Class: MyPoints

MyPoints~MyPoints(arrayFuncs, groupopt, settingsopt)

Creating the new THREE.Points and adding it into group. Extends MyObject.

Constructor

new MyPoints(arrayFuncs, groupopt, settingsopt)

Creating the new THREE.Points and adding it into group.
Parameters:
Name Type Attributes Default Description
arrayFuncs array points.geometry.attributes.position array. See arrayFuncs parametr of the Player.getPoints(...) for details.
group THREE.Group <optional>
Group for new points. Default is three.scene
settings object <optional>
{} the following settings are available
Properties
Name Type Attributes Default Description
options object | Options <optional>
new Options() the following options are available. See the options parameter of the MyThree class.
Properties
Name Type Attributes Default Description
point Object <optional>
point options. See Options.point for details.
scales.w object <optional>
followed w axis scale params is available
Properties
Name Type Attributes Default Description
min object <optional>
0 Minimal range of the color palette.
max object <optional>
1 Maximal range of the color palette.
palette object <optional>
new ColorPicker.palette();//palette: ColorPicker.paletteIndexes.BGYW See ColorPicker.palette.
Example:
new ColorPicker.palette( { palette: ColorPicker.paletteIndexes.bidirectional } );
guiSelectPoint GuiSelectPoint <optional>
A dat.gui based graphical user interface for select a point from the mesh. See GuiSelectPoint for details.
raycaster object <optional>
Followed raycaster options is available.
Properties
Name Type Attributes Description
addParticle function <optional>
Callback function that take as input the new THREE.Points. Add new particle into array of objects to check for intersection with the ray. See THREE.Raycaster.intersectObject for details.
removeParticle function <optional>
Callback function that take as input the new THREE.Points. Remove particle from array of objects to check for intersection with the ray. See THREE.Raycaster.intersectObject for details.
pointsOptions object <optional>
{} followed points options is availablee:
Properties
Name Type Attributes Default Description
frustumPoints FrustumPoints <optional>
Include this points into array of points with cloud. See FrustumPoints.
tMin number <optional>
0 start time. Uses for playing of the points..
name string <optional>
"" Name of the points. Used for displaying of items of the Select drop down control of the Meshes folder of the dat.gui.
shaderMaterial object | boolean <optional>
creates the THREE.Points with THREE.ShaderMaterial material. The size of the each point of the THREE.Points seems the same on canvas because I reduce the size of the points closest to the camera and increase the size of the points farthest to the camera.

false - no shaderMaterial.

Properties
Name Type Attributes Description
point object <optional>
Properties
Name Type Attributes Description
size number <optional>
point size.
position THREE.Vector3 <optional>
new THREE.Vector3( 0, 0, 0 ) position of the points.
Vector's x, y, z is position of the points.
Can be as:
float - position of the points.
[float] - array of positions of the points.
Function - position of the points is function of the t. Example:
	new Function( 't', 'return 0.1 + t' )
Example:
colors Array <optional>
Array of colors for the each vertex.
Every vertex is associated with 3 values of the colors array.
Each value of the colors array is red or green or blue color of the particular vertex in range from 0 to 1.

0 is no color.
1 is full color.

For example:
settings.object.geometry.colors: [
	1, 0, 0,//red color of the position[0] vertex.
	0, 1, 0,//green color of the position[1] vertex.
	0, 0, 1,//blue color of the position[2] vertex.
	1, 1, 1,//white color of the position[3] vertex.
],
Have effect only if arrayFuncs points are not THREE.Vector4 type. See arrayFuncs parametr of the Player.getPoints(...) for details.
color String | number <optional>
'lime' color of points.
String - color name. See list of available color names in the _colorKeywords object in the Color.js file.
number - color Hex triplet. Example: 0x0000ff - blue color.
Have effect only if settings.pointsOptions.colors are not defined.
opacity boolean | array <optional>
boolean -
	If true then opacity of the point is depend from distance to all meshes points from the group with defined mesh.userData.cloud.
	See optionsColor.opacity parameter of the Player.getColors(...)ions.getColors for details.
array -
	Array of opacities of each position of the points.
	Each item of array is float value in the range of 0.0 - 1.0 indicating how transparent the material is.
	A value of 0.0 indicates fully transparent, 1.0 is fully opaque.
scale THREE.Vector3 <optional>
new THREE.Vector3( 1, 1, 1 ) scale of the points.
Vector's x, y, z is scale of the points.
Can be as:
float - scale of the points.
[float] - array of scales of the points.
Function - scale of the points is function of the t. Example:
	new Function( 't', 'return 1.1 + t' )
Example: new THREE.Vector3 ( new Function( 't', 'return 1 + t' ), 1, 1)
rotation THREE.Vector3 <optional>
new THREE.Vector3( 0, 0, 0 ) rotation of the points.
Vector's x, y, z is rotation of the points.
Can be as:
float - rotation of the points.
[float] - array of rotations of the points.
Function - rotation of the points is function of the t. Example:
	new Function( 't', 'return Math.PI / 2 + t * Math.PI * 2' )
Example: new THREE.Vector3 ( new Function( 't', 'return Math.PI / 2 + t * Math.PI * 2' ), 0, 0)
onReady function <optional>
Callback function that take as input the new THREE.Points. Fires after creating of the points.
function( points )
	points - Points.
	Call the points.userData.opacity(opacity) function if you want to change the opacity of the points.
		The opacity parameter is float in the range of 0.0 - 1.0 indicating how transparent the points is.
		A value of 0.0 indicates fully transparent, 1.0 is fully opaque.
raycaster object <optional>
Followed raycaster options is available.
Properties
Name Type Attributes Description
onIntersection function <optional>
Callback function that take as input the intersectObject , and mouse position. Fires after intersection of the mouse pointer with a point.
onIntersectionOut function <optional>
Callback function. Fires if mouse pointer leaves of intersection with the point.
onMouseDown function <optional>
Callback function that take as input the intersectObject . User has clicked over point.
elements object <optional>
Followed elements can display on the web page
Properties
Name Type Attributes Description
pointsName HTMLElement | string <optional>
Display of the settings.pointsOptions.name on the web page.
HTMLElement - element for displaying.
string - id of the element.
Source:

Extends

  • MyObject