|
@@ -39,7 +39,6 @@
|
|
const options = {
|
|
const options = {
|
|
trs: params.trs,
|
|
trs: params.trs,
|
|
onlyVisible: params.onlyVisible,
|
|
onlyVisible: params.onlyVisible,
|
|
- truncateDrawRange: params.truncateDrawRange,
|
|
|
|
binary: params.binary,
|
|
binary: params.binary,
|
|
maxTextureSize: params.maxTextureSize
|
|
maxTextureSize: params.maxTextureSize
|
|
};
|
|
};
|
|
@@ -105,7 +104,6 @@
|
|
const params = {
|
|
const params = {
|
|
trs: false,
|
|
trs: false,
|
|
onlyVisible: true,
|
|
onlyVisible: true,
|
|
- truncateDrawRange: true,
|
|
|
|
binary: false,
|
|
binary: false,
|
|
maxTextureSize: 4096,
|
|
maxTextureSize: 4096,
|
|
exportScene1: exportScene1,
|
|
exportScene1: exportScene1,
|
|
@@ -345,44 +343,6 @@
|
|
|
|
|
|
scene1.add( object );
|
|
scene1.add( object );
|
|
|
|
|
|
- // ---------------------------------------------------------------------
|
|
|
|
- // Buffer geometry truncated (DrawRange)
|
|
|
|
- // ---------------------------------------------------------------------
|
|
|
|
- geometry = new THREE.BufferGeometry();
|
|
|
|
- const numElements = 6;
|
|
|
|
- const outOfRange = 3;
|
|
|
|
-
|
|
|
|
- positions = new Float32Array( ( numElements + outOfRange ) * 3 );
|
|
|
|
- const colors = new Float32Array( ( numElements + outOfRange ) * 3 );
|
|
|
|
-
|
|
|
|
- positions.set( [
|
|
|
|
- 0, 0, 0,
|
|
|
|
- 0, 80, 0,
|
|
|
|
- 80, 0, 0,
|
|
|
|
- 80, 0, 0,
|
|
|
|
- 0, 80, 0,
|
|
|
|
- 80, 80, 0
|
|
|
|
- ] );
|
|
|
|
-
|
|
|
|
- colors.set( [
|
|
|
|
- 1, 0, 0,
|
|
|
|
- 1, 0, 0,
|
|
|
|
- 1, 1, 0,
|
|
|
|
- 1, 1, 0,
|
|
|
|
- 0, 0, 1,
|
|
|
|
- 0, 0, 1,
|
|
|
|
- ] );
|
|
|
|
-
|
|
|
|
- geometry.setAttribute( 'position', new THREE.BufferAttribute( positions, 3 ) );
|
|
|
|
- geometry.setAttribute( 'color', new THREE.BufferAttribute( colors, 3 ) );
|
|
|
|
- geometry.setDrawRange( 0, numElements );
|
|
|
|
-
|
|
|
|
- object = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { side: THREE.DoubleSide, vertexColors: true } ) );
|
|
|
|
- object.name = 'Custom buffered truncated';
|
|
|
|
- object.position.set( 140, - 40, - 200 );
|
|
|
|
-
|
|
|
|
- scene1.add( object );
|
|
|
|
-
|
|
|
|
// ---------------------------------------------------------------------
|
|
// ---------------------------------------------------------------------
|
|
// THREE.Points
|
|
// THREE.Points
|
|
// ---------------------------------------------------------------------
|
|
// ---------------------------------------------------------------------
|
|
@@ -462,7 +422,7 @@
|
|
|
|
|
|
waltHead = obj;
|
|
waltHead = obj;
|
|
waltHead.scale.multiplyScalar( 1.5 );
|
|
waltHead.scale.multiplyScalar( 1.5 );
|
|
- waltHead.position.set( 400, 0, 0 );
|
|
|
|
|
|
+ waltHead.position.set( 200, - 40, - 200 );
|
|
scene1.add( waltHead );
|
|
scene1.add( waltHead );
|
|
|
|
|
|
} );
|
|
} );
|
|
@@ -495,7 +455,6 @@
|
|
let h = gui.addFolder( 'Settings' );
|
|
let h = gui.addFolder( 'Settings' );
|
|
h.add( params, 'trs' ).name( 'Use TRS' );
|
|
h.add( params, 'trs' ).name( 'Use TRS' );
|
|
h.add( params, 'onlyVisible' ).name( 'Only Visible Objects' );
|
|
h.add( params, 'onlyVisible' ).name( 'Only Visible Objects' );
|
|
- h.add( params, 'truncateDrawRange' ).name( 'Truncate Draw Range' );
|
|
|
|
h.add( params, 'binary' ).name( 'Binary (GLB)' );
|
|
h.add( params, 'binary' ).name( 'Binary (GLB)' );
|
|
h.add( params, 'maxTextureSize', 2, 8192 ).name( 'Max Texture Size' ).step( 1 );
|
|
h.add( params, 'maxTextureSize', 2, 8192 ).name( 'Max Texture Size' ).step( 1 );
|
|
|
|
|