Gets the disposed status of the entity.
The disposed status.
An array of the elements that this component instance exposes. In the case that this component does not expose any elements of its own, this will be an array of the elements exposed by this component's children.
Returns true if this component, or any of its parents, are marked as locked.
Gets a behavior of a specific type from the component.
The type of behavior to get.
The behavior of the specified type, or undefined if no such behavior exists.
Gets all behaviors of a specific type from the component.
The type of behaviors to get.
An array of behaviors of the specified type.
Get the instance of the ZComponent that constructed this entity.
If you pass the class of a ZComponent as the type parameter, this function will ensure that it
returns an instance of that ZComponent. If this component or behavior was constructed by a different
ZComponent class, or by a different entity altogether, the function with throw an error.
Optionaltype: ConstructorForComponent<T>The ZComponent class that you are expecting to receive
The instance of the ZComponent that constructed this component or behavior
Register a function to be called when an Event is fired, or an Observable's value changes. The function will only be bound to the underlying Event or Observable while this entity is enabled.
Using this function, rather than attaching your handler directly to the Event or Observable, ensures your handler is automatically released when this entity is disposed.
Rest...args: ArgsOptionaloptions: RegisterOptionsOptionaloptions: RegisterOptionsReadonlytagsAn array of string 'tags' assocated with this component.
The getComponentsByTag(mgr, tag) function can be used to get an array of components
with the supplied tag.
By default, tags are scoped to the ZComponent instance that a component is constructed by.
Tags that begin with global: are scoped to the experience as a whole.
A layer clip to play when the component is not in placement mode.
A layer clip to play when the component enters placement mode.
ReadonlyenabledIf false, this entity and its children will no longer participate in the experience.
Note - to read this value, you may wish to use enabledResolved which will be false if
this entity, or any of its parents, have enabled set to false.
The precise implications of enabled being false will vary between entities,
but in general disabled entities:
ReadonlybehaviorsThe behaviors attached to this component.
ReadonlychildrenThe children of this component.
ReadonlycontextOptionalelementThe raw element(s) that this component exposes
ReadonlyenabledThis will have value false if this entity, or any of its parents, have enabled set to false.
To change the enabled status of this entity, use the enabled property instead.
The precise implications of enabled being false will vary between entities,
but in general disabled entities:
Disabled entities will typically remain visible (if they have a visible appearance).
OptionallockedIf true, this component can't be selected at design time in the 3D preview.
ReadonlyonAn event that is fired as the last act of this entity being destroyed.
OptionalparentThe parent of this component.
For devices with multiple controllers, this property determines which controller will be used by the user to choose a location - either the left-hand or right-hand controller. If no matching controller is found, the component will use the first input source reported by the device, or the user's gaze if none are reported.
If this property is set true, the component will disregard any surfaces that are not the floor as
possible locations for the user to choose.
If true (the default), the component will enter placement mode again if device has lost its
ability to track the user's environment.
If true (the default), other controller events, such as pointer events and button presses, will be
suppressed during placement mode. This is to prevent any conflicts with scene interaction while the
user is choosing the location of the content.
Allow the use of a controller to choose a location. Otherwise the user's viewing direction will be used.
This component allows the user to choose where the origin of the scene appears in their environment. This is particularly useful for AR experiences where the content is contained within a small area, such product visualization, as it gives the user the flexibility to choose where to view the content in their room.
By default the component uses the pointing direction of a hardware controller (if present), or the user's gaze, to determine potential locations for the scene during placement mode. The user can confirm a location by pressing their device's select button - either the trigger button on the controller, or the screen itself.
Some devices and hardware can detect surfaces in the user's environment, and this component will utilise these when determining suitable locations for placement. Alternaively the
forceGroundPlaneproperty can be used to ensure that placement occurs on the floor.The
restartPlacement()function can be used to enter placement mode again after the user has chosen a location.Zicon
my_location
Zparents
three/Object3D/Group/**