new Drawable() → {Drawable}

Description
Creates a drawable and initializes id
Returns

Members


id :String

Description
Unique identification string

geometry :Geometry

Description
Geometry
Details

collisionGeometry :GKCollisionGeo

Description
Geometry that is used for collision detection & raycasting
Details

material :ShaderMaterial

Description
ShaderMaterial
Details

rayCast :boolean

Description
Is drawable able to be rayCast to?

isInteractive :boolean

Description
Is drawable able to be interacted with?

isSelectable :boolean

Description
Is drawable able to be selected?

isHoverable :boolean

Description
Is drawable able to be hovered?

shouldDraw :boolean

Description
Should the object draw to screen?

isReady: :boolean

Description
Gets isReady status

translation :Array

Description
[x,y,z] vector of translation

rotation :Array

Description
Rotation vector [x,y,z]

Methods


setInteractive( interactive, selectable, hoverable )

Description
Sets interativity of the drawable
Parameters
Name Type Description
interactive boolean set interactive
selectable boolean set selection
hoverable boolean set hoverable

update( sceneProps )

Description
Update shader material uniforms
Parameters
Name Type Description
sceneProps Object object of scene props as uniforms