Camera
商品説明
このコンポーネントにより、ユーザーはエンティティを通して世界を見ることができる。
プロパティ一覧
ワールド・エフェクト
Property | Type | 初期値 | 商品説明 |
---|---|---|---|
scale | ストリング | 'responsive' | レスポンシブ」か「アブソリュート」のどちらかだ。 responsiveは、フレーム1のカメラがXR8.XrController.updateCameraProjectionMatrix()で定義された原点になるように値を返します。 absoluteはカメラ、イメージターゲットなどをメートル単位で返す。 absoluteを使用する場合、スケールが推定されると、開始ポーズのx-position、z-position、rotationは、XR8.XrController.updateCameraProjectionMatrix()で設定されたパラメータに従います。 y-positionは、カメラの接地面からの物理的な高さに依存します。 |
フェイス・エフェクト
Property | Type | 初期値 | 商品説明 |
---|---|---|---|
ニアクリップ | 番号 | 0.1 | ニアクリップ平面のカメラからの距離、すなわち、シーンオブジェクトが見えるカメラからの最も近い距離です。 |
ファークリップ | 番号 | 1000 | ファークリップ平面のカメラからの距離、すなわち、シーンオブジェクトが見えるカメラからの最も遠い距離です。 |
顔 | ブーリアン | true | 顔メッシュのジオメトリを表示するかどうか。 |
アイズ | ブーリアン | false | アイメッシュのジオメトリを表示するかどうか。 |
アイリス | ブーリアン | false | アイリスメッシュのジオメトリを表示するかどうか。 |
口 | ブーリアン | false | 口のメッシュ形状を表示するかどうか。 |
maxDetections | 番号 | 1 | 検出する顔の最大数を指定します。 選択できるのは、1、2、3のいずれかです。 |
イネーブル・イヤーズ | ブーリアン | false | trueの場合、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)