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.
The ID of a layer clip to play when this controller is not being tracked by the hardware.
The ID of a layer clip to play when this controller is being tracked by the hardware.
Determines if this object casts shadows.
Determines if this object receives shadows.
Determines if this object and its children are rendered to the screen.
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.
ReadonlycontextThe device model to simulate in the 3D view at design time. Note that this has no influence at runtime where the model will be automatically determined from the underlying device/hardware.
The THREE.Group object that represents this component.
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).
If the device is able to update a controller's rotation, but not its position in 3D space. This can happen when a controller is out of sight of the tracking hardware of a device but sensor data (e.g. from the gyroscope) is still available.
true if the device is currently able to track this controller in space.
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.
The position, in 3D space, of this node relative to its parent. The three elements of the array correspond to the x, y, and z components of position.
The rotation, in three dimensions, of this node relative to its parent. The three elements of the array correspond to Euler angles - yaw, pitch and roll.
The scale, in three dimensions, of this node relative to its parent. The three elements of the array correspond to scales in the the x, y, and z axis.
For hand inputs without grip space, emulate grip space from the joints of the hand.
If true, the controller model and any children of this node will be have visible set to false if the controller tracking is lost.
If this array contains any items, only inputs with a profile in this list can be bound to this component.
Any inputs with profiles in this list will be ignored by this component.
If true, any loaded 3D model representing this controller will be shown.
If true, XRManagers will ignore the input device bound to this component for the purposes of pointer emulation.
This component represents an input controller for an XR experience. Depending on the device being used, this may be a physical controller that the user holds in their hand, the user's hands themselves, or even a 'simulated' controller when the user taps on the screen.
If you're building an experience from scratch, you may wish to use one of the XRRig components - they constitute a pre-defined setup that includes instances of this component.
This component will 'bind' to an underlying input device depending on the values of its 'allow*' properties. These properties make it possible to limit this component to handling only input devices that match a specific set of constraints, such as only left-hand or right-hand controllers. This facilitates experiences where the user may hold a tool in one hand and a menu of options in the other, for example.
3D objects added as children of this component will be 'tracked' to the controller. There are two supported spaces for children: grip space, where the origin appears in a location corresponding to the user 'holding' the object; and target ray space, where the -Z axis is aligned with the direction that the controller is pointing. You can choose which space is used with the
spaceparameter.By default, the XRManager will emulate pointers for the input devices reported by the underlying hardware, allowing users to point and click on objects using the controllers. In some instances you may wish a specific controller not have an emulated pointer - for example if the user is holding an object or tool with that controller - and you can do this by setting the
suppressPointerEmulationof this node totrue.This component will emit events for the various button presses and touches that underlying XR inputs and controllers expose. Note that not all devices feature all the available buttons. In general, however, most physical controllers have at least a trigger button. For more information see: https://www.w3.org/TR/webxr-gamepads-module-1/
Sometimes a device will lose track of a controller - if it's out of view, for example, or if its battery dies. By default, this component will hide the content within it when this happens, and show it again if/when tracking resumes. You can control this behavior using the
hideWhenTrackingLostproperty. You may wish to use theonTrackingandonNotTrackingevents, or thetrackingLayerClipandnotTrackingLayerClipproperties to further customize the user experience in these cases.Zicon
google_tv_remote
Ztag
three/Object3D/Group/XRController
Zparents
three/Object3D/Group/**