You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// A class that places cubes on each position in the 'positions' array, given through the update function. Useful for quick visualizations of 3D positions.
487
+
// VisualizePoints() : VisualizePoints object
488
+
// A class that places a mesh on each point in the given array. Useful for quick visualization of 3D points in your scene.
489
+
// For a one-liner, you can pass the array of points as the first optional argument when creating a VisualizePoints(<points>) instance.
489
490
//
490
-
// Example, showing all properties
491
-
//
492
-
// var v = new VisualizePositions() // create VisualizePositions instance
493
-
// v.scale // (optional) the scale of the cubes (world size, default is 1)
494
-
// v.rotation // (optional) the rotation of the cubes (if continuousRotationis set to false)
495
-
// v.continuousRotation // (optional) make the cubes rotate around local up, clockwise (boolean, default is true)
496
-
// v.material // (optional) the material of the cubes (Asset.Material)
497
-
// v.showPositions( [vec3 Array] ) // show cubes on the given positions (array), returns the array of created SceneObjects for further customization
498
-
// v.getPositions() // returns currently visualized positions
499
-
// v.remove() // clear all created visualizations
491
+
// Points can be defined in 3 ways: positions (vec3), Objects ({position:vec3, rotation:quat, scale:vec3}), or transformation matrices (mat4)
// var positions = [new vec3(0, 0, 0), new vec3(1, 0, 0)] // some world positions to visualize
504
-
// new VisualizePositions().showPositions(positions)
498
+
// var v = new VisualizePoints(points)) // create instance ('points' argument is optional, this will invoke .show(points) right away)
499
+
// v.parent // (optional) SceneObject to parent the points to (default is LSQS' SceneObject)
500
+
// v.scale // (optional) scale multiplier for the mesh when created (vec3)
501
+
// v.material // (optional) the material on the mesh (Asset.Material)
502
+
// v.mesh // (optional) the mesh to show on each point (Asset.RenderMesh, default is a unit box)
503
+
// v.maxCount // (optional) maximum amount of points to show, starts cutting off indices at 0 (default is null for unlimited)
504
+
// v.show(points) // show an array of points (see different ways to define a point below), returns the array of created SceneObjects for further customization
505
+
// v.getTransforms() // get all objects' transform components (<Transform> array)
0 commit comments