useCameraEntity
@3dverse/livelink-react v0.2.32
@3dverse/livelink-react / useCameraEntity
Function: useCameraEntity()
useCameraEntity(
props
,watchedComponents
):object
Defined in: livelink.react/sources/hooks/useCameraEntity.ts:97
A hook that creates a camera entity.
Parameters
props
The properties used to create the camera entity.
perspective_lens
Partial
<PerspectiveLens
>
The perspective lens of the camera entity, can't be used with orthographic_lens.
orthographic_lens
Partial
<OrthographicLens
>
The orthographic lens of the camera entity, can't be used with perspective_lens.
renderGraphRef
UUID
The render graph to use within the camera entity.
settings
RenderGraphDataObject
The settings of the camera entity.
renderTargetIndex
number
The render target index to use to render the frame.
orientation
Quat
The initial orientation of the camera entity in quaternion form, can't be used with eulerOrientation.
eulerOrientation
Vec3
The initial orientation of the camera entity in Euler angles form, can't be used with orientation.
name
string
The name of the camera entity.
position
Vec3
The initial position of the camera entity.
watchedComponents
The components to watch for changes. If any component in this list changes, the entity trigger a redraw. If set to "any", the entity will trigger a redraw on any component change.
keyof ComponentsRecord
[] | "any"
Returns
object
The camera entity and a boolean indicating if the entity is pending creation.
isPending
isPending:
boolean
cameraEntity
cameraEntity:
Entity
|null