javascript - Add Attribute to Three.js Object -
i want maintain information shapes i'm creating. use html canvas texture, know can keep values in element attributes arrays of canvases. i'm wondering though, there more straight-forward way of maintaining attributes works three.js shapes regardless of how constructed?
the advantage (or problem) javascript, can objects. can add, or delete attributes as want time.
thus, can add every property want 3 objects giving value :
mythreeobject.myproperty = myvalue ;
be careful though, if haven't assigned value property, property not exist (yet), thus, don't forget check if value exist before reading :
if( "undefined" !== typeof mythreeobject.myproperty ) // ...
Comments
Post a Comment