メインコンテンツへスキップ

Camera

商品説明

このコンポーネントにより、ユーザーはエンティティを通して世界を見ることができる。

プロパティ一覧

ワールド・エフェクト

PropertyType初期値商品説明
scaleストリング'responsive'レスポンシブ」か「アブソリュート」のどちらかだ。 responsiveは、フレーム1のカメラがXR8.XrController.updateCameraProjectionMatrix()で定義された原点になるように値を返します。 absoluteはカメラ、イメージターゲットなどをメートル単位で返す。 absoluteを使用する場合、スケールが推定されると、開始ポーズのx-position、z-position、rotationは、XR8.XrController.updateCameraProjectionMatrix()で設定されたパラメータに従います。 y-positionは、カメラの接地面からの物理的な高さに依存します。

フェイス・エフェクト

PropertyType初期値商品説明
ニアクリップ番号0.1ニアクリップ平面のカメラからの距離、すなわち、シーンオブジェクトが見えるカメラからの最も近い距離です。
ファークリップ番号1000ファークリップ平面のカメラからの距離、すなわち、シーンオブジェクトが見えるカメラからの最も遠い距離です。
ブーリアンtrue顔メッシュのジオメトリを表示するかどうか。
アイズブーリアンfalseアイメッシュのジオメトリを表示するかどうか。
アイリスブーリアンfalseアイリスメッシュのジオメトリを表示するかどうか。
ブーリアンfalse口のメッシュ形状を表示するかどうか。
maxDetections番号1検出する顔の最大数を指定します。 選択できるのは、1、2、3のいずれかです。
イネーブル・イヤーズブーリアンfalsetrueの場合、Face Effectsと同時に耳検出を実行し、耳の取り付けポイントを返します。

関数一覧

Get

Returns a read-only reference.

Example

ecs.Camera.get(world, component.eid)

Set

Ensures the component exists on the entity, then assigns the (optional) data to the component.

Example

ecs.Camera.set(world, component.eid, {
scale: 'responsive',
nearClip: 0.1,
farClip: 1000,
Face: true,
Eyes: false,
Iris: false,
Mouth: false,
maxDetections: 1,
enableEars: false
})

Mutate

Perform an update to the component within a callback function. Return true to indicate no changes made.

Example

ecs.Camera.mutate(world, component.eid, (cursor) => {
cursor.scale = 'absolute';
cursor.nearClip = 0.5;
return false;
})

Remove

Removes the component from the entity.

Example

ecs.Camera.remove(world, component.eid)

Has

Returns true if the component is present on the entity.

Example

ecs.Camera.has(world, component.eid)

Reset

Adds, or resets the component to its default state.

Example

ecs.Camera.reset(world, component.eid)

Advanced Functions

Cursor

Returns a mutable reference. Cursors are reused so only one cursor for each component can exist at a time.

Example
ecs.Camera.cursor(world, component.eid)

Acquire

Same behavior as cursor, but commit must be called after the cursor is done being used.

Example
ecs.Camera.acquire(world, component.eid)

Commit

Called after acquire. An optional third argument determines whether the cursor was mutated or not.

Example
ecs.Camera.commit(world, component.eid)
ecs.Camera.commit(world, component.eid, false)

Dirty

Mark the entity as having been mutated. Only needed in a specific case where systems are mutating data.

Example
ecs.Camera.dirty(world, component.eid)