zincjs 1.10.1 → 1.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/zinc.frontend.js +1 -1
- package/build/zinc.js +2 -2
- package/build/zinc.js.map +1 -1
- package/package.json +1 -1
- package/src/three/Geometry.js +5 -3
package/build/zinc.js
CHANGED
|
@@ -32,7 +32,7 @@ module.exports = require("url-polyfill");
|
|
|
32
32
|
/***/ ((module) => {
|
|
33
33
|
|
|
34
34
|
"use strict";
|
|
35
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"zincjs","version":"1.10.
|
|
35
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"zincjs","version":"1.10.2","description":"ZincJS (Web-based-Zinc-Visualisation)","main":"build/zinc.js","directories":{"doc":"docs"},"files":["package.json","LICENSE","README.md","src/*","build/zinc.js","build/zinc.frontend.js","build/zinc.js.map","webpack.config.js"],"scripts":{"build-bundle":"webpack --config webpack.frontend.js; webpack --config webpack.backend.js","build-backend":"webpack --config webpack.backend.js","test":"npm --prefix ./test install && npm --prefix ./test run test-ci","changelog":"auto-changelog -p --output CHANGELOG.md --template keepachangelog","jsdoc":"jsdoc -c jsdoc_conf.json","version":"npm run build-bundle;npm run jsdoc;npm run changelog; git add CHANGELOG.md docs","release:beta":"npm version prerelease --preid=beta; npm publish --tag beta","release:minor":"npm version minor; npm publish","release:patch":"npm version patch; npm publish"},"repository":{"type":"git","url":"git+https://github.com/alan-wu/ZincJS.git"},"keywords":["library","webgl","3d","zincjs"],"author":"Alan Wu <alan.wu@auckland.ac.nz>","license":"MIT","bugs":{"url":"https://github.com/alan-wu/ZincJS/issues"},"homepage":"http://alan-wu.github.io/ZincJS/","devDependencies":{"@babel/core":"^7.23.9","@babel/preset-env":"^7.23.9","auto-changelog":"^2.4.0","babel-loader":"^9.1.3","babel-preset-minify":"^0.5.1","file-loader":"^6.2.0","jsdoc":"^4.0.2","raw-loader":"^4.0.2","webpack":"^5.90.3","webpack-cli":"^5.1.4","webpack-node-externals":"^3.0.0"},"dependencies":{"css-element-queries":"^1.2.2","lodash":"^4.17.19","promise-polyfill":"^8.1.3","three":"^0.130.1","three-spritetext":"1.6.2","url-loader":"^4.1.1","url-polyfill":"^1.1.7","webworkify-webpack":"^2.1.5"}}');
|
|
36
36
|
|
|
37
37
|
/***/ }),
|
|
38
38
|
/* 3 */
|
|
@@ -139,7 +139,7 @@ tmpGeo.vertices=this.morphTargets[_i5].vertices,tmpGeo.computeFaceNormals();var
|
|
|
139
139
|
for(var _f4=0,_fl4=this.faces.length;_f4<_fl4;_f4++){var _face3=this.faces[_f4],_faceNormal=morphNormals.faceNormals[_f4],_vertexNormals2=morphNormals.vertexNormals[_f4];_faceNormal.copy(_face3.normal),_vertexNormals2.a.copy(_face3.vertexNormals[0]),_vertexNormals2.b.copy(_face3.vertexNormals[1]),_vertexNormals2.c.copy(_face3.vertexNormals[2])}}// restore original normals
|
|
140
140
|
for(var _face4,_f5=0,_fl5=this.faces.length;_f5<_fl5;_f5++)_face4=this.faces[_f5],_face4.normal=_face4.__originalFaceNormal,_face4.vertexNormals=_face4.__originalVertexNormals;this.morphNormalsReady=!0},computeBoundingBox:function computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new three__WEBPACK_IMPORTED_MODULE_0__.Box3),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new three__WEBPACK_IMPORTED_MODULE_0__.Sphere),this.boundingSphere.setFromPoints(this.vertices)},mergeMorph:function mergeMorph(geometry,matrix){var m=this.morphTargets.length,morphTargets1=this.morphTargets,morphTargets2=geometry.morphTargets,n=this.morphColors.length,morphColors1=this.morphColors,morphColors2=geometry.morphColors;if(0<m&&m==morphTargets2.length)for(var i=0,l=morphTargets1.length;i<l;i++){for(var morphTarget1=morphTargets1[i],morphTarget2=morphTargets2[i],k=0,kl=morphTarget2.vertices.length;k<kl;k++){var vertex=morphTarget2.vertices[k],vertexCopy=vertex.clone();void 0!==matrix&&vertexCopy.applyMatrix4(matrix),morphTarget1.vertices.push(vertexCopy)}if(morphTarget1.normals&&morphTarget2.normals)for(var _k=0;_k<morphTarget2.normals.length;_k+=3)_temp.set(morphTarget2.normals2[_k],morphTarget2.normals2[_k+1],morphTarget2.normals2[_k+2]),void 0!==matrix&&_temp.applyMatrix4(matrix),morphTarget1.normals.push(_temp.x,_temp.y,_temp.z)}if(0<n&&n==morphColors2.length)for(var _i6=0,_l=morphColors1.length;_i6<_l;_i6++)for(var morphColor1=morphColors1[_i6],morphColor2=morphColors2[_i6],_k2=0,_kl=morphColor2.colors;_k2<_kl;_k2++)morphColor1.colors.push(morphColor2.colors[_k2].clone())},merge:function merge(geometry,matrix){var materialIndexOffset=2<arguments.length&&arguments[2]!==void 0?arguments[2]:0;if(!(geometry&&geometry.isGeometry))return void console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",geometry);var normalMatrix,vertexOffset=this.vertices.length,vertices1=this.vertices,vertices2=geometry.vertices,normals2=geometry.normals,faces1=this.faces,faces2=geometry.faces,colors1=this.colors,colors2=geometry.colors;matrix!==void 0&&(normalMatrix=new three__WEBPACK_IMPORTED_MODULE_0__.Matrix3().getNormalMatrix(matrix));// vertices
|
|
141
141
|
for(var i=0,il=vertices2.length;i<il;i++){var vertex=vertices2[i],vertexCopy=vertex.clone();matrix!==void 0&&vertexCopy.applyMatrix4(matrix),vertices1.push(vertexCopy)}for(var _i7=0;_i7<normals2.length;_i7+=3)_temp.set(normals2[_i7],normals2[_i7+1],normals2[_i7+2]),void 0!==matrix&&_temp.applyMatrix4(matrix),this.normals.push(_temp.x,_temp.y,_temp.z);// colors
|
|
142
|
-
for(var _i8=0,_il3=colors2.length;_i8<_il3;_i8++)colors1.push(colors2[_i8].clone());// faces
|
|
142
|
+
for(var _i8=0,_il3=colors2.length;_i8<_il3;_i8++)"number"==typeof colors2[_i8]?colors1.push(colors2[_i8]):colors1.push(colors2[_i8].clone());// faces
|
|
143
143
|
for(var _i9=0,_il4=faces2.length;_i9<_il4;_i9++){var face=faces2[_i9],normal=void 0,color=void 0,faceVertexNormals=face.vertexNormals,faceVertexColors=face.vertexColors,faceCopy=new Face3(face.a+vertexOffset,face.b+vertexOffset,face.c+vertexOffset);faceCopy.normal.copy(face.normal),normalMatrix!==void 0&&faceCopy.normal.applyMatrix3(normalMatrix).normalize();for(var j=0,jl=faceVertexNormals.length;j<jl;j++)normal=faceVertexNormals[j].clone(),void 0!==normalMatrix&&normal.applyMatrix3(normalMatrix).normalize(),faceCopy.vertexNormals.push(normal);faceCopy.color.copy(face.color);for(var _j=0,_jl=faceVertexColors.length;_j<_jl;_j++)color=faceVertexColors[_j],faceCopy.vertexColors.push(color.clone());faceCopy.materialIndex=face.materialIndex+materialIndexOffset,faces1.push(faceCopy)}// uvs
|
|
144
144
|
for(var faceVertexUvs2,_i10=0,_il5=geometry.faceVertexUvs.length;_i10<_il5;_i10++){faceVertexUvs2=geometry.faceVertexUvs[_i10],this.faceVertexUvs[_i10]===void 0&&(this.faceVertexUvs[_i10]=[]);for(var _j2=0,_jl2=faceVertexUvs2.length;_j2<_jl2;_j2++){for(var uvs2=faceVertexUvs2[_j2],uvsCopy=[],k=0,kl=uvs2.length;k<kl;k++)uvsCopy.push(uvs2[k].clone());this.faceVertexUvs[_i10].push(uvsCopy)}}this.mergeMorph(geometry,matrix)},mergeMesh:function mergeMesh(mesh){return mesh&&mesh.isMesh?void(mesh.matrixAutoUpdate&&mesh.updateMatrix(),this.merge(mesh.geometry,mesh.matrix)):void console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",mesh)},/*
|
|
145
145
|
* Checks for duplicate vertices with hashmap.
|