{
const base = "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/models/ply/"
const loader = new THREE.PLYLoader();
loader.load( base + "ascii/dolphins.ply", function ( geometry ) {
geometry.computeVertexNormals();
var material = new THREE.MeshStandardMaterial( { color: 0x0055ff, flatShading: true } );
var mesh = new THREE.Mesh( geometry, material );
mesh.position.y = - 0.2;
mesh.position.z = 0.3;
mesh.rotation.x = - Math.PI / 2;
mesh.scale.multiplyScalar( 0.001 );
mesh.castShadow = true;
mesh.receiveShadow = true;
scene.add( mesh );
});
loader.load( base + "binary/Lucy100k.ply", function ( geometry ) {
geometry.computeVertexNormals();
var material = new THREE.MeshStandardMaterial( { color: 0x0055ff, flatShading: true } );
var mesh = new THREE.Mesh( geometry, material );
mesh.position.x = - 0.2;
mesh.position.y = - 0.02;
mesh.position.z = - 0.2;
mesh.scale.multiplyScalar( 0.0006 );
mesh.castShadow = true;
mesh.receiveShadow = true;
scene.add( mesh );
});
}