Methods
# setRenderObject(renderObject)
Adds a three.js render object to the pawn. The render object will have its transform automatically updated when the pawn moves.
Parameters:
Name | Type | Description |
---|---|---|
renderObject |
Object | A three.js render object. |
Example
this.geometry = new THREE.BoxGeometry( 1, 1, 1 );
this.material = new THREE.MeshStandardMaterial();
const cube = new THREE.Mesh( this.geometry, this.material );
this.setRenderObject(cube);