多面体幾何学
商品説明
このコンポーネントは、エンティティのジオメトリを確立する。
プロパティ一覧
Property | Type | 初期値 | 商品説明 |
---|---|---|---|
radius | 番号 | 1 | 正四面体の半径。 |
関数一覧
Get
Returns a read-only reference.
Example
ecs.PolyhedronGeometry.get(world, component.eid)
Set
Ensures the component exists on the entity, then assigns the (optional) data to the component.
Example
ecs.PolyhedronGeometry.set(world, component.eid, {
radius: 1
})
Mutate
Perform an update to the component within a callback function. Return true
to indicate no changes made.
Example
ecs.PolyhedronGeometry.mutate(world, component.eid, (cursor) => {
cursor.radius += 1;
return false;
})
Remove
Removes the component from the entity.
Example
ecs.PolyhedronGeometry.remove(world, component.eid)