pub struct Points {
pub geometry: Rc<BufferGeometry>,
pub material: Option<MeshBasicNodeMaterial>,
pub count: Option<usize>,
}Expand description
The state Points adds to Object3D: geometry and material, plus the
non-standard count the compute examples set.
Fields§
§geometry: Rc<BufferGeometry>Points.geometry.
material: Option<MeshBasicNodeMaterial>Points.material.
count: Option<usize>mesh.count, which is not a Points property in three.js. The
renderer picks it up anyway: RenderObject.getInstanceCount()
(src/renderers/common/RenderObject.js:623-627) is
instanced geometry ? … : object.count !== undefined ? max( 0, object.count ) : 1,
so webgpu_compute_points’ mesh.count = 300000 on a one-vertex
geometry becomes draw( 1, 300000, 0, 0 ). Reproduced deliberately —
see docs/rung12-progress.md.
Implementations§
Source§impl Points
impl Points
Sourcepub fn new(
geometry: Rc<BufferGeometry>,
material: MeshBasicNodeMaterial,
) -> ObjectRef
pub fn new( geometry: Rc<BufferGeometry>, material: MeshBasicNodeMaterial, ) -> ObjectRef
new Points( geometry, material ).
Sourcepub fn raycast(
&self,
matrix_world: &Matrix4,
scale: &Vector3,
object: &ObjectRef,
raycaster: &Raycaster,
intersects: &mut Vec<Intersection>,
)
pub fn raycast( &self, matrix_world: &Matrix4, scale: &Vector3, object: &ObjectRef, raycaster: &Raycaster, intersects: &mut Vec<Intersection>, )
Points.raycast( raycaster, intersects ) — every point within
raycaster.params.points.threshold of the ray. scale is the node’s
local scale, which three.js divides the threshold by.