Update three.js.

This commit is contained in:
kovacsv 2021-11-26 16:17:59 +01:00
parent b1ddc0e719
commit d97f13ebd8
3 changed files with 9 additions and 5 deletions

2
libs/three.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -968,7 +968,7 @@
geometry.setIndex( new THREE.BufferAttribute( meshData[ 'triangles' ], 1 ) );
geometry.setAttribute( 'position', new THREE.BufferAttribute( meshData[ 'vertices' ], 3 ) );
const material = new THREE.MeshPhongMaterial( {
color: 0xaaaaff,
color: 0xffffff,
flatShading: true
} );
const mesh = new THREE.Mesh( geometry, material );

View File

@ -1887,6 +1887,7 @@
}
return {
curves: p.curves,
points: points,
isCW: THREE.ShapeUtils.isClockWise( points ),
identifier: identifier ++,
@ -1904,12 +1905,15 @@
if ( ! amIAHole.isHole ) {
const shape = new THREE.Shape( p.points );
const shape = new THREE.Shape();
shape.curves = p.curves;
const holes = isAHole.filter( h => h.isHole && h.for === p.identifier );
holes.forEach( h => {
const path = simplePaths[ h.identifier ];
shape.holes.push( new THREE.Path( path.points ) );
const hole = simplePaths[ h.identifier ];
const path = new THREE.Path();
path.curves = hole.curves;
shape.holes.push( path );
} );
shapesToReturn.push( shape );