Class: RandomVertices

HyperSphere~RandomVertices(scene, options, randomVerticesSettingsopt)

Random vertices

Constructor

new RandomVertices(scene, options, randomVerticesSettingsopt)

Random vertices
Parameters:
Name Type Attributes Default Description
scene THREE.Group group of objects to which a new random vertices object will be added.
options Options See Options.
randomVerticesSettings object <optional>
{} The following settings are available.
Properties
Name Type Attributes Default Description
R number <optional>
1 Hypersphere radius.
np number <optional>
36 numPoints. Number of vertices on a circle.
name number <optional>
'' Name of random vertices.
params object <optional>
{} The following parameters are available.
Properties
Name Type Attributes Default Description
vertice Array <optional>
[0, 0, 0] First vertice of the arc between two vertices.
oppositeVertice Array <optional>
[0, 0, 0] Second vertice of the arc between two vertices.
random boolean <optional>
true random arrangement of circles vertices.
onChangeRandom function <optional>
Callback function is called when the randomVerticesSettings.params.random has changed.
parameter random: new value of the randomVerticesSettings.params.random.
onePoint boolean <optional>
false true - получить одну случайную точку не вычисляя остальные случайные точки.
onChangeOnePoint function <optional>
Callback function is called when the randomVerticesSettings.params.onePoint has changed.
parameter onePoint: new value of the randomVerticesSettings.params.onePoint.
onePointArray boolean <optional>
false true - array of the one points.
onChangeOnePointArray function <optional>
Callback function is called when the randomVerticesSettings.params.onePointArray has changed.
parameter onePointArray: new value of the randomVerticesSettings.params.onePointArray.
debug boolean | object <optional>
false Debug mode.
	false - No debug mode.
	true or object- Diagnoses your code and display detected errors to console.
Properties
Name Type Attributes Description
oneCircles object <optional>
View circles only around the opposite vertice. We skip the circles inside and outside the opposite vertice. This is necessary so that we can see the circles better. NOTE! Have effect for 3D hypersperes only.
Properties
Name Type Attributes Description
altitudeShift float <optional>
Shift of the altitude of the points of the circle with the maximum diameter. The shift of the altitude of the points of the circle with the smaller diameter gradually decreases to zero for the circle located at the opposite vertice.
Source:

Methods

changeCirclesPoints(paramsNew)

Сall this method for the randomVerticesSettings.params.arc change to take effect.
Parameters:
Name Type Description
paramsNew Object See paramsNew of the createOnePointArray method for details.
Source:

createOnePointArray(paramsNew)

Creates an array of the random points from one random point.
Parameters:
Name Type Description
paramsNew Object See randomVerticesSettings.params of the constructor for details. You can set vertice and oppositeVertice parameters instead arc and center. See below:
Properties
Name Type Attributes Description
vertice Array <optional>
First vertice of the arc.
oppositeVertice Array <optional>
Second vertice of the arc.
Source:
Returns:
HyperSphere, what contains created points array.

onChangeOnePoint(paramsNew)

Сall this method for the randomVerticesSettings.params.onePoint change to take effect or if randomVerticesSettings.params.onePointArray was changed to false.
Parameters:
Name Type Description
paramsNew Object See randomVerticesSettings.params of the constructor for details.
Source:

onChangeRandom()

Сall this method for the randomVerticesSettings.params.random change to take effect.
Source:

(static) params(params)

Sets a RandomVertices parameters.
Parameters:
Name Type Description
params object See RandomVertices constructor randomVerticesSettings.params parameter for details.
Source: