Class: Object3DBox

Object3DBox

A 3D object box in the map

new Object3DBox (json, datas)

Name Type Description
json Object Json object describing the object 3D custom
datas SystemObject3D The system object 3D
Properties:
Name Type Description
Object3DBox.VERTICES Array.<THREE.Vector3> A box local vertices
Object3DBox.NB_VERTICES Array.<THREE.Vector3> A number of vertices
Object3DBox.TEXTURES Array.<Array.<number>> A textures values
Object3DBox.TEXTURES_VALUES Array.<number> The textures coordinates values
Object3DBox.INDEXES Array.<number> The texture indexes
id number The ID
datas SystemObject3D The system object 3D

Extends

Methods

read (json, datas) overrides

Read the JSON associated to the object 3D box
Name Type Description
json Object Json object describing the object 3D box
datas SystemObject3D The system object 3D

updateGeometry (geometry, position, count)Array.<any>

Update the geometry of a group of object 3D with the same material
Name Type Description
geometry THREE.Geometry Geometry of the object 3D
position Array.<number> The position of object 3D
count number The faces count
Returns:
Type Description
Array.<any>

scale (vecA, vecB, vecC, vecD, center, position, size, kind) inherited overrides

Scale the vertices correctly
Name Type Description
vecA THREE.Vector3 The A vertex to rotate
vecB THREE.Vector3 The B vertex to rotate
vecC THREE.Vector3 The C vertex to rotate
vecD THREE.Vector3 The D vertex to rotate
center THREE.Vector3 The center to rotate around
position Array.<number> The json position
size THREE.Vector3 The scale size
kind ElementMapKind The element map kind