RenderModel

new RenderModel(json)

Render object3D component model store data to render an object3D (in an external context), a render controller should be implemented to use it

Parameters:
NameTypeDescription
jsonobject

json to configure render model

Properties
NameTypeAttributesDefaultDescription
uuidstring

uuid render model

idRenderDatastring<optional>

id of render data (could be an id link to gltf, obj file)

colorArray.<number><optional>
[1,1,1,1]

[r,g,b,a] format color

Members

color :Array.<number>

color to apply to the 3D model

Type:
  • Array.<number>

idRenderData :string

id of render data

Type:
  • string

Methods

getColor() → {Array.<number>}

Returns:
  • render model color rgba
Type: 
Array.<number>

getIdRenderData() → {string}

Returns:
  • script model id render data
Type: 
string

setColor(color)

Parameters:
NameTypeDescription
colorArray.<number>

new color of render model

setIdRenderData(value)

Parameters:
NameTypeDescription
valuestring

new id render data of render model

toJSON() → {object}

Returns:
  • export render model to json object
Type: 
object