|
@@ -130,7 +130,7 @@
|
|
} else if ( type === 6 ) {
|
|
} else if ( type === 6 ) {
|
|
|
|
|
|
const points = [ 0, 0, 0, 100, 0, 0, 100, 100, 0, 0, 100, 0 ];
|
|
const points = [ 0, 0, 0, 100, 0, 0, 100, 100, 0, 0, 100, 0 ];
|
|
- const colors = [ 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0 ];
|
|
|
|
|
|
+ const colors = [ 0.5, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0.5, 0 ];
|
|
|
|
|
|
const geometry = new THREE.BufferGeometry();
|
|
const geometry = new THREE.BufferGeometry();
|
|
geometry.setAttribute( 'position', new THREE.Float32BufferAttribute( points, 3 ) );
|
|
geometry.setAttribute( 'position', new THREE.Float32BufferAttribute( points, 3 ) );
|
|
@@ -149,6 +149,7 @@
|
|
function init() {
|
|
function init() {
|
|
|
|
|
|
renderer = new THREE.WebGLRenderer();
|
|
renderer = new THREE.WebGLRenderer();
|
|
|
|
+ renderer.outputEncoding = THREE.sRGBEncoding;
|
|
renderer.setPixelRatio( window.devicePixelRatio );
|
|
renderer.setPixelRatio( window.devicePixelRatio );
|
|
renderer.setSize( window.innerWidth, window.innerHeight );
|
|
renderer.setSize( window.innerWidth, window.innerHeight );
|
|
document.body.appendChild( renderer.domElement );
|
|
document.body.appendChild( renderer.domElement );
|