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

world

Description

This library includes properties and functions related to the World.

Properties

PropertyTypeDescription
allEntitiesSetSet of all scene entities.

Functions

createEntity

Create a new entity.

world.createEntity() // -> eid

deleteEntity

Delete an existing entity.

world.deleteEntity(eid) // -> void

getChildren

Get children of an entity.

world.getChildren(eid) // -> Generator<Eid>

getParent

Get the parent of an entity.

world.getParent(eid) // -> eid

setParent

Set the parent of an entity.

world.setParent(eid, parent: eid) // -> void

getWorldTransform

Get the world transform of an entity. Copies the worldTransform of the target into the second parameter.

world.getWorldTransform(eid, transform: Mat4) // -> void

setTransform

Set transform of an entity.

world.setPosition(eid, transform: Mat4) // -> void

setPosition

Set position of an entity.

world.setPosition(eid, x: number, y: number, z: number) // -> void

setQuaternion

Set rotation of an entity.

world.setQuaternion(eid, x: number, y: number, z: number, w: number) // -> void

setScale

Set scale of an entity.

world.setScale(eid, x: number, y: number, z: number) // -> void

normalizeQuaternion

Normalizes an entity's quaternion.

world.normalizeQuaternion(eid) // -> void