Class: ComponentBase
Defined in: src/components/ComponentBase.ts:25
Components are used to attach functionality to object3D, it has an owner object3D. The component can receive update events at each frame.
Every component is automatically discoverable by type from any RenderGraphPass — or any other system that calls ComponentCollect.collectByTypeLayered — without having to route through RenderNode. Registration into the per-View type-keyed registry is driven directly from the enable/disable call sites (set enable, __start, __stop), so subclasses can freely override onEnable / onDisable without needing a super call to keep the registry in sync.
Extended by
BillboardComponentColliderComponentDecalComponentMirrorComponentSceneCaptureCameraComponentSkeletonAnimationComponentTransformAnimatorComponentPropertyAnimationMorphTargetBlenderFlyCameraControllerHoverCameraControllerOrbitControllerPostProcessingComponentGlobalIlluminationComponentCamera3DTransformControllerBaseComponent
Implements
Constructors
Constructor
new ComponentBase():
ComponentBase
Returns
ComponentBase
Properties
object3D
object3D:
Object3D=null
Defined in: src/components/ComponentBase.ts:29
owner object3D
Implementation of
isDestroyed
isDestroyed:
boolean=false
Defined in: src/components/ComponentBase.ts:77
Implementation of
Accessors
visibleLayer
Get Signature
get visibleLayer():
number
Defined in: src/components/ComponentBase.ts:46
Composition-layer membership bitmask. The pass / camera / collector filters via
(component.visibleLayer & pass.layerMask & camera.cullingMask) !== 0
Defaults to VisibleLayer.Default (bit 0) so a fresh subclass is visible to passes whose layerMask is VisibleLayer.All (which includes bit 0). Application code can assign project-specific bits (1..31) to organise the scene into composition layers.
Returns
number
Set Signature
set visibleLayer(
value):void
Defined in: src/components/ComponentBase.ts:50
Parameters
value
number
Returns
void
eventDispatcher
Get Signature
get eventDispatcher():
CEventDispatcher
Defined in: src/components/ComponentBase.ts:63
Returns
Set Signature
set eventDispatcher(
value):void
Defined in: src/components/ComponentBase.ts:68
Parameters
value
Returns
void
Implementation of
isStart
Get Signature
get isStart():
boolean
Defined in: src/components/ComponentBase.ts:79
Returns
boolean
transform
Get Signature
get transform():
Transform
Defined in: src/components/ComponentBase.ts:89
Return the Transform component attached to the Object3D. Null before the component is attached — addComponent assigns object3D only after construction — so constructor-time callers can probe safely via this.transform?..
Returns
Implementation of
enable
Get Signature
get enable():
boolean
Defined in: src/components/ComponentBase.ts:113
Enable/disable components. The enabled components can be updated, while the disabled components cannot be updated.
Returns
boolean
Set Signature
set enable(
value):void
Defined in: src/components/ComponentBase.ts:96
Enable/disable components. The enabled components can be updated, while the disabled components cannot be updated.
Parameters
value
boolean
Returns
void
Implementation of
Methods
init()
init(
param?):void
Defined in: src/components/ComponentBase.ts:161
Parameters
param?
any
Returns
void
Implementation of
start()
start():
void
Defined in: src/components/ComponentBase.ts:162
Returns
void
Implementation of
stop()
stop():
void
Defined in: src/components/ComponentBase.ts:163
Returns
void
Implementation of
onEnable()?
optionalonEnable(view?):any
Defined in: src/components/ComponentBase.ts:164
Parameters
view?
Returns
any
Implementation of
onDisable()?
optionalonDisable(view?):any
Defined in: src/components/ComponentBase.ts:165
Parameters
view?
Returns
any
Implementation of
onUpdate()?
optionalonUpdate(view?):any
Defined in: src/components/ComponentBase.ts:166
Parameters
view?
Returns
any
Implementation of
onLateUpdate()?
optionalonLateUpdate(view?):any
Defined in: src/components/ComponentBase.ts:167
Parameters
view?
Returns
any
Implementation of
onBeforeUpdate()?
optionalonBeforeUpdate(view?):any
Defined in: src/components/ComponentBase.ts:168
Parameters
view?
Returns
any
Implementation of
onCompute()?
optionalonCompute(view?,command?):any
Defined in: src/components/ComponentBase.ts:169
Parameters
view?
command?
GPUCommandEncoder
Returns
any
Implementation of
onGraphic()?
optionalonGraphic(view?):any
Defined in: src/components/ComponentBase.ts:170
Parameters
view?
Returns
any
Implementation of
onParentChange()?
optionalonParentChange(lastParent?,currentParent?):any
Defined in: src/components/ComponentBase.ts:171
Parameters
lastParent?
currentParent?
Returns
any
Implementation of
onAddChild()?
optionalonAddChild(child):any
Defined in: src/components/ComponentBase.ts:172
Parameters
child
Returns
any
Implementation of
onRemoveChild()?
optionalonRemoveChild(child):any
Defined in: src/components/ComponentBase.ts:173
Parameters
child
Returns
any
Implementation of
cloneTo()
cloneTo(
obj):void
Defined in: src/components/ComponentBase.ts:180
clone component data to target object3D
Parameters
obj
target object3D
Returns
void
Implementation of
copyComponent()
copyComponent(
from):this
Defined in: src/components/ComponentBase.ts:182
Parameters
from
this
Returns
this
beforeDestroy()
beforeDestroy(
force?):void
Defined in: src/components/ComponentBase.ts:249
before release this component, object refrences are not be set null now.
Parameters
force?
boolean
Returns
void
Implementation of
destroy()
destroy(
force?):void
Defined in: src/components/ComponentBase.ts:256
release this component
Parameters
force?
boolean
Returns
void

