Constructor
new HyperSphere(options, classSettingsopt)
Base class for n dimensional hypersphere.
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Options | See Options. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
classSettings |
object |
<optional> |
HyperSphere class settings.
Properties
|
- Source:
Extends
- MyObject
Members
angles
get hyper sphere angles. See classSettings.settings.object.geometry.angles parameter of the hyperSphere constructor.
- Source:
defaultColor
get default color is 'lime'
- Source:
(static) ND
- Source:
(static) edgesCreationMethod
Enums a methods for creating edges:
Random: every vertice of the edge have random position. NearestVertice: Vertices of the edge have nearest position.
- Source:
Methods
Test()
Writes a console error, if any vertices angle is out of the angles range. Normalizes a vertices angle to available range, if out of the angles range is occures. Writes a console error, if identifier of any edge of the vertices is incorrect.
- Source:
TestVertice(vertice, strVerticeId)
Writes a console error, if vertice edges count is incorrect.
Parameters:
Name | Type | Description |
---|---|---|
vertice |
object | vertice for testing |
strVerticeId |
string | name of the vertice Id |
- Source:
angles2Vertice(anglesId, timeId)
Converts a vertice angles to vertice position.
Parameters:
Name | Type | Description |
---|---|---|
anglesId |
number | array | number: vertice id array: array of the vertice angles |
timeId |
number | player time id |
- Source:
Returns:
Vertice position.
logHyperSphere()
Writes to console an important information about hyper sphere, that can help you for debugging.
- Source:
name()
Base method that returns a name of the hyper sphere in the child classes.
- Source:
Returns:
a console error if your call this method directly.
normalizeVerticeAngles(verticeAngles)
Normalizes a vertices angles to available range, if out of the angles range is occures.
Parameters:
Name | Type | Description |
---|---|---|
verticeAngles |
array | vertice angles |
- Source:
Returns:
Normalized a vertices angles.
project(scene, paramsopt)
Projects the hypersphere onto the canvas
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
scene |
THREE.Scene | THREE.Scene | ||||||||||||||||||||||||||||||||
params |
object |
<optional> |
{} | The following parameters are available
Properties
|
- Source:
pushRandomLongitude(verticeAngles)
Push random longitude into vertice angles
Parameters:
Name | Type | Description |
---|---|---|
verticeAngles |
array | vertice angles |
- Source:
vertice2angles(vertice)
Converts a vertice position to vertice angles.
Parameters:
Name | Type | Description |
---|---|---|
vertice |
array | array of the vertice axes |
- Source:
Returns:
Vertice angles.