ReflectionProbeComponent class Lighting and environment
A Component that captures the scene's lighting at its node into a local EnvironmentMap and feeds it to nearby reflections with parallax-corrected sampling.
The probe's box (half-size extents, centered on the node's world position) plays two roles: it is the influence volume the camera blends the probe in over (full inside, fading across blendDistance outside), and it is the parallax proxy reflections intersect so they track the captured surfaces instead of floating at infinity. Size it to the room or area the probe represents. The box is world-axis-aligned; the node's rotation is ignored.
The capture renders the scene's linear HDR lighting from the box center into a cubemap (six faces at faceResolution) and prefilters it through the same machinery as any other environment. It happens once when the probe first renders (captureOnActivate) and again on requestCapture; there is no automatic re-capture, so moving geometry is not tracked.
Constructors
Properties
- blendDistance ↔ double
-
World-space fade band outside the box over which the probe's influence
falls from full to zero.
0is a hard edge.getter/setter pair - captureOnActivate ↔ bool
-
Whether the probe captures automatically before its first rendered
frame. With this false, nothing renders from the probe until
requestCapture.
getter/setter pair
- capturePending → bool
-
Whether a capture will run before the next frame renders.
no setter
- enabled ↔ bool
-
Whether this component's update hook runs each frame.
getter/setter pairinherited
- environment → EnvironmentMap?
-
The captured local environment, or null before the first capture
completes. Carries the parallax box in
EnvironmentMap.parallaxBoxCenter/EnvironmentMap.parallaxBoxHalfExtents.
no setter
- extents ↔ Vector3
-
World-space half-size of the probe's box (influence volume and
parallax proxy).
getter/setter pair
- faceResolution ↔ int
-
Resolution of each captured cube face, in pixels.
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
-
Cross-fade order against environment volumes and other probes; higher
applies later (on top). Defaults above the volume default so a probe
wins inside its box.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- weight ↔ double
-
Master contribution scale,
0..1.getter/setter pair - worldCenter → Vector3
-
World-space center of the probe box (the owning node's position).
no setter
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 -
The probe's coverage at
cameraPosition,1inside the box fading to0across blendDistance outside (before weight). -
fixedUpdate(
double fixedDt) → void -
Called once per fixed physics step while the component is mounted,
enabled, and loaded.
fixedDtis 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
-
requestCapture(
) → void - Schedules a fresh capture before the next frame renders, replacing the previous one when it completes.
-
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.
deltaSecondsis the elapsed time since the previous tick. A traversal visits each component at most once. Removing this component or an earlier sibling is safe. A component inserted before the current traversal position starts on the next frame. Reordering component or child lists during traversal is unsupported.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited