three-csg-ts
Advanced tools
Comparing version 3.1.4 to 3.1.5
@@ -103,5 +103,7 @@ "use strict"; | ||
normals.write(pvs[j - 1].normal); | ||
uvs.write(pvs[0].uv); | ||
uvs.write(pvs[j - 2].uv); | ||
uvs.write(pvs[j - 1].uv); | ||
if (uvs) { | ||
uvs.write(pvs[0].uv); | ||
uvs.write(pvs[j - 2].uv); | ||
uvs.write(pvs[j - 1].uv); | ||
} | ||
if (colors) { | ||
@@ -116,3 +118,3 @@ colors.write(pvs[0].color); | ||
geom.setAttribute('normal', new three_1.BufferAttribute(normals.array, 3)); | ||
geom.setAttribute('uv', new three_1.BufferAttribute(uvs.array, 2)); | ||
uvs && geom.setAttribute('uv', new three_1.BufferAttribute(uvs.array, 2)); | ||
colors && geom.setAttribute('color', new three_1.BufferAttribute(colors.array, 3)); | ||
@@ -119,0 +121,0 @@ for (let gi = 0; gi < grps.length; gi++) { |
@@ -100,5 +100,7 @@ import { BufferAttribute, BufferGeometry, Matrix3, Matrix4, Mesh, Vector3, } from 'three'; | ||
normals.write(pvs[j - 1].normal); | ||
uvs.write(pvs[0].uv); | ||
uvs.write(pvs[j - 2].uv); | ||
uvs.write(pvs[j - 1].uv); | ||
if (uvs) { | ||
uvs.write(pvs[0].uv); | ||
uvs.write(pvs[j - 2].uv); | ||
uvs.write(pvs[j - 1].uv); | ||
} | ||
if (colors) { | ||
@@ -113,3 +115,3 @@ colors.write(pvs[0].color); | ||
geom.setAttribute('normal', new BufferAttribute(normals.array, 3)); | ||
geom.setAttribute('uv', new BufferAttribute(uvs.array, 2)); | ||
uvs && geom.setAttribute('uv', new BufferAttribute(uvs.array, 2)); | ||
colors && geom.setAttribute('color', new BufferAttribute(colors.array, 3)); | ||
@@ -116,0 +118,0 @@ for (let gi = 0; gi < grps.length; gi++) { |
{ | ||
"name": "three-csg-ts", | ||
"version": "3.1.4", | ||
"version": "3.1.5", | ||
"description": "CSG library for use with THREE.js", | ||
@@ -39,3 +39,3 @@ "main": "lib/cjs/index.js", | ||
"@types/node": "^14.14.45", | ||
"@types/three": "^0.129.1", | ||
"@types/three": "^0.130.0", | ||
"@typescript-eslint/eslint-plugin": "^4.23.0", | ||
@@ -53,3 +53,3 @@ "@typescript-eslint/parser": "^4.23.0", | ||
"standard-version": "^9.3.0", | ||
"three": "^0.129.0", | ||
"three": "^0.130.1", | ||
"ts-jest": "^27.0.3", | ||
@@ -56,0 +56,0 @@ "ts-loader": "^9.2.3", |
55872
1471