クォータニオン
説明
このコンポーネントは、エンティティの回 転方法を制御する。
プロパティ
プロパティ | タイプ | デフォルト | 説明 |
---|---|---|---|
x | 番号 | 0 | x座標 |
y | 番号 | 0 | y座標 |
z | 番号 | 0 | z座標 |
w | 番号 | 0 | W座標 |
機能
Get
Returns a read-only reference.
Example
ecs.Quaternion.get(world, component.eid)
Set
Ensures the component exists on the entity, then assigns the (optional) data to the component.
Example
ecs.Quaternion.set(world, component.eid, {
x: 0,
y: 0,
z: 0,
w: 0
})