Skip to content

THREE.Instances #5171

@mrdoob

Description

@mrdoob

I've been toying with this API recently.

var mesh = new THREE.Mesh( geometry, material );

var instances = new THREE.Instances( mesh );
instances.objects.push(
    new THREE.Object3D().setPosition( 1, 1, 1 ).setRotation( 0, 1, 0 ),
    new THREE.Object3D().setPosition( 2, 2, 2 ),
    new THREE.Object3D().setPosition( 3, 3, 3 ).setScale( 2, 1, 1 )
);
scene.add( instances );

Based on ANGLE_instanced_arrays. (~50%)

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions