|
@@ -65,11 +65,10 @@
|
|
controls.update();
|
|
controls.update();
|
|
|
|
|
|
const floorGeometry = new THREE.PlaneGeometry( 6, 6 );
|
|
const floorGeometry = new THREE.PlaneGeometry( 6, 6 );
|
|
- const floorMaterial = new THREE.ShadowMaterial( { opacity: 0.25 } );
|
|
|
|
|
|
+ const floorMaterial = new THREE.ShadowMaterial( { opacity: 0.25, blending: THREE.CustomBlending, transparent: false } );
|
|
const floor = new THREE.Mesh( floorGeometry, floorMaterial );
|
|
const floor = new THREE.Mesh( floorGeometry, floorMaterial );
|
|
floor.rotation.x = - Math.PI / 2;
|
|
floor.rotation.x = - Math.PI / 2;
|
|
floor.receiveShadow = true;
|
|
floor.receiveShadow = true;
|
|
- floor.renderOrder = 2;
|
|
|
|
scene.add( floor );
|
|
scene.add( floor );
|
|
|
|
|
|
scene.add( new THREE.HemisphereLight( 0x808080, 0x606060 ) );
|
|
scene.add( new THREE.HemisphereLight( 0x808080, 0x606060 ) );
|
|
@@ -134,11 +133,6 @@
|
|
|
|
|
|
document.body.appendChild( XRButton.createButton( renderer ) );
|
|
document.body.appendChild( XRButton.createButton( renderer ) );
|
|
|
|
|
|
- // clipping
|
|
|
|
-
|
|
|
|
- const floorClipping = new THREE.Plane( new THREE.Vector3( 0, 1, 0 ) );
|
|
|
|
- renderer.clippingPlanes = [ floorClipping ];
|
|
|
|
-
|
|
|
|
// controllers
|
|
// controllers
|
|
|
|
|
|
controller1 = renderer.xr.getController( 0 );
|
|
controller1 = renderer.xr.getController( 0 );
|