EnvironmentVolumeComponent class Lighting and environment

A Component that contributes a spatial environment volume: a region whose look (settings) overrides the scene environment, blended by camera position so the environment transitions as the camera moves between areas.

The region is defined in the owning node's local space (a shape sized by extents or radius), so the node transform places, orients, and scales it. Coverage is 1 inside and fades to 0 across blendDistance (in the node's local units) outside the surface, scaled by weight; overlapping volumes apply in priority order. While mounted, the component registers with the scene so the renderer folds it into the environment blend.

Inheritance

Constructors

EnvironmentVolumeComponent({required EnvironmentSettings settings, EnvironmentVolumeShape shape = EnvironmentVolumeShape.box, Vector3? extents, double radius = 5.0, double blendDistance = 1.0, double priority = 0.0, double weight = 1.0})
Creates a volume contributing settings over the region described by shape/extents/radius.

Properties

blendDistance double
Local-space fade band outside the region over which the contribution falls from full to zero. 0 is a hard edge.
getter/setter pair
enabled bool
Whether this component's update hook runs each frame.
getter/setter pairinherited
extents ↔ Vector3
Box half-size in local space (used when shape is EnvironmentVolumeShape.box).
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isAttached bool
Whether this component is currently attached to a node.
no setterinherited
isLoaded bool
Whether onLoad has completed.
no setterinherited
isMounted bool
Whether the owning node is part of a live scene graph.
no setterinherited
node Node
The node this component is attached to.
no setterinherited
priority double
Blend order; higher priority volumes are applied later (on top).
getter/setter pair
radius double
Sphere radius in local space (used when shape is EnvironmentVolumeShape.sphere).
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
settings EnvironmentSettings
The look this volume blends toward where it is in effect.
getter/setter pair
shape EnvironmentVolumeShape
The region shape.
getter/setter pair
weight double
Master contribution scale, 0..1.
getter/setter pair

Methods

cloneFor(Node cloneOwner) Component?
Returns a copy of this component for cloneOwner, the Node.clone counterpart of the owning node, or null to not carry the component to clones (the default).
inherited
coverage(Vector3 cameraPosition) double
This volume's coverage at world-space cameraPosition, 0..1 (before weight). Transforms the camera into the node's local space and tests the local region, so the node transform (including rotation and scale) shapes the volume.
fixedUpdate(double fixedDt) → void
Called once per fixed physics step while the component is mounted, enabled, and loaded. fixedDt is the fixed timestep of the surrounding PhysicsWorld, not the frame interval.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onAttach() → void
Called when this component is added to a node.
inherited
onDetach() → void
Called when this component is removed from a node.
inherited
onLoad() Future<void>
Optional asynchronous setup, such as loading an asset.
inherited
onMount() → void
Called when the owning node enters a live scene graph.
override
onUnmount() → void
Called when the owning node leaves a live scene graph.
override
toString() String
A string representation of this object.
inherited
update(double deltaSeconds) → void
Called once per frame while the component is mounted, enabled, and loaded. deltaSeconds is the elapsed time since the previous tick.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited