Class: SystemObject3D

SystemObject3D

A 3D object of the game

new SystemObject3D (json)

Name Type Description
json Object optional Json object describing the object 3D
Properties:
Name Type Description
id number The ID
shapeKind ShapeKind The shape kind
objID number The .obj ID
mtlID number The .mtl ID
collisionKind ObjectCollisionKind The object collision kind
collisionCustomID number The custom collision ID
scale number The scale
widthSquare number The square width
widthPixel number The pixel width
heightSquare number The square height
heightPixel number The pixel height
depthSquare number The square depth
depthPixel number The pixel depth
stretch boolean Indicate if the texture is stretch

Extends

Methods

read (json) overrides

Read the JSON associated to the object 3D
Name Type Description
json Object Json object describing the object 3D

widthPixels ()number

Get the width in pixels
Returns:
Type Description
number

heightPixels ()number

Get the height in pixels
Returns:
Type Description
number

depthPixels ()number

Get the depth in pixels
Returns:
Type Description
number

width ()number

Get the width in squares
Returns:
Type Description
number

height ()number

Get the height in squares
Returns:
Type Description
number

depth ()number

Get the depth in squares
Returns:
Type Description
number

getSizeVector ()THREE.Vector3

Get the size vector
Returns:
Type Description
THREE.Vector3

getObj ()SystemShape

Get the shape obj
Returns:
Type Description
SystemShape