create
Creates a new object with the specified properties.
Syntax
engine.objects.create(type, props);
Parameters
Name | Type | Description |
---|---|---|
type | ObjectType | The object type |
props | CreateObjectProps | The object props |
Returns
ObjectManager
- The created object manager.
Example
const box = engine.objects.create('box', {
color: 'red',
width: 1,
height: 1,
depth: 1,
position: [1, 2, 3],
});
Available on: Client Server