Add a 3D primitive.
string, ( r )
The scriptable name for this molecule. This name can be set using rename function dynamically.
getUV(point, face, index);
Given a point in space and the mesh’s face where the point lies, this function returns the UV coordinate of the indexed UV set.
point | (object) a point in space. (e.g as returned by Camera Molecule.rayCastSelect.) |
face | (object) a face on the mesh. (e.g as returned by Camera Molecule.rayCastSelect.) |
index | (int) index of a UV coordinate set. Default to 0. |
N/A
setMaterialName(name, submesh_index);
Sets the material of this mesh.
name | (string) an unique name of the material. (e.g. ‘materialName’, ‘materialMoleculeName.materialName’, ‘dropletName.materialMoleculeName.materialName’, or ‘app.dropletName.materialMoleculeName.materialName’). |
submesh_index | (int) optional. If this mesh is made of multiple sub-meshes each with different material. You can set each sub-mesh’s material by its index. |
N/A
setDepthMaterialName(name);
Sets the depth material of this mesh.
name | (string) an unique name of the material. (e.g. ‘materialName’, ‘materialMoleculeName.materialName’, ‘dropletName.materialMoleculeName.materialName’, or ‘app.dropletName.materialMoleculeName.materialName’). |
N/A
shatterBake(fragment_count, callback); shatterBake(fragment_count, force_direction, center_offset, entry_diameter, exit_diameter, callback);
Initiate the baking process for generating Voronoi fragments in a worker thread.
fragment_count | (int) the number of fragments to be generated. |
force_direction | (object) the direction of impact force in Vector3. |
center_offset | (object) the offset of the impact point from the mesh’s geometric center. |
entry_diameter | (int) the size of the entry point. |
exit_diameter | (int) the size of the exit point. |
callback | (function) a function for receiving the notification of process completion. |
N/A
pauseSound(end_time);
Pause the sound playback at the given end_time. Use playSound to resume.
end_time | (float) place in sound track to pause the playback in seconds. |
N/A
stopSound(end_time);
Stop the sound playback at the given end_time. Calling playSound again will start from time 0.
end_time | (float) place in sound track to stop the playback in seconds. |
N/A