new Glyphset() → {Glyphset}
This is a container of Glyph and their graphical properties
including transformations, colors, number of time steps, duration of animations
and group name. Please note that all glyphs in the glyphset share the same geometry
however they may have different transformations.
- Source:
Returns:
- Type
- Glyphset
Methods
addCustomGlyph(Glyph)
Parameters:
Name | Type | Description |
---|---|---|
Glyph |
Glyph | to be added. |
- Source:
addMeshAsGlyph(Mesh, id)
Add a THREE.Mesh object to be displayed as glyph in this Glyphset.
Parameters:
Name | Type | Description |
---|---|---|
Mesh |
THREE.Mesh | to be added. |
id |
Number | of the mesh. |
- Source:
dispose()
Clear this glyphset and its list of glyphs which will release them from the memory.
- Source:
forEachGlyph(callbackFunction)
A function which iterates through the list of glyphs and call the callback
function with the glyph as the argument.
Parameters:
Name | Type | Description |
---|---|---|
callbackFunction |
function | Callback function with the glyph as an argument. |
- Source:
getBoundingBox() → {Three.Box3}
Get the bounding box for the whole set of glyphs.
- Source:
Returns:
;
- Type
- Three.Box3
getClosestVertex()
Get the closest vertex to centroid.
- Source:
getClosestVertexIndex()
Get the index of the closest vertex to centroid.
- Source:
getCurrentTime() → {Number}
Get the current inbuild time of the
- Source:
Returns:
- Type
- Number
isTimeVarying() → {Boolean}
Check if the glyphset is time varying.
- Source:
Returns:
- Type
- Boolean
load(glyphsetData, glyphURL, finishCallback)
Copy glyphset data into this glyphset then load the glyph's geoemtry
with the provided glyphURL. FinishCallback will be called once
glyph is loaded.
Parameters:
Name | Type | Description |
---|---|---|
glyphsetData |
Array | contains the informations about the glyphs. |
glyphURL |
String | URL to the geometry which will be applied to all all the glyphs in the glyphset once loaded. |
finishCallback |
function | User's function to be called once glyph's geometry is loaded. |
- Source:
render()
Update the glyphsets if required the render.
- Source:
setMorphTime(time)
Set the local time of this glyphset.
Parameters:
Name | Type | Description |
---|---|---|
time |
Number | Can be any value between 0 to duration. |
- Source:
showLabel()
Display the label of the glyphs in the glyphset.
- Source:
(inner) createGlyphs(displayLabels)
Create the glyphs in the glyphset.
Parameters:
Name | Type | Description |
---|---|---|
displayLabels |
Boolean | Flag to determine either the labels should be display or not. |
- Source:
(inner) resolve_glyph_axes() → {Array}
Calculate the actual transformation value that can be applied
to the transformation matrix.
- Source:
Returns:
- Type
- Array
(inner) updateGlyphsetHexColors()
Update colour for each of the glyph in this glyphset.
- Source:
(inner) updateGlyphsetTransformation()
Update transformation for each of the glyph in this glyphset.
- Source:
(inner) updateMorphGlyphsets()
Update the current states of the glyphs in this glyphset, this includes transformation and
colour for each of them. This is called when glyphset and glyphs are initialised and whenever
the internal time has been updated.
- Source: