Function: useCameraEntity()
function useCameraEntity(
props:
| ({
name?: string;
position?: Vec3;
} & {
orientation?: Quat;
} & Partial<Record<"eulerOrientation", never>> & {
perspective_lens?: Partial<PerspectiveLens>;
} & Partial<Record<"orthographic_lens", never>> & {
renderGraphRef?: UUID;
settings?: RenderGraphDataObject;
renderTargetIndex?: number;
})
| ({
name?: string;
position?: Vec3;
} & {
orientation?: Quat;
} & Partial<Record<"eulerOrientation", never>> & {
orthographic_lens?: Partial<OrthographicLens>;
} & Partial<Record<"perspective_lens", never>> & {
renderGraphRef?: UUID;
settings?: RenderGraphDataObject;
renderTargetIndex?: number;
})
| ({
name?: string;
position?: Vec3;
} & {
eulerOrientation?: Vec3;
} & Partial<Record<"orientation", never>> & {
perspective_lens?: Partial<PerspectiveLens>;
} & Partial<Record<"orthographic_lens", never>> & {
renderGraphRef?: UUID;
settings?: RenderGraphDataObject;
renderTargetIndex?: number;
})
| ({
name?: string;
position?: Vec3;
} & {
eulerOrientation?: Vec3;
} & Partial<Record<"orientation", never>> & {
orthographic_lens?: Partial<OrthographicLens>;
} & Partial<Record<"perspective_lens", never>> & {
renderGraphRef?: UUID;
settings?: RenderGraphDataObject;
renderTargetIndex?: number;
}),
): {
isPending: boolean;
cameraEntity: Entity | null;
};
Defined in: livelink.react/sources/hooks/useCameraEntity.ts:134
A hook that creates a camera entity.
Parameters
| Parameter | Type | Description |
|---|---|---|
props | | { name?: string; position?: Vec3; } & { orientation?: Quat; } & Partial<Record<"eulerOrientation", never>> & { perspective_lens?: Partial<PerspectiveLens>; } & Partial<Record<"orthographic_lens", never>> & { renderGraphRef?: UUID; settings?: RenderGraphDataObject; renderTargetIndex?: number; } | { name?: string; position?: Vec3; } & { orientation?: Quat; } & Partial<Record<"eulerOrientation", never>> & { orthographic_lens?: Partial<OrthographicLens>; } & Partial<Record<"perspective_lens", never>> & { renderGraphRef?: UUID; settings?: RenderGraphDataObject; renderTargetIndex?: number; } | { name?: string; position?: Vec3; } & { eulerOrientation?: Vec3; } & Partial<Record<"orientation", never>> & { perspective_lens?: Partial<PerspectiveLens>; } & Partial<Record<"orthographic_lens", never>> & { renderGraphRef?: UUID; settings?: RenderGraphDataObject; renderTargetIndex?: number; } | { name?: string; position?: Vec3; } & { eulerOrientation?: Vec3; } & Partial<Record<"orientation", never>> & { orthographic_lens?: Partial<OrthographicLens>; } & Partial<Record<"perspective_lens", never>> & { renderGraphRef?: UUID; settings?: RenderGraphDataObject; renderTargetIndex?: number; } | The properties used to create the camera entity. Once created, the camera entity will persist with this properties until the component using this hook is unmounted. When the component is unmounted, the camera entity is deleted from the scene. |
Returns
{
isPending: boolean;
cameraEntity: Entity | null;
}
The camera entity and a boolean indicating if the entity is pending creation.
| Name | Type |
|---|---|
isPending | boolean |
cameraEntity | Entity | null |