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ACA;AACA;AACA;AACA;AACA;AACA,GANA,CAiBA;AACA;AACA;AACA;AACA;AACA;AACA,GANA,CAYA;AACA;AACA;AACA;AACA;AACA,GALA,CAYA;AACA;AACA;AACA;AACA,GAJA,CAWA;AACA;AACA;AACA;AACA,GAJA,CASA;AACA;AACA;AACA;AACA,GAJA,CAaA;AACA;AACA;AACA;AACA,GAJA,CAYA;AACA;AACA;AACA;AACA,GAJA,CAeA;AACA;AACA;AACA;AACA,GAJA,CASA;AACA;AACA;AACA;AACA,GAJA,CA8BA;AACA;AACA;AACA;AACA,GAJA,CAsCA;AACA;AACA;AACA;AACA,GAJA,CAsBA;AACA;AACA,GAFA,CAcA;AACA;AACA;AACA;AACA;AACA,GALA,CAeA;AACA;AACA,GAFA,CAyEA;AACA;AACA;AACA;AACA,GAJA,CAqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAXA,CA6BA;AA4BA;AACA;AACA,GAFA,CAOA;AACA;AACA,GAFA,CA2BA;AACA;AACA;AACA;AACA,GAJA,CAmBA;AACA;AACA;AACA;AACA,GAppBAxb,UAAU,CAAC8C,SAAS,CAAC2Y,WAAW,CAAG,SAASC,UAAU,CAAE,CACtD,IAAI,CAAClB,QAAQ,CAAGkB,UAAU,CACtB,IAAI,CAACjB,UAAU,EACjB,IAAI,CAACA,UAAU,CAACgB,WAAW,CAAC,IAAI,CAACjB,QAAQ,CAE7C,CAAC,CAODxa,UAAU,CAAC8C,SAAS,CAAC6Y,WAAW,CAAG,UAAW,CAC5C,MAAO,KAAI,CAACnB,QACd,CAAC,CAODxa,UAAU,CAAC8C,SAAS,CAAC8Y,SAAS,CAAG,SAASX,MAAM,CAAE,CAChD,IAAI,CAACA,MAAM,CAAGA,MAChB,CAAC,CAODjb,UAAU,CAAC8C,SAAS,CAAC+Y,SAAS,CAAG,UAAW,CAC1C,MAAO,KAAI,CAACZ,MACd,CAAC,CAOAjb,UAAU,CAAC8C,SAAS,CAACV,QAAQ,CA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nB;AACF;AACA,KAFE,CAQA;AACF;AACA,KAFE,CAQA;AACF;AACA;AACA;AACA;AACA,KALE,CAaA;AACF;AACA;AACA;AACA,KAJE,CASA;AACF;AACA;AACA;AACA;AACA,KALE,CAUA;AACF;AACA;AACA;AACA;AACA;AACA,KANE,CAaA;AACF;AACA;AACA;AACA;AACA,KALE,CAYA;AACF;AACA;AACA;AACA,KAJE,CASA;AACF;AACA;AACA;AACA,KAJE,CASA;AACF;AACA;AACA;AACA,KAJE,CAoBA;AACF;AACA;AACA;AACA,KAJE,CAiBA;AACF;AACA;AACA;AACA;AACA,KALE,CAcA;AACF;AACA;AACA;AACA;AACA,KALE,CAiBA;AACF;AACA;AACA;AACA;AACA;AACA,KANE,CAyBA;AACF;AACA;AACA;AACA;AACA;AACA;AACA,KAPE,CAaA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KARE,CA0BA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KARE,CAeA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KARE,CAiBA;AACF;AACA;AACA;AACA;AACA;AACA,KANE,CAoBA;AACF;AACA;AACA;AACA;AACA,KALE,CAqBA;AACF;AACA;AACA;AACA;AACA;AACA;AACA,KAPE,CAoBA;AACF;AACA,KAFE,CAwBA;AACF;AACA;AACA;AACA;AACA,KALE,CAYA;AACF;AACA;AACA,KAHE,CAQA;AACF;AACA;AACA;AACA;AACA;AACA,KANE,CAkCA;AACF;AACA;AACA;AACA;AACA,KALE,CAkBA;AACF;AACA;AACA;AACA;AACA;AACA;AACA,KAPE,CAwBA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KARE,CAmBA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KARE,CAmBA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KARE,CAmBA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IARE,CAkCA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KARE,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A5xD,KAAK,CAAG2xD,QAAQ,CAAC/vD,cAAc,CAAC9wB,IAAI,CAAEa,CAAC,CAAC,CAAC,CAAC,CAChDquB,KAAK,CAAClG,QAAQ,CAACq3D,QAAO,CAAC14D,KAAK,CAC7B,CACJ,CACG,GAAM,CAAAk1D,MAAM,CAAG,GAAI,CAAAhgF,WAAW,CAACgkF,QAAQ,CAAC,CACxC,MAAO,CAAAhE,MACT,CAGD,CAEF,CAAC,CA7ED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAwEAr/E,mBAAmB,CAAGX,WAAW;;;;;UCnFjC;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;UENA;UACA;UACA;UACA","sources":["webpack://Zinc/webpack/universalModuleDefinition","webpack://Zinc/./src/zinc.js","webpack://Zinc/external commonjs \"url-polyfill\"","webpack://Zinc/./src/primitives/geometry.js","webpack://Zinc/external commonjs \"three\"","webpack://Zinc/./src/utilities.js","webpack://Zinc/./src/three/Geometry.js","webpack://Zinc/external commonjs \"three-spritetext\"","webpack://Zinc/./src/assets/disc.png","webpack://Zinc/./src/primitives/augmentShader.js","webpack://Zinc/./src/primitives/zincObject.js","webpack://Zinc/./src/primitives/lod.js","webpack://Zinc/./src/three/line/LineSegments.js","webpack://Zinc/./src/three/line/Line.js","webpack://Zinc/./src/primitives/marker.js","webpack://Zinc/./src/assets/mapMarker.svg","webpack://Zinc/./src/primitives/glyph.js","webpack://Zinc/./src/primitives/label.js","webpack://Zinc/./src/primitives/glyphset.js","webpack://Zinc/./src/loaders/JSONLoader.js","webpack://Zinc/./src/three/Loader.js","webpack://Zinc/./src/videoHandler.js","webpack://Zinc/./src/primitives/pointset.js","webpack://Zinc/./src/three/Points.js","webpack://Zinc/./src/primitives/lines.js","webpack://Zinc/./src/texture/textureArray.js","webpack://Zinc/./src/texture/texture.js","webpack://Zinc/./src/primitives/textureSlides.js","webpack://Zinc/./src/shaders/textureSlide.js","webpack://Zinc/./src/primitives/texturePrimitive.js","webpack://Zinc/./src/renderer.js","webpack://Zinc/external commonjs \"css-element-queries/src/ResizeSensor\"","webpack://Zinc/./src/scene.js","webpack://Zinc/./src/primitives/markerCluster.js","webpack://Zinc/./src/assets/mapMarkerOrange.svg","webpack://Zinc/./src/sceneLoader.js","webpack://Zinc/./src/loaders/STLLoader.js","webpack://Zinc/./src/loaders/OBJLoader.js","webpack://Zinc/./src/loaders/primitivesLoader.js","webpack://Zinc/./src/loaders/GLTFToZincJSLoader.js","webpack://Zinc/external commonjs \"three/examples/jsm/loaders/GLTFLoader\"","webpack://Zinc/./src/sceneExporter.js","webpack://Zinc/./src/three/GLTFExporter.js","webpack://Zinc/./src/controls.js","webpack://Zinc/./src/region.js","webpack://Zinc/./src/primitives/lines2.js","webpack://Zinc/./src/three/line/LineSegments2.js","webpack://Zinc/./src/three/line/LineSegmentsGeometry.js","webpack://Zinc/./src/three/line/LineMaterial.js","webpack://Zinc/./src/minimap.js","webpack://Zinc/./src/geometryCSG.js","webpack://Zinc/./src/three-js-csg.js","webpack://Zinc/external commonjs \"webworkify-webpack\"","webpack://Zinc/external commonjs \"promise-polyfill\"","webpack://Zinc/./src/workers/geometryCSG.worker.js","webpack://Zinc/./src/workers/geometryCSGInternal.js","webpack://Zinc/./src/glyphsetCSG.js","webpack://Zinc/webpack/bootstrap","webpack://Zinc/webpack/runtime/compat get default export","webpack://Zinc/webpack/runtime/define property getters","webpack://Zinc/webpack/runtime/hasOwnProperty shorthand","webpack://Zinc/webpack/runtime/make namespace object","webpack://Zinc/webpack/before-startup","webpack://Zinc/webpack/startup","webpack://Zinc/webpack/after-startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Zinc\"] = factory();\n\telse\n\t\troot[\"Zinc\"] = factory();\n})(this, () => {\nreturn ","require(\"url-polyfill\");\nconst PACKAGE = require('../package.json');\nconst version = PACKAGE.version;\n\n/**\n * Provides a global namespace for the Zinc javascript library and some default parameters for it.\n * \n * @namespace\n * @author Alan Wu\n */\n\nconst Zinc = function() {\n this.Revision = version;\n this.defaultMaterialColor = 0xFFFFFF;\n this.defaultOpacity = 1.0;\n this.modelPrefix = undefined;\n this.Geometry = require('./primitives/geometry').Geometry;\n this.Glyph = require('./primitives/glyph').Glyph;\n this.Glyphset = require('./primitives/glyphset').Glyphset;\n this.Pointset = require('./primitives/pointset').Pointset;\n this.Label = require('./primitives/label').Label;\n this.Lines = require('./primitives/lines').Lines;\n this.TextureArray = require('./texture/textureArray').TextureArray;\n this.TextureSlides = require('./primitives/textureSlides').TextureSlides;\n this.Renderer = require('./renderer').Renderer;\n this.Scene = require('./scene').Scene;\n this.GeometryCSG = require('./geometryCSG').GeometryCSG;\n this.GlyphsetCSG = require('./glyphsetCSG').GlyphsetCSG;\n this.Viewport = require('./controls').Viewport;\n this.CameraControls = require('./controls').CameraControls;\n this.SmoothCameraTransition = require('./controls').SmoothCameraTransition;\n this.RayCaster = require('./controls').RayCaster;\n this.CameraAutoTumble = require('./controls').CameraAutoTumble;\n this.StereoEffect = require('./controls').StereoEffect;\n this.loadExternalFile = require('./utilities').loadExternalFile;\n this.loadExternalFiles = require('./utilities').loadExternalFiles;\n this.THREE = require('three'); \n \n};\n\nmodule.exports = new Zinc();\n","module.exports = require(\"url-polyfill\");","const THREE = require('three');\nconst toBufferGeometry = require('../utilities').toBufferGeometry;\n\nconst createMeshForGeometry = (geometryIn, materialIn, options) => {\n // First copy the geometry\n let geometry = toBufferGeometry(geometryIn, options);\n\n let isTransparent = false;\n if (1.0 > options.opacity)\n isTransparent = true;\n\n let material = undefined;\n if (geometry._video === undefined) {\n const morphTargets = options.localTimeEnabled || options.localMorphColour;\n if (materialIn) {\n material = materialIn;\n material.morphTargets = morphTargets;\n material.morphNormals = options.localTimeEnabled;\n } else {\n if (geometry instanceof THREE.BufferGeometry && geometry.attributes.color === undefined) {\n material = new THREE.MeshPhongMaterial({\n color : options.colour,\n morphTargets : morphTargets,\n morphNormals : options.localTimeEnabled,\n transparent : isTransparent,\n opacity : options.opacity,\n side : THREE.DoubleSide\n });\n } else {\n material = new THREE.MeshPhongMaterial({\n color : options.colour,\n morphTargets : morphTargets,\n morphNormals : options.localTimeEnabled,\n vertexColors : THREE.VertexColors,\n transparent : isTransparent,\n opacity : options.opacity,\n side : THREE.DoubleSide\n });\n }\n }\n //material = PhongToToon(material);\n if (options.localMorphColour && geometry.morphAttributes[ \"color\" ]) {\n material.onBeforeCompile = (require(\"./augmentShader\").augmentMorphColor)();\n }\n } else {\n let videoTexture = geometry._video.createCanvasVideoTexture();\n material = new THREE.MeshBasicMaterial({\n morphTargets : options.localTimeEnabled,\n color : new THREE.Color(1, 1, 1),\n transparent : isTransparent,\n opacity : options.opacity,\n map : videoTexture,\n side : THREE.DoubleSide\n });\n this.videoHandler = geometry._video;\n }\n return new THREE.Mesh(geometry, material); \n}\n\n/**\n * Provides an object which stores geometry and provides method which controls its animations.\n * This is created when a valid json file containging geometry is read into a {@link Zinc.Scene}\n * object.\n * \n * @class\n * @author Alan Wu\n * @return {Geometry}\n */\nconst Geometry = function () {\n (require('./zincObject').ZincObject).call(this);\n\t// THREE.Geometry or THREE.BufferGeometry\n\tthis.videoHandler = undefined;\n this.isGeometry = true;\n\n /**\n * Create the mesh for rendering\n * \n * @param {THREE.Geomtry} geometryIn - Geometry to be rendered.\n * @param {THREE.Material} materialIn - Material to be set for the geometry.\n * @param {Object} options - Provide various options\n * @param {THREE.Color} options.colour - colour to be set for the geometry\n * @param {Boolean} options.localTimeEnabled - A flag to indicate either the geometry is\n * time dependent.\n * @param {Boolean} options.localMorphColour - A flag to indicate either the colour is\n * time dependent.\n * @param {Number} options.opacity - Opacity to be set for the geometry\n */\n\tthis.createMesh = (geometryIn, materialIn, options) => {\n //Skip if there is a morph already\n\t\tif (this.morph && this.morph.geometry && (geometryIn != undefined))\n\t\t\treturn;\n\t\tconst mesh = createMeshForGeometry(geometryIn, materialIn, options); \n\t\tthis.setMesh(mesh, options.localTimeEnabled, options.localMorphColour);\n\t}\n\n /**\n * Calculate the UV for texture rendering.\n */\n\tthis.calculateUVs = () => {\n //Multilayers\n\t\tthis.geometry.computeBoundingBox();\n\t\tconst max = this.geometry.boundingBox.max, min = this.geometry.boundingBox.min;\n\t\tconst offset = new THREE.Vector2(0 - min.x, 0 - min.y);\n\t\tconst range = new THREE.Vector2(max.x - min.x, max.y - min.y);\n\t\tthis.geometry.faceVertexUvs[0] = [];\n\t\tfor (let i = 0; i < this.geometry.faces.length ; i++) {\n\t\t const v1 = this.geometry.vertices[this.geometry.faces[i].a];\n\t\t const v2 = this.geometry.vertices[this.geometry.faces[i].b];\n\t\t const v3 = this.geometry.vertices[this.geometry.faces[i].c];\n\t\t geometry.faceVertexUvs[0].push(\n\t\t [\n\t\t new THREE.Vector2((v1.x + offset.x)/range.x ,(v1.y + offset.y)/range.y),\n\t\t new THREE.Vector2((v2.x + offset.x)/range.x ,(v2.y + offset.y)/range.y),\n\t\t new THREE.Vector2((v3.x + offset.x)/range.x ,(v3.y + offset.y)/range.y)\n\t\t ]);\n\t\t}\n\t\tgeometry.uvsNeedUpdate = true;\t\n\t}\n\n /**\n * Handle transparent mesh, create a clone for backside rendering if it is\n * transparent.\n */\n this.checkTransparentMesh = function() {\n this._lod.checkTransparentMesh();\n }\n\t\n\t/**\n\t * Set wireframe display for this geometry.\n\t * \n\t * @param {Boolean} wireframe - Flag to turn on/off wireframe display.\n\t */\n\tthis.setWireframe = wireframe => {\n\t\tthis.morph.material.wireframe = wireframe;\n\t}\n\n /**\n * Edit Vertice in index.\n */\n this.editVertices = function(coords, i) {\n if (coords && coords.length) {\n let mesh = this.getMorph();\n const attribute = mesh.geometry.getAttribute(\"position\");\n if (!mesh || 0 > i) {\n return;\n } else {\n let index = i * 3;\n coords.forEach(coord => {\n attribute.array[index++] = coord[0];\n attribute.array[index++] = coord[1];\n attribute.array[index++] = coord[2];\n });\n attribute.needsUpdate = true;\n mesh.geometry.computeBoundingBox();\n mesh.geometry.computeBoundingSphere();\n this.boundingBoxUpdateRequired = true;\n }\n }\n }\n\t\n\n}\n\nGeometry.prototype = Object.create((require('./zincObject').ZincObject).prototype);\nexports.Geometry = Geometry;\n","module.exports = require(\"three\");","const THREE = require('three');\nconst THREEGeometry = require('./three/Geometry').Geometry;\nconst SpriteText = require('three-spritetext').default;\n\nfunction resolveURL(url) {\n\tlet actualURL = url;\n\tconst prefix = (require(\"./zinc\").modelPrefix);\n\t\n\tif (prefix) {\n\t\tif (prefix[prefix.length -1] != '/')\n\t\t\tprefix = prefix + '/';\n\t\tconst r = new RegExp('^(?:[a-z]+:)?//', 'i');\n\t\tif (!r.test(url)) {\n\t\t\tactualURL = prefix + url;\n\t\t}\n\t}\n\t\n\treturn actualURL;\n}\n\nfunction createNewURL(target, reference) {\n const getNewURL = (target, reference) => {\n try {\n let newURL = (new URL(target, reference)).href;\n //Make sure the target url does not contain parameters\n if (target && target.split(\"?\").length < 2) {\n const paramsStrings = reference.split(\"?\");\n //There are parameters, add them to the target\n if (paramsStrings.length === 2) {\n newURL = newURL + \"?\" + paramsStrings[1];\n }\n }\n return newURL;\n } catch {\n console.error(`There is an issue creting the url link with: ${target}.` );\n }\n }\n if (!Array.isArray(target)) {\n return getNewURL(target, reference);\n } else {\n const urls = [];\n target.forEach((url) => {\n urls.push(getNewURL(url, reference));\n });\n return urls;\n }\n}\n\n/*\n * Calculate the bounding box of a mesh, values will be\n * set for cachedBox, b1, v1 and v2 and they need to be\n * defined. \n */\nfunction getBoundingBox(mesh, cachedBox, b1, v1, v2) {\n let influences = mesh.morphTargetInfluences;\n let attributes = undefined;\n if (mesh.geometry)\n attributes = mesh.geometry.morphAttributes;\n let found = false;\n if (influences && attributes && attributes.position) {\n v1.set(0.0, 0.0, 0.0);\n v2.set(0.0, 0.0, 0.0);\n for (let i = 0; i < influences.length; i++) {\n if (influences[i] > 0) {\n found = true;\n b1.setFromArray(attributes.position[i].array);\n v1.add(b1.min.multiplyScalar(influences[i]));\n v2.add(b1.max.multiplyScalar(influences[i]));\n }\n }\n if (found) {\n cachedBox.set(v1, v2);\n }\n }\n if (!found) {\n cachedBox.setFromBufferAttribute(\n mesh.geometry.attributes.position);\n }\n mesh.updateWorldMatrix(true, true);\n cachedBox.applyMatrix4(mesh.matrixWorld);\n}\n\n\n//Convenient function\nfunction loadExternalFile(url, data, callback, errorCallback) {\n // Set up an asynchronous request\n const request = new XMLHttpRequest();\n request.open('GET', resolveURL(url), true);\n\n // Hook the event that gets called as the request progresses\n request.onreadystatechange = () => {\n // If the request is \"DONE\" (completed or failed)\n if (request.readyState == 4) {\n // If we got HTTP status 200 (OK)\n if (request.status == 200) {\n callback(request.responseText, data)\n } else { // Failed\n errorCallback(url);\n }\n }\n };\n\n request.send(null); \n}\n\nfunction loadExternalFiles(urls, callback, errorCallback) {\n const numUrls = urls.length;\n let numComplete = 0;\n const result = [];\n\n // Callback for a single file\n function partialCallback(text, urlIndex) {\n result[urlIndex] = text;\n numComplete++;\n\n // When all files have downloaded\n if (numComplete == numUrls) {\n callback(result);\n }\n }\n\n for (let i = 0; i < numUrls; i++) {\n \tloadExternalFile(urls[i], i, partialCallback, errorCallback);\n }\n}\n\n\n//Get the colours at index\nexports.getColorsRGB = (colors, index) => {\n const index_in_colors = Math.floor(index/3);\n const remainder = index%3;\n let hex_value = 0;\n if (remainder == 0)\n {\n hex_value = colors[index_in_colors].r;\n }\n else if (remainder == 1)\n {\n hex_value = colors[index_in_colors].g;\n }\n else if (remainder == 2)\n {\n hex_value = colors[index_in_colors].b;\n }\n const mycolor = new THREE.Color(hex_value);\n return [mycolor.r, mycolor.g, mycolor.b];\n}\n\nexports.updateMorphColorAttribute = function(targetGeometry, morph) {\n if (morph && targetGeometry && targetGeometry.morphAttributes &&\n targetGeometry.morphAttributes[ \"color\" ]) {\n const morphColors = targetGeometry.morphAttributes[ \"color\" ];\n const influences = morph.morphTargetInfluences;\n const length = influences.length;\n targetGeometry.deleteAttribute( 'morphColor0' );\n targetGeometry.deleteAttribute( 'morphColor1' );\n let bound = 0;\n let morphArray = [];\n for (let i = 0; (1 > bound) || (i < length); i++) {\n if (influences[i] > 0) {\n bound++;\n morphArray.push([i, influences[i]]);\n }\n }\n if (morphArray.length == 2) {\n targetGeometry.setAttribute('morphColor0', morphColors[ morphArray[0][0] ] );\n targetGeometry.setAttribute('morphColor1', morphColors[ morphArray[1][0] ] );\n } else if (morphArray.length == 1) {\n targetGeometry.setAttribute('morphColor0', morphColors[ morphArray[0][0] ] );\n targetGeometry.setAttribute('morphColor1', morphColors[ morphArray[0][0] ] );\n }\n }\n}\n\n\nexports.toBufferGeometry = (geometryIn, options) => {\n let geometry = undefined;\n if (geometryIn instanceof THREEGeometry) {\n if (options.localTimeEnabled && !geometryIn.morphNormalsReady && \n (geometryIn.morphNormals == undefined || geometryIn.morphNormals.length == 0))\n geometryIn.computeMorphNormals();\n geometry = geometryIn.toIndexedBufferGeometry();\n if (options.localMorphColour) {\n copyMorphColorsToIndexedBufferGeometry(geometryIn, geometry);\n }\n } else if (geometryIn instanceof THREE.BufferGeometry) {\n geometry = geometryIn.clone();\n }\n geometry.colorsNeedUpdate = true;\n geometry.computeBoundingBox();\n geometry.computeBoundingSphere();\n if (geometryIn._video)\n geometry._video = geometryIn._video;\n return geometry;\n}\n\nexports.copyMorphColorsToBufferGeometry = (geometry, bufferGeometry) => {\n if (geometry && geometry.morphColors && geometry.morphColors.length > 0 ) {\n let array = [];\n let morphColors = geometry.morphColors;\n const getColorsRGB = require(\"./utilities\").getColorsRGB;\n for ( var i = 0, l = morphColors.length; i < l; i ++ ) {\n let morphColor = morphColors[ i ];\n let colorArray = [];\n for ( var j = 0; j < geometry.faces.length; j ++ ) {\n let face = geometry.faces[j];\n let color = getColorsRGB(morphColor.colors, face.a);\n colorArray.push(color[0], color[1], color[2]);\n color = getColorsRGB(morphColor.colors, face.b);\n colorArray.push(color[0], color[1], color[2]);\n color = getColorsRGB(morphColor.colors, face.c);\n colorArray.push(color[0], color[1], color[2]);\n }\n var attribute = new THREE.Float32BufferAttribute( geometry.faces.length * 3 * 3, 3 );\n attribute.name = morphColor.name;\n array.push( attribute.copyArray( colorArray ) );\n }\n bufferGeometry.morphAttributes[ \"color\" ] = array; \n }\n}\n\n\nconst copyMorphColorsToIndexedBufferGeometry = (geometry, bufferGeometry) => {\n if (geometry && geometry.morphColors && geometry.morphColors.length > 0 ) {\n let array = [];\n let morphColors = geometry.morphColors;\n const getColorsRGB = require(\"./utilities\").getColorsRGB;\n for ( let i = 0, l = morphColors.length; i < l; i ++ ) {\n const morphColor = morphColors[ i ];\n const colorArray = [];\n for ( let j = 0; j < morphColor.colors.length * 3; j ++ ) {\n let color = getColorsRGB(morphColor.colors, j);\n colorArray.push(color[0], color[1], color[2]);\n }\n const attribute = new THREE.Float32BufferAttribute( colorArray, 3 );\n attribute.name = morphColor.name;\n array.push( attribute );\n }\n bufferGeometry.morphAttributes[ \"color\" ] = array; \n }\n}\n\nexports.mergeVertices = ( geometry, tolerance = 1e-4 ) => {\n\n tolerance = Math.max( tolerance, Number.EPSILON );\n\n // Generate an index buffer if the geometry doesn't have one, or optimize it\n // if it's already available.\n var hashToIndex = {};\n var indices = geometry.getIndex();\n var positions = geometry.getAttribute( 'position' );\n var vertexCount = indices ? indices.count : positions.count;\n\n // next value for triangle indices\n var nextIndex = 0;\n\n // attributes and new attribute arrays\n var attributeNames = Object.keys( geometry.attributes );\n var attrArrays = {};\n var morphAttrsArrays = {};\n var newIndices = [];\n var getters = [ 'getX', 'getY', 'getZ', 'getW' ];\n\n // initialize the arrays\n for ( var i = 0, l = attributeNames.length; i < l; i ++ ) {\n var name = attributeNames[ i ];\n\n attrArrays[ name ] = [];\n\n var morphAttr = geometry.morphAttributes[ name ];\n if ( morphAttr ) {\n\n morphAttrsArrays[ name ] = new Array( morphAttr.length ).fill().map( () => [] );\n\n }\n\n }\n\n // convert the error tolerance to an amount of decimal places to truncate to\n var decimalShift = Math.log10( 1 / tolerance );\n var shiftMultiplier = Math.pow( 10, decimalShift );\n for ( var i = 0; i < vertexCount; i ++ ) {\n\n var index = indices ? indices.getX( i ) : i;\n\n // Generate a hash for the vertex attributes at the current index 'i'\n var hash = '';\n for ( var j = 0, l = attributeNames.length; j < l; j ++ ) {\n\n var name = attributeNames[ j ];\n var attribute = geometry.getAttribute( name );\n var itemSize = attribute.itemSize;\n\n for ( var k = 0; k < itemSize; k ++ ) {\n\n // double tilde truncates the decimal value\n hash += `${ ~ ~ ( attribute[ getters[ k ] ]( index ) * shiftMultiplier ) },`;\n\n }\n\n }\n\n // Add another reference to the vertex if it's already\n // used by another index\n if ( hash in hashToIndex ) {\n\n newIndices.push( hashToIndex[ hash ] );\n\n } else {\n\n // copy data to the new index in the attribute arrays\n for ( var j = 0, l = attributeNames.length; j < l; j ++ ) {\n\n var name = attributeNames[ j ];\n var attribute = geometry.getAttribute( name );\n var morphAttr = geometry.morphAttributes[ name ];\n var itemSize = attribute.itemSize;\n var newarray = attrArrays[ name ];\n var newMorphArrays = morphAttrsArrays[ name ];\n\n for ( var k = 0; k < itemSize; k ++ ) {\n\n var getterFunc = getters[ k ];\n newarray.push( attribute[ getterFunc ]( index ) );\n\n if ( morphAttr ) {\n\n for ( var m = 0, ml = morphAttr.length; m < ml; m ++ ) {\n\n newMorphArrays[ m ].push( morphAttr[ m ][ getterFunc ]( index ) );\n\n }\n\n }\n\n }\n\n }\n\n hashToIndex[ hash ] = nextIndex;\n newIndices.push( nextIndex );\n nextIndex ++;\n\n }\n\n }\n\n // Generate typed arrays from new attribute arrays and update\n // the attributeBuffers\n const result = geometry.clone();\n for ( var i = 0, l = attributeNames.length; i < l; i ++ ) {\n\n var name = attributeNames[ i ];\n var oldAttribute = geometry.getAttribute( name );\n var attribute;\n\n var buffer = new oldAttribute.array.constructor( attrArrays[ name ] );\n if ( oldAttribute.isInterleavedBufferAttribute ) {\n\n attribute = new THREE.BufferAttribute( buffer, oldAttribute.itemSize, oldAttribute.itemSize );\n\n } else {\n\n attribute = geometry.getAttribute( name ).clone();\n attribute.setArray( buffer );\n\n }\n\n result.setAttribute( name, attribute );\n\n // Update the attribute arrays\n if ( name in morphAttrsArrays ) {\n\n for ( var j = 0; j < morphAttrsArrays[ name ].length; j ++ ) {\n\n var morphAttribute = geometry.morphAttributes[ name ][ j ].clone();\n morphAttribute.setArray( new morphAttribute.array.constructor( morphAttrsArrays[ name ][ j ] ) );\n result.morphAttributes[ name ][ j ] = morphAttribute;\n\n }\n\n }\n\n }\n\n // Generate an index buffer typed array\n var cons = Uint8Array;\n if ( newIndices.length >= Math.pow( 2, 8 ) ) cons = Uint16Array;\n if ( newIndices.length >= Math.pow( 2, 16 ) ) cons = Uint32Array;\n\n var newIndexBuffer = new cons( newIndices );\n var newIndices = null;\n if ( indices === null ) {\n\n newIndices = new THREE.BufferAttribute( newIndexBuffer, 1 );\n\n } else {\n\n newIndices = geometry.getIndex().clone();\n newIndices.setArray( newIndexBuffer );\n\n }\n\n result.setIndex( newIndices );\n\n return result;\n}\n\nfunction PhongToToon(materialIn) {\n\tif (materialIn.isMeshPhongMaterial) {\n\t\tlet material = new THREE.MeshToonMaterial({\n\t\t\tcolor : materialIn.color.clone(),\n\t\t\tmorphTargets : materialIn.morphTargets,\n\t\t\tmorphNormals : materialIn.morphNormals,\n\t\t\tvertexColors : materialIn.vertexColors,\n\t\t\ttransparent : materialIn.transparent,\n\t\t\topacity : materialIn.opacity,\n\t\t\tside : materialIn.side\n\t\t});\n\t\tif (materialIn.map)\n\t\t\tmaterial.map = materialIn.map;\n\t\treturn material;\n\t}\n\n\treturn materialIn;\n}\n\n/**\n * Create and return a new buffer geometry with the size of length,\n * and initial coords.\n */\nfunction createBufferGeometry(length, coords) {\n if (coords && (length >= coords.length)) {\n const geometry = new THREE.BufferGeometry()\n const vertices = new Float32Array(length * 3);\n let i = 0;\n coords.forEach(coord => {\n vertices[i++] = coord[0];\n vertices[i++] = coord[1];\n vertices[i++] = coord[2];\n });\n geometry.setAttribute( 'position', new THREE.BufferAttribute( vertices, 3 ) );\n geometry.setDrawRange(0, coords.length);\n return geometry;\n }\n return undefined;\n};\n\nfunction getCircularTexture() {\n const image = new Image();\n image.src = require(\"./assets/disc.png\");\n const texture = new THREE.Texture();\n texture.image = image;\n texture.needsUpdate = true;\n return texture;\n}\n\nfunction createNewSpriteText(text, height, colour, font, pixel, weight) {\n const sprite = new SpriteText(text, height, colour, font, pixel, weight);\n sprite.material.sizeAttenuation = false;\n sprite.material.alphaTest = 0.5;\n sprite.material.transparent = true;\n sprite.material.depthWrite = false;\n sprite.material.depthTest = false;\n sprite.center.set(0.5, -1.2);\n sprite.renderOrder = 10000;\n return sprite;\n}\n\nexports.getBoundingBox = getBoundingBox;\nexports.createNewURL = createNewURL;\nexports.createBufferGeometry = createBufferGeometry;\nexports.getCircularTexture = getCircularTexture;\nexports.resolveURL = resolveURL;\nexports.loadExternalFile = loadExternalFile;\nexports.loadExternalFiles = loadExternalFiles;\nexports.PhongToToon = PhongToToon;\nexports.createNewSpriteText = createNewSpriteText;\n","import {\n\tBox3,\n\tBufferAttribute,\n\tBufferGeometry,\n\tColor,\n\tEventDispatcher,\n\tFloat32BufferAttribute,\n\tMatrix3,\n\tMatrix4,\n\tMathUtils,\n\tObject3D,\n\tSphere,\n\tVector2,\n\tVector3\n} from 'three';\n\nconst _m1 = new Matrix4();\nconst _obj = new Object3D();\nconst _offset = new Vector3();\nconst _temp = new Vector3();\n\nfunction Geometry() {\n\n\tthis.uuid = MathUtils.generateUUID();\n\n\tthis.name = '';\n\tthis.type = 'Geometry';\n\n\tthis.vertices = [];\n\tthis.colors = [];\n\tthis.faces = [];\n\tthis.faceVertexUvs = [[]];\n this.normals = [];\n this.uvs = [];\n\n\tthis.morphTargets = [];\n\tthis.morphNormals = [];\n\n\tthis.skinWeights = [];\n\tthis.skinIndices = [];\n\n\tthis.lineDistances = [];\n\n\tthis.boundingBox = null;\n\tthis.boundingSphere = null;\n\n\t// update flags\n\n\tthis.elementsNeedUpdate = false;\n\tthis.verticesNeedUpdate = false;\n\tthis.uvsNeedUpdate = false;\n\tthis.normalsNeedUpdate = false;\n\tthis.colorsNeedUpdate = false;\n\tthis.lineDistancesNeedUpdate = false;\n\tthis.groupsNeedUpdate = false;\n\tthis.morphNormalsReady = false;\n\n}\n\nGeometry.prototype = Object.assign( Object.create( EventDispatcher.prototype ), {\n\n\tconstructor: Geometry,\n\n\tisGeometry: true,\n\n\tapplyMatrix4: function ( matrix ) {\n\n\t\tconst normalMatrix = new Matrix3().getNormalMatrix( matrix );\n\n\t\tfor ( let i = 0, il = this.vertices.length; i < il; i ++ ) {\n\n\t\t\tconst vertex = this.vertices[ i ];\n\t\t\tvertex.applyMatrix4( matrix );\n\n\t\t}\n\n\t\tfor ( let i = 0, il = this.faces.length; i < il; i ++ ) {\n\n\t\t\tconst face = this.faces[ i ];\n\t\t\tface.normal.applyMatrix3( normalMatrix ).normalize();\n\n\t\t\tfor ( let j = 0, jl = face.vertexNormals.length; j < jl; j ++ ) {\n\n\t\t\t\tface.vertexNormals[ j ].applyMatrix3( normalMatrix ).normalize();\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( this.boundingBox !== null ) {\n\n\t\t\tthis.computeBoundingBox();\n\n\t\t}\n\n\t\tif ( this.boundingSphere !== null ) {\n\n\t\t\tthis.computeBoundingSphere();\n\n\t\t}\n\n\t\tthis.verticesNeedUpdate = true;\n\t\tthis.normalsNeedUpdate = true;\n\n\t\treturn this;\n\n\t},\n\n\trotateX: function ( angle ) {\n\n\t\t// rotate geometry around world x-axis\n\n\t\t_m1.makeRotationX( angle );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t},\n\n\trotateY: function ( angle ) {\n\n\t\t// rotate geometry around world y-axis\n\n\t\t_m1.makeRotationY( angle );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t},\n\n\trotateZ: function ( angle ) {\n\n\t\t// rotate geometry around world z-axis\n\n\t\t_m1.makeRotationZ( angle );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t},\n\n\ttranslate: function ( x, y, z ) {\n\n\t\t// translate geometry\n\n\t\t_m1.makeTranslation( x, y, z );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t},\n\n\tscale: function ( x, y, z ) {\n\n\t\t// scale geometry\n\n\t\t_m1.makeScale( x, y, z );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t},\n\n\tlookAt: function ( vector ) {\n\n\t\t_obj.lookAt( vector );\n\n\t\t_obj.updateMatrix();\n\n\t\tthis.applyMatrix4( _obj.matrix );\n\n\t\treturn this;\n\n\t},\n\n\tfromBufferGeometry: function ( geometry ) {\n\n\t\tconst scope = this;\n\n\t\tconst index = geometry.index !== null ? geometry.index : undefined;\n\t\tconst attributes = geometry.attributes;\n\n\t\tif ( attributes.position === undefined ) {\n\n\t\t\tconsole.error( 'THREE.Geometry.fromBufferGeometry(): Position attribute required for conversion.' );\n\t\t\treturn this;\n\n\t\t}\n\n\t\tconst position = attributes.position;\n\t\tconst normal = attributes.normal;\n\t\tconst color = attributes.color;\n\t\tconst uv = attributes.uv;\n\t\tconst uv2 = attributes.uv2;\n\n\t\tif ( uv2 !== undefined ) this.faceVertexUvs[ 1 ] = [];\n\n\t\tfor ( let i = 0; i < position.count; i ++ ) {\n\n\t\t\tscope.vertices.push( new Vector3().fromBufferAttribute( position, i ) );\n\n\t\t\tif ( color !== undefined ) {\n\n\t\t\t\tscope.colors.push( new Color().fromBufferAttribute( color, i ) );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction addFace( a, b, c, materialIndex ) {\n\n\t\t\tconst vertexColors = ( color === undefined ) ? [] : [\n\t\t\t\tscope.colors[ a ].clone(),\n\t\t\t\tscope.colors[ b ].clone(),\n\t\t\t\tscope.colors[ c ].clone()\n\t\t\t];\n\n\t\t\tconst vertexNormals = ( normal === undefined ) ? [] : [\n\t\t\t\tnew Vector3().fromBufferAttribute( normal, a ),\n\t\t\t\tnew Vector3().fromBufferAttribute( normal, b ),\n\t\t\t\tnew Vector3().fromBufferAttribute( normal, c )\n\t\t\t];\n\n\t\t\tconst face = new Face3( a, b, c, vertexNormals, vertexColors, materialIndex );\n\n\t\t\tscope.faces.push( face );\n\n\t\t\tif ( uv !== undefined ) {\n\n\t\t\t\tscope.faceVertexUvs[ 0 ].push( [\n\t\t\t\t\tnew Vector2().fromBufferAttribute( uv, a ),\n\t\t\t\t\tnew Vector2().fromBufferAttribute( uv, b ),\n\t\t\t\t\tnew Vector2().fromBufferAttribute( uv, c )\n\t\t\t\t] );\n\n\t\t\t}\n\n\t\t\tif ( uv2 !== undefined ) {\n\n\t\t\t\tscope.faceVertexUvs[ 1 ].push( [\n\t\t\t\t\tnew Vector2().fromBufferAttribute( uv2, a ),\n\t\t\t\t\tnew Vector2().fromBufferAttribute( uv2, b ),\n\t\t\t\t\tnew Vector2().fromBufferAttribute( uv2, c )\n\t\t\t\t] );\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst groups = geometry.groups;\n\n\t\tif ( groups.length > 0 ) {\n\n\t\t\tfor ( let i = 0; i < groups.length; i ++ ) {\n\n\t\t\t\tconst group = groups[ i ];\n\n\t\t\t\tconst start = group.start;\n\t\t\t\tconst count = group.count;\n\n\t\t\t\tfor ( let j = start, jl = start + count; j < jl; j += 3 ) {\n\n\t\t\t\t\tif ( index !== undefined ) {\n\n\t\t\t\t\t\taddFace( index.getX( j ), index.getX( j + 1 ), index.getX( j + 2 ), group.materialIndex );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\taddFace( j, j + 1, j + 2, group.materialIndex );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif ( index !== undefined ) {\n\n\t\t\t\tfor ( let i = 0; i < index.count; i += 3 ) {\n\n\t\t\t\t\taddFace( index.getX( i ), index.getX( i + 1 ), index.getX( i + 2 ) );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tfor ( let i = 0; i < position.count; i += 3 ) {\n\n\t\t\t\t\taddFace( i, i + 1, i + 2 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.computeFaceNormals();\n\n\t\tif ( geometry.boundingBox !== null ) {\n\n\t\t\tthis.boundingBox = geometry.boundingBox.clone();\n\n\t\t}\n\n\t\tif ( geometry.boundingSphere !== null ) {\n\n\t\t\tthis.boundingSphere = geometry.boundingSphere.clone();\n\n\t\t}\n\n\t\treturn this;\n\n\t},\n\n\tcenter: function () {\n\n\t\tthis.computeBoundingBox();\n\n\t\tthis.boundingBox.getCenter( _offset ).negate();\n\n\t\tthis.translate( _offset.x, _offset.y, _offset.z );\n\n\t\treturn this;\n\n\t},\n\n\tnormalize: function () {\n\n\t\tthis.computeBoundingSphere();\n\n\t\tconst center = this.boundingSphere.center;\n\t\tconst radius = this.boundingSphere.radius;\n\n\t\tconst s = radius === 0 ? 1 : 1.0 / radius;\n\n\t\tconst matrix = new Matrix4();\n\t\tmatrix.set(\n\t\t\ts, 0, 0, - s * center.x,\n\t\t\t0, s, 0, - s * center.y,\n\t\t\t0, 0, s, - s * center.z,\n\t\t\t0, 0, 0, 1\n\t\t);\n\n\t\tthis.applyMatrix4( matrix );\n\n\t\treturn this;\n\n\t},\n\n\tcomputeFaceNormals: function () {\n\n\t\tconst cb = new Vector3(), ab = new Vector3();\n\n\t\tfor ( let f = 0, fl = this.faces.length; f < fl; f ++ ) {\n\n\t\t\tconst face = this.faces[ f ];\n\n\t\t\tconst vA = this.vertices[ face.a ];\n\t\t\tconst vB = this.vertices[ face.b ];\n\t\t\tconst vC = this.vertices[ face.c ];\n\n\t\t\tcb.subVectors( vC, vB );\n\t\t\tab.subVectors( vA, vB );\n\t\t\tcb.cross( ab );\n\n\t\t\tcb.normalize();\n\n\t\t\tface.normal.copy( cb );\n\n\t\t}\n\n\t},\n\n\tcomputeVertexNormals: function ( areaWeighted = true ) {\n\n\t\tconst vertices = new Array( this.vertices.length );\n\n\t\tfor ( let v = 0, vl = this.vertices.length; v < vl; v ++ ) {\n\n\t\t\tvertices[ v ] = new Vector3();\n\n\t\t}\n\n\t\tif ( areaWeighted ) {\n\n\t\t\t// vertex normals weighted by triangle areas\n\t\t\t// http://www.iquilezles.org/www/articles/normals/normals.htm\n\n\t\t\tconst cb = new Vector3(), ab = new Vector3();\n\n\t\t\tfor ( let f = 0, fl = this.faces.length; f < fl; f ++ ) {\n\n\t\t\t\tconst face = this.faces[ f ];\n\n\t\t\t\tconst vA = this.vertices[ face.a ];\n\t\t\t\tconst vB = this.vertices[ face.b ];\n\t\t\t\tconst vC = this.vertices[ face.c ];\n\n\t\t\t\tcb.subVectors( vC, vB );\n\t\t\t\tab.subVectors( vA, vB );\n\t\t\t\tcb.cross( ab );\n\n\t\t\t\tvertices[ face.a ].add( cb );\n\t\t\t\tvertices[ face.b ].add( cb );\n\t\t\t\tvertices[ face.c ].add( cb );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tthis.computeFaceNormals();\n\n\t\t\tfor ( let f = 0, fl = this.faces.length; f < fl; f ++ ) {\n\n\t\t\t\tconst face = this.faces[ f ];\n\n\t\t\t\tvertices[ face.a ].add( face.normal );\n\t\t\t\tvertices[ face.b ].add( face.normal );\n\t\t\t\tvertices[ face.c ].add( face.normal );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfor ( let v = 0, vl = this.vertices.length; v < vl; v ++ ) {\n\n\t\t\tvertices[ v ].normalize();\n\n\t\t}\n\n\t\tfor ( let f = 0, fl = this.faces.length; f < fl; f ++ ) {\n\n\t\t\tconst face = this.faces[ f ];\n\n\t\t\tconst vertexNormals = face.vertexNormals;\n\n\t\t\tif ( vertexNormals.length === 3 ) {\n\n\t\t\t\tvertexNormals[ 0 ].copy( vertices[ face.a ] );\n\t\t\t\tvertexNormals[ 1 ].copy( vertices[ face.b ] );\n\t\t\t\tvertexNormals[ 2 ].copy( vertices[ face.c ] );\n\n\t\t\t} else {\n\n\t\t\t\tvertexNormals[ 0 ] = vertices[ face.a ].clone();\n\n\t\t\t\tvertexNormals[ 1 ] = vertices[ face.b ].clone();\n\t\t\t\tvertexNormals[ 2 ] = vertices[ face.c ].clone();\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( this.faces.length > 0 ) {\n\n\t\t\tthis.normalsNeedUpdate = true;\n\n\t\t}\n\n return vertices;\n\n\t},\n\n\tcomputeFlatVertexNormals: function () {\n\n\t\tthis.computeFaceNormals();\n\n\t\tfor ( let f = 0, fl = this.faces.length; f < fl; f ++ ) {\n\n\t\t\tconst face = this.faces[ f ];\n\n\t\t\tconst vertexNormals = face.vertexNormals;\n\n\t\t\tif ( vertexNormals.length === 3 ) {\n\n\t\t\t\tvertexNormals[ 0 ].copy( face.normal );\n\t\t\t\tvertexNormals[ 1 ].copy( face.normal );\n\t\t\t\tvertexNormals[ 2 ].copy( face.normal );\n\n\t\t\t} else {\n\n\t\t\t\tvertexNormals[ 0 ] = face.normal.clone();\n\t\t\t\tvertexNormals[ 1 ] = face.normal.clone();\n\t\t\t\tvertexNormals[ 2 ] = face.normal.clone();\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( this.faces.length > 0 ) {\n\n\t\t\tthis.normalsNeedUpdate = true;\n\n\t\t}\n\n\t},\n\n\tcomputeMorphNormals: function () {\n\n\t\t// save original normals\n\t\t// - create temp variables on first access\n\t\t// otherwise just copy (for faster repeated calls)\n\n\t\tfor ( let f = 0, fl = this.faces.length; f < fl; f ++ ) {\n\n\t\t\tconst face = this.faces[ f ];\n\n\t\t\tif ( ! face.__originalFaceNormal ) {\n\n\t\t\t\tface.__originalFaceNormal = face.normal.clone();\n\n\t\t\t} else {\n\n\t\t\t\tface.__originalFaceNormal.copy( face.normal );\n\n\t\t\t}\n\n\t\t\tif ( ! face.__originalVertexNormals ) face.__originalVertexNormals = [];\n\n\t\t\tfor ( let i = 0, il = face.vertexNormals.length; i < il; i ++ ) {\n\n\t\t\t\tif ( ! face.__originalVertexNormals[ i ] ) {\n\n\t\t\t\t\tface.__originalVertexNormals[ i ] = face.vertexNormals[ i ].clone();\n\n\t\t\t\t} else {\n\n\t\t\t\t\tface.__originalVertexNormals[ i ].copy( face.vertexNormals[ i ] );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// use temp geometry to compute face and vertex normals for each morph\n\n\t\tconst tmpGeo = new Geometry();\n\t\ttmpGeo.faces = this.faces;\n\n\t\tfor ( let i = 0, il = this.morphTargets.length; i < il; i ++ ) {\n\n\t\t\t// create on first access\n\n\t\t\tif ( ! this.morphNormals[ i ] ) {\n\n\t\t\t\tthis.morphNormals[ i ] = {};\n\t\t\t\tthis.morphNormals[ i ].faceNormals = [];\n\t\t\t\tthis.morphNormals[ i ].vertexNormals = [];\n\n\t\t\t\tconst dstNormalsFace = this.morphNormals[ i ].faceNormals;\n\t\t\t\tconst dstNormalsVertex = this.morphNormals[ i ].vertexNormals;\n\n\t\t\t\tfor ( let f = 0, fl = this.faces.length; f < fl; f ++ ) {\n\n\t\t\t\t\tconst faceNormal = new Vector3();\n\t\t\t\t\tconst vertexNormals = { a: new Vector3(), b: new Vector3(), c: new Vector3() };\n\n\t\t\t\t\tdstNormalsFace.push( faceNormal );\n\t\t\t\t\tdstNormalsVertex.push( vertexNormals );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconst morphNormals = this.morphNormals[ i ];\n\n\t\t\t// set vertices to morph target\n\n\t\t\ttmpGeo.vertices = this.morphTargets[ i ].vertices;\n\n\t\t\t// compute morph normals\n\n\t\t\ttmpGeo.computeFaceNormals();\n\t\t\tlet vertexNormals = tmpGeo.computeVertexNormals();\n\n if (vertexNormals && vertexNormals.length > 0) {\n this.morphTargets[i].normals = new Array( this.vertices.length );\n\n for ( let v = 0; v < vertexNormals.length; v ++ ) {\n \n this.morphTargets[i].normals[ v ] = vertexNormals[v].clone();\n \n }\n }\n\n\t\t\t// store morph normals\n\n\t\t\tfor ( let f = 0, fl = this.faces.length; f < fl; f ++ ) {\n\n\t\t\t\tconst face = this.faces[ f ];\n\n\t\t\t\tconst faceNormal = morphNormals.faceNormals[ f ];\n\t\t\t\tconst vertexNormals = morphNormals.vertexNormals[ f ];\n\n\t\t\t\tfaceNormal.copy( face.normal );\n\n\t\t\t\tvertexNormals.a.copy( face.vertexNormals[ 0 ] );\n\t\t\t\tvertexNormals.b.copy( face.vertexNormals[ 1 ] );\n\t\t\t\tvertexNormals.c.copy( face.vertexNormals[ 2 ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// restore original normals\n\n\t\tfor ( let f = 0, fl = this.faces.length; f < fl; f ++ ) {\n\n\t\t\tconst face = this.faces[ f ];\n\n\t\t\tface.normal = face.__originalFaceNormal;\n\t\t\tface.vertexNormals = face.__originalVertexNormals;\n\n\t\t}\n\n this.morphNormalsReady = true;\n\n\t},\n\n\tcomputeBoundingBox: function () {\n\n\t\tif ( this.boundingBox === null ) {\n\n\t\t\tthis.boundingBox = new Box3();\n\n\t\t}\n\n\t\tthis.boundingBox.setFromPoints( this.vertices );\n\n\t},\n\n\tcomputeBoundingSphere: function () {\n\n\t\tif ( this.boundingSphere === null ) {\n\n\t\t\tthis.boundingSphere = new Sphere();\n\n\t\t}\n\n\t\tthis.boundingSphere.setFromPoints( this.vertices );\n\n\t},\n\n\tmergeMorph: function ( geometry, matrix ) {\n\n\t\tconst m = this.morphTargets.length,\n\t\t\tmorphTargets1 = this.morphTargets,\n\t\t\tmorphTargets2 = geometry.morphTargets,\n\t\t\tn = this.morphColors.length,\n\t\t\tmorphColors1 = this.morphColors,\n\t\t\tmorphColors2 = geometry.morphColors;\n\n if ( m > 0 && m == morphTargets2.length) {\n\n\t\t\tfor ( let i = 0, l = morphTargets1.length; i < l; i ++ ) {\n\n\t\t\t\tconst morphTarget1 = morphTargets1[ i ];\n\t\t\t\tconst morphTarget2 = morphTargets2[ i ];\n\n\t\t\t\tfor ( let k = 0, kl = morphTarget2.vertices.length; k < kl; k ++ ) {\n\n\t\t\t\t\tconst vertex = morphTarget2.vertices[ k ];\n\t\t\n\t\t\t\t\tconst vertexCopy = vertex.clone();\n\t\t\n\t\t\t\t\tif ( matrix !== undefined ) vertexCopy.applyMatrix4( matrix );\n\t\t\n\t\t\t\t\tmorphTarget1.vertices.push( vertexCopy );\n\t\t\n\t\t\t\t}\n\n\t\t\t\tif ( morphTarget1.normals && morphTarget2.normals ) {\n\t\t\t\t\t\n\t\t\t\t\tfor ( let k = 0; k < morphTarget2.normals.length; k = k + 3) {\n\n\t\t\t\t\t\t_temp.set(morphTarget2.normals2[k], morphTarget2.normals2[k + 1], morphTarget2.normals2[k + 2]);\n\t\t\t\n\t\t\t\t\t\tif ( matrix !== undefined ) _temp.applyMatrix4( matrix );\n\t\t\t\n\t\t\t\t\t\tmorphTarget1.normals.push(_temp.x, _temp.y, _temp.z);\n\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( n > 0 && n == morphColors2.length) {\n\n\t\t\tfor ( let i = 0, l = morphColors1.length; i < l; i ++ ) {\n\n\t\t\t\tconst morphColor1 = morphColors1[ i ];\n\t\t\t\tconst morphColor2 = morphColors2[ i ];\n\n\t\t\t\tfor ( let k = 0, kl = morphColor2.colors; k < kl; k ++ ) {\n\n\t\t\t\t\tmorphColor1.colors.push( morphColor2.colors[ k ].clone() );\n\t\t\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t},\n\n\tmerge: function ( geometry, matrix, materialIndexOffset = 0 ) {\n\n\t\tif ( ! ( geometry && geometry.isGeometry ) ) {\n\n\t\t\tconsole.error( 'THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.', geometry );\n\t\t\treturn;\n\n\t\t}\n\n\t\tlet normalMatrix;\n\t\tconst vertexOffset = this.vertices.length,\n\t\t\tvertices1 = this.vertices,\n\t\t\tvertices2 = geometry.vertices,\n\t\t\tnormals2 = geometry.normals,\n\t\t\tfaces1 = this.faces,\n\t\t\tfaces2 = geometry.faces,\n\t\t\tcolors1 = this.colors,\n\t\t\tcolors2 = geometry.colors;\n\n\t\tif ( matrix !== undefined ) {\n\n\t\t\tnormalMatrix = new Matrix3().getNormalMatrix( matrix );\n\n\t\t}\n\n\t\t// vertices\n\n\t\tfor ( let i = 0, il = vertices2.length; i < il; i ++ ) {\n\n\t\t\tconst vertex = vertices2[ i ];\n\n\t\t\tconst vertexCopy = vertex.clone();\n\n\t\t\tif ( matrix !== undefined ) vertexCopy.applyMatrix4( matrix );\n\n\t\t\tvertices1.push( vertexCopy );\n\n\t\t}\n\n\t\tfor ( let i = 0; i < normals2.length; i = i + 3) {\n\n\t\t\t_temp.set(normals2[i], normals2[i + 1], normals2[i + 2]);\n\n\t\t\tif ( matrix !== undefined ) _temp.applyMatrix4( matrix );\n\n\t\t\tthis.normals.push(_temp.x, _temp.y, _temp.z);\n\n\t\t}\n\n\t\t// colors\n\n\t\tfor ( let i = 0, il = colors2.length; i < il; i ++ ) {\n\t\t\tif ((typeof colors2[ i ] === \"number\")) {\n\t\t\t\tcolors1.push( colors2[ i ] );\n\t\t\t} else {\n\t\t\t\tcolors1.push( colors2[ i ].clone() );\n\t\t\t}\n\t\t}\n\n\t\t// faces\n\n\t\tfor ( let i = 0, il = faces2.length; i < il; i ++ ) {\n\n\t\t\tconst face = faces2[ i ];\n\t\t\tlet normal, color;\n\t\t\tconst faceVertexNormals = face.vertexNormals,\n\t\t\t\tfaceVertexColors = face.vertexColors;\n\n\t\t\tconst faceCopy = new Face3( face.a + vertexOffset, face.b + vertexOffset, face.c + vertexOffset );\n\t\t\tfaceCopy.normal.copy( face.normal );\n\n\t\t\tif ( normalMatrix !== undefined ) {\n\n\t\t\t\tfaceCopy.normal.applyMatrix3( normalMatrix ).normalize();\n\n\t\t\t}\n\n\t\t\tfor ( let j = 0, jl = faceVertexNormals.length; j < jl; j ++ ) {\n\n\t\t\t\tnormal = faceVertexNormals[ j ].clone();\n\n\t\t\t\tif ( normalMatrix !== undefined ) {\n\n\t\t\t\t\tnormal.applyMatrix3( normalMatrix ).normalize();\n\n\t\t\t\t}\n\n\t\t\t\tfaceCopy.vertexNormals.push( normal );\n\n\t\t\t}\n\n\t\t\tfaceCopy.color.copy( face.color );\n\n\t\t\tfor ( let j = 0, jl = faceVertexColors.length; j < jl; j ++ ) {\n\n\t\t\t\tcolor = faceVertexColors[ j ];\n\t\t\t\tfaceCopy.vertexColors.push( color.clone() );\n\n\t\t\t}\n\n\t\t\tfaceCopy.materialIndex = face.materialIndex + materialIndexOffset;\n\n\t\t\tfaces1.push( faceCopy );\n\n\t\t}\n\n\t\t// uvs\n\n\t\tfor ( let i = 0, il = geometry.faceVertexUvs.length; i < il; i ++ ) {\n\n\t\t\tconst faceVertexUvs2 = geometry.faceVertexUvs[ i ];\n\n\t\t\tif ( this.faceVertexUvs[ i ] === undefined ) this.faceVertexUvs[ i ] = [];\n\n\t\t\tfor ( let j = 0, jl = faceVertexUvs2.length; j < jl; j ++ ) {\n\n\t\t\t\tconst uvs2 = faceVertexUvs2[ j ], uvsCopy = [];\n\n\t\t\t\tfor ( let k = 0, kl = uvs2.length; k < kl; k ++ ) {\n\n\t\t\t\t\tuvsCopy.push( uvs2[ k ].clone() );\n\n\t\t\t\t}\n\n\t\t\t\tthis.faceVertexUvs[ i ].push( uvsCopy );\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.mergeMorph( geometry, matrix );\n\n\t},\n\n\tmergeMesh: function ( mesh ) {\n\n\t\tif ( ! ( mesh && mesh.isMesh ) ) {\n\n\t\t\tconsole.error( 'THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.', mesh );\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( mesh.matrixAutoUpdate ) mesh.updateMatrix();\n\n\t\tthis.merge( mesh.geometry, mesh.matrix );\n\n\t},\n\n\t/*\n\t * Checks for duplicate vertices with hashmap.\n\t * Duplicated vertices are removed\n\t * and faces' vertices are updated.\n\t */\n\n\tmergeVertices: function ( precisionPoints = 4 ) {\n\n\t\tconst verticesMap = {}; // Hashmap for looking up vertices by position coordinates (and making sure they are unique)\n\t\tconst unique = [], changes = [];\n\n\t\tconst precision = Math.pow( 10, precisionPoints );\n\n\t\tfor ( let i = 0, il = this.vertices.length; i < il; i ++ ) {\n\n\t\t\tconst v = this.vertices[ i ];\n\t\t\tconst key = Math.round( v.x * precision ) + '_' + Math.round( v.y * precision ) + '_' + Math.round( v.z * precision );\n\n\t\t\tif ( verticesMap[ key ] === undefined ) {\n\n\t\t\t\tverticesMap[ key ] = i;\n\t\t\t\tunique.push( this.vertices[ i ] );\n\t\t\t\tchanges[ i ] = unique.length - 1;\n\n\t\t\t} else {\n\n\t\t\t\t//console.log('Duplicate vertex found. ', i, ' could be using ', verticesMap[key]);\n\t\t\t\tchanges[ i ] = changes[ verticesMap[ key ] ];\n\n\t\t\t}\n\n\t\t}\n\n\n\t\t// if faces are completely degenerate after merging vertices, we\n\t\t// have to remove them from the geometry.\n\t\tconst faceIndicesToRemove = [];\n\n\t\tfor ( let i = 0, il = this.faces.length; i < il; i ++ ) {\n\n\t\t\tconst face = this.faces[ i ];\n\n\t\t\tface.a = changes[ face.a ];\n\t\t\tface.b = changes[ face.b ];\n\t\t\tface.c = changes[ face.c ];\n\n\t\t\tconst indices = [ face.a, face.b, face.c ];\n\n\t\t\t// if any duplicate vertices are found in a Face3\n\t\t\t// we have to remove the face as nothing can be saved\n\t\t\tfor ( let n = 0; n < 3; n ++ ) {\n\n\t\t\t\tif ( indices[ n ] === indices[ ( n + 1 ) % 3 ] ) {\n\n\t\t\t\t\tfaceIndicesToRemove.push( i );\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfor ( let i = faceIndicesToRemove.length - 1; i >= 0; i -- ) {\n\n\t\t\tconst idx = faceIndicesToRemove[ i ];\n\n\t\t\tthis.faces.splice( idx, 1 );\n\n\t\t\tfor ( let j = 0, jl = this.faceVertexUvs.length; j < jl; j ++ ) {\n\n\t\t\t\tthis.faceVertexUvs[ j ].splice( idx, 1 );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Use unique set of vertices\n\n\t\tconst diff = this.vertices.length - unique.length;\n\t\tthis.vertices = unique;\n\t\treturn diff;\n\n\t},\n\n\tsetFromPoints: function ( points ) {\n\n\t\tthis.vertices = [];\n\n\t\tfor ( let i = 0, l = points.length; i < l; i ++ ) {\n\n\t\t\tconst point = points[ i ];\n\t\t\tthis.vertices.push( new Vector3( point.x, point.y, point.z || 0 ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t},\n\n\tsortFacesByMaterialIndex: function () {\n\n\t\tconst faces = this.faces;\n\t\tconst length = faces.length;\n\n\t\t// tag faces\n\n\t\tfor ( let i = 0; i < length; i ++ ) {\n\n\t\t\tfaces[ i ]._id = i;\n\n\t\t}\n\n\t\t// sort faces\n\n\t\tfunction materialIndexSort( a, b ) {\n\n\t\t\treturn a.materialIndex - b.materialIndex;\n\n\t\t}\n\n\t\tfaces.sort( materialIndexSort );\n\n\t\t// sort uvs\n\n\t\tconst uvs1 = this.faceVertexUvs[ 0 ];\n\t\tconst uvs2 = this.faceVertexUvs[ 1 ];\n\n\t\tlet newUvs1, newUvs2;\n\n\t\tif ( uvs1 && uvs1.length === length ) newUvs1 = [];\n\t\tif ( uvs2 && uvs2.length === length ) newUvs2 = [];\n\n\t\tfor ( let i = 0; i < length; i ++ ) {\n\n\t\t\tconst id = faces[ i ]._id;\n\n\t\t\tif ( newUvs1 ) newUvs1.push( uvs1[ id ] );\n\t\t\tif ( newUvs2 ) newUvs2.push( uvs2[ id ] );\n\n\t\t}\n\n\t\tif ( newUvs1 ) this.faceVertexUvs[ 0 ] = newUvs1;\n\t\tif ( newUvs2 ) this.faceVertexUvs[ 1 ] = newUvs2;\n\n\t},\n\n\ttoJSON: function () {\n\n\t\tconst data = {\n\t\t\tmetadata: {\n\t\t\t\tversion: 4.5,\n\t\t\t\ttype: 'Geometry',\n\t\t\t\tgenerator: 'Geometry.toJSON'\n\t\t\t}\n\t\t};\n\n\t\t// standard Geometry serialization\n\n\t\tdata.uuid = this.uuid;\n\t\tdata.type = this.type;\n\t\tif ( this.name !== '' ) data.name = this.name;\n\n\t\tif ( this.parameters !== undefined ) {\n\n\t\t\tconst parameters = this.parameters;\n\n\t\t\tfor ( const key in parameters ) {\n\n\t\t\t\tif ( parameters[ key ] !== undefined ) data[ key ] = parameters[ key ];\n\n\t\t\t}\n\n\t\t\treturn data;\n\n\t\t}\n\n\t\tconst vertices = [];\n\n\t\tfor ( let i = 0; i < this.vertices.length; i ++ ) {\n\n\t\t\tconst vertex = this.vertices[ i ];\n\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t}\n\n\t\tconst faces = [];\n\t\tconst normals = [];\n\t\tconst normalsHash = {};\n\t\tconst colors = [];\n\t\tconst colorsHash = {};\n\t\tconst uvs = [];\n\t\tconst uvsHash = {};\n\n\t\tfor ( let i = 0; i < this.faces.length; i ++ ) {\n\n\t\t\tconst face = this.faces[ i ];\n\n\t\t\tconst hasMaterial = true;\n\t\t\tconst hasFaceUv = false; // deprecated\n\t\t\tconst hasFaceVertexUv = this.faceVertexUvs[ 0 ][ i ] !== undefined;\n\t\t\tconst hasFaceNormal = face.normal.length() > 0;\n\t\t\tconst hasFaceVertexNormal = face.vertexNormals.length > 0;\n\t\t\tconst hasFaceColor = face.color.r !== 1 || face.color.g !== 1 || face.color.b !== 1;\n\t\t\tconst hasFaceVertexColor = face.vertexColors.length > 0;\n\n\t\t\tlet faceType = 0;\n\n\t\t\tfaceType = setBit( faceType, 0, 0 ); // isQuad\n\t\t\tfaceType = setBit( faceType, 1, hasMaterial );\n\t\t\tfaceType = setBit( faceType, 2, hasFaceUv );\n\t\t\tfaceType = setBit( faceType, 3, hasFaceVertexUv );\n\t\t\tfaceType = setBit( faceType, 4, hasFaceNormal );\n\t\t\tfaceType = setBit( faceType, 5, hasFaceVertexNormal );\n\t\t\tfaceType = setBit( faceType, 6, hasFaceColor );\n\t\t\tfaceType = setBit( faceType, 7, hasFaceVertexColor );\n\n\t\t\tfaces.push( faceType );\n\t\t\tfaces.push( face.a, face.b, face.c );\n\t\t\tfaces.push( face.materialIndex );\n\n\t\t\tif ( hasFaceVertexUv ) {\n\n\t\t\t\tconst faceVertexUvs = this.faceVertexUvs[ 0 ][ i ];\n\n\t\t\t\tfaces.push(\n\t\t\t\t\tgetUvIndex( faceVertexUvs[ 0 ] ),\n\t\t\t\t\tgetUvIndex( faceVertexUvs[ 1 ] ),\n\t\t\t\t\tgetUvIndex( faceVertexUvs[ 2 ] )\n\t\t\t\t);\n\n\t\t\t}\n\n\t\t\tif ( hasFaceNormal ) {\n\n\t\t\t\tfaces.push( getNormalIndex( face.normal ) );\n\n\t\t\t}\n\n\t\t\tif ( hasFaceVertexNormal ) {\n\n\t\t\t\tconst vertexNormals = face.vertexNormals;\n\n\t\t\t\tfaces.push(\n\t\t\t\t\tgetNormalIndex( vertexNormals[ 0 ] ),\n\t\t\t\t\tgetNormalIndex( vertexNormals[ 1 ] ),\n\t\t\t\t\tgetNormalIndex( vertexNormals[ 2 ] )\n\t\t\t\t);\n\n\t\t\t}\n\n\t\t\tif ( hasFaceColor ) {\n\n\t\t\t\tfaces.push( getColorIndex( face.color ) );\n\n\t\t\t}\n\n\t\t\tif ( hasFaceVertexColor ) {\n\n\t\t\t\tconst vertexColors = face.vertexColors;\n\n\t\t\t\tfaces.push(\n\t\t\t\t\tgetColorIndex( vertexColors[ 0 ] ),\n\t\t\t\t\tgetColorIndex( vertexColors[ 1 ] ),\n\t\t\t\t\tgetColorIndex( vertexColors[ 2 ] )\n\t\t\t\t);\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction setBit( value, position, enabled ) {\n\n\t\t\treturn enabled ? value | ( 1 << position ) : value & ( ~ ( 1 << position ) );\n\n\t\t}\n\n\t\tfunction getNormalIndex( normal ) {\n\n\t\t\tconst hash = normal.x.toString() + normal.y.toString() + normal.z.toString();\n\n\t\t\tif ( normalsHash[ hash ] !== undefined ) {\n\n\t\t\t\treturn normalsHash[ hash ];\n\n\t\t\t}\n\n\t\t\tnormalsHash[ hash ] = normals.length / 3;\n\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\n\t\t\treturn normalsHash[ hash ];\n\n\t\t}\n\n\t\tfunction getColorIndex( color ) {\n\n\t\t\tconst hash = color.r.toString() + color.g.toString() + color.b.toString();\n\n\t\t\tif ( colorsHash[ hash ] !== undefined ) {\n\n\t\t\t\treturn colorsHash[ hash ];\n\n\t\t\t}\n\n\t\t\tcolorsHash[ hash ] = colors.length;\n\t\t\tcolors.push( color.getHex() );\n\n\t\t\treturn colorsHash[ hash ];\n\n\t\t}\n\n\t\tfunction getUvIndex( uv ) {\n\n\t\t\tconst hash = uv.x.toString() + uv.y.toString();\n\n\t\t\tif ( uvsHash[ hash ] !== undefined ) {\n\n\t\t\t\treturn uvsHash[ hash ];\n\n\t\t\t}\n\n\t\t\tuvsHash[ hash ] = uvs.length / 2;\n\t\t\tuvs.push( uv.x, uv.y );\n\n\t\t\treturn uvsHash[ hash ];\n\n\t\t}\n\n\t\tdata.data = {};\n\n\t\tdata.data.vertices = vertices;\n\t\tdata.data.normals = normals;\n\t\tif ( colors.length > 0 ) data.data.colors = colors;\n\t\tif ( uvs.length > 0 ) data.data.uvs = [ uvs ]; // temporal backward compatibility\n\t\tdata.data.faces = faces;\n\n\t\treturn data;\n\n\t},\n\n\tclone: function () {\n\n\t\t/*\n\t\t // Handle primitives\n\n\t\t const parameters = this.parameters;\n\n\t\t if ( parameters !== undefined ) {\n\n\t\t const values = [];\n\n\t\t for ( const key in parameters ) {\n\n\t\t values.push( parameters[ key ] );\n\n\t\t }\n\n\t\t const geometry = Object.create( this.constructor.prototype );\n\t\t this.constructor.apply( geometry, values );\n\t\t return geometry;\n\n\t\t }\n\n\t\t return new this.constructor().copy( this );\n\t\t */\n\n\t\treturn new Geometry().copy( this );\n\n\t},\n\n\tcopy: function ( source ) {\n\n\t\t// reset\n\n\t\tthis.vertices = [];\n\t\tthis.colors = [];\n\t\tthis.faces = [];\n\t\tthis.faceVertexUvs = [[]];\n\t\tthis.morphTargets = [];\n\t\tthis.morphNormals = [];\n\t\tthis.skinWeights = [];\n\t\tthis.skinIndices = [];\n\t\tthis.lineDistances = [];\n\t\tthis.boundingBox = null;\n\t\tthis.boundingSphere = null;\n\n\t\t// name\n\n\t\tthis.name = source.name;\n\n\t\t// vertices\n\n\t\tconst vertices = source.vertices;\n\n\t\tfor ( let i = 0, il = vertices.length; i < il; i ++ ) {\n\n\t\t\tthis.vertices.push( vertices[ i ].clone() );\n\n\t\t}\n\n\t\t// colors\n\n\t\tconst colors = source.colors;\n\n\t\tfor ( let i = 0, il = colors.length; i < il; i ++ ) {\n\n\t\t\tthis.colors.push( colors[ i ].clone() );\n\n\t\t}\n\n\t\t// faces\n\n\t\tconst faces = source.faces;\n\n\t\tfor ( let i = 0, il = faces.length; i < il; i ++ ) {\n\n\t\t\tthis.faces.push( faces[ i ].clone() );\n\n\t\t}\n\n\t\t// face vertex uvs\n\n\t\tfor ( let i = 0, il = source.faceVertexUvs.length; i < il; i ++ ) {\n\n\t\t\tconst faceVertexUvs = source.faceVertexUvs[ i ];\n\n\t\t\tif ( this.faceVertexUvs[ i ] === undefined ) {\n\n\t\t\t\tthis.faceVertexUvs[ i ] = [];\n\n\t\t\t}\n\n\t\t\tfor ( let j = 0, jl = faceVertexUvs.length; j < jl; j ++ ) {\n\n\t\t\t\tconst uvs = faceVertexUvs[ j ], uvsCopy = [];\n\n\t\t\t\tfor ( let k = 0, kl = uvs.length; k < kl; k ++ ) {\n\n\t\t\t\t\tconst uv = uvs[ k ];\n\n\t\t\t\t\tuvsCopy.push( uv.clone() );\n\n\t\t\t\t}\n\n\t\t\t\tthis.faceVertexUvs[ i ].push( uvsCopy );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// morph targets\n\n\t\tconst morphTargets = source.morphTargets;\n\n\t\tfor ( let i = 0, il = morphTargets.length; i < il; i ++ ) {\n\n\t\t\tconst morphTarget = {};\n\t\t\tmorphTarget.name = morphTargets[ i ].name;\n\n\t\t\t// vertices\n\n\t\t\tif ( morphTargets[ i ].vertices !== undefined ) {\n\n\t\t\t\tmorphTarget.vertices = [];\n\n\t\t\t\tfor ( let j = 0, jl = morphTargets[ i ].vertices.length; j < jl; j ++ ) {\n\n\t\t\t\t\tmorphTarget.vertices.push( morphTargets[ i ].vertices[ j ].clone() );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// normals\n\n\t\t\tif ( morphTargets[ i ].normals !== undefined ) {\n\n\t\t\t\tmorphTarget.normals = [];\n\n\t\t\t\tfor ( let j = 0, jl = morphTargets[ i ].normals.length; j < jl; j ++ ) {\n\n\t\t\t\t\tmorphTarget.normals.push( morphTargets[ i ].normals[ j ].clone() );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis.morphTargets.push( morphTarget );\n\n\t\t}\n\n\t\t// morph normals\n\n\t\tconst morphNormals = source.morphNormals;\n\n\t\tfor ( let i = 0, il = morphNormals.length; i < il; i ++ ) {\n\n\t\t\tconst morphNormal = {};\n\n\t\t\t// vertex normals\n\n\t\t\tif ( morphNormals[ i ].vertexNormals !== undefined ) {\n\n\t\t\t\tmorphNormal.vertexNormals = [];\n\n\t\t\t\tfor ( let j = 0, jl = morphNormals[ i ].vertexNormals.length; j < jl; j ++ ) {\n\n\t\t\t\t\tconst srcVertexNormal = morphNormals[ i ].vertexNormals[ j ];\n\t\t\t\t\tconst destVertexNormal = {};\n\n\t\t\t\t\tdestVertexNormal.a = srcVertexNormal.a.clone();\n\t\t\t\t\tdestVertexNormal.b = srcVertexNormal.b.clone();\n\t\t\t\t\tdestVertexNormal.c = srcVertexNormal.c.clone();\n\n\t\t\t\t\tmorphNormal.vertexNormals.push( destVertexNormal );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// face normals\n\n\t\t\tif ( morphNormals[ i ].faceNormals !== undefined ) {\n\n\t\t\t\tmorphNormal.faceNormals = [];\n\n\t\t\t\tfor ( let j = 0, jl = morphNormals[ i ].faceNormals.length; j < jl; j ++ ) {\n\n\t\t\t\t\tmorphNormal.faceNormals.push( morphNormals[ i ].faceNormals[ j ].clone() );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis.morphNormals.push( morphNormal );\n\n\t\t}\n\n\t\t// skin weights\n\n\t\tconst skinWeights = source.skinWeights;\n\n\t\tfor ( let i = 0, il = skinWeights.length; i < il; i ++ ) {\n\n\t\t\tthis.skinWeights.push( skinWeights[ i ].clone() );\n\n\t\t}\n\n\t\t// skin indices\n\n\t\tconst skinIndices = source.skinIndices;\n\n\t\tfor ( let i = 0, il = skinIndices.length; i < il; i ++ ) {\n\n\t\t\tthis.skinIndices.push( skinIndices[ i ].clone() );\n\n\t\t}\n\n\t\t// line distances\n\n\t\tconst lineDistances = source.lineDistances;\n\n\t\tfor ( let i = 0, il = lineDistances.length; i < il; i ++ ) {\n\n\t\t\tthis.lineDistances.push( lineDistances[ i ] );\n\n\t\t}\n\n\t\t// bounding box\n\n\t\tconst boundingBox = source.boundingBox;\n\n\t\tif ( boundingBox !== null ) {\n\n\t\t\tthis.boundingBox = boundingBox.clone();\n\n\t\t}\n\n\t\t// bounding sphere\n\n\t\tconst boundingSphere = source.boundingSphere;\n\n\t\tif ( boundingSphere !== null ) {\n\n\t\t\tthis.boundingSphere = boundingSphere.clone();\n\n\t\t}\n\n\t\t// update flags\n\n\t\tthis.elementsNeedUpdate = source.elementsNeedUpdate;\n\t\tthis.verticesNeedUpdate = source.verticesNeedUpdate;\n\t\tthis.uvsNeedUpdate = source.uvsNeedUpdate;\n\t\tthis.normalsNeedUpdate = source.normalsNeedUpdate;\n\t\tthis.colorsNeedUpdate = source.colorsNeedUpdate;\n\t\tthis.lineDistancesNeedUpdate = source.lineDistancesNeedUpdate;\n\t\tthis.groupsNeedUpdate = source.groupsNeedUpdate;\n\n\t\treturn this;\n\n\t},\n\n\n\tcomputeGroups( ) {\n\n\t\tconst groups = [];\n\n\t\tlet group, i;\n\t\tlet materialIndex = undefined;\n\n\t\tconst faces = this.faces;\n\n\t\tfor ( i = 0; i < faces.length; i ++ ) {\n\n\t\t\tconst face = faces[ i ];\n\n\t\t\t// materials\n\n\t\t\tif ( face.materialIndex !== materialIndex ) {\n\n\t\t\t\tmaterialIndex = face.materialIndex;\n\n\t\t\t\tif ( group !== undefined ) {\n\n\t\t\t\t\tgroup.count = ( i * 3 ) - group.start;\n\t\t\t\t\tgroups.push( group );\n\n\t\t\t\t}\n\n\t\t\t\tgroup = {\n\t\t\t\t\tstart: i * 3,\n\t\t\t\t\tmaterialIndex: materialIndex\n\t\t\t\t};\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( group !== undefined ) {\n\n\t\t\tgroup.count = ( i * 3 ) - group.start;\n\t\t\tgroups.push( group );\n\n\t\t}\n\n\t\treturn groups;\n\n\t},\n\n\ttoBufferGeometry: function () {\n\n\t\tconst geometry = new DirectGeometry().fromGeometry( this );\n\n\t\tconst buffergeometry = new BufferGeometry();\n\n\t\tconst positions = new Float32Array( geometry.vertices.length * 3 );\n\t\tbuffergeometry.setAttribute( 'position', new BufferAttribute( positions, 3 ).copyVector3sArray( geometry.vertices ) );\n\n\t\tif ( geometry.normals.length > 0 ) {\n\n\t\t\tconst normals = new Float32Array( geometry.normals.length * 3 );\n\t\t\tbuffergeometry.setAttribute( 'normal', new BufferAttribute( normals, 3 ).copyVector3sArray( geometry.normals ) );\n\n\t\t}\n\n\t\tif ( geometry.colors.length > 0 ) {\n\n\t\t\tconst colors = new Float32Array( geometry.colors.length * 3 );\n\t\t\tbuffergeometry.setAttribute( 'color', new BufferAttribute( colors, 3 ).copyColorsArray( geometry.colors ) );\n\n\t\t}\n\n\t\tif ( geometry.uvs.length > 0 ) {\n\n\t\t\tconst uvs = new Float32Array( geometry.uvs.length * 2 );\n\t\t\tbuffergeometry.setAttribute( 'uv', new BufferAttribute( uvs, 2 ).copyVector2sArray( geometry.uvs ) );\n\n\t\t}\n\n\t\tif ( geometry.uvs2.length > 0 ) {\n\n\t\t\tconst uvs2 = new Float32Array( geometry.uvs2.length * 2 );\n\t\t\tbuffergeometry.setAttribute( 'uv2', new BufferAttribute( uvs2, 2 ).copyVector2sArray( geometry.uvs2 ) );\n\n\t\t}\n\n\t\t// groups\n\n\t\tbuffergeometry.groups = geometry.groups;\n\n\t\t// morphs\n\n\t\tfor ( const name in geometry.morphTargets ) {\n\n\t\t\tconst array = [];\n\t\t\tconst morphTargets = geometry.morphTargets[ name ];\n\n\t\t\tfor ( let i = 0, l = morphTargets.length; i < l; i ++ ) {\n\n\t\t\t\tconst morphTarget = morphTargets[ i ];\n\n\t\t\t\tconst attribute = new Float32BufferAttribute( morphTarget.data.length * 3, 3 );\n\t\t\t\tattribute.name = morphTarget.name;\n\n\t\t\t\tarray.push( attribute.copyVector3sArray( morphTarget.data ) );\n\n\t\t\t}\n\n\t\t\tbuffergeometry.morphAttributes[ name ] = array;\n\n\t\t}\n\n\t\t// skinning\n\n\t\tif ( geometry.skinIndices.length > 0 ) {\n\n\t\t\tconst skinIndices = new Float32BufferAttribute( geometry.skinIndices.length * 4, 4 );\n\t\t\tbuffergeometry.setAttribute( 'skinIndex', skinIndices.copyVector4sArray( geometry.skinIndices ) );\n\n\t\t}\n\n\t\tif ( geometry.skinWeights.length > 0 ) {\n\n\t\t\tconst skinWeights = new Float32BufferAttribute( geometry.skinWeights.length * 4, 4 );\n\t\t\tbuffergeometry.setAttribute( 'skinWeight', skinWeights.copyVector4sArray( geometry.skinWeights ) );\n\n\t\t}\n\n\t\t//\n\n\t\tif ( geometry.boundingSphere !== null ) {\n\n\t\t\tbuffergeometry.boundingSphere = geometry.boundingSphere.clone();\n\n\t\t}\n\n\t\tif ( geometry.boundingBox !== null ) {\n\n\t\t\tbuffergeometry.boundingBox = geometry.boundingBox.clone();\n\n\t\t}\n\n\t\treturn buffergeometry;\n\n\t},\n\n toIndexedBufferGeometry: function () {\n\n\t\t//const geometry = new DirectGeometry().fromGeometry( this );\n\n\t\tconst buffergeometry = new BufferGeometry();\n\n\t\tconst positions = new Float32Array( this.vertices.length * 3 );\n\t\tbuffergeometry.setAttribute( 'position', new BufferAttribute( positions, 3 ).copyVector3sArray( this.vertices ) );\n\n\t\tif ( this.normals.length > 0 ) {\n\t\t\tconst normals = new Float32Array( this.normals.length );\n let buffer = new BufferAttribute( normals, 3 ).copyArray( this.normals );\n\t\t\tbuffergeometry.setAttribute( 'normal', buffer);\n\t\t}\n if ( this.uvs.length > 0 && this.uvs[0].length > 0 ) {\n\n\t\t\tconst uvs = new Float32Array( this.uvs[0].length * 2 );\n\t\t\tbuffergeometry.setAttribute( 'uv', new BufferAttribute( uvs, 2 ).copyArray( this.uvs[0] ) );\n\t\t}\n\n\t\tif ( this.uvs.length > 1 && this.uvs[1].length > 0 ) {\n\t\t\tconst uvs2 = new Float32Array( this.uvs[1].length * 2 );\n\t\t\tbuffergeometry.setAttribute( 'uv2', new BufferAttribute( uvs2, 2 ).copyArray( this.uvs[1] ) );\n\t\t}\n\n if ( this.colors.length > 0) {\n\n const colorArray = [];\n for (let i = 0 ; i < this.colors.length; i++) {\n colorArray.push(new Color( this.colors[ i ] ));\n }\n const colors = new Float32Array( colorArray.length * 3 );\n\t\t\tbuffergeometry.setAttribute( 'color', new BufferAttribute( colors, 3 ).copyColorsArray( colorArray ) );\n\n } else {\n\n const colorsArray = new Float32Array( this.vertices.length * 3 );\n for (let i = 0; i < this.vertices.length * 3; i++) {\n colorsArray[i] = 1.0;\n }\n buffergeometry.setAttribute( 'color', new BufferAttribute( colorsArray, 3 ) );\n \n }\n\n if (this.faces.length > 0) {\n\n let colors = [];\n\n let indices = [];\n\n for (let i = 0 ; i < this.faces.length; i++) {\n\n indices.push(this.faces[i].a, this.faces[i].b, this.faces[i].c);\n\n const vertexColors = this.faces[i].vertexColors;\n \n if ( vertexColors.length === 3 ) {\n \n colors.push( vertexColors[ 0 ], vertexColors[ 1 ], vertexColors[ 2 ] );\n \n } else {\n \n const color = this.faces[i].color;\n \n colors.push( color, color, color );\n \n }\n\n }\n\n // if ( colors.length > 0 ) {\n\n// const colorsArray = new Float32Array( colors.length * 3 );\n// buffergeometry.setAttribute( 'color', new BufferAttribute( colorsArray, 3 ).copyColorsArray( colors ) );\n \n// }\n\n buffergeometry.setIndex( indices );\n\n buffergeometry.groups = this.computeGroups();\n\n }\n\n\t\t// morphs\n\n if (this.morphTargets.length > 0) {\n\n\t\t\tconst array = [];\n const normalsArray = [];\n\n\t\t\tfor ( let i = 0, l = this.morphTargets.length; i < l; i ++ ) {\n\n\t\t\t\tconst morphTarget = this.morphTargets[ i ];\n\n\t\t\t\tconst attribute = new Float32BufferAttribute( morphTarget.vertices.length * 3, 3 );\n\t\t\t\tattribute.name = morphTarget.name;\n\n\t\t\t\tarray.push( attribute.copyVector3sArray( morphTarget.vertices ) );\n\n if (morphTarget.normals) {\n\n\n const attribute = new Float32BufferAttribute( morphTarget.normals.length * 3, 3 );\n attribute.name = morphTarget.name;\n\n normalsArray.push( attribute.copyVector3sArray( morphTarget.normals ) );\n \n }\n\n\t\t\t}\n\n\t\t\tbuffergeometry.morphAttributes.position = array;\n buffergeometry.morphAttributes.normal = normalsArray;\n\n\t\t}\n\n\t\t// skinning\n\n\t\tif ( this.skinIndices.length > 0 ) {\n\n\t\t\tconst skinIndices = new Float32BufferAttribute( this.skinIndices.length * 4, 4 );\n\t\t\tbuffergeometry.setAttribute( 'skinIndex', skinIndices.copyVector4sArray( this.skinIndices ) );\n\n\t\t}\n\n\t\tif ( this.skinWeights.length > 0 ) {\n\n\t\t\tconst skinWeights = new Float32BufferAttribute( this.skinWeights.length * 4, 4 );\n\t\t\tbuffergeometry.setAttribute( 'skinWeight', skinWeights.copyVector4sArray( this.skinWeights ) );\n\n\t\t}\n\n\t\t//\n\n\t\tif ( this.boundingSphere !== null ) {\n\n\t\t\tbuffergeometry.boundingSphere = this.boundingSphere.clone();\n\n\t\t}\n\n\t\tif ( this.boundingBox !== null ) {\n\n\t\t\tbuffergeometry.boundingBox = this.boundingBox.clone();\n\n\t\t}\n\n\t\treturn buffergeometry;\n\n\t},\n\n\tcomputeTangents: function () {\n\n\t\tconsole.error( 'THREE.Geometry: .computeTangents() has been removed.' );\n\n\t},\n\n\tcomputeLineDistances: function () {\n\n\t\tconsole.error( 'THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.' );\n\n\t},\n\n\tapplyMatrix: function ( matrix ) {\n\n\t\tconsole.warn( 'THREE.Geometry: .applyMatrix() has been renamed to .applyMatrix4().' );\n\t\treturn this.applyMatrix4( matrix );\n\n\t},\n\n\tdispose: function () {\n\n\t\tthis.dispatchEvent( { type: 'dispose' } );\n\n\t}\n\n} );\n\nGeometry.createBufferGeometryFromObject = function ( object ) {\n\n\tlet buffergeometry = new BufferGeometry();\n\n\tconst geometry = object.geometry;\n\n\tif ( object.isPoints || object.isLine ) {\n\n\t\tconst positions = new Float32BufferAttribute( geometry.vertices.length * 3, 3 );\n\t\tconst colors = new Float32BufferAttribute( geometry.colors.length * 3, 3 );\n\n\t\tbuffergeometry.setAttribute( 'position', positions.copyVector3sArray( geometry.vertices ) );\n\t\tbuffergeometry.setAttribute( 'color', colors.copyColorsArray( geometry.colors ) );\n\n\t\tif ( geometry.lineDistances && geometry.lineDistances.length === geometry.vertices.length ) {\n\n\t\t\tconst lineDistances = new Float32BufferAttribute( geometry.lineDistances.length, 1 );\n\n\t\t\tbuffergeometry.setAttribute( 'lineDistance', lineDistances.copyArray( geometry.lineDistances ) );\n\n\t\t}\n\n\t\tif ( geometry.boundingSphere !== null ) {\n\n\t\t\tbuffergeometry.boundingSphere = geometry.boundingSphere.clone();\n\n\t\t}\n\n\t\tif ( geometry.boundingBox !== null ) {\n\n\t\t\tbuffergeometry.boundingBox = geometry.boundingBox.clone();\n\n\t\t}\n\n\t} else if ( object.isMesh ) {\n\n\t\tbuffergeometry = geometry.toBufferGeometry();\n\n\t}\n\n\treturn buffergeometry;\n\n};\n\nclass DirectGeometry {\n\n\tconstructor() {\n\n\t\tthis.vertices = [];\n\t\tthis.normals = [];\n\t\tthis.colors = [];\n\t\tthis.uvs = [];\n\t\tthis.uvs2 = [];\n\n\t\tthis.groups = [];\n\n\t\tthis.morphTargets = {};\n\n\t\tthis.skinWeights = [];\n\t\tthis.skinIndices = [];\n\n\t\t// this.lineDistances = [];\n\n\t\tthis.boundingBox = null;\n\t\tthis.boundingSphere = null;\n\n\t\t// update flags\n\n\t\tthis.verticesNeedUpdate = false;\n\t\tthis.normalsNeedUpdate = false;\n\t\tthis.colorsNeedUpdate = false;\n\t\tthis.uvsNeedUpdate = false;\n\t\tthis.groupsNeedUpdate = false;\n\n\t}\n\n\tcomputeGroups( geometry ) {\n\n\t\tconst groups = [];\n\n\t\tlet group, i;\n\t\tlet materialIndex = undefined;\n\n\t\tconst faces = geometry.faces;\n\n\t\tfor ( i = 0; i < faces.length; i ++ ) {\n\n\t\t\tconst face = faces[ i ];\n\n\t\t\t// materials\n\n\t\t\tif ( face.materialIndex !== materialIndex ) {\n\n\t\t\t\tmaterialIndex = face.materialIndex;\n\n\t\t\t\tif ( group !== undefined ) {\n\n\t\t\t\t\tgroup.count = ( i * 3 ) - group.start;\n\t\t\t\t\tgroups.push( group );\n\n\t\t\t\t}\n\n\t\t\t\tgroup = {\n\t\t\t\t\tstart: i * 3,\n\t\t\t\t\tmaterialIndex: materialIndex\n\t\t\t\t};\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( group !== undefined ) {\n\n\t\t\tgroup.count = ( i * 3 ) - group.start;\n\t\t\tgroups.push( group );\n\n\t\t}\n\n\t\tthis.groups = groups;\n\n\t}\n\n\tfromGeometry( geometry ) {\n\n\t\tconst faces = geometry.faces;\n\t\tconst vertices = geometry.vertices;\n\t\tconst faceVertexUvs = geometry.faceVertexUvs;\n\n\t\tconst hasFaceVertexUv = faceVertexUvs[ 0 ] && faceVertexUvs[ 0 ].length > 0;\n\t\tconst hasFaceVertexUv2 = faceVertexUvs[ 1 ] && faceVertexUvs[ 1 ].length > 0;\n\n\t\t// morphs\n\n\t\tconst morphTargets = geometry.morphTargets;\n\t\tconst morphTargetsLength = morphTargets.length;\n\n\t\tlet morphTargetsPosition;\n\n\t\tif ( morphTargetsLength > 0 ) {\n\n\t\t\tmorphTargetsPosition = [];\n\n\t\t\tfor ( let i = 0; i < morphTargetsLength; i ++ ) {\n\n\t\t\t\tmorphTargetsPosition[ i ] = {\n\t\t\t\t\tname: morphTargets[ i ].name,\n\t\t\t\t \tdata: []\n\t\t\t\t};\n\n\t\t\t}\n\n\t\t\tthis.morphTargets.position = morphTargetsPosition;\n\n\t\t}\n\n\t\tconst morphNormals = geometry.morphNormals;\n\t\tconst morphNormalsLength = morphNormals.length;\n\n\t\tlet morphTargetsNormal;\n\n\t\tif ( morphNormalsLength > 0 ) {\n\n\t\t\tmorphTargetsNormal = [];\n\n\t\t\tfor ( let i = 0; i < morphNormalsLength; i ++ ) {\n\n\t\t\t\tmorphTargetsNormal[ i ] = {\n\t\t\t\t\tname: morphNormals[ i ].name,\n\t\t\t\t \tdata: []\n\t\t\t\t};\n\n\t\t\t}\n\n\t\t\tthis.morphTargets.normal = morphTargetsNormal;\n\n\t\t}\n\n\t\t// skins\n\n\t\tconst skinIndices = geometry.skinIndices;\n\t\tconst skinWeights = geometry.skinWeights;\n\n\t\tconst hasSkinIndices = skinIndices.length === vertices.length;\n\t\tconst hasSkinWeights = skinWeights.length === vertices.length;\n\n\t\t//\n\n\t\tif ( vertices.length > 0 && faces.length === 0 ) {\n\n\t\t\tconsole.error( 'THREE.DirectGeometry: Faceless geometries are not supported.' );\n\n\t\t}\n\n\t\tfor ( let i = 0; i < faces.length; i ++ ) {\n\n\t\t\tconst face = faces[ i ];\n\n\t\t\tthis.vertices.push( vertices[ face.a ], vertices[ face.b ], vertices[ face.c ] );\n\n\t\t\tconst vertexNormals = face.vertexNormals;\n\n\t\t\tif ( vertexNormals.length === 3 ) {\n\n\t\t\t\tthis.normals.push( vertexNormals[ 0 ], vertexNormals[ 1 ], vertexNormals[ 2 ] );\n\n\t\t\t} else {\n\n\t\t\t\tconst normal = face.normal;\n\n\t\t\t\tthis.normals.push( normal, normal, normal );\n\n\t\t\t}\n\n\t\t\tconst vertexColors = face.vertexColors;\n\n\t\t\tif ( vertexColors.length === 3 ) {\n\n\t\t\t\tthis.colors.push( vertexColors[ 0 ], vertexColors[ 1 ], vertexColors[ 2 ] );\n\n\t\t\t} else {\n\n\t\t\t\tconst color = face.color;\n\n\t\t\t\tthis.colors.push( color, color, color );\n\n\t\t\t}\n\n\t\t\tif ( hasFaceVertexUv === true ) {\n\n\t\t\t\tconst vertexUvs = faceVertexUvs[ 0 ][ i ];\n\n\t\t\t\tif ( vertexUvs !== undefined ) {\n\n\t\t\t\t\tthis.uvs.push( vertexUvs[ 0 ], vertexUvs[ 1 ], vertexUvs[ 2 ] );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.warn( 'THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ', i );\n\n\t\t\t\t\tthis.uvs.push( new Vector2(), new Vector2(), new Vector2() );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( hasFaceVertexUv2 === true ) {\n\n\t\t\t\tconst vertexUvs = faceVertexUvs[ 1 ][ i ];\n\n\t\t\t\tif ( vertexUvs !== undefined ) {\n\n\t\t\t\t\tthis.uvs2.push( vertexUvs[ 0 ], vertexUvs[ 1 ], vertexUvs[ 2 ] );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.warn( 'THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ', i );\n\n\t\t\t\t\tthis.uvs2.push( new Vector2(), new Vector2(), new Vector2() );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// morphs\n\n\t\t\tfor ( let j = 0; j < morphTargetsLength; j ++ ) {\n\n\t\t\t\tconst morphTarget = morphTargets[ j ].vertices;\n\n\t\t\t\tmorphTargetsPosition[ j ].data.push( morphTarget[ face.a ], morphTarget[ face.b ], morphTarget[ face.c ] );\n\n\t\t\t}\n\n\t\t\tfor ( let j = 0; j < morphNormalsLength; j ++ ) {\n\n\t\t\t\tconst morphNormal = morphNormals[ j ].vertexNormals[ i ];\n\n\t\t\t\tmorphTargetsNormal[ j ].data.push( morphNormal.a, morphNormal.b, morphNormal.c );\n\n\t\t\t}\n\n\t\t\t// skins\n\n\t\t\tif ( hasSkinIndices ) {\n\n\t\t\t\tthis.skinIndices.push( skinIndices[ face.a ], skinIndices[ face.b ], skinIndices[ face.c ] );\n\n\t\t\t}\n\n\t\t\tif ( hasSkinWeights ) {\n\n\t\t\t\tthis.skinWeights.push( skinWeights[ face.a ], skinWeights[ face.b ], skinWeights[ face.c ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.computeGroups( geometry );\n\n\t\tthis.verticesNeedUpdate = geometry.verticesNeedUpdate;\n\t\tthis.normalsNeedUpdate = geometry.normalsNeedUpdate;\n\t\tthis.colorsNeedUpdate = geometry.colorsNeedUpdate;\n\t\tthis.uvsNeedUpdate = geometry.uvsNeedUpdate;\n\t\tthis.groupsNeedUpdate = geometry.groupsNeedUpdate;\n\n\t\tif ( geometry.boundingSphere !== null ) {\n\n\t\t\tthis.boundingSphere = geometry.boundingSphere.clone();\n\n\t\t}\n\n\t\tif ( geometry.boundingBox !== null ) {\n\n\t\t\tthis.boundingBox = geometry.boundingBox.clone();\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass Face3 {\n\n\tconstructor( a, b, c, normal, color, materialIndex = 0 ) {\n\n\t\tthis.a = a;\n\t\tthis.b = b;\n\t\tthis.c = c;\n\n\t\tthis.normal = ( normal && normal.isVector3 ) ? normal : new Vector3();\n\t\tthis.vertexNormals = Array.isArray( normal ) ? normal : [];\n\n\t\tthis.color = ( color && color.isColor ) ? color : new Color();\n\t\tthis.vertexColors = Array.isArray( color ) ? color : [];\n\n\t\tthis.materialIndex = materialIndex;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.a = source.a;\n\t\tthis.b = source.b;\n\t\tthis.c = source.c;\n\n\t\tthis.normal.copy( source.normal );\n\t\tthis.color.copy( source.color );\n\n\t\tthis.materialIndex = source.materialIndex;\n\n\t\tfor ( let i = 0, il = source.vertexNormals.length; i < il; i ++ ) {\n\n\t\t\tthis.vertexNormals[ i ] = source.vertexNormals[ i ].clone();\n\n\t\t}\n\n\t\tfor ( let i = 0, il = source.vertexColors.length; i < il; i ++ ) {\n\n\t\t\tthis.vertexColors[ i ] = source.vertexColors[ i ].clone();\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nexport { Face3, Geometry };\n","module.exports = require(\"three-spritetext\");","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sHDgwCEMBJZu0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAABM5JREFUWMO1V0tPG2cUPZ4Hxh6DazIOrjFNqJs0FIMqWFgWQkatsmvVbtggKlSVRVf5AWz4AWz4AUSKEChll19QJYSXkECuhFxsHjEhxCYm+DWGMZ5HF72DJq4bAzFXurI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pMpnURFEU79y503TVyKenpzOTk5M7e3t7MQKPV0Zv1gNm+awB0MvlshqLxfLb29uyJElWURSbXC4XXyvqxcXFs6mpqeTc3Nzu3t7e3wQcA7BPZ8Cov1pNlJplmQtAG8MwHV6v95tAINA5MDBwPxAIuLu6upr8fr/VAN3c3JQjkcjZ+vp6fnl5+d2bN29SuVzuNYAEpf01CdRChUL+X1VskHACuA3Ay3Fcu9vt7nA6nZ7m5uYWQRCaNE3jVVW15PP580KhIGUymWw2m00DOAJwSP4WwPtq4LX2Ao6USxNlQyS/RcQcdLGwlNIz6vEMAaZpNzCk2Pll94LK/cDYimxERiBwG10sxjgvEZBE0UpE6vxj+0Ct5bTaXthgEhRmja8QWNkkPGsuIpfdjpkK+cZUWTC0KredVmtD/gdlSl6EG4AMvQAAAABJRU5ErkJggg==\"","\n/**\n * Provide additional shaders to render time dependent color.\n */\nexports.augmentMorphColor = function() {\n return function(shader) {\n shader.vertexShader = shader.vertexShader.replace(\n '#include ',\n [\n\t 'varying vec3 vColor;',\n 'attribute vec3 morphColor0;',\n 'attribute vec3 morphColor1;'\n ].join( '\\n' )\n );\n shader.vertexShader = shader.vertexShader.replace(\n '#include ',\n [\n 'vColor.xyz = color.xyz;',\n '#ifdef USE_MORPHTARGETS',\n 'vColor = morphColor0 * morphTargetInfluences[ 0 ];',\n 'vColor += morphColor1 * morphTargetInfluences[ 1 ];',\n '#endif'\n ].join( '\\n' )\n );\n };\n}\n","const THREE = require('three');\nconst createBufferGeometry = require('../utilities').createBufferGeometry;\nconst resolveURL = require('../utilities').resolveURL;\n\nlet uniqueiId = 0;\n\nconst getUniqueId = function () {\n return \"pr\" + uniqueiId++;\n}\n\n/**\n * Provides the base object for other primitive types.\n * This class contains multiple base methods.\n * \n * @class\n * @author Alan Wu\n * @return {ZincObject}\n */\nconst ZincObject = function() {\n this.isZincObject = true;\n this.geometry = undefined;\n // THREE.Mesh\n this.morph = undefined;\n this.group = new THREE.Group();\n this._lod = new (require(\"./lod\").LOD)(this);\n /**\n\t * Groupname given to this geometry.\n\t */\n this.groupName = undefined;\n this.timeEnabled = false;\n this.morphColour = false;\n this.inbuildTime = 0;\n this.mixer = undefined;\n this.animationGroup = undefined;\n\t/**\n\t * Total duration of the animation, this value interacts with the \n\t * {@link Renderer#playRate} to produce the actual duration of the\n\t * animation. Actual time in second = duration / playRate.\n\t */\n this.duration = 6000;\n this.clipAction = undefined;\n this.userData = {};\n this.videoHandler = undefined;\n this.marker = undefined;\n this.markerNumber = undefined;\n this.markerUpdateRequired = true;\n this.closestVertexIndex = -1;\n this.boundingBoxUpdateRequired = true;\n this.cachedBoundingBox = new THREE.Box3();\n this.anatomicalId = undefined;\n this.region = undefined;\n this.animationClip = undefined;\n this.markerMode = \"inherited\";\n this.uuid = getUniqueId();\n this._v1 = new THREE.Vector3();\n this._v2 = new THREE.Vector3();\n this._b1 = new THREE.Box3();\n this.center = new THREE.Vector3();\n this.radius = 0;\n this.visible = true;\n //Draw range is only used by primitives added\n //programatically with addVertices function\n this.drawRange = -1;\n}\n\n/**\n * Set the duration of the animation of this object.\n * \n * @param {Number} durationIn - Duration of the animation.\n */\nZincObject.prototype.setDuration = function(durationIn) {\n this.duration = durationIn;\n if (this.clipAction) {\n this.clipAction.setDuration(this.duration);\n }\n}\n\n/**\n * Get the duration of the animation of this object.\n * \n * @return {Number}\n */\nZincObject.prototype.getDuration = function() {\n return this.duration;\n}\n\n/**\n * Set the region this object belongs to.\n *\n * @param {Region} region\n */\nZincObject.prototype.setRegion = function(region) {\n this.region = region;\n}\n\n/**\n * Get the region this object belongs to.\n * \n * @return {Region}\n */\nZincObject.prototype.getRegion = function() {\n return this.region;\n}\n\n/**\n * Get the threejs object3D. \n * \n * @return {Object}\n */\n ZincObject.prototype.getMorph = function() {\n const morph = this._lod.getCurrentMorph();\n return morph ? morph : this.morph;\n}\n\n/**\n * Get the threejs object3D. \n * \n * @return {Object}\n */\n ZincObject.prototype.getGroup = function() {\n return this.group;\n}\n\n/**\n * Set the internal threejs object3D. \n */\n ZincObject.prototype.setMorph = function(mesh) {\n this.morph = mesh;\n this.group.add(this.morph);\n //this is the base level object\n const distance = this._lod.calculateDistance(\"far\");\n this._lod.addLevel(mesh, distance);\n this._lod.setMaterial(mesh.material);\n}\n\n/**\n * Handle transparent mesh, create a clone for backside rendering if it is\n * transparent.\n */\nZincObject.prototype.checkTransparentMesh = function() {\n return;\n}\n\n/**\n * Set the mesh function for zincObject.\n * \n * @param {THREE.Mesh} mesh - Mesh to be set for this zinc object.\n * @param {Boolean} localTimeEnabled - A flag to indicate either the mesh is\n * time dependent.\n * @param {Boolean} localMorphColour - A flag to indicate either the colour is\n * time dependent.\n */\nZincObject.prototype.setMesh = function(mesh, localTimeEnabled, localMorphColour) {\n //Note: we assume all layers are consistent with time frame\n //Thus adding them to the same animation group should work.\n //This step is only required for the primary (level 0) mesh.\n this.animationGroup = new THREE.AnimationObjectGroup(mesh);\n this.mixer = new THREE.AnimationMixer(this.animationGroup);\n const geometry = mesh.geometry;\n this.geometry = mesh.geometry;\n this.clipAction = undefined;\n if (geometry && geometry.morphAttributes) {\n let morphAttribute = geometry.morphAttributes.position;\n if (!morphAttribute) {\n morphAttribute = geometry.morphAttributes.color ?\n geometry.morphAttributes.color :\n geometry.morphAttributes.normal;\n }\n if (morphAttribute) {\n this.animationClip = THREE.AnimationClip.CreateClipsFromMorphTargetSequences(\n morphAttribute, 10, true);\n if (this.animationClip && (this.animationClip[0] != undefined)) {\n this.clipAction = this.mixer.clipAction(this.animationClip[0]).setDuration(\n this.duration);\n this.clipAction.loop = THREE.loopOnce;\n this.clipAction.clampWhenFinished = true;\n this.clipAction.play();\n }\n }\n }\n this.timeEnabled = localTimeEnabled;\n this.morphColour = localMorphColour;\n mesh.userData = this;\n mesh.matrixAutoUpdate = false;\n this.setMorph(mesh);\n this.checkTransparentMesh();\n if (this.timeEnabled) {\n this.setFrustumCulled(false);\n } else {\n if (this.morphColour) {\n geometry.setAttribute('morphTarget0', geometry.getAttribute( 'position' ) );\n geometry.setAttribute('morphTarget1', geometry.getAttribute( 'position' ) );\n }\n }\n this.boundingBoxUpdateRequired = true;\n}\n\n/**\n * Set the name for this ZincObject.\n * \n * @param {String} groupNameIn - Name to be set.\n */\nZincObject.prototype.setName = function(groupNameIn) {\n this.groupName = groupNameIn;\n this._lod.setName(groupNameIn);\n}\n\n/**\n * Get the local time of this geometry, it returns a value between \n * 0 and the duration.\n * \n * @return {Number}\n */\nZincObject.prototype.getCurrentTime = function() {\n if (this.clipAction) {\n const ratio = this.clipAction.time / this.clipAction._clip.duration;\n return this.duration * ratio;\n } else {\n return this.inbuildTime;\n }\n}\n\n/**\n * Set the local time of this geometry.\n * \n * @param {Number} time - Can be any value between 0 to duration.\n */\nZincObject.prototype.setMorphTime = function(time) {\n let timeChanged = false;\n if (this.clipAction) {\n const ratio = time / this.duration;\n const actualDuration = this.clipAction._clip.duration;\n let newTime = ratio * actualDuration;\n if (newTime != this.clipAction.time) {\n this.clipAction.time = newTime;\n timeChanged = true;\n }\n if (timeChanged && this.isTimeVarying()) {\n this.mixer.update( 0.0 );\n }\n } else {\n let newTime = time; \n if (time > this.duration)\n newTime = this.duration;\n else if (0 > time)\n newTime = 0;\n else\n newTime = time;\n if (newTime != this.inbuildTime) {\n this.inbuildTime = newTime;\n timeChanged = true;\n }\n }\n if (timeChanged) {\n this.boundingBoxUpdateRequired = true;\n this._lod.updateMorphColorAttribute(true);\n if (this.timeEnabled)\n this.markerUpdateRequired = true;\n }\n}\n\n/**\n * Check if the geometry is time varying.\n * \n * @return {Boolean}\n */\nZincObject.prototype.isTimeVarying = function() {\n if (this.timeEnabled || this.morphColour)\n return true;\n return false;\n}\n\n/**\n * Get the visibility of this Geometry.\n * \n */\nZincObject.prototype.getVisibility = function() {\n return this.visible;\n}\n\n/**\n * Set the visibility of this Geometry.\n * \n * @param {Boolean} visible - a boolean flag indicate the visibility to be set \n */\nZincObject.prototype.setVisibility = function(visible) {\n if (visible !== this.visible) {\n this.visible = visible;\n this.group.visible = visible;\n if (this.region) this.region.pickableUpdateRequired = true;\n }\n}\n\n/**\n * Set the opacity of this Geometry. This function will also set the isTransparent\n * flag according to the provided alpha value.\n * \n * @param {Number} alpah - Alpha value to set for this geometry, \n * can be any value between from 0 to 1.0.\n */\nZincObject.prototype.setAlpha = function(alpha) {\n const material = this._lod._material;\n let isTransparent = false;\n if (alpha < 1.0)\n isTransparent = true;\n material.opacity = alpha;\n material.transparent = isTransparent;\n this.checkTransparentMesh();\n}\n\n/**\n * The rendering will be culled if it is outside of the frustrum\n * when this flag is set to true, it should be set to false if\n * morphing is enabled.\n * \n * @param {Boolean} flag - Set frustrum culling on/off based on this flag.\n */\nZincObject.prototype.setFrustumCulled = function(flag) {\n //multilayers - set for all layers\n this._lod.setFrustumCulled(flag);\n}\n\n/**\n * Set rather a zinc object should be displayed using per vertex colour or\n * not.\n * \n * @param {Boolean} vertexColors - Set display with vertex color on/off.\n */\nZincObject.prototype.setVertexColors = function(vertexColors) {\n //multilayers - set for all\n this._lod.setVertexColors(vertexColors);\n\n}\n\n/**\n * Get the colour of the mesh.\n * \n * @return {THREE.Color}\n */\nZincObject.prototype.getColour = function() {\n if (this._lod._material)\n return this._lod._material.color;\n\treturn undefined;\n}\n \n/**\n * Set the colour of the mesh.\n * \n * @param {THREE.Color} colour - Colour to be set for this geometry.\n */\nZincObject.prototype.setColour = function(colour) {\n this._lod.setColour(colour);\n}\n\n/**\n * Get the colour of the mesh in hex string form.\n * \n * @return {String}\n */\nZincObject.prototype.getColourHex = function() {\n if (!this.morphColour) {\n if (this._lod._material && this._lod._material.color)\n return this._lod._material.color.getHexString();\n }\n return undefined;\n}\n\n/**\n * Set the colour of the mesh using hex in string form.\n * \n * @param {String} hex - The colour value in hex form.\n */\nZincObject.prototype.setColourHex = function(hex) {\n this._lod._material.color.setHex(hex);\n if (this._lod._secondaryMaterial) {\n this._lod._secondaryMaterial.color.setHex(hex);\n }\n}\n\n/**\n * Set the emissive rgb of the mesh using rgb.\n * \n * @param {String} colour - The colour value in rgb form.\n */\nZincObject.prototype.setEmissiveRGB = function(colour) {\n if (this._lod._material && this._lod._material.emissive) {\n this._lod._material.emissive.setRGB(...colour);\n }\n if (this._lod._secondaryMaterial) {\n this._lod._secondaryMaterial.emissive.setRGB(...colour);\n }\n}\n\n\n/**\n * Set the material of the geometry.\n * \n * @param {THREE.Material} material - Material to be set for this geometry.\n */\nZincObject.prototype.setMaterial = function(material) {\n this._lod.setMaterial(material);\n}\n\n/**\n * Get the index of the closest vertex to centroid.\n * \n * @return {Number} - integer index in the array\n */\nZincObject.prototype.getClosestVertexIndex = function() {\n let closestIndex = -1;\n const morph = this.getMorph();\n if (morph && morph.geoemtry) {\n let position = morph.geometry.attributes.position;\n this._b1.setFromBufferAttribute(position);\n this._b1.getCenter(this._v1);\n if (position) {\n let distance = -1;\n let currentDistance = 0;\n for (let i = 0; i < position.count; i++) {\n this._v2.fromArray(position.array, i * 3);\n currentDistance = this._v2.distanceTo(this._v1);\n if (distance == -1)\n distance = currentDistance;\n else if (distance > (currentDistance)) {\n distance = currentDistance;\n closestIndex = i;\n }\n }\n }\n }\n return closestIndex;\n}\n\n/**\n * Get the closest vertex to centroid.\n * \n * @return {THREE.Vector3}\n */\nZincObject.prototype.getClosestVertex = function(applyMatrixWorld) {\n let position = new THREE.Vector3();\n if (this.closestVertexIndex == -1) {\n this.closestVertexIndex = this.getClosestVertexIndex();\n }\n const morph = this.getMorph();\n if (morph && morph.geometry && this.closestVertexIndex >= 0) {\n let influences = morph.morphTargetInfluences;\n let attributes = morph.geometry.morphAttributes;\n if (influences && attributes && attributes.position) {\n let found = false;\n for (let i = 0; i < influences.length; i++) {\n if (influences[i] > 0) {\n found = true;\n this._v1.fromArray(\n attributes.position[i].array, this.closestVertexIndex * 3);\n position.add(this._v1.multiplyScalar(influences[i]));\n }\n }\n if (found) {\n return applyMatrixWorld ? position.applyMatrix4(morph.matrixWorld) : position;\n }\n } else {\n position.fromArray(morph.geometry.attributes.position.array,\n this.closestVertexIndex * 3);\n return applyMatrixWorld ? position.applyMatrix4(morph.matrixWorld) : position;\n }\n }\n this.getBoundingBox();\n position.copy(this.center);\n return applyMatrixWorld ? position.applyMatrix4(this.morph.matrixWorld) : position;\n}\n\n/**\n * Get the bounding box of this geometry.\n * \n * @return {THREE.Box3}.\n */\nZincObject.prototype.getBoundingBox = function() {\n if (this.visible) {\n let morph = this._lod.getCurrentMorph();\n if (morph && morph.visible) {\n if (this.boundingBoxUpdateRequired) {\n require(\"../utilities\").getBoundingBox(morph, this.cachedBoundingBox,\n this._b1, this._v1, this._v2);\n this.cachedBoundingBox.getCenter(this.center);\n this.radius = this.center.distanceTo(this.cachedBoundingBox.max);\n this.boundingBoxUpdateRequired = false;\n }\n return this.cachedBoundingBox;\n }\n }\n return undefined;\n}\n\n/**\n * Clear this geometry and free the memory.\n */\nZincObject.prototype.dispose = function() {\n //multilayyers\n this._lod.dispose();\n this.animationGroup = undefined;\n this.mixer = undefined;\n this.morph = undefined;\n this.group = undefined;\n this.clipAction = undefined;\n this.groupName = undefined;\n}\n\n/**\n * Check if marker is enabled based on the objects settings with \n * the provided scene options.\n * \n * @return {Boolean} \n */\nZincObject.prototype.markerIsRequired = function(options) {\n if (this.visible && \n (this.markerMode === \"on\" || (options && options.displayMarkers &&\n (this.markerMode === \"inherited\")))) {\n return true;\n }\n return false;\n}\n\n/**\n * Update the marker's position and size based on current viewport. \n */\nZincObject.prototype.updateMarker = function(playAnimation, options) {\n if ((playAnimation == false) &&\n (this.markerIsRequired(options)))\n {\n let ndcToBeUpdated = options.ndcToBeUpdated;\n if (this.groupName) {\n if (!this.marker) {\n this.marker = new (require(\"./marker\").Marker)(this);\n this.markerUpdateRequired = true;\n }\n if (this.markerUpdateRequired) {\n let position = this.getClosestVertex(false);\n if (position) {\n this.marker.setPosition(position.x, position.y, position.z);\n this.markerUpdateRequired = false;\n }\n }\n if (!this.marker.isEnabled()) {\n if (options.markersList &&\n (!(this.marker.uuid in options.markersList))) { \n ndcToBeUpdated = true;\n options.markersList[this.marker.uuid] = this.marker;\n }\n this.marker.enable();\n this.group.add(this.marker.morph);\n }\n this.marker.setNumber(this.markerNumber);\n if (this.markerImgURL) {\n this.marker.loadUserSprite(this.markerImgURL);\n } else {\n this.marker.setDefaultSprite();\n }\n if (options && options.camera && (ndcToBeUpdated ||\n options.markerCluster.markerUpdateRequired)) {\n this.marker.updateNDC(options.camera.cameraObject);\n options.markerCluster.markerUpdateRequired = true;\n }\n }\n } else {\n if (this.marker && this.marker.isEnabled()) {\n this.marker.disable();\n this.group.remove(this.marker.morph);\n if (options.markersList &&\n (this.marker.uuid in options.markersList)) {\n options.markerCluster.markerUpdateRequired = true;\n delete options.markersList[this.marker.uuid];\n }\n }\n this.markerUpdateRequired = true;\n }\n}\n\nZincObject.prototype.processMarkerVisual = function(min, max) {\n if (this.marker && this.marker.isEnabled()) {\n this.marker.updateVisual(min, max);\n }\n}\n\nZincObject.prototype.initiateMorphColor = function() {\n //Multilayers - set all\n if (this.morphColour == 1) {\n this._lod.updateMorphColorAttribute(false);\n }\n}\n\nZincObject.prototype.setRenderOrder = function(renderOrder) {\n //multiilayers\n this._lod.setRenderOrder(renderOrder);\n}\n\n/**\n * Get the windows coordinates.\n * \n * @return {Object} - position and rather the closest vertex is on screen.\n */\nZincObject.prototype.getClosestVertexDOMElementCoords = function(scene) {\n if (scene && scene.camera) {\n let inView = true;\n const position = this.getClosestVertex(true);\n position.project(scene.camera);\n position.z = Math.min(Math.max(position.z, 0), 1);\n if (position.x > 1 || position.x < -1 || position.y > 1 || position.y < -1) {\n inView = false;\n }\n scene.getZincCameraControls().getRelativeCoordsFromNDC(position.x, position.y, position);\n return {position, inView};\n } else {\n return undefined;\n }\n}\n\n/**\n * Set marker mode for this zinc object which determine rather the\n * markers should be displayed or not.\n *\n * @param {string} mode - There are three options:\n * \"on\" - marker is enabled regardless of settings of scene\n * \"off\" - marker is disabled regardless of settings of scene\n * \"inherited\" - Marker settings on scene will determine the visibility\n * of the marker.\n * \n * @return {Boolean} \n */\n ZincObject.prototype.setMarkerMode = function(mode, options) {\n if (mode !== this.markerMode) {\n if (mode === \"on\" || mode === \"off\") {\n this.markerMode = mode;\n } else {\n this.markerMode = \"inherited\";\n }\n if (this.region) {\n this.region.pickableUpdateRequired = true;\n }\n }\n if (options) {\n this.markerNumber = options.number;\n this.markerImgURL = options.imgURL;\n }\n}\n\n//Update the geometry and colours depending on the morph.\nZincObject.prototype.render = function(delta, playAnimation,\n cameraControls, options) {\n if (this.visible && !(this.timeEnabled && playAnimation)) {\n this._lod.update(cameraControls, this.center);\n }\n if (playAnimation == true)\n {\n if ((this.clipAction) && this.isTimeVarying()) {\n this.mixer.update( delta );\n }\n else {\n let targetTime = this.inbuildTime + delta;\n if (targetTime > this.duration)\n targetTime = targetTime - this.duration;\n this.inbuildTime = targetTime;\n }\n //multilayers\n if (this.visible && delta != 0) {\n this.boundingBoxUpdateRequired = true;\n if (this.morphColour == 1) {\n this._lod.updateMorphColorAttribute(true);\n }\n }\n }\n this.updateMarker(playAnimation, options);\n}\n\n/**\n * Add lod from an url into the lod object.\n */\nZincObject.prototype.addLOD = function(loader, level, url, index, preload) {\n this._lod.addLevelFromURL(loader, level, url, index, preload);\n}\n\n/**\n * Add lod from an url into the lod object.\n */\nZincObject.prototype.addVertices = function(coords) {\n let mesh = this.getMorph();\n let geometry = undefined;\n if (!mesh) {\n geometry = createBufferGeometry(500, coords);\n this.drawRange = coords.length;\n } else {\n if (this.drawRange > -1) {\n const positionAttribute = mesh.geometry.getAttribute( 'position' );\n coords.forEach(coord => {\n positionAttribute.setXYZ(this.drawRange, coord[0], coord[1], coord[2])\n ++this.drawRange;\n });\n positionAttribute.needsUpdate = true;\n mesh.geometry.setDrawRange(0, this.drawRange);\n mesh.geometry.computeBoundingBox();\n mesh.geometry.computeBoundingSphere();\n geometry = mesh.geoemtry;\n this.boundingBoxUpdateRequired = true;\n }\n }\n return geometry;\n}\n\n/**\n * Set the objects position.\n * \n * @return {THREE.Box3}.\n */\nZincObject.prototype.setPosition = function(x, y, z) {\n const group = this.getGroup();\n if (group) {\n group.position.set(x, y, z);\n group.updateMatrix();\n this.boundingBoxUpdateRequired = true;\n }\n}\n\nZincObject.prototype.loadAdditionalSources = function(primitivesLoader, sources) {\n primitivesLoader.load(resolveURL(filename), meshloader(region, colour, opacity, localTimeEnabled, localMorphColour, undefined, undefined,\n undefined, undefined, finishCallback), this.onProgress(filename), this.onError(finishCallback));\n}\n\n/**\n * Set the objects scale.\n * \n * @return {THREE.Box3}.\n */\nZincObject.prototype.setScaleAll = function(scale) {\n const group = this.getGroup();\n if (group) {\n group.scale.set(scale, scale, scale);\n group.updateMatrix();\n this.boundingBoxUpdateRequired = true;\n }\n}\n\n\nexports.ZincObject = ZincObject;\n","const THREE = require('three');\nconst updateMorphColorAttribute = require(\"../utilities\").updateMorphColorAttribute;\nconst toBufferGeometry = require('../utilities').toBufferGeometry;\n\n/**\n * Provides an object which stores meshes at different levels based\n * on specified distance.\n * This object is ued by zincObject to provide mesh at different LODs.\n * A layer is displayed when the distance from the camera is greater \n * than its specified distance and closest compared to other layers.\n * This is intended to be an internal object used only by Zinc Object.\n * \n * This object assumes the centroid and bounding box are consistent between\n * different level of layers.\n * \n * @class\n * @author Alan Wu\n * @return {LOD}\n */\nconst LOD = function (parent) {\n this.levels = [];\n this._currentLevel = 0;\n this._renderOrder = 1;\n this._material = undefined;\n this._secondaryMaterial = undefined;\n this._loader = undefined;\n //The owning Zinc Object\n this._parent = parent;\n\n /*\n * Add a level of LOD at the specified distance\n */\n this.addLevel = (object, distanceIn) => {\n if (object) {\n const distance = Math.abs(distanceIn);\n let l;\n for (l = 0; l < this.levels.length; l++) {\n if (distance < this.levels[l].distance) {\n break;\n }\n }\n const levelObject = {\n distance: distance,\n morph: object,\n loaded: true,\n loading: false,\n url: \"\",\n };\n this.levels.splice(l, 0, levelObject);\n object.renderOrder = this._renderOrder;\n //this.add( object );\n }\n }\n\n /*\n * This is called once an ondemand level is loaded\n */\n this.levelLoaded = (object, distanceIn) => {\n if (object) {\n const distance = Math.abs(distanceIn);\n for (let l = 0; l < this.levels.length; l++) {\n if (distance === this.levels[l].distance) {\n this._parent.group.add(object);\n this.levels[l].morph = object;\n this.levels[l].loaded = true;\n this.levels[l].loading = false;\n break;\n }\n }\n this.checkTransparentMesh();\n }\n }\n\n this.addLevelFromURL = (loader, level, url, index, preload) => {\n this._loader = loader;\n const distance = this.calculateDistance(level);\n const levelObject = {\n distance: distance,\n morph: undefined,\n loaded: false,\n loading: false,\n url: url,\n index: index,\n };\n let l;\n for (l = 0; l < this.levels.length; l++) {\n if (distance < this.levels[l].distance) {\n break;\n }\n }\n this.levels.splice(l, 0, levelObject);\n if (preload) {\n this.loadLevel(l);\n }\n }\n\n //load the mesh at index, return true if morph is not ready\n this.loadLevel = (index) => {\n const level = this.levels[index];\n if (!level.morph && !level.loaded &&\n !level.loading) {\n level.loading = true;\n this._loader.load(level.url, this.lodLoader(level.distance),\n undefined, undefined, {index: level.index});\n }\n return (level.morph === undefined);\n }\n\n\n this.calculateDistance = function (level) {\n this._parent.getBoundingBox();\n const radius = this._parent.radius;\n let distance = 0;\n if (level === \"far\") {\n distance = radius * 4.5;\n } else if (level === \"medium\") {\n distance = radius * 2.5;\n } else if (level === \"close\") {\n distance = 0;\n }\n return distance;\n }\n\n /**\n * Check if there are multiple levels.\n */\n this.containsLevels = () => {\n if (this.levels && this.levels.length > 1) {\n return true;\n }\n return false;\n }\n\n /**\n * Check if material is transparent, create secondary mesh\n * for better rendering if required.\n */\n this.checkTransparentMesh = () => {\n const level = this.levels[this._currentLevel];\n if (this._material) {\n if (this._material.transparent) {\n if (!this._secondaryMaterial) {\n this._secondaryMaterial = this._material.clone();\n this._secondaryMaterial.side = THREE.FrontSide;\n }\n this._secondaryMaterial.opacity = this._material.opacity;\n if (this._secondaryMaterial.emissive) {\n this._secondaryMaterial.emissive.copy(this._material.emissive);\n }\n this._secondaryMaterial.needsUpdate = true;\n // THREE.Mesh - for utilities purpose such as rendering \n // transparent surfaces - one for front face and one for back face.\n if (!level.secondaryMesh) {\n level.secondaryMesh = new THREE.Mesh(level.morph.geometry,\n this._secondaryMaterial);\n level.secondaryMesh.renderOrder = level.morph.renderOrder + 1;\n level.secondaryMesh.userData = level.morph.userData;\n level.secondaryMesh.name = level.morph.name;\n }\n this._material.side = THREE.BackSide;\n this._material.needsUpdate = true;\n if (!level.secondaryMesh.parent) {\n level.morph.add(level.secondaryMesh);\n if (this._parent.animationGroup) {\n this._parent.animationGroup.add(level.secondaryMesh);\n }\n }\n } else {\n if (level.secondaryMesh) {\n //Do not delete this mesh, remove it from\n //rendering and animation group instead\n level.morph.remove(level.secondaryMesh);\n if (this._parent.animationGroup) {\n this._parent.animationGroup.uncache(level.secondaryMesh);\n this._parent.animationGroup.remove(level.secondaryMesh);\n }\n }\n this._material.side = THREE.DoubleSide;\n this._material.needsUpdate = true;\n }\n }\n }\n\n this.dispose = () => {\n this.levels.forEach((level) => {\n if (level.morph && level.morph.geometry) {\n level.morph.geometry.dispose();\n }\n });\n if (this._material) {\n this._material.dispose();\n }\n if (this._secondaryMaterial) {\n this._secondaryMaterial.dispose();\n }\n }\n\n this.getCurrentLevel = () => {\n return this._currentLevel;\n }\n\n this.getCurrentMorph = () => {\n const level = this.levels[this._currentLevel];\n if (level && level.morph) {\n return level.morph;\n }\n return this._parent.morph;\n }\n\n /**\n * Loader for lod object\n */\n this.lodLoader = function (distance) {\n return (geometryIn) => {\n const material = this._material;\n const options = {\n localTimeEnabled: this._parent.timeEnabled,\n localMorphColour: this._parent.morphColour,\n }\n const geometry = toBufferGeometry(geometryIn, options);\n let mesh = undefined;\n if (this._parent.isGeometry) {\n mesh = new THREE.Mesh(geometry, material);\n } else if (this._parent.isLines) {\n mesh = new (require(\"../three/line/LineSegments\").LineSegments)(geometry, material);\n }\n mesh.userData = this._parent;\n mesh.renderOrder = this._renderOrder;\n geometryIn.dispose();\n this.levelLoaded(mesh, distance);\n };\n }\n\n this.updateMorphColorAttribute = (currentOnly) => {\n //Multilayers - set all\n if (this._material) {\n if ((this._material.vertexColors == THREE.VertexColors) ||\n (this._material.vertexColors == true)) {\n if (currentOnly) {\n const morph = this.getCurrentMorph();\n updateMorphColorAttribute(morph.geometry, morph);\n } else {\n this.levels.forEach((level) => {\n if (level.morph && level.morph.geometry) {\n updateMorphColorAttribute(level.morph.geometry, level.morph);\n }\n });\n }\n }\n }\n }\n\n this.setColour = (colour) => {\n this._material.color = colour;\n if (this._secondaryMaterial) {\n this._secondaryMaterial.color = colour;\n }\n updateGeometryColour();\n }\n\n this.setFrustumCulled = (flag) => {\n this.levels.forEach((level) => {\n if (level.morph) {\n level.morph.frustumCulled = flag;\n }\n if (level.secondaryMesh) {\n level.secondaryMesh.frustumCulled = flag;\n }\n });\n }\n\n this.setMaterial = (material) => {\n if (material) {\n if (!this._material || (this._material.id !== material.id)) {\n this._material = material;\n if (this._secondaryMaterial) {\n this._secondaryMaterial.dispose();\n }\n this._secondaryMaterial = material.clone()\n this._secondaryMaterial.side = THREE.FrontSide;\n this._secondaryMaterial.transparent = true;\n this.levels.forEach((level) => {\n if (level.morph) {\n level.morph.material = this._material;\n if (level.morph.geometry) {\n level.morph.geometry.colorsNeedUpdate = true;\n }\n }\n if (level.secondaryMesh) {\n level.secondaryMesh.material = this._secondaryMaterial;\n }\n });\n }\n }\n }\n\n this.setName = (name) => {\n this.levels.forEach((level) => {\n if (level.morph) {\n level.morph.name = name;\n }\n if (level.secondaryMesh) {\n level.secondaryMesh.name = name;\n }\n });\n }\n\n this.setRenderOrder = (order) => {\n this._renderOrder = order;\n this.levels.forEach((level) => {\n if (level.morph) {\n level.morph.renderOrder = order;\n }\n if (level.secondaryMesh) {\n level.secondaryMesh.renderOrder = order;\n }\n });\n }\n\n this.setVertexColors = (vertexColors) => {\n this._material.vertexColors = vertexColors;\n updateGeometryColour();\n if (this._secondaryMaterial) {\n this._secondaryMaterial.vertexColors = vertexColors;\n }\n }\n\n /* Update layers based on the */\n this.update = (camera, center) => {\n const levels = this.levels;\n if (levels.length > 1) {\n const distance = camera.cameraObject.position.distanceTo(center);\n let visibleIndex = -1;\n let optimalIndex = -1;\n let i, l;\n //Found a visible index that is within range of the LOD\n for (i = 0, l = levels.length; i < l; i++) {\n if (distance >= levels[i].distance) {\n //Check if a level is loading\n if (levels[i].morph) {\n if (visibleIndex > -1 && levels[visibleIndex].morph) {\n levels[visibleIndex].morph.visible = false;\n }\n visibleIndex = i;\n levels[i].morph.visible = true;\n optimalIndex = -1;\n }\n else {\n optimalIndex = i;\n }\n } else {\n break;\n }\n }\n if (optimalIndex > -1) {\n this.loadLevel(optimalIndex);\n }\n for (; i < l; i++) {\n if (levels[i].morph) {\n //Set visibility of other morph to false\n //and set the closest lod to true if\n //none is found\n if (visibleIndex > -1) {\n levels[i].morph.visible = false;\n } else {\n levels[i].morph.visible = true;\n visibleIndex = i;\n }\n }\n }\n if (this._currentLevel != visibleIndex) {\n this._currentLevel = visibleIndex;\n this.checkTransparentMesh();\n }\n }\n }\n\n this.toggleMarker = (marker, flag) => {\n this.levels.forEach((level) => {\n if (level.morph) {\n if (flag) {\n level.morph.add(marker);\n } else {\n level.morph.remove(marker);\n }\n }\n });\n }\n\n const updateGeometryColour = () => {\n this.levels.forEach((level) => {\n if (level.morph && level.morph.geometry) {\n level.morph.geometry.colorsNeedUpdate = true;\n }\n });\n }\n}\n\nexports.LOD = LOD;\n","import { Line } from './Line.js';\nimport {\n Float32BufferAttribute,\n\tVector3\n} from 'three';\n\nconst _start = /*@__PURE__*/ new Vector3();\nconst _end = /*@__PURE__*/ new Vector3();\n\nclass LineSegments extends Line {\n\n\tconstructor( geometry, material ) {\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'LineSegments';\n\n\t}\n\n\tcomputeLineDistances() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\t// we assume non-indexed geometry\n\n\t\t\tif ( geometry.index === null ) {\n\n\t\t\t\tconst positionAttribute = geometry.attributes.position;\n\t\t\t\tconst lineDistances = [];\n\n\t\t\t\tfor ( let i = 0, l = positionAttribute.count; i < l; i += 2 ) {\n\n\t\t\t\t\t_start.fromBufferAttribute( positionAttribute, i );\n\t\t\t\t\t_end.fromBufferAttribute( positionAttribute, i + 1 );\n\n\t\t\t\t\tlineDistances[ i ] = ( i === 0 ) ? 0 : lineDistances[ i - 1 ];\n\t\t\t\t\tlineDistances[ i + 1 ] = lineDistances[ i ] + _start.distanceTo( _end );\n\n\t\t\t\t}\n\n\t\t\t\tgeometry.setAttribute( 'lineDistance', new Float32BufferAttribute( lineDistances, 1 ) );\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.' );\n\n\t\t\t}\n\n\t\t} else if ( geometry.isGeometry ) {\n\n\t\t\tconsole.error( 'THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nLineSegments.prototype.isLineSegments = true;\n\nexport { LineSegments };","import {\n BufferGeometry,\n Float32BufferAttribute,\n LineBasicMaterial,\n\tMatrix4,\n Object3D,\n Ray,\n\tSphere,\n\tVector3\n} from 'three';\n\n\nconst _start = /*@__PURE__*/ new Vector3();\nconst _end = /*@__PURE__*/ new Vector3();\nconst _inverseMatrix = /*@__PURE__*/ new Matrix4();\nconst _ray = /*@__PURE__*/ new Ray();\nconst _sphere = /*@__PURE__*/ new Sphere();\nconst _morphA = /*@__PURE__*/ new Vector3();\nconst _morphB = /*@__PURE__*/ new Vector3();\nconst _tempA = /*@__PURE__*/ new Vector3();\nconst _tempB = /*@__PURE__*/ new Vector3();\n\nclass Line extends Object3D {\n\n\tconstructor( geometry = new BufferGeometry(), material = new LineBasicMaterial() ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'Line';\n\n\t\tthis.geometry = geometry;\n\t\tthis.material = material;\n\n\t\tthis.updateMorphTargets();\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.material = source.material;\n\t\tthis.geometry = source.geometry;\n\n\t\treturn this;\n\n\t}\n\n\tcomputeLineDistances() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\t// we assume non-indexed geometry\n\n\t\t\tif ( geometry.index === null ) {\n\n\t\t\t\tconst positionAttribute = geometry.attributes.position;\n\t\t\t\tconst lineDistances = [ 0 ];\n\n\t\t\t\tfor ( let i = 1, l = positionAttribute.count; i < l; i ++ ) {\n\n\t\t\t\t\t_start.fromBufferAttribute( positionAttribute, i - 1 );\n\t\t\t\t\t_end.fromBufferAttribute( positionAttribute, i );\n\n\t\t\t\t\tlineDistances[ i ] = lineDistances[ i - 1 ];\n\t\t\t\t\tlineDistances[ i ] += _start.distanceTo( _end );\n\n\t\t\t\t}\n\n\t\t\t\tgeometry.setAttribute( 'lineDistance', new Float32BufferAttribute( lineDistances, 1 ) );\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.' );\n\n\t\t\t}\n\n\t\t} else if ( geometry.isGeometry ) {\n\n\t\t\tconsole.error( 'THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst geometry = this.geometry;\n\t\tconst matrixWorld = this.matrixWorld;\n\t\tconst threshold = raycaster.params.Line.threshold;\n const drawRange = geometry.drawRange;\n const morphPosition = geometry.morphAttributes.position;\n\n\t\t// Checking boundingSphere distance to ray\n\n\t\tif ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();\n\n\t\t_sphere.copy( geometry.boundingSphere );\n\t\t_sphere.applyMatrix4( matrixWorld );\n\t\t_sphere.radius += threshold;\n\n\t\tif ( raycaster.ray.intersectsSphere( _sphere ) === false ) return;\n\n\t\t//\n\n\t\t_inverseMatrix.copy( matrixWorld ).invert();\n\t\t_ray.copy( raycaster.ray ).applyMatrix4( _inverseMatrix );\n\n\t\tconst localThreshold = threshold / ( ( this.scale.x + this.scale.y + this.scale.z ) / 3 );\n\t\tconst localThresholdSq = localThreshold * localThreshold;\n\n\t\tconst vStart = new Vector3();\n\t\tconst vEnd = new Vector3();\n\t\tconst interSegment = new Vector3();\n\t\tconst interRay = new Vector3();\n\t\tconst step = this.isLineSegments ? 2 : 1;\n\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\tconst index = geometry.index;\n\t\t\tconst attributes = geometry.attributes;\n\t\t\tconst positionAttribute = attributes.position;\n\n\t\t\tif ( index !== null ) {\n\n\t\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\t\tconst end = Math.min( index.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\tfor ( let i = start, l = end - 1; i < l; i += step ) {\n\n\t\t\t\t\tconst a = index.getX( i );\n const b = index.getX( i + 1 );\n \n calculatePosition( vStart, vEnd, this, positionAttribute, morphPosition, a, b );\n\n\t\t\t\t\tconst distSq = _ray.distanceSqToSegment( vStart, vEnd, interRay, interSegment );\n\n\t\t\t\t\tif ( distSq > localThresholdSq ) continue;\n\n\t\t\t\t\tinterRay.applyMatrix4( this.matrixWorld ); //Move back to world space for distance calculation\n\n\t\t\t\t\tconst distance = raycaster.ray.origin.distanceTo( interRay );\n\n\t\t\t\t\tif ( distance < raycaster.near || distance > raycaster.far ) continue;\n\n\t\t\t\t\tintersects.push( {\n\n\t\t\t\t\t\tdistance: distance,\n\t\t\t\t\t\t// What do we want? intersection point on the ray or on the segment??\n\t\t\t\t\t\t// point: raycaster.ray.at( distance ),\n\t\t\t\t\t\tpoint: interSegment.clone().applyMatrix4( this.matrixWorld ),\n\t\t\t\t\t\tindex: i,\n\t\t\t\t\t\tface: null,\n\t\t\t\t\t\tfaceIndex: null,\n\t\t\t\t\t\tobject: this\n\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\t\tconst end = Math.min( positionAttribute.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\tfor ( let i = start, l = end - 1; i < l; i += step ) {\n\n calculatePosition( vStart, vEnd, this, positionAttribute, morphPosition, i, i+1 );\n\n\t\t\t\t\tconst distSq = _ray.distanceSqToSegment( vStart, vEnd, interRay, interSegment );\n\n\t\t\t\t\tif ( distSq > localThresholdSq ) continue;\n\n\t\t\t\t\tinterRay.applyMatrix4( this.matrixWorld ); //Move back to world space for distance calculation\n\n\t\t\t\t\tconst distance = raycaster.ray.origin.distanceTo( interRay );\n\n\t\t\t\t\tif ( distance < raycaster.near || distance > raycaster.far ) continue;\n\n\t\t\t\t\tintersects.push( {\n\n\t\t\t\t\t\tdistance: distance,\n\t\t\t\t\t\t// What do we want? intersection point on the ray or on the segment??\n\t\t\t\t\t\t// point: raycaster.ray.at( distance ),\n\t\t\t\t\t\tpoint: interSegment.clone().applyMatrix4( this.matrixWorld ),\n\t\t\t\t\t\tindex: i,\n\t\t\t\t\t\tface: null,\n\t\t\t\t\t\tfaceIndex: null,\n\t\t\t\t\t\tobject: this\n\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else if ( geometry.isGeometry ) {\n\n\t\t\tconsole.error( 'THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\n\t\t}\n\n\t}\n\n\tupdateMorphTargets() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\tconst morphAttributes = geometry.morphAttributes;\n\t\t\tconst keys = Object.keys( morphAttributes );\n\n\t\t\tif ( keys.length > 0 ) {\n\n\t\t\t\tconst morphAttribute = morphAttributes[ keys[ 0 ] ];\n\n\t\t\t\tif ( morphAttribute !== undefined ) {\n\n\t\t\t\t\tthis.morphTargetInfluences = [];\n\t\t\t\t\tthis.morphTargetDictionary = {};\n\n\t\t\t\t\tfor ( let m = 0, ml = morphAttribute.length; m < ml; m ++ ) {\n\n\t\t\t\t\t\tconst name = morphAttribute[ m ].name || String( m );\n\n\t\t\t\t\t\tthis.morphTargetInfluences.push( 0 );\n\t\t\t\t\t\tthis.morphTargetDictionary[ name ] = m;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tconst morphTargets = geometry.morphTargets;\n\n\t\t\tif ( morphTargets !== undefined && morphTargets.length > 0 ) {\n\n\t\t\t\tconsole.error( 'THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n}\n\nfunction calculatePosition( vStart, vEnd, object, position, morphPosition, a, b )\t{\n\n vStart.fromBufferAttribute( position, a );\n vEnd.fromBufferAttribute( position, b );\n\n var morphInfluences = object.morphTargetInfluences;\n\n if ( object.material.morphTargets && morphPosition && morphInfluences ) {\n\n _morphA.set( 0, 0, 0 );\n _morphB.set( 0, 0, 0 );\n\n for ( var i = 0, il = morphPosition.length; i < il; i ++ ) {\n\n var influence = morphInfluences[ i ];\n var morphAttribute = morphPosition[ i ];\n\n if ( influence === 0 ) continue;\n\n _tempA.fromBufferAttribute( morphAttribute, a );\n _tempB.fromBufferAttribute( morphAttribute, b );\n\n _morphA.addScaledVector( _tempA.sub( vStart ), influence );\n _morphB.addScaledVector( _tempB.sub( vEnd ), influence );\n\n }\n\n vStart.add( _morphA );\n vEnd.add( _morphB );\n\n }\n\n}\n\nLine.prototype.isLine = true;\n\n\nexport { Line };","var THREE = require('three');\nconst markerImage = new Image(128, 128);\nmarkerImage.src = require(\"../assets/mapMarker.svg\");\nconst texture = new THREE.Texture();\ntexture.image = markerImage;\ntexture.needsUpdate = true;\nconst size = [0.02, 0.03, 1];\nconst spriteMaterial = new THREE.SpriteMaterial({\n map: texture,\n alphaTest: 0.5,\n transparent: true,\n depthTest: false,\n depthWrite: false,\n sizeAttenuation: false\n});\nconst createNewSpriteText = require('../utilities').createNewSpriteText;\n\n/**\n * A special graphics type with a tear drop shape.\n * It is currently used to mark the location of a\n * {@link zincObject}.\n * \n * @class\n * @author Alan Wu\n * @return {Marker}\n */\nconst Marker = function(zincObject) {\n (require('./zincObject').ZincObject).call(this);\n this.texture = texture;\n let sprite = undefined;\n let userTexture = undefined;\n let userMaterial = undefined;\n let userSprite = undefined;\n let userUrl = undefined;\n let defaultDisplay = true;\n this.morph = new THREE.Group();\n this.group = this.morph;\n this.parent = zincObject;\n this.isMarker = true;\n let enabled = false;\n this.ndc = new THREE.Vector3();\n let number = undefined;\n let label = undefined;\n\n\tlet initialise = () => { \n sprite = new THREE.Sprite(spriteMaterial);\n sprite.center.set(0.5, 0);\n this.morph.add(sprite);\n this.morph.position.set(0, 0, 0);\n this.morph.renderOrder = 10000;\n sprite.scale.set(size[0], size[1], size[2]);\n sprite.userData = this;\n }\n\n this.updateVisual = (min, max) => {\n let scale = 1;\n let porportion = 0;\n if (min !== max) {\n porportion = (1 - (this.ndc.z - min) / (max - min));\n scale = 0.6 + porportion * 0.4;\n }\n this.setSpriteSize(scale);\n }\n\n this.updateNDC = camera => {\n this.ndc.copy(this.morph.position);\n this.ndc.project(camera);\n this.ndc.z = Math.min(Math.max(this.ndc.z, 0), 1);\n return this.ndc;\n }\n\n /**\n * Set the position of the marker.\n * \n * @param {Number} x - x coordinate to be set.\n * @param {Number} y - y coordinate to be set.\n * @param {Number} z - z coordinate to be set.\n */\n this.setPosition = (x, y, z) => {\n this.morph.position.set(x, y, z);\n }\n\n /**\n * Set the size of the marker.\n * \n * @param {Number} size - size to be set.\n */ \n this.setSpriteSize = size => {\n sprite.scale.set(0.015, 0.02, 1);\n sprite.scale.multiplyScalar(size);\n }\n\n this.setUserSprite = () => {\n if (defaultDisplay && userSprite) {\n this.morph.add(userSprite);\n this.morph.remove(sprite);\n if (label) {\n this.morph.remove(label);\n }\n defaultDisplay = false;\n }\n }\n\n this.setImageForUserSprite = (image, size) => {\n if (userSprite) {\n this.morph.remove(userSprite);\n userSprite.dispose();\n }\n if (userTexture) userTexture.dispose();\n if (userMaterial) userMaterial.dispose();\n userTexture = new THREE.Texture();\n userTexture.image = image;\n userTexture.needsUpdate = true;\n userMaterial = new THREE.SpriteMaterial({\n map: userTexture,\n alphaTest: 0.5,\n transparent: true,\n depthTest: false,\n depthWrite: false,\n sizeAttenuation: false\n });\n if (!size) {\n size = [0.05, 0.05, 1];\n }\n userSprite = new THREE.Sprite(userMaterial);\n userSprite.center.set(0.5, 0);\n userSprite.scale.set(size[0], size[1], size[2]);\n userSprite.userData = this;\n this.setUserSprite();\n }\n\n this.setDefaultSprite = () => {\n if (!defaultDisplay) {\n defaultDisplay = true;\n this.morph.add(sprite);\n if (userSprite) this.morph.remove(userSprite);\n if (label) this.morph.add(label);\n }\n }\n\n this.loadUserSprite = (url, size) => {\n if (url) {\n if (url !== userUrl) {\n userUrl = url;\n const userImage = new Image(128, 128);\n userImage.crossOrigin = \"anonymous\"\n userImage.onload = () => {\n this.setImageForUserSprite(userImage, size);\n };\n userImage.src = url;\n } else {\n this.setUserSprite();\n }\n }\n }\n\n /**\n * Clean up this object,\n */ \n this.dispose = () => {\n if (this.morph) {\n this.morph.clear();\n }\n if (sprite) {\n sprite.clear();\n sprite = undefined;\n }\n if (label) {\n label.material.map.dispose();\n label.material.dispose();\n label = undefined;\n }\n }\n\n this.isEnabled = () => {\n return enabled;\n }\n\n this.setNumber = (numberIn) => {\n if (!numberIn || (number != numberIn)) {\n //remove label\n if (label) {\n this.morph.remove(label);\n label.material.map.dispose();\n label.material.dispose();\n label = undefined;\n }\n }\n if (!label && numberIn) {\n label = createNewSpriteText(numberIn, 0.012, \"black\", \"Asap\", 50, 500);\n this.morph.add(label);\n }\n number = numberIn;\n }\n\n this.getNumber = () => {\n return number ? number : 1;\n }\n\n /**\n * Set the visibility of this Geometry.\n * \n * @param {Boolean} visible - a boolean flag indicate the visibility to be set \n */\n this.setVisibility = function(visible) {\n if (visible !== this.visible) {\n this.visible = visible;\n this.group.visible = visible;\n if (this.parent.region) this.parent.region.pickableUpdateRequired = true;\n }\n }\n\n /**\n * Enable and visualise the marker.\n */ \n this.enable = () => {\n enabled = true;\n this.morph.visible = true;\n this.visible = true;\n }\n\n /**\n * Disable and hide the marker.\n */ \n this.disable = () => {\n enabled = false;\n this.morph.visible = false;\n this.visible = false;\n }\n\n\tinitialise();\n\n}\n\nMarker.prototype = Object.create((require('./zincObject').ZincObject).prototype);\nexports.Marker = Marker;\n","module.exports = \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIiA/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiB3aWR0aD0iMzY1IiBoZWlnaHQ9IjU2MCIgdmlld0JveD0iMCAwIDM2NSA1NjAiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGRlc2M+Q3JlYXRlZCB3aXRoIEZhYnJpYy5qcyA1LjIuNDwvZGVzYz4NCjxkZWZzPg0KPC9kZWZzPg0KPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idHJhbnNwYXJlbnQiPjwvcmVjdD4NCjxnIHRyYW5zZm9ybT0ibWF0cml4KDAgMCAwIDAgMCAwKSIgaWQ9IjgwOGVkMjgzLTI1MjQtNDQwZi04OGFlLTNiZGI0N2JiNTc0OSI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SAxOTQuNiBDIDcuNSAyODMgMTgyLjggNTUyIDE4Mi44IDU1MiBDIDE4Mi44IDU1MiAxODIuOSA1NTEuNyAxODIuOSA1NTEuNyB6IE0gMTIyLjIgMTg3LjIgQyAxMjIuMiAxNTMuNiAxNDkuNCAxMjYuMzk5OTk5OTk5OTk5OTkgMTgzIDEyNi4zOTk5OTk5OTk5OTk5OSBDIDIxNi42IDEyNi4zOTk5OTk5OTk5OTk5OSAyNDMuOCAxNTMuNiAyNDMuOCAxODcuMiBDIDI0My44IDIyMC43OTk5OTk5OTk5OTk5OCAyMTYuNSAyNDggMTgyLjkgMjQ4IEMgMTQ5LjQgMjQ4IDEyMi4yIDIyMC44IDEyMi4yIDE4Ny4yIHoiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgLz4NCjwvZz4NCgkJPGcgdHJhbnNmb3JtPSJtYXRyaXgoMy44MiAwIDAgMy44MiAwIC0xMDAuNzcpIiAgPg0KPGNpcmNsZSBzdHlsZT0ic3Ryb2tlOiByZ2IoMCwwLDApOyBzdHJva2Utd2lkdGg6IDA7IHN0cm9rZS1kYXNoYXJyYXk6IG5vbmU7IHN0cm9rZS1saW5lY2FwOiBidXR0OyBzdHJva2UtZGFzaG9mZnNldDogMDsgc3Ryb2tlLWxpbmVqb2luOiBtaXRlcjsgc3Ryb2tlLW1pdGVybGltaXQ6IDQ7IGZpbGw6IHJnYigyNTUsMjU1LDI1NSk7IGZpbGwtcnVsZTogbm9uemVybzsgb3BhY2l0eTogMTsiIHZlY3Rvci1lZmZlY3Q9Im5vbi1zY2FsaW5nLXN0cm9rZSIgIGN4PSIwIiBjeT0iMCIgcj0iMzUiIC8+DQo8L2c+DQo8L2c+DQo8L2c+DQo8L3N2Zz4=\"","const THREE = require('three');\n\n/**\n * Zinc representation of glyph graphic, it contains the colours, \n * geometry and transformation of the glyph.\n * \n * @param {THREE.Geometry} geometry - Geometry of the glyph .\n * @param {THREE.Material} materialIn - Material of the glyph.\n * @param {Number} idIn - Id of the glyph.\n * \n * @class\n * @author Alan Wu\n * @return {Glyph}\n */\nconst Glyph = function (geometry, materialIn, idIn, glyphsetIn) {\n (require('./zincObject').ZincObject).call(this);\n let material = undefined;\n if (materialIn) {\n material = materialIn.clone();\n material.vertexColors = THREE.FaceColors;\n }\n const parent = glyphsetIn;\n this.id = idIn;\n let label = undefined;\n let labelString = undefined;\n this.isGlyph = true;\n\n /**\n * Create a glyph using mesh\n * @param {THREE.Mesh} meshIn - Mesh to create the glyph from\n *\n * @returns {Boolean} true if successful\n */\n this.fromMesh = meshIn => {\n if (meshIn && meshIn.isMesh) {\n this.morph = meshIn.clone();\n this.morph.userData = this;\n this.group.add(this.morph);\n return true;\n }\n return false;\n }\n\n if (geometry && material) {\n this.fromMesh(new THREE.Mesh(geometry, material));\n }\n\n /**\n * Get the {Glyphset} containing this glyph.\n *\n * @returns {Boolean} true if successful\n */\n this.getGlyphset = function () {\n return parent;\n }\n\n /**\n * Set and update the text containing this glyph.\n * @param {String} text - Label to be set for this instance\n */\n this.setLabel = text => {\n if (text && (typeof text === 'string' || text instanceof String)) {\n labelString = text;\n if (this.morph)\n this.morph.name = text;\n }\n if (label)\n this.showLabel();\n }\n\n /**\n * Display label with the choosen colour. It will replace the current\n * label.\n * @param {THREE.Color} colour - Colour for the label.\n */\n this.showLabel = (colour) => {\n if (label) {\n position = label.getPosition();\n this.group.remove(label.getSprite());\n label.dispose();\n label = undefined;\n }\n if (labelString && (typeof labelString === 'string' || labelString instanceof String)) {\n let position = [0, 0, 0];\n label = new (require('./label').Label)(labelString, colour);\n label.setPosition(position[0], position[1], position[2]);\n this.group.add(label.getSprite());\n }\n }\n\n /**\n * Get the label of this glyph\n * @return {Label}\n */\n this.getLabel = () => {\n return labelString;\n }\n\n /**\n * Get the mesh of this glyph.\n * @return {THREE.Mesh}\n */\n this.getMesh = () => {\n return this.morph;\n }\n\n /**\n * Set the transformation of this glyph.\n * @param {Array} position - Three components vectors containing position of the\n * transformation.\n * @param {Array} axis1 - Three components vectors containing axis1 rotation of the\n * transformation.\n * @param {Array} axis2 - Three components vectors containing axis2 rotation of the\n * transformation.\n * @param {Array} position - Three components vectors containing axis3 rotation of the\n * transformation.\n */\n this.setTransformation = (position, axis1, axis2, axis3) => {\n if (this.morph) {\n this.morph.matrix.elements[0] = axis1[0];\n this.morph.matrix.elements[1] = axis1[1];\n this.morph.matrix.elements[2] = axis1[2];\n this.morph.matrix.elements[3] = 0.0;\n this.morph.matrix.elements[4] = axis2[0];\n this.morph.matrix.elements[5] = axis2[1];\n this.morph.matrix.elements[6] = axis2[2];\n this.morph.matrix.elements[7] = 0.0;\n this.morph.matrix.elements[8] = axis3[0];\n this.morph.matrix.elements[9] = axis3[1];\n this.morph.matrix.elements[10] = axis3[2];\n this.morph.matrix.elements[11] = 0.0;\n this.morph.matrix.elements[12] = position[0];\n this.morph.matrix.elements[13] = position[1];\n this.morph.matrix.elements[14] = position[2];\n this.morph.matrix.elements[15] = 1.0;\n this.morph.matrixAutoUpdate = false;\n }\n if (label)\n label.setPosition(position[0], position[1], position[2]);\n }\n\n /**\n * Set the color of the glyph and its label.\n * \n * @param {THREE.Color} color - Colour to be set.\n */\n this.setColour = (color) => {\n if (label)\n label.setColour(color);\n if (this.secondaryMesh && this.secondaryMesh.material)\n this.secondaryMesh.material.color = colour;\n this.geometry.colorsNeedUpdate = true;\n }\n\n /**\n * Clear and free its memory.\n */\n this.dispose = () => {\n if (this.material)\n this.material.dispose();\n this.morph = undefined;\n }\n}\n\nGlyph.prototype = Object.create((require('./zincObject').ZincObject).prototype);\nexports.Glyph = Glyph;\n","const SpriteText = require('three-spritetext').default;\n\n/**\n * Bitmap labels, this is used with {@link Glyph} to \n * provide labels.\n * \n * @param {String} textIn - Text to be displayed dwith the label.\n * @param {THREE.Color} colour - Colour to be set for the label.\n * \n * @class\n * @author Alan Wu\n * @return {Label}\n */\nexports.Label = function (textIn, colour) {\n let text = textIn;\n let sprite = undefined;\n if (colour)\n sprite = new SpriteText(text, 0.015, colour.getStyle());\n else\n sprite = new SpriteText(text, 0.015);\n sprite.material.sizeAttenuation = false;\n sprite.center.x = -0.05;\n sprite.center.y = 0;\n\n /**\n * Get the current position in an array containing the x, y and z\n * coordinates.\n * \n * @return {Array}\n */\n this.getPosition = () => {\n if (sprite)\n return [sprite.position.x, sprite.position.y, sprite.position.z];\n return [0, 0, 0];\n }\n\n /**\n * Set the position of the label in 3D coordinates.\n * \n * @param {Number} x - x coordinate to be set.\n * @param {Number} y - y coordinate to be set.\n * @param {Number} z - z coordinate to be set.\n */\n this.setPosition = (x, y, z) => {\n if (sprite) {\n sprite.position.set(x, y, z);\n }\n }\n\n /**\n * Set the colour of the label\n * \n * @param {THREE.Color} colour - colour to be set\n */\n this.setColour = colour => {\n sprite.color = colour.getStyle();\n }\n\n /**\n * Scale the label.\n * \n * @param {Number} scaling - Scale to be set.\n */\n this.setScale = scaling => {\n if (sprite && scaling > 0.0)\n sprite.scale.set(scaling, scaling, 1.0);\n }\n\n /**\n * Free up the memory\n */\n this.dispose = () => {\n sprite.dispose();\n }\n\n /**\n * Get the intrnal sprite.\n * \n * @return {THREE.Sprite}\n */\n this.getSprite = () => {\n return sprite;\n }\n\n /**\n * Get the text.\n * \n * @return {String}\n */\n this.getString = () => {\n return text;\n }\n\n};\n\n\n\n","const THREE = require('three');\nconst JSONLoader = require('../loaders/JSONLoader').JSONLoader;\n\n/**\n * This is a container of {@link Glyph} and their graphical properties \n * including transformations, colors, number of time steps, duration of animations\n * and group name. Please note that all glyphs in the glyphset share the same geometry\n * however they may have different transformations.\n * \n * @class\n * @author Alan Wu\n * @return {Glyphset}\n */\nconst Glyphset = function () {\n (require('./zincObject').ZincObject).call(this);\n const glyphList = [];\n let axis1s = undefined;\n let axis2s = undefined;\n let axis3s = undefined;\n let positions = undefined;\n let scales = undefined;\n let colors = undefined;\n let labels = undefined;\n let numberOfTimeSteps = 0;\n let numberOfVertices = 0;\n let baseSize = [0, 0, 0];\n let offset = [0, 0, 0];\n let scaleFactors = [0, 0, 0];\n let repeat_mode = \"NONE\";\n this.ready = false;\n let morphColours = false;\n let morphVertices = false;\n this.isGlyphset = true;\n let _transformMatrix = new THREE.Matrix4();\n const _bot_colour = new THREE.Color();\n const _top_colour = new THREE.Color();\n const _boundingBox1 = new THREE.Box3();\n const _boundingBox2 = new THREE.Box3();\n const _boundingBox3 = new THREE.Box3();\n const _points = [];\n const _current_positions = [];\n const _current_axis1s = [];\n const _current_axis2s = [];\n const _current_axis3s = [];\n const _current_scales = [];\n const _current_colors = [];\n const _glyph_axis_array = [];\n for (let i = 0; i < 8; i++) {\n _points[i] = new THREE.Vector3();\n }\n\n /**\n * Copy glyphset data into this glyphset then load the glyph's geoemtry \n * with the provided glyphURL. FinishCallback will be called once\n * glyph is loaded.\n * \n * @param {Array} glyphsetData - contains the informations about the glyphs.\n * @param {String} glyphURL - URL to the geometry which will be applied to all\n * all the glyphs in the glyphset once loaded.\n * @param {Function} finishCallback - User's function to be called once glyph's\n * geometry is loaded.\n */\n this.load = (glyphsetData, glyphURL, finishCallback, isInline, displayLabels) => {\n axis1s = glyphsetData.axis1;\n axis2s = glyphsetData.axis2;\n axis3s = glyphsetData.axis3;\n positions = glyphsetData.positions;\n scales = glyphsetData.scale;\n colors = glyphsetData.colors;\n labels = glyphsetData.label;\n morphColours = glyphsetData.metadata.MorphColours;\n morphVertices = glyphsetData.metadata.MorphVertices;\n numberOfTimeSteps = glyphsetData.metadata.number_of_time_steps;\n repeat_mode = glyphsetData.metadata.repeat_mode;\n numberOfVertices = glyphsetData.metadata.number_of_vertices;\n if (repeat_mode == \"AXES_2D\" || repeat_mode == \"MIRROR\")\n numberOfVertices = numberOfVertices * 2;\n else if (repeat_mode == \"AXES_3D\")\n numberOfVertices = numberOfVertices * 3;\n baseSize = glyphsetData.metadata.base_size;\n offset = glyphsetData.metadata.offset;\n scaleFactors = glyphsetData.metadata.scale_factors;\n const loader = new JSONLoader();\n this.geometry = new THREE.BufferGeometry();\n const instancedMesh = new THREE.InstancedMesh(this.geometry, undefined, numberOfVertices);\n this.setMorph(instancedMesh);\n if (isInline) {\n var object = loader.parse(glyphURL);\n (meshloader(finishCallback, displayLabels))(object.geometry, object.materials);\n object.geometry.dispose();\n } else {\n loader.crossOrigin = \"Anonymous\";\n loader.load(glyphURL, meshloader(finishCallback, displayLabels));\n }\n }\n\n /**\n * Calculate the actual transformation value that can be applied \n * to the transformation matrix.\n * \n * @returns {Array}\n */\n const resolve_glyph_axes = (point, axis1, axis2, axis3, scale, return_arrays) => {\n if (repeat_mode == \"NONE\" || repeat_mode == \"MIRROR\") {\n let axis_scale = [0.0, 0.0, 0.0];\n let final_axis1 = [0.0, 0.0, 0.0];\n let final_axis2 = [0.0, 0.0, 0.0];\n let final_axis3 = [0.0, 0.0, 0.0];\n let final_point = [0.0, 0.0, 0.0];\n const mirrored_axis1 = [0.0, 0.0, 0.0];\n const mirrored_axis2 = [0.0, 0.0, 0.0];\n const mirrored_axis3 = [0.0, 0.0, 0.0];\n const mirrored_point = [0.0, 0.0, 0.0];\n for (var j = 0; j < 3; j++) {\n var sign = (scale[j] < 0.0) ? -1.0 : 1.0;\n axis_scale[j] = sign * baseSize[j] + scale[j] * scaleFactors[j];\n }\n for (var j = 0; j < 3; j++) {\n final_axis1[j] = axis1[j] * axis_scale[0];\n final_axis2[j] = axis2[j] * axis_scale[1];\n final_axis3[j] = axis3[j] * axis_scale[2];\n final_point[j] = point[j]\n + offset[0] * final_axis1[j]\n + offset[1] * final_axis2[j]\n + offset[2] * final_axis3[j];\n if (repeat_mode == \"MIRROR\") {\n mirrored_axis1[j] = -final_axis1[j];\n mirrored_axis2[j] = -final_axis2[j];\n mirrored_axis3[j] = -final_axis3[j];\n mirrored_point[j] = final_point[j];\n if (scale[0] < 0.0) {\n // shift glyph origin to end of axis1 \n final_point[j] -= final_axis1[j];\n mirrored_point[j] -= mirrored_axis1[j];\n }\n }\n }\n /* if required, reverse axis3 to maintain right-handed coordinate system */\n if (0.0 > (\n final_axis3[0] * (final_axis1[1] * final_axis2[2] -\n final_axis1[2] * final_axis2[1]) +\n final_axis3[1] * (final_axis1[2] * final_axis2[0] -\n final_axis1[0] * final_axis2[2]) +\n final_axis3[2] * (final_axis1[0] * final_axis2[1] -\n final_axis1[1] * final_axis2[0]))) {\n final_axis3[0] = -final_axis3[0];\n final_axis3[1] = -final_axis3[1];\n final_axis3[2] = -final_axis3[2];\n }\n return_arrays[0] = [final_point, final_axis1, final_axis2, final_axis3];\n if (repeat_mode == \"MIRROR\") {\n if (0.0 > (\n mirrored_axis3[0] * (mirrored_axis1[1] * mirrored_axis2[2] -\n mirrored_axis1[2] * mirrored_axis2[1]) +\n mirrored_axis3[1] * (mirrored_axis1[2] * mirrored_axis2[0] -\n mirrored_axis1[0] * mirrored_axis2[2]) +\n mirrored_axis3[2] * (mirrored_axis1[0] * mirrored_axis2[1] -\n mirrored_axis1[1] * mirrored_axis2[0]))) {\n mirrored_axis3[0] = -mirrored_axis3[0];\n mirrored_axis3[1] = -mirrored_axis3[1];\n mirrored_axis3[2] = -mirrored_axis3[2];\n }\n return_arrays[1] = [mirrored_point, mirrored_axis1, mirrored_axis2, mirrored_axis3];\n }\n }\n else if (repeat_mode == \"AXES_2D\" || repeat_mode == \"AXES_3D\") {\n let axis_scale = [0.0, 0.0, 0.0];\n let final_point = [0.0, 0.0, 0.0];\n for (var j = 0; j < 3; j++) {\n var sign = (scale[j] < 0.0) ? -1.0 : 1.0;\n axis_scale[j] = sign * baseSize[0] + scale[j] * scaleFactors[0];\n }\n for (var j = 0; j < 3; j++) {\n final_point[j] = point[j]\n + offset[0] * axis_scale[0] * axis1[j]\n + offset[1] * axis_scale[1] * axis2[j]\n + offset[2] * axis_scale[2] * axis3[j];\n }\n const number_of_glyphs = (glyph_repeat_mode == \"AXES_2D\") ? 2 : 3;\n for (let k = 0; k < number_of_glyphs; k++) {\n let use_axis1, use_axis2;\n const use_scale = scale[k];\n let final_axis1 = [0.0, 0.0, 0.0];\n let final_axis2 = [0.0, 0.0, 0.0];\n let final_axis3 = [0.0, 0.0, 0.0];\n if (k == 0) {\n use_axis1 = axis1;\n use_axis2 = axis2;\n }\n else if (k == 1) {\n use_axis1 = axis2;\n use_axis2 = (glyph_repeat_mode == \"AXES_2D\") ? axis1 : axis3;\n }\n else // if (k == 2)\n {\n use_axis1 = axis3;\n use_axis2 = axis1;\n }\n const final_scale1 = baseSize[0] + use_scale * scaleFactors[0];\n final_axis1[0] = use_axis1[0] * final_scale1;\n final_axis1[1] = use_axis1[1] * final_scale1;\n final_axis1[2] = use_axis1[2] * final_scale1;\n final_axis3[0] = final_axis1[1] * use_axis2[2] - use_axis2[1] * final_axis1[2];\n final_axis3[1] = final_axis1[2] * use_axis2[0] - use_axis2[2] * final_axis1[0];\n final_axis3[2] = final_axis1[0] * use_axis2[1] - final_axis1[1] * use_axis2[0];\n let magnitude = Math.sqrt(final_axis3[0] * final_axis3[0] + final_axis3[1] * final_axis3[1] + final_axis3[2] * final_axis3[2]);\n if (0.0 < magnitude) {\n let scaling = (baseSize[2] + use_scale * scaleFactors[2]) / magnitude;\n if ((repeat_mode == \"AXES_2D\") && (k > 0)) {\n scaling *= -1.0;\n }\n final_axis3[0] *= scaling;\n final_axis3[1] *= scaling;\n final_axis3[2] *= scaling;\n }\n\n final_axis2[0] = final_axis3[1] * final_axis1[2] - final_axis1[1] * final_axis3[2];\n final_axis2[1] = final_axis3[2] * final_axis1[0] - final_axis1[2] * final_axis3[0];\n final_axis2[2] = final_axis3[0] * final_axis1[1] - final_axis3[1] * final_axis1[0];\n magnitude = Math.sqrt(final_axis2[0] * final_axis2[0] + final_axis2[1] * final_axis2[1] + final_axis2[2] * final_axis2[2]);\n if (0.0 < magnitude) {\n var scaling = (baseSize[1] + use_scale * scaleFactors[1]) / magnitude;\n final_axis2[0] *= scaling;\n final_axis2[1] *= scaling;\n final_axis2[2] *= scaling;\n }\n return_arrays[k] = [final_point, final_axis1, final_axis2, final_axis3];\n }\n }\n return return_arrays;\n };\n\n /**\n * Update transformation for each of the glyph in this glyphset.\n */\n const updateGlyphsetTransformation = (\n current_positions,\n current_axis1s,\n current_axis2s,\n current_axis3s,\n current_scales\n ) => {\n let numberOfGlyphs = 1;\n if (repeat_mode == \"AXES_2D\" || repeat_mode == \"MIRROR\")\n numberOfGlyphs = 2;\n else if (repeat_mode == \"AXES_3D\")\n numberOfGlyphs = 3;\n const numberOfPositions = current_positions.length / 3;\n let current_glyph_index = 0;\n _glyph_axis_array.length = numberOfGlyphs;\n for (let i = 0; i < numberOfPositions; i++) {\n const current_index = i * 3;\n const current_position = [current_positions[current_index], current_positions[current_index + 1],\n current_positions[current_index + 2]];\n const current_axis1 = [current_axis1s[current_index], current_axis1s[current_index + 1],\n current_axis1s[current_index + 2]];\n const current_axis2 = [current_axis2s[current_index], current_axis2s[current_index + 1],\n current_axis2s[current_index + 2]];\n const current_axis3 = [current_axis3s[current_index], current_axis3s[current_index + 1],\n current_axis3s[current_index + 2]];\n const current_scale = [current_scales[current_index], current_scales[current_index + 1],\n current_scales[current_index + 2]];\n const arrays = resolve_glyph_axes(current_position, current_axis1, current_axis2,\n current_axis3, current_scale, _glyph_axis_array);\n if (arrays.length == numberOfGlyphs) {\n for (let j = 0; j < numberOfGlyphs; j++) {\n _transformMatrix.elements[0] = arrays[j][1][0];\n _transformMatrix.elements[1] = arrays[j][1][1];\n _transformMatrix.elements[2] = arrays[j][1][2];\n _transformMatrix.elements[3] = 0.0;\n _transformMatrix.elements[4] = arrays[j][2][0];\n _transformMatrix.elements[5] = arrays[j][2][1];\n _transformMatrix.elements[6] = arrays[j][2][2];\n _transformMatrix.elements[7] = 0.0;\n _transformMatrix.elements[8] = arrays[j][3][0];\n _transformMatrix.elements[9] = arrays[j][3][1];\n _transformMatrix.elements[10] = arrays[j][3][2];\n _transformMatrix.elements[11] = 0.0;\n _transformMatrix.elements[12] = arrays[j][0][0];\n _transformMatrix.elements[13] = arrays[j][0][1];\n _transformMatrix.elements[14] = arrays[j][0][2];\n _transformMatrix.elements[15] = 1.0;\n this.morph.setMatrixAt(current_glyph_index, _transformMatrix);\n const glyph = glyphList[current_glyph_index];\n if (glyph)\n glyph.setTransformation(arrays[j][0], arrays[j][1],\n arrays[j][2], arrays[j][3]);\n current_glyph_index++;\n }\n }\n }\n this.morph.instanceMatrix.needsUpdate = true;\n };\n\n /**\n * Update colour for each of the glyph in this glyphset.\n */\n const updateGlyphsetHexColors = current_colors => {\n let numberOfGlyphs = 1;\n if (repeat_mode == \"AXES_2D\" || repeat_mode == \"MIRROR\")\n numberOfGlyphs = 2;\n else if (repeat_mode == \"AXES_3D\")\n numberOfGlyphs = 3;\n const numberOfColours = current_colors.length;\n let current_glyph_index = 0;\n for (let i = 0; i < numberOfColours; i++) {\n const hex_values = current_colors[i];\n for (let j = 0; j < numberOfGlyphs; j++) {\n _bot_colour.setHex(hex_values)\n this.morph.setColorAt(current_glyph_index, _bot_colour);\n const glyph = glyphList[current_glyph_index];\n if (glyph)\n glyph.setColour(_bot_colour);\n current_glyph_index++;\n }\n }\n this.morph.instanceColor.needsUpdate = true;\n };\n\n /**\n * Update the current states of the glyphs in this glyphset, this includes transformation and\n * colour for each of them. This is called when glyphset and glyphs are initialised and whenever\n * the internal time has been updated.\n */\n const updateMorphGlyphsets = () => {\n const current_positions = _current_positions;\n const current_axis1s = _current_axis1s;\n const current_axis2s = _current_axis2s;\n const current_axis3s = _current_axis3s;\n const current_scales = _current_scales;\n const current_colors = _current_colors;\n\n const current_time = this.inbuildTime / this.duration * (numberOfTimeSteps - 1);\n const bottom_frame = Math.floor(current_time);\n const proportion = 1 - (current_time - bottom_frame);\n const top_frame = Math.ceil(current_time);\n if (morphVertices) {\n const bottom_positions = positions[bottom_frame.toString()];\n const top_positions = positions[top_frame.toString()];\n const bottom_axis1 = axis1s[bottom_frame.toString()];\n const top_axis1 = axis1s[top_frame.toString()];\n const bottom_axis2 = axis2s[bottom_frame.toString()];\n const top_axis2 = axis2s[top_frame.toString()];\n const bottom_axis3 = axis3s[bottom_frame.toString()];\n const top_axis3 = axis3s[top_frame.toString()];\n const bottom_scale = scales[bottom_frame.toString()];\n const top_scale = scales[top_frame.toString()];\n _current_positions.length = bottom_positions.length;\n _current_axis1s.length = bottom_positions.length;\n _current_axis2s.length = bottom_positions.length;\n _current_axis3s.length = bottom_positions.length;\n _current_scales.length = bottom_positions.length;\n\n for (let i = 0; i < bottom_positions.length; i++) {\n current_positions[i] = proportion * bottom_positions[i] + (1.0 - proportion) * top_positions[i];\n current_axis1s[i] = proportion * bottom_axis1[i] + (1.0 - proportion) * top_axis1[i];\n current_axis2s[i] = proportion * bottom_axis2[i] + (1.0 - proportion) * top_axis2[i];\n current_axis3s[i] = proportion * bottom_axis3[i] + (1.0 - proportion) * top_axis3[i];\n current_scales[i] = proportion * bottom_scale[i] + (1.0 - proportion) * top_scale[i];\n }\n } else {\n current_positions = positions[\"0\"];\n current_axis1s = axis1s[\"0\"];\n current_axis2s = axis2s[\"0\"];\n current_axis3s = axis3s[\"0\"];\n current_scales = scales[\"0\"];\n }\n updateGlyphsetTransformation(current_positions, current_axis1s, current_axis2s, current_axis3s,\n current_scales);\n this.boundingBoxUpdateRequired = true;\n if (colors != undefined) {\n if (morphColours) {\n const bottom_colors = colors[bottom_frame.toString()];\n const top_colors = colors[top_frame.toString()];\n current_colors.length = bottom_colors.length;\n for (let i = 0; i < bottom_colors.length; i++) {\n _bot_colour.setHex(bottom_colors[i]);\n _top_colour.setHex(top_colors[i]);\n _bot_colour.setRGB(_bot_colour.r * proportion + _top_colour.r * (1 - proportion),\n _bot_colour.g * proportion + _top_colour.g * (1 - proportion),\n _bot_colour.b * proportion + _top_colour.b * (1 - proportion));\n current_colors[i] = _bot_colour.getHex();\n }\n /*\n for (var i = 0; i < bottom_colors.length; i++) {\n current_colors.push(proportion * bottom_colors[i] + (1.0 - proportion) * top_colors[i]);\n }\n */\n } else {\n current_colors = colors[\"0\"];\n }\n updateGlyphsetHexColors(current_colors);\n }\n };\n\n /**\n * Display the label of the glyphs in the glyphset.\n */\n this.showLabel = () => {\n for (let i = 0; i < glyphList.length; i++) {\n glyphList[i].showLabel(this.morph.material ? this.morph.material.color : undefined);\n }\n }\n\n /**\n * Create the glyphs in the glyphset.\n * \n * @param {Boolean} displayLabels -Flag to determine either the labels should be display or not.\n */\n const createGlyphs = (displayLabels) => {\n if ((labels != undefined) && displayLabels) {\n for (let i = 0; i < numberOfVertices; i++) {\n const glyph = new (require('./glyph').Glyph)(undefined, undefined, i, this);\n if (labels != undefined && labels[i] != undefined) {\n glyph.setLabel(labels[i]);\n }\n if (numberOfTimeSteps > 0) {\n glyph.setFrustumCulled(false);\n }\n glyphList[i] = glyph;\n this.morph.add(glyph.getGroup());\n }\n }\n if ((labels != undefined) && displayLabels) {\n this.showLabel(this.morph.material ? this.morph.material.color : undefined);\n }\n //Update the transformation of the glyphs.\n updateGlyphsetTransformation(positions[\"0\"], axis1s[\"0\"],\n axis2s[\"0\"], axis3s[\"0\"], scales[\"0\"]);\n //Update the color of the glyphs.\n if (colors != undefined) {\n updateGlyphsetHexColors(colors[\"0\"]);\n }\n this.ready = true;\n this.boundingBoxUpdateRequired = true;\n };\n\n /**\n * Add a custom {@link Glyph} to this {@link Glyphset}.\n * \n * @param {Glyph} Glyph to be added.\n */\n this.addCustomGlyph = glyph => {\n if (glyph.isGlyph)\n glyphList.push(glyph);\n this.ready = true;\n this.boundingBoxUpdateRequired = true;\n }\n\n /**\n * Add a THREE.Mesh object to be displayed as glyph in this {@link Glyphset}.\n * \n * @param {THREE.Mesh} Mesh to be added.\n * @param {Number} id of the mesh.\n */\n this.addMeshAsGlyph = (mesh, id) => {\n if (mesh.isMesh) {\n const glyph = new (require('./glyph').Glyph)(undefined, undefined, id, this);\n glyph.fromMesh(mesh);\n glyphList.push(glyph);\n this.morph.add(glyph.getGroup())\n this.ready = true;\n this.boundingBoxUpdateRequired = true;\n return glyph;\n }\n return undefined;\n }\n\n /**\n * A function which iterates through the list of glyphs and call the callback\n * function with the glyph as the argument.\n * \n * @param {Function} callbackFunction - Callback function with the glyph\n * as an argument.\n */\n this.forEachGlyph = callbackFunction => {\n for (let i = 0; i < glyphList.length; i++) {\n callbackFunction(glyphList[i]);\n }\n }\n\n var meshloader = (finishCallback, displayLabels) => {\n return (geometry, materials) => {\n const tempGeometry = geometry.toBufferGeometry();\n this.geometry.copy(tempGeometry);\n this.geometry.computeBoundingSphere();\n this.geometry.computeBoundingBox();\n tempGeometry.dispose();\n if (materials && materials[0])\n this.morph.material = materials[0];\n createGlyphs(displayLabels);\n this.morph.name = this.groupName;\n this.morph.userData = this;\n this.setMorph(this.morph);\n geometry.dispose();\n if (finishCallback != undefined && (typeof finishCallback == 'function'))\n finishCallback(this);\n };\n }\n\n /**\n * Get the index of the closest vertex to centroid.\n */\n this.getClosestVertexIndex = function () {\n let closestIndex = -1;\n if (this.morph && this.ready) {\n this.getBoundingBox().getCenter(this._v1);\n let current_positions = positions[\"0\"];\n const numberOfPositions = current_positions.length / 3;\n let distance = -1;\n let currentDistance = 0;\n for (let i = 0; i < numberOfPositions; i++) {\n const current_index = i * 3;\n this._v2.set(current_positions[current_index],\n current_positions[current_index + 1],\n current_positions[current_index + 2]);\n currentDistance = this._v1.distanceTo(this._v2);\n if (distance == -1) {\n distance = currentDistance;\n closestIndex = i;\n } else if (distance > currentDistance) {\n distance = currentDistance;\n closestIndex = i;\n }\n }\n }\n return closestIndex;\n }\n\n /**\n * Get the closest vertex to centroid.\n */\n this.getClosestVertex = function () {\n\n if (this.closestVertexIndex == -1) {\n this.closestVertexIndex = this.getClosestVertexIndex();\n }\n if (this.closestVertexIndex >= 0) {\n /*\n if (glyphList && glyphList[this.closestVertexIndex]) {\n glyphList[this.closestVertexIndex].getBoundingBox().getCenter(position);\n }\n */\n if (this.morph) {\n let position = new THREE.Vector3();\n this.morph.getMatrixAt(this.closestVertexIndex, _transformMatrix);\n position.setFromMatrixPosition(_transformMatrix);\n return position;\n }\n }\n\n return undefined;\n }\n\n /**\n * Get the bounding box for the whole set of glyphs.\n * \n * @return {Three.Box3};\n */\n this.getBoundingBox = () => {\n if (this.morph && this.ready && this.morph.visible) {\n if (this.boundingBoxUpdateRequired) {\n _boundingBox1.setFromBufferAttribute(\n this.morph.geometry.attributes.position);\n for (let i = 0; i < numberOfVertices; i++) {\n this.morph.getMatrixAt(i, _transformMatrix);\n _boundingBox2.copy(_boundingBox1).applyMatrix4(_transformMatrix);\n if (i == 0) {\n _boundingBox3.copy(_boundingBox2);\n } else {\n _boundingBox3.union(_boundingBox2);\n }\n }\n if (_boundingBox3) {\n this.cachedBoundingBox.copy(_boundingBox3);\n this.morph.updateWorldMatrix(true, true);\n this.cachedBoundingBox.applyMatrix4(this.morph.matrixWorld);\n this.boundingBoxUpdateRequired = false;\n } else\n return undefined;\n }\n return this.cachedBoundingBox;\n }\n return undefined;\n }\n\n /**\n * Set the local time of this glyphset.\n * \n * @param {Number} time - Can be any value between 0 to duration.\n */\n this.setMorphTime = time => {\n if (time > this.duration)\n this.inbuildTime = this.duration;\n else if (0 > time)\n this.inbuildTime = 0;\n else\n this.inbuildTime = time;\n if (morphColours || morphVertices) {\n updateMorphGlyphsets();\n if (morphVertices)\n this.markerUpdateRequired = true;\n }\n }\n\n /**\n * Check if the glyphset is time varying.\n * \n * @return {Boolean}\n */\n this.isTimeVarying = () => {\n if (((this.ready === false) || (numberOfTimeSteps > 0)) && \n (morphColours || morphVertices))\n return true;\n return false;\n }\n\n /**\n * Get the current inbuild time of the \n * \n * @return {Number}\n */\n this.getCurrentTime = () => {\n return this.inbuildTime;\n }\n\n\n /**\n * Clear this glyphset and its list of glyphs which will release them from the memory.\n */\n this.dispose = () => {\n for (let i = glyphList.length - 1; i >= 0; i--) {\n glyphList[i].dispose();\n }\n if (this.geometry)\n this.geometry.dispose();\n if (this.morph)\n this.morph.material.dispose();\n axis1s = undefined;\n axis2s = undefined;\n axis3s = undefined;\n positions = undefined;\n scales = undefined;\n colors = undefined;\n this.ready = false;\n this.groupName = undefined;\n }\n\n /**\n * Update the glyphsets if required the render.\n */\n this.render = (delta, playAnimation, options) => {\n if (playAnimation == true) {\n let targetTime = this.inbuildTime + delta;\n if (targetTime > this.duration)\n targetTime = targetTime - this.duration;\n this.inbuildTime = targetTime;\n if (morphColours || morphVertices) {\n updateMorphGlyphsets();\n }\n }\n this.updateMarker(playAnimation, options);\n }\n}\n\nGlyphset.prototype = Object.create((require('./zincObject').ZincObject).prototype);\nexports.Glyphset = Glyphset;\n","var THREE = require('three');\n\nvar Loader = require('../three/Loader').Loader;\nvar LoaderUtils = THREE.LoaderUtils;\nvar AnimationClip = THREE.AnimationClip;\nvar Vector3 = THREE.Vector3;\nvar Vector4 = THREE.Vector4;\nvar Color = THREE.Color;\nvar Vector2 = THREE.Vector2;\nvar Face3 = require('../three/Geometry').Face3;\nvar Geometry = require('../three/Geometry').Geometry;\nvar FileLoader = THREE.FileLoader;\nvar DefaultLoadingManager = THREE.DefaultLoadingManager;\nvar VideoHandler = require('../videoHandler').VideoHandler;\n\n/**\n * @author mrdoob / http://mrdoob.com/\n * @author alteredq / http://alteredqualia.com/\n */\n\nfunction JSONLoader( manager ) {\n\n\tif ( typeof manager === 'boolean' ) {\n\n\t\tconsole.warn( 'THREE.JSONLoader: showStatus parameter has been removed from constructor.' );\n\t\tmanager = undefined;\n\n\t}\n\n\tthis.manager = ( manager !== undefined ) ? manager : DefaultLoadingManager;\n\n\tthis.withCredentials = false;\n\n this.paramsString = \"\";\n\n}\n\nObject.assign( JSONLoader.prototype, {\n\n\tload: function ( url, onLoad, onProgress, onError ) {\n\n\t\tvar scope = this;\n\n\t\tvar texturePath = this.texturePath && ( typeof this.texturePath === 'string' ) ? this.texturePath : LoaderUtils.extractUrlBase( url );\n\n\t\tvar loader = new FileLoader( this.manager );\n\n const params = url.split(\"?\");\n\n //There are parameters, add them to the target\n if (url.length === 2) {\n\n this.paramsString = paramsStrings[1];\n\n } else {\n\n this.paramsString = \"\";\n\n }\n\n\t\tloader.setWithCredentials( this.withCredentials );\n\t\tloader.load( url, function ( text ) {\n\n\t\t\tvar json = JSON.parse( text );\n\t\t\tvar metadata = json.metadata;\n\n\t\t\tif ( metadata !== undefined ) {\n\n\t\t\t\tvar type = metadata.type;\n\n\t\t\t\tif ( type !== undefined ) {\n\n\t\t\t\t\tif ( type.toLowerCase() === 'object' ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.JSONLoader: ' + url + ' should be loaded with THREE.ObjectLoader instead.' );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n if (scope && scope.parse) {\n var object = scope.parse( json, texturePath );\n onLoad( object.geometry, object.materials );\n }\n\n\t\t}, onProgress, onError );\n\n\t},\n\n\tsetTexturePath: function ( value ) {\n\n\t\tthis.texturePath = value;\n\n\t},\n\n\tparse: ( function () {\n\n\t\tfunction parseModel( json, geometry ) {\n\n\t\t\tfunction isBitSet( value, position ) {\n\n\t\t\t\treturn value & ( 1 << position );\n\n\t\t\t}\n\n\t\t\tvar i, j, fi,\n\n\t\t\t\toffset, zLength,\n\n\t\t\t\tcolorIndex, normalIndex, uvIndex, materialIndex,\n\n\t\t\t\ttype,\n\t\t\t\tisQuad,\n\t\t\t\thasMaterial,\n\t\t\t\thasFaceVertexUv,\n\t\t\t\thasFaceNormal, hasFaceVertexNormal,\n\t\t\t\thasFaceColor, hasFaceVertexColor,\n\n\t\t\t\tvertex, face, faceA, faceB, hex, normal,\n\n\t\t\t\tuvLayer, uv, u, v,\n\n\t\t\t\tfaces = json.faces,\n\t\t\t\tvertices = json.vertices,\n\t\t\t\tnormals = json.normals,\n\t\t\t\tcolors = json.colors,\n\n\t\t\t\tscale = json.scale,\n\n\t\t\t\tnUvLayers = 0;\n\n\n\t\t\tif ( json.uvs !== undefined ) {\n\n\t\t\t\t// disregard empty arrays\n\n\t\t\t\tfor ( i = 0; i < json.uvs.length; i ++ ) {\n\n\t\t\t\t\tif ( json.uvs[ i ].length ) nUvLayers ++;\n\n\t\t\t\t}\n\n\t\t\t\tfor ( i = 0; i < nUvLayers; i ++ ) {\n\n\t\t\t\t\tgeometry.faceVertexUvs[ i ] = [];\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\toffset = 0;\n\t\t\tzLength = vertices.length;\n\n\t\t\twhile ( offset < zLength ) {\n\n\t\t\t\tvertex = new Vector3();\n\n\t\t\t\tvertex.x = vertices[ offset ++ ] * scale;\n\t\t\t\tvertex.y = vertices[ offset ++ ] * scale;\n\t\t\t\tvertex.z = vertices[ offset ++ ] * scale;\n\n\t\t\t\tgeometry.vertices.push( vertex );\n\n\t\t\t}\n\n\t\t\toffset = 0;\n\t\t\tzLength = faces.length;\n\n if (json.uvs) {\n\n for ( i = 0; i < json.uvs.length; i ++ ) {\n\n geometry.uvs[i] = [];\n\n for ( let k = 0; k < json.uvs[i].length ; k++ ) {\n\n geometry.uvs[i][k] = json.uvs[i][k];\n\n }\n \n }\n \n }\n\n if (normals) {\n\n for ( i = 0; i < normals.length; i ++ ) {\n\n geometry.normals[i] = normals[i];\n\n }\n \n }\n\n if (colors) {\n\n for ( i = 0; i < colors.length; i ++ ) {\n\n geometry.colors[i] = colors[i];\n\n }\n \n }\n\n\n\t\t\twhile ( offset < zLength ) {\n\n\t\t\t\ttype = faces[ offset ++ ];\n\n\t\t\t\tisQuad = isBitSet( type, 0 );\n\t\t\t\thasMaterial = isBitSet( type, 1 );\n\t\t\t\thasFaceVertexUv = isBitSet( type, 3 );\n\t\t\t\thasFaceNormal = isBitSet( type, 4 );\n\t\t\t\thasFaceVertexNormal = isBitSet( type, 5 );\n\t\t\t\thasFaceColor = isBitSet( type, 6 );\n\t\t\t\thasFaceVertexColor = isBitSet( type, 7 );\n\n\t\t\t\t// console.log(\"type\", type, \"bits\", isQuad, hasMaterial, hasFaceVertexUv, hasFaceNormal, hasFaceVertexNormal, hasFaceColor, hasFaceVertexColor);\n\n\t\t\t\tif ( isQuad ) {\n\n\t\t\t\t\tfaceA = new Face3();\n\t\t\t\t\tfaceA.a = faces[ offset ];\n\t\t\t\t\tfaceA.b = faces[ offset + 1 ];\n\t\t\t\t\tfaceA.c = faces[ offset + 3 ];\n\n\t\t\t\t\tfaceB = new Face3();\n\t\t\t\t\tfaceB.a = faces[ offset + 1 ];\n\t\t\t\t\tfaceB.b = faces[ offset + 2 ];\n\t\t\t\t\tfaceB.c = faces[ offset + 3 ];\n\n\t\t\t\t\toffset += 4;\n\n\t\t\t\t\tif ( hasMaterial ) {\n\n\t\t\t\t\t\tmaterialIndex = faces[ offset ++ ];\n\t\t\t\t\t\tfaceA.materialIndex = materialIndex;\n\t\t\t\t\t\tfaceB.materialIndex = materialIndex;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// to get face <=> uv index correspondence\n\n\t\t\t\t\tfi = geometry.faces.length;\n\n\t\t\t\t\tif ( hasFaceVertexUv ) {\n\n\t\t\t\t\t\tfor ( i = 0; i < nUvLayers; i ++ ) {\n\n\t\t\t\t\t\t\tuvLayer = json.uvs[ i ];\n\n\t\t\t\t\t\t\tgeometry.faceVertexUvs[ i ][ fi ] = [];\n\t\t\t\t\t\t\tgeometry.faceVertexUvs[ i ][ fi + 1 ] = [];\n\n\t\t\t\t\t\t\tfor ( j = 0; j < 4; j ++ ) {\n\n\t\t\t\t\t\t\t\tuvIndex = faces[ offset ++ ];\n\n\t\t\t\t\t\t\t\tu = uvLayer[ uvIndex * 2 ];\n\t\t\t\t\t\t\t\tv = uvLayer[ uvIndex * 2 + 1 ];\n\n\t\t\t\t\t\t\t\tuv = new Vector2( u, v );\n\n\t\t\t\t\t\t\t\tif ( j !== 2 ) geometry.faceVertexUvs[ i ][ fi ].push( uv );\n\t\t\t\t\t\t\t\tif ( j !== 0 ) geometry.faceVertexUvs[ i ][ fi + 1 ].push( uv );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( hasFaceNormal ) {\n\n\t\t\t\t\t\tnormalIndex = faces[ offset ++ ] * 3;\n\n\t\t\t\t\t\tfaceA.normal.set(\n\t\t\t\t\t\t\tnormals[ normalIndex ++ ],\n\t\t\t\t\t\t\tnormals[ normalIndex ++ ],\n\t\t\t\t\t\t\tnormals[ normalIndex ]\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tfaceB.normal.copy( faceA.normal );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( hasFaceVertexNormal ) {\n\n\t\t\t\t\t\tfor ( i = 0; i < 4; i ++ ) {\n\n\t\t\t\t\t\t\tnormalIndex = faces[ offset ++ ] * 3;\n\n\t\t\t\t\t\t\tnormal = new Vector3(\n\t\t\t\t\t\t\t\tnormals[ normalIndex ++ ],\n\t\t\t\t\t\t\t\tnormals[ normalIndex ++ ],\n\t\t\t\t\t\t\t\tnormals[ normalIndex ]\n\t\t\t\t\t\t\t);\n\n\n\t\t\t\t\t\t\tif ( i !== 2 ) faceA.vertexNormals.push( normal );\n\t\t\t\t\t\t\tif ( i !== 0 ) faceB.vertexNormals.push( normal );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tif ( hasFaceColor ) {\n\n\t\t\t\t\t\tcolorIndex = faces[ offset ++ ];\n\t\t\t\t\t\thex = colors[ colorIndex ];\n\n\t\t\t\t\t\tfaceA.color.setHex( hex );\n\t\t\t\t\t\tfaceB.color.setHex( hex );\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tif ( hasFaceVertexColor ) {\n\n\t\t\t\t\t\tfor ( i = 0; i < 4; i ++ ) {\n\n\t\t\t\t\t\t\tcolorIndex = faces[ offset ++ ];\n\t\t\t\t\t\t\thex = colors[ colorIndex ];\n\n\t\t\t\t\t\t\tif ( i !== 2 ) faceA.vertexColors.push( new Color( hex ) );\n\t\t\t\t\t\t\tif ( i !== 0 ) faceB.vertexColors.push( new Color( hex ) );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tgeometry.faces.push( faceA );\n\t\t\t\t\tgeometry.faces.push( faceB );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tface = new Face3();\n\t\t\t\t\tface.a = faces[ offset ++ ];\n\t\t\t\t\tface.b = faces[ offset ++ ];\n\t\t\t\t\tface.c = faces[ offset ++ ];\n\n\t\t\t\t\tif ( hasMaterial ) {\n\n\t\t\t\t\t\tmaterialIndex = faces[ offset ++ ];\n\t\t\t\t\t\tface.materialIndex = materialIndex;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// to get face <=> uv index correspondence\n\n\t\t\t\t\tfi = geometry.faces.length;\n\n\t\t\t\t\tif ( hasFaceVertexUv ) {\n\n\t\t\t\t\t\tfor ( i = 0; i < nUvLayers; i ++ ) {\n\n\t\t\t\t\t\t\tuvLayer = json.uvs[ i ];\n\n\t\t\t\t\t\t\tgeometry.faceVertexUvs[ i ][ fi ] = [];\n\n\t\t\t\t\t\t\tfor ( j = 0; j < 3; j ++ ) {\n\n\t\t\t\t\t\t\t\tuvIndex = faces[ offset ++ ];\n\n\t\t\t\t\t\t\t\tu = uvLayer[ uvIndex * 2 ];\n\t\t\t\t\t\t\t\tv = uvLayer[ uvIndex * 2 + 1 ];\n\n\t\t\t\t\t\t\t\tuv = new Vector2( u, v );\n\n\t\t\t\t\t\t\t\tgeometry.faceVertexUvs[ i ][ fi ].push( uv );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( hasFaceNormal ) {\n\n\t\t\t\t\t\tnormalIndex = faces[ offset ++ ] * 3;\n\n\t\t\t\t\t\tface.normal.set(\n\t\t\t\t\t\t\tnormals[ normalIndex ++ ],\n\t\t\t\t\t\t\tnormals[ normalIndex ++ ],\n\t\t\t\t\t\t\tnormals[ normalIndex ]\n\t\t\t\t\t\t);\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( hasFaceVertexNormal ) {\n\n\t\t\t\t\t\tfor ( i = 0; i < 3; i ++ ) {\n\n\t\t\t\t\t\t\tnormalIndex = faces[ offset ++ ] * 3;\n\n\t\t\t\t\t\t\tnormal = new Vector3(\n\t\t\t\t\t\t\t\tnormals[ normalIndex ++ ],\n\t\t\t\t\t\t\t\tnormals[ normalIndex ++ ],\n\t\t\t\t\t\t\t\tnormals[ normalIndex ]\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tface.vertexNormals.push( normal );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tif ( hasFaceColor ) {\n\n\t\t\t\t\t\tcolorIndex = faces[ offset ++ ];\n\t\t\t\t\t\tface.color.setHex( colors[ colorIndex ] );\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tif ( hasFaceVertexColor ) {\n\n\t\t\t\t\t\tfor ( i = 0; i < 3; i ++ ) {\n\n\t\t\t\t\t\t\tcolorIndex = faces[ offset ++ ];\n\t\t\t\t\t\t\tface.vertexColors.push( new Color( colors[ colorIndex ] ) );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tgeometry.faces.push( face );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction parseSkin( json, geometry ) {\n\n\t\t\tvar influencesPerVertex = ( json.influencesPerVertex !== undefined ) ? json.influencesPerVertex : 2;\n\n\t\t\tif ( json.skinWeights ) {\n\n\t\t\t\tfor ( var i = 0, l = json.skinWeights.length; i < l; i += influencesPerVertex ) {\n\n\t\t\t\t\tvar x = json.skinWeights[ i ];\n\t\t\t\t\tvar y = ( influencesPerVertex > 1 ) ? json.skinWeights[ i + 1 ] : 0;\n\t\t\t\t\tvar z = ( influencesPerVertex > 2 ) ? json.skinWeights[ i + 2 ] : 0;\n\t\t\t\t\tvar w = ( influencesPerVertex > 3 ) ? json.skinWeights[ i + 3 ] : 0;\n\n\t\t\t\t\tgeometry.skinWeights.push( new Vector4( x, y, z, w ) );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( json.skinIndices ) {\n\n\t\t\t\tfor ( var i = 0, l = json.skinIndices.length; i < l; i += influencesPerVertex ) {\n\n\t\t\t\t\tvar a = json.skinIndices[ i ];\n\t\t\t\t\tvar b = ( influencesPerVertex > 1 ) ? json.skinIndices[ i + 1 ] : 0;\n\t\t\t\t\tvar c = ( influencesPerVertex > 2 ) ? json.skinIndices[ i + 2 ] : 0;\n\t\t\t\t\tvar d = ( influencesPerVertex > 3 ) ? json.skinIndices[ i + 3 ] : 0;\n\n\t\t\t\t\tgeometry.skinIndices.push( new Vector4( a, b, c, d ) );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tgeometry.bones = json.bones;\n\n\t\t\tif ( geometry.bones && geometry.bones.length > 0 && ( geometry.skinWeights.length !== geometry.skinIndices.length || geometry.skinIndices.length !== geometry.vertices.length ) ) {\n\n\t\t\t\tconsole.warn( 'When skinning, number of vertices (' + geometry.vertices.length + '), skinIndices (' +\n\t\t\t\t\tgeometry.skinIndices.length + '), and skinWeights (' + geometry.skinWeights.length + ') should match.' );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction parseMorphing( json, geometry ) {\n\n\t\t\tvar scale = json.scale;\n\n\t\t\tif ( json.morphTargets !== undefined ) {\n\n\t\t\t\tfor ( var i = 0, l = json.morphTargets.length; i < l; i ++ ) {\n\n\t\t\t\t\tgeometry.morphTargets[ i ] = {};\n\t\t\t\t\tgeometry.morphTargets[ i ].name = json.morphTargets[ i ].name;\n\t\t\t\t\tgeometry.morphTargets[ i ].vertices = [];\n\n\t\t\t\t\tvar dstVertices = geometry.morphTargets[ i ].vertices;\n\t\t\t\t\tvar srcVertices = json.morphTargets[ i ].vertices;\n\n\t\t\t\t\tfor ( var v = 0, vl = srcVertices.length; v < vl; v += 3 ) {\n\n\t\t\t\t\t\tvar vertex = new Vector3();\n\t\t\t\t\t\tvertex.x = srcVertices[ v ] * scale;\n\t\t\t\t\t\tvertex.y = srcVertices[ v + 1 ] * scale;\n\t\t\t\t\t\tvertex.z = srcVertices[ v + 2 ] * scale;\n\n\t\t\t\t\t\tdstVertices.push( vertex );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( json.morphNormals !== undefined ) {\n\n\t\t\t\tfor ( var i = 0, l = json.morphNormals.length; i < l; i ++ ) {\n\n if (geometry.morphTargets[ i ]) {\n\n geometry.morphTargets[ i ].normals = [];\n\n var dstNormals = geometry.morphTargets[ i ].normals;\n var srcNormals = json.morphNormals[ i ].normals;\n\n for ( var v = 0, vl = srcNormals.length; v < vl; v += 3 ) {\n\n var normals = new Vector3();\n normals.x = srcNormals[ v ];\n normals.y = srcNormals[ v + 1 ] ;\n normals.z = srcNormals[ v + 2 ] ;\n\n dstNormals.push( normals );\n\n }\n\n geometry.morphNormalsReady = true;\n\n }\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( json.morphColors !== undefined ) {\n\n\t\t\t\tvar i, l, c, cl, dstColors, srcColors, color;\n\n\t\t\t\tfor ( i = 0, l = json.morphColors.length; i < l; i ++ ) {\n\n\t\t\t\t\tgeometry.morphColors[ i ] = {};\n\t\t\t\t\tgeometry.morphColors[ i ].name = json.morphColors[ i ].name;\n\t\t\t\t\tgeometry.morphColors[ i ].colors = [];\n\n\t\t\t\t\tdstColors = geometry.morphColors[ i ].colors;\n\t\t\t\t\tsrcColors = json.morphColors[ i ].colors;\n\n\t\t\t\t\tfor ( c = 0, cl = srcColors.length; c < cl; c += 3 ) {\n\n\t\t\t\t\t\tcolor = new THREE.Color( 0xffaa00 );\n\t\t\t\t\t\tcolor.setRGB( srcColors[ c ], srcColors[ c + 1 ], srcColors[ c + 2 ] );\n\t\t\t\t\t\tdstColors.push( color );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction parseAnimations( json, geometry ) {\n\n\t\t\tvar outputAnimations = [];\n\n\t\t\t// parse old style Bone/Hierarchy animations\n\t\t\tvar animations = [];\n\n\t\t\tif ( json.animation !== undefined ) {\n\n\t\t\t\tanimations.push( json.animation );\n\n\t\t\t}\n\n\t\t\tif ( json.animations !== undefined ) {\n\n\t\t\t\tif ( json.animations.length ) {\n\n\t\t\t\t\tanimations = animations.concat( json.animations );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tanimations.push( json.animations );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tfor ( var i = 0; i < animations.length; i ++ ) {\n\n\t\t\t\tvar clip = AnimationClip.parseAnimation( animations[ i ], geometry.bones );\n\t\t\t\tif ( clip ) outputAnimations.push( clip );\n\n\t\t\t}\n\n\t\t\t// parse implicit morph animations\n\t\t\tif ( geometry.morphTargets ) {\n\n\t\t\t\t// TODO: Figure out what an appropraite FPS is for morph target animations -- defaulting to 10, but really it is completely arbitrary.\n\t\t\t\tvar morphAnimationClips = AnimationClip.CreateClipsFromMorphTargetSequences( geometry.morphTargets, 10 );\n\t\t\t\toutputAnimations = outputAnimations.concat( morphAnimationClips );\n\n\t\t\t}\n\n\t\t\tif ( outputAnimations.length > 0 ) geometry.animations = outputAnimations;\n\n\t\t}\n\n\t\treturn function parse( json, texturePath ) {\n\n\t\t\tif ( json.data !== undefined ) {\n\n\t\t\t\t// Geometry 4.0 spec\n\t\t\t\tjson = json.data;\n\n\t\t\t}\n\n\t\t\tif ( json.scale !== undefined ) {\n\n\t\t\t\tjson.scale = 1.0 / json.scale;\n\n\t\t\t} else {\n\n\t\t\t\tjson.scale = 1.0;\n\n\t\t\t}\n\n\t\t\tvar geometry = new Geometry();\n\t\t\tgeometry.morphColors = [];\n\t\t\tparseModel( json, geometry );\n\t\t\tparseSkin( json, geometry );\n\t\t\tparseMorphing( json, geometry );\n\t\t\tparseAnimations( json, geometry );\n\n\t\t\tgeometry.computeFaceNormals();\n\t\t\tgeometry.computeBoundingSphere();\n\n\t\t\tif ( json.materials === undefined || json.materials.length === 0 ) {\n\n\t\t\t\treturn { geometry: geometry };\n\n\t\t\t} else {\n\n\t\t\t\tvar materials = Loader.prototype.initMaterials( json.materials, texturePath, 'Anonymous' );\n\n\t\t\t\t\n\t\t\t\tif (json.materials[0].video) {\n\t\t\t\t\t\n\t\t\t\t\tvar fullPath = texturePath + json.materials[0].video;\n\n if (this.paramsString) {\n\n fullPath = fullPath + `?${this.paramsString}`;\n \n }\n\n\t\t\t\t\tconst videoHandler = new VideoHandler(fullPath);\n\t\t\t\t\t\n\t\t\t\t\tgeometry._video = videoHandler;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (materials && materials.length > 0) {\n\t\t\t\t\tif (json.materials[0].singleSided) {\n\t\t\t\t\t\tmaterials[0].side = THREE.FrontSide;\n\t\t\t\t\t} else if (json.materials[0].flipSided){\n\t\t\t\t\t\tmaterials[0].side = THREE.BackSide;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmaterials[0].side = THREE.DoubleSide;\n }\n if (json.materials[0].specularCoef) {\n materials[0].shininess = Math.floor(json.materials[0].specularCoef / 3);\n }\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn { geometry: geometry, materials: materials };\n\n\t\t\t}\n\n\t\t};\n\n\t} )()\n\n} );\n\n\nexport { JSONLoader };\n","var THREE = require('three');\n\nimport {\n\tNoBlending,\n\tNormalBlending,\n\tAdditiveBlending,\n\tSubtractiveBlending,\n\tMultiplyBlending,\n\tCustomBlending,\n\n\tFaceColors,\n\tVertexColors,\n\n\tDoubleSide,\n\tBackSide,\n\n\tMirroredRepeatWrapping,\n RepeatWrapping,\n MathUtils,\n MaterialLoader,\n TextureLoader,\n Color\n} from 'three';\n\n/**\n * @author alteredq / http://alteredqualia.com/\n */\n\nfunction Loader() {}\n\nLoader.Handlers = {\n\n\thandlers: [],\n\n\tadd: function ( regex, loader ) {\n\n\t\tthis.handlers.push( regex, loader );\n\n\t},\n\n\tget: function ( file ) {\n\n\t\tvar handlers = this.handlers;\n\n\t\tfor ( var i = 0, l = handlers.length; i < l; i += 2 ) {\n\n\t\t\tvar regex = handlers[ i ];\n\t\t\tvar loader = handlers[ i + 1 ];\n\n\t\t\tif ( regex.test( file ) ) {\n\n\t\t\t\treturn loader;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn null;\n\n\t}\n\n};\n\nObject.assign( Loader.prototype, {\n\n\tcrossOrigin: 'anonymous',\n\n\tonLoadStart: function () {},\n\n\tonLoadProgress: function () {},\n\n\tonLoadComplete: function () {},\n\n\tinitMaterials: function ( materials, texturePath, crossOrigin ) {\n\n\t\tvar array = [];\n\n\t\tfor ( var i = 0; i < materials.length; ++ i ) {\n\n\t\t\tarray[ i ] = this.createMaterial( materials[ i ], texturePath, crossOrigin );\n\n\t\t}\n\n\t\treturn array;\n\n\t},\n\n\tcreateMaterial: ( function () {\n\n\t\tvar BlendingMode = {\n\t\t\tNoBlending: NoBlending,\n\t\t\tNormalBlending: NormalBlending,\n\t\t\tAdditiveBlending: AdditiveBlending,\n\t\t\tSubtractiveBlending: SubtractiveBlending,\n\t\t\tMultiplyBlending: MultiplyBlending,\n\t\t\tCustomBlending: CustomBlending\n\t\t};\n\n\t\tvar color = new Color();\n\t\tvar textureLoader = new TextureLoader();\n\t\tvar materialLoader = new MaterialLoader();\n\n\t\treturn function createMaterial( m, texturePath, crossOrigin ) {\n\n\t\t\t// convert from old material format\n\n\t\t\tvar textures = {};\n\n\t\t\tfunction loadTexture( path, repeat, offset, wrap, anisotropy ) {\n\n\t\t\t\tvar fullPath = texturePath + path;\n\t\t\t\tvar loader = Loader.Handlers.get( fullPath );\n\n\t\t\t\tvar texture;\n\n\t\t\t\tif ( loader !== null ) {\n\n\t\t\t\t\ttexture = loader.load( fullPath );\n\n\t\t\t\t} else {\n\n\t\t\t\t\ttextureLoader.setCrossOrigin( crossOrigin );\n\t\t\t\t\ttexture = textureLoader.load( fullPath );\n\n\t\t\t\t}\n\n\t\t\t\tif ( repeat !== undefined ) {\n\n\t\t\t\t\ttexture.repeat.fromArray( repeat );\n\n\t\t\t\t\tif ( repeat[ 0 ] !== 1 ) texture.wrapS = RepeatWrapping;\n\t\t\t\t\tif ( repeat[ 1 ] !== 1 ) texture.wrapT = RepeatWrapping;\n\n\t\t\t\t}\n\n\t\t\t\tif ( offset !== undefined ) {\n\n\t\t\t\t\ttexture.offset.fromArray( offset );\n\n\t\t\t\t}\n\n\t\t\t\tif ( wrap !== undefined ) {\n\n\t\t\t\t\tif ( wrap[ 0 ] === 'repeat' ) texture.wrapS = RepeatWrapping;\n\t\t\t\t\tif ( wrap[ 0 ] === 'mirror' ) texture.wrapS = MirroredRepeatWrapping;\n\n\t\t\t\t\tif ( wrap[ 1 ] === 'repeat' ) texture.wrapT = RepeatWrapping;\n\t\t\t\t\tif ( wrap[ 1 ] === 'mirror' ) texture.wrapT = MirroredRepeatWrapping;\n\n\t\t\t\t}\n\n\t\t\t\tif ( anisotropy !== undefined ) {\n\n\t\t\t\t\ttexture.anisotropy = anisotropy;\n\n\t\t\t\t}\n\n\t\t\t\tvar uuid = MathUtils.generateUUID();\n\n\t\t\t\ttextures[ uuid ] = texture;\n\n\t\t\t\treturn uuid;\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tvar json = {\n\t\t\t\tuuid: MathUtils.generateUUID(),\n\t\t\t\ttype: 'MeshLambertMaterial'\n\t\t\t};\n\n\t\t\tfor ( var name in m ) {\n\n\t\t\t\tvar value = m[ name ];\n\n\t\t\t\tswitch ( name ) {\n\n\t\t\t\t\tcase 'DbgColor':\n\t\t\t\t\tcase 'DbgIndex':\n\t\t\t\t\tcase 'opticalDensity':\n\t\t\t\t\tcase 'illumination':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'DbgName':\n\t\t\t\t\t\tjson.name = value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'blending':\n\t\t\t\t\t\tjson.blending = BlendingMode[ value ];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'colorAmbient':\n\t\t\t\t\tcase 'mapAmbient':\n\t\t\t\t\t\tconsole.warn( 'THREE.Loader.createMaterial:', name, 'is no longer supported.' );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'colorDiffuse':\n\t\t\t\t\t\tjson.color = color.fromArray( value ).getHex();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'colorSpecular':\n\t\t\t\t\t\tjson.specular = color.fromArray( value ).getHex();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'colorEmissive':\n\t\t\t\t\t\tjson.emissive = color.fromArray( value ).getHex();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'specularCoef':\n\t\t\t\t\t\tjson.shininess = value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'shading':\n\t\t\t\t\t\tif ( value.toLowerCase() === 'basic' ) json.type = 'MeshBasicMaterial';\n\t\t\t\t\t\tif ( value.toLowerCase() === 'phong' ) json.type = 'MeshPhongMaterial';\n\t\t\t\t\t\tif ( value.toLowerCase() === 'standard' ) json.type = 'MeshStandardMaterial';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapDiffuse':\n\t\t\t\t\t\tjson.map = loadTexture( value, m.mapDiffuseRepeat, m.mapDiffuseOffset, m.mapDiffuseWrap, m.mapDiffuseAnisotropy );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapDiffuseRepeat':\n\t\t\t\t\tcase 'mapDiffuseOffset':\n\t\t\t\t\tcase 'mapDiffuseWrap':\n\t\t\t\t\tcase 'mapDiffuseAnisotropy':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapEmissive':\n\t\t\t\t\t\tjson.emissiveMap = loadTexture( value, m.mapEmissiveRepeat, m.mapEmissiveOffset, m.mapEmissiveWrap, m.mapEmissiveAnisotropy );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapEmissiveRepeat':\n\t\t\t\t\tcase 'mapEmissiveOffset':\n\t\t\t\t\tcase 'mapEmissiveWrap':\n\t\t\t\t\tcase 'mapEmissiveAnisotropy':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapLight':\n\t\t\t\t\t\tjson.lightMap = loadTexture( value, m.mapLightRepeat, m.mapLightOffset, m.mapLightWrap, m.mapLightAnisotropy );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapLightRepeat':\n\t\t\t\t\tcase 'mapLightOffset':\n\t\t\t\t\tcase 'mapLightWrap':\n\t\t\t\t\tcase 'mapLightAnisotropy':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapAO':\n\t\t\t\t\t\tjson.aoMap = loadTexture( value, m.mapAORepeat, m.mapAOOffset, m.mapAOWrap, m.mapAOAnisotropy );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapAORepeat':\n\t\t\t\t\tcase 'mapAOOffset':\n\t\t\t\t\tcase 'mapAOWrap':\n\t\t\t\t\tcase 'mapAOAnisotropy':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapBump':\n\t\t\t\t\t\tjson.bumpMap = loadTexture( value, m.mapBumpRepeat, m.mapBumpOffset, m.mapBumpWrap, m.mapBumpAnisotropy );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapBumpScale':\n\t\t\t\t\t\tjson.bumpScale = value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapBumpRepeat':\n\t\t\t\t\tcase 'mapBumpOffset':\n\t\t\t\t\tcase 'mapBumpWrap':\n\t\t\t\t\tcase 'mapBumpAnisotropy':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapNormal':\n\t\t\t\t\t\tjson.normalMap = loadTexture( value, m.mapNormalRepeat, m.mapNormalOffset, m.mapNormalWrap, m.mapNormalAnisotropy );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapNormalFactor':\n\t\t\t\t\t\tjson.normalScale = value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapNormalRepeat':\n\t\t\t\t\tcase 'mapNormalOffset':\n\t\t\t\t\tcase 'mapNormalWrap':\n\t\t\t\t\tcase 'mapNormalAnisotropy':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapSpecular':\n\t\t\t\t\t\tjson.specularMap = loadTexture( value, m.mapSpecularRepeat, m.mapSpecularOffset, m.mapSpecularWrap, m.mapSpecularAnisotropy );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapSpecularRepeat':\n\t\t\t\t\tcase 'mapSpecularOffset':\n\t\t\t\t\tcase 'mapSpecularWrap':\n\t\t\t\t\tcase 'mapSpecularAnisotropy':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapMetalness':\n\t\t\t\t\t\tjson.metalnessMap = loadTexture( value, m.mapMetalnessRepeat, m.mapMetalnessOffset, m.mapMetalnessWrap, m.mapMetalnessAnisotropy );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapMetalnessRepeat':\n\t\t\t\t\tcase 'mapMetalnessOffset':\n\t\t\t\t\tcase 'mapMetalnessWrap':\n\t\t\t\t\tcase 'mapMetalnessAnisotropy':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapRoughness':\n\t\t\t\t\t\tjson.roughnessMap = loadTexture( value, m.mapRoughnessRepeat, m.mapRoughnessOffset, m.mapRoughnessWrap, m.mapRoughnessAnisotropy );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapRoughnessRepeat':\n\t\t\t\t\tcase 'mapRoughnessOffset':\n\t\t\t\t\tcase 'mapRoughnessWrap':\n\t\t\t\t\tcase 'mapRoughnessAnisotropy':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapAlpha':\n\t\t\t\t\t\tjson.alphaMap = loadTexture( value, m.mapAlphaRepeat, m.mapAlphaOffset, m.mapAlphaWrap, m.mapAlphaAnisotropy );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapAlphaRepeat':\n\t\t\t\t\tcase 'mapAlphaOffset':\n\t\t\t\t\tcase 'mapAlphaWrap':\n\t\t\t\t\tcase 'mapAlphaAnisotropy':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'flipSided':\n\t\t\t\t\t\tjson.side = BackSide;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'doubleSided':\n\t\t\t\t\t\tjson.side = DoubleSide;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'transparency':\n\t\t\t\t\t\tconsole.warn( 'THREE.Loader.createMaterial: transparency has been renamed to opacity' );\n\t\t\t\t\t\tjson.opacity = value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'depthTest':\n\t\t\t\t\tcase 'depthWrite':\n\t\t\t\t\tcase 'colorWrite':\n\t\t\t\t\tcase 'opacity':\n\t\t\t\t\tcase 'reflectivity':\n\t\t\t\t\tcase 'transparent':\n\t\t\t\t\tcase 'visible':\n\t\t\t\t\tcase 'wireframe':\n\t\t\t\t\t\tjson[ name ] = value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'vertexColors':\n\t\t\t\t\t\tif ( value === true ) json.vertexColors = VertexColors;\n\t\t\t\t\t\tif ( value === 'face' ) json.vertexColors = FaceColors;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tconsole.error( 'THREE.Loader.createMaterial: Unsupported', name, value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( json.type === 'MeshBasicMaterial' ) delete json.emissive;\n\t\t\tif ( json.type !== 'MeshPhongMaterial' ) delete json.specular;\n\n\t\t\tif ( json.opacity < 1 ) json.transparent = true;\n\n\t\t\tmaterialLoader.setTextures( textures );\n\n\t\t\treturn materialLoader.parse( json );\n\n\t\t};\n\n\t} )()\n\n} );\n\nexport { Loader };\n","var THREE = require('three');\n\n/**\n * Provide basic functionality to display video as texture.\n * VideoTexture is used for creating and updating a video projected onto a Three.js texture\n * \n * @class\n * @param {Object} containerIn - Container to create the renderer on.\n * @author Alan Wu\n * @return {VideoHandler}\n */\nexports.VideoHandler = function(srcIn) {\n\n\tvar _this = this;\n\tthis.video = undefined;\n\tthis.videoTexture = undefined;\n\tvar src = srcIn;\n\tvar lastTime = 0;\n\tvar lastUpdate = 0;\n\tvar frameRate = 30;\n\tvar videoPlaneLoadedFlag = false;\n\tvar lastPlayPos = 0;\n\tvar currentPlayPos = 0;\n\tvar bufferingDetected = false;\n\t\n\tvar checkBuffering = function(delta, playAnimation) {\n\t currentPlayPos = _this.video.currentTime;\n\n\t // checking offset should be at most the check interval\n\t // but allow for some margin\n\t var offset = delta - 0.02;\n\n\t // if no buffering is currently detected,\n\t // and the position does not seem to increase\n\t // and the _this.video isn't manually paused...\n\t if (!bufferingDetected && (currentPlayPos < (lastPlayPos + offset)) &&\n\t \t\t!_this.video.paused) {\n\t bufferingDetected = true;\n\t }\n\n\t // if we were buffering but the _this.video has advanced,\n\t // then there is no buffering\n\t if (bufferingDetected && (currentPlayPos > (lastPlayPos + offset)) &&\n\t \t\t!_this.video.paused) {\n\t bufferingDetected = false;\n\t }\n\t lastPlayPos = currentPlayPos;\n\t}\n\n\tvar initialise = function(){\n\t\tif (document) {\n\t\t \t_this.video = document.createElement( 'video' );\n\t\t \t_this.video.crossOrigin = \"anonymous\";\n\t\t \t_this.video.src = src;\n\t\t \t_this.video.load();\n _this.video.loop = true;\n \n\t\t}\n\t}\n\n\tthis.setMorphTime = function(time, duration){\n\t\tvar actualTime = time / duration * _this.video.duration;\n\t\t_this.video.currentTime = actualTime;\n\t}\n\n\t// videoPlaneLoaded connects the video to the video texture once it has loaded\n\t this.getVideoDuration = function() {\n\t\t return _this.video.duration;\n\t}\n\n\tthis.createCanvasVideoTexture = function(){\n\t\t_this.videoTexture = new THREE.VideoTexture( _this.video );\n\t\t_this.videoTexture.minFilter = THREE.LinearFilter;\n\t\t_this.videoTexture.magFilter = THREE.LinearFilter;\n\t\t_this.videoTexture.format = THREE.RGBFormat;\n _this.video.currentTime = 0;\n\t\treturn _this.videoTexture;\n\t}\n\t\n\tthis.getCurrentTime = function(duration) {\n\t\tif (_this.video)\n\t\t\treturn duration * (_this.video.currentTime / _this.video.duration);\n\t\telse\n\t\t\treturn 0;\n\t}\n\n\tthis.isReadyToPlay = function(){\n\t\t// video.readyState 3 means we have data to load for the current time and foreseeable future\n\t\tif (_this.video && _this.video.readyState >= 3){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\t\n\t//this should be handle by scene... check the sync at \n\tinitialise();\n\n}","const THREE = require('three');\nconst Points = require('../three/Points').Points;\nconst toBufferGeometry = require('../utilities').toBufferGeometry;\nconst getCircularTexture = require('../utilities').getCircularTexture;\nconst Label = require('./label').Label;\n\n/**\n * Provides an object which stores points and provides method which controls its position.\n * This is created when a valid json file containing point is read into a {@link Zinc.Scene}\n * object.\n * \n * @class\n * @author Alan Wu\n * @return {Pointset}\n */\nconst Pointset = function () {\n (require('./zincObject').ZincObject).call(this);\n this.isPointset = true;\n const labelSets = [];\n\n /**\n * Create the pointsets using geometry and material.\n * \n * @param {THREE.Geomtry} geometryIn - Geometry of points to be rendered.\n * @param {THREE.Material} materialIn - Material to be set for the lines.\n * @param {Object} options - Provide various options\n * @param {Boolean} options.localTimeEnabled - A flag to indicate either the lines is\n * time dependent.\n * @param {Boolean} options.localMorphColour - A flag to indicate either the colour is\n * time dependent.\n */\n this.createMesh = (geometryIn, materialIn, options) => {\n if (geometryIn && materialIn) {\n let geometry = toBufferGeometry(geometryIn, options);\n const texture = getCircularTexture();\n materialIn.map = texture;\n let point = new Points(geometry, materialIn);\n this.setMesh(point, options.localTimeEnabled, \n options.localMorphColour);\n }\n }\n\n const addLabel = (index, coord, labelText, colourHex) => {\n if (labelText) {\n const colour = new THREE.Color(colourHex);\n const label = new Label(labelText, colour);\n label.setPosition(coord[0], coord[1], coord[2]);\n const sprite = label.getSprite();\n sprite.material.sizeAttenuation = false;\n sprite.material.alphaTest = 0.5;\n sprite.material.transparent = true;\n sprite.material.depthWrite = false;\n sprite.material.depthTest = false;\n this.group.add(sprite);\n labelSets[index] = label;\n }\n }\n\n /**\n * Add points to existing mesh if it exists, otherwise\n * create a new one and add to it.\n * @param {Array} coords -An array of three components coordinates.\n * @param {Array|String} labels - An array of strings, these are only added\n * if the number of coords equals to the number labels provided.\n * @param {Number} colour - A hex value of the colour for the points\n */\n this.addPoints = (coords, labels, colour) => {\n if (coords && coords.length > 0) {\n let current = this.drawRange - 1;\n const geometry = this.addVertices(coords);\n let mesh = this.getMorph();\n if (!mesh) {\n let material = new THREE.PointsMaterial({ alphaTest: 0.5, size: 10,\n color: colour, sizeAttenuation: false });\n const options = { localTimeEnabled: false, localMorphColour: false};\n geometry.colorsNeedUpdate = true;\n this.createMesh(geometry, material, options);\n }\n let end = current + coords.length;\n let index = 0;\n if ((Array.isArray(labels) && labels.length === coords.length) || \n (typeof labels === \"string\")) {\n for (current; current + index < end;) {\n const labelText = typeof labels === \"string\" ? labels : labels[index];\n addLabel(index, coords[index], labelText, colour);\n index++;\n }\n }\n if (this.region) this.region.pickableUpdateRequired = true;\n }\n }\n\n /**\n * Set the size of the points.\n * \n * @param {Number} size - size to be set.\n */\n this.setSize = size => {\n if (this.morph && this.morph.material) {\n this.morph.material.size = size;\n this.morph.material.needsUpdate = true;\n }\n }\n\n /**\n * Turn size attenuation on/off based on the flag.\n * \n * @param {Boolean} flag - Determin either size attenuation\n * should be on or off.\n */\n this.setSizeAttenuation = flag => {\n if (this.morph && this.morph.material) {\n this.morph.material.sizeAttenuation = flag;\n this.morph.material.needsUpdate = true;\n }\n }\n\n /**\n * Get vertices at index\n */\n this.getVerticesByIndex = function(index) {\n if (index >= 0 && this.drawRange > index) {\n const positionAttribute = this.getMorph().geometry.getAttribute( 'position' );\n return [ \n positionAttribute.getX(index),\n positionAttribute.getY(index),\n positionAttribute.getZ(index)\n ];\n }\n return undefined;\n }\n\n /**\n * Edit Vertice in index.\n */\n this.editVertices = function(coords, i) {\n if (coords && coords.length) {\n let mesh = this.getMorph();\n const maxIndex = i + coords.length - 1;\n if (!mesh || 0 > i || maxIndex >= this.drawRange) {\n return;\n } else {\n const positionAttribute = mesh.geometry.getAttribute( 'position' );\n let index = i;\n coords.forEach(coord => {\n const label = labelSets[index];\n if (label) {\n label.setPosition(coord[0], coord[1], coord[2]);\n }\n positionAttribute.setXYZ(index++, coord[0], coord[1], coord[2]);\n \n });\n positionAttribute.needsUpdate = true;\n this.boundingBoxUpdateRequired = true;\n }\n }\n }\n\n /**\n * Turn size attenuation on/off based on the flag.\n * \n * @param {Boolean} flag - Determin either size attenuation\n * should be on or off.\n */\n this.render = (delta, playAnimation, cameraControls, options) => {\n if (this.morph && cameraControls) {\n this.morph.sizePerPixel = cameraControls.pixelHeight;\n }\n Pointset.prototype.render.call(this, delta, playAnimation, cameraControls, options);\n }\n}\n\nPointset.prototype = Object.create((require('./zincObject').ZincObject).prototype);\nexports.Pointset = Pointset;\n","import {\n\tBufferGeometry,\n\tMatrix4,\n Object3D,\n PointsMaterial,\n Ray,\n\tSphere,\n\tVector3\n} from 'three';\n\n\nconst _inverseMatrix = /*@__PURE__*/ new Matrix4();\nconst _ray = /*@__PURE__*/ new Ray();\nconst _sphere = /*@__PURE__*/ new Sphere();\nconst _position = /*@__PURE__*/ new Vector3();\nconst _morphA = /*@__PURE__*/ new Vector3();\nconst _tempA = /*@__PURE__*/ new Vector3();\n\nclass Points extends Object3D {\n\n\tconstructor( geometry = new BufferGeometry(), material = new PointsMaterial() ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'Points';\n\n\t\tthis.geometry = geometry;\n\t\tthis.material = material;\n\t\tthis.sizePerPixel = 1;\n\n\t\tthis.updateMorphTargets();\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.material = source.material;\n\t\tthis.geometry = source.geometry;\n\n\t\treturn this;\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst geometry = this.geometry;\n\t\tconst matrixWorld = this.matrixWorld;\n\t\tconst threshold = raycaster.params.Points.threshold;\n const drawRange = geometry.drawRange;\n\n\t\t// Checking boundingSphere distance to ray\n\n\t\tif ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();\n\n\t\t_sphere.copy( geometry.boundingSphere );\n\t\t_sphere.applyMatrix4( matrixWorld );\n\t\t_sphere.radius += threshold;\n\n\t\tif ( raycaster.ray.intersectsSphere( _sphere ) === false ) return;\n\n\t\t//\n\n\t\t_inverseMatrix.copy( matrixWorld ).invert();\n\t\t_ray.copy( raycaster.ray ).applyMatrix4( _inverseMatrix );\n\n\t\tconst localThreshold = threshold / ( ( this.scale.x + this.scale.y + this.scale.z ) / 3 ) * this.material.size * this.sizePerPixel;\n\t\tconst localThresholdSq = localThreshold * localThreshold;\n\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\tconst index = geometry.index;\n\t\t\tconst attributes = geometry.attributes;\n\t\t\tconst positionAttribute = attributes.position;\n const morphPosition = geometry.morphAttributes.position;\n\n\t\t\tif ( index !== null ) {\n\n\t\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\t\tconst end = Math.min( index.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\tfor ( let i = start, il = end; i < il; i ++ ) {\n\n\t\t\t\t\tconst a = index.getX( i );\n \n calculatePosition( this, positionAttribute, morphPosition, a );\n\n\t\t\t\t\ttestPoint( _position, a, localThresholdSq, matrixWorld, raycaster, intersects, this );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\t\tconst end = Math.min( positionAttribute.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\tfor ( let i = start, l = end; i < l; i ++ ) {\n \n calculatePosition( this, positionAttribute, morphPosition, i );\n\n\t\t\t\t\ttestPoint( _position, i, localThresholdSq, matrixWorld, raycaster, intersects, this );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tconsole.error( 'THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\n\t\t}\n\n\t}\n\n\tupdateMorphTargets() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\tconst morphAttributes = geometry.morphAttributes;\n\t\t\tconst keys = Object.keys( morphAttributes );\n\n\t\t\tif ( keys.length > 0 ) {\n\n\t\t\t\tconst morphAttribute = morphAttributes[ keys[ 0 ] ];\n\n\t\t\t\tif ( morphAttribute !== undefined ) {\n\n\t\t\t\t\tthis.morphTargetInfluences = [];\n\t\t\t\t\tthis.morphTargetDictionary = {};\n\n\t\t\t\t\tfor ( let m = 0, ml = morphAttribute.length; m < ml; m ++ ) {\n\n\t\t\t\t\t\tconst name = morphAttribute[ m ].name || String( m );\n\n\t\t\t\t\t\tthis.morphTargetInfluences.push( 0 );\n\t\t\t\t\t\tthis.morphTargetDictionary[ name ] = m;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tconst morphTargets = geometry.morphTargets;\n\n\t\t\tif ( morphTargets !== undefined && morphTargets.length > 0 ) {\n\n\t\t\t\tconsole.error( 'THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n}\n\nPoints.prototype.isPoints = true;\n\nfunction testPoint( point, index, localThresholdSq, matrixWorld, raycaster, intersects, object ) {\n\n\tconst rayPointDistanceSq = _ray.distanceSqToPoint( point );\n\n\tif ( rayPointDistanceSq < localThresholdSq ) {\n\n\t\tconst intersectPoint = new Vector3();\n\n\t\t_ray.closestPointToPoint( point, intersectPoint );\n\t\tintersectPoint.applyMatrix4( matrixWorld );\n\n\t\tconst distance = raycaster.ray.origin.distanceTo( intersectPoint );\n\n\t\tif ( distance < raycaster.near || distance > raycaster.far ) return;\n\n\t\tintersects.push( {\n\n\t\t\tdistance: distance,\n\t\t\tdistanceToRay: Math.sqrt( rayPointDistanceSq ),\n\t\t\tpoint: intersectPoint,\n\t\t\tindex: index,\n\t\t\tface: null,\n\t\t\tobject: object\n\n\t\t} );\n\n\t}\n\n}\n\nfunction calculatePosition( object, position, morphPosition, a )\t{\n\n _position.fromBufferAttribute( position, a );\n\n const morphInfluences = object.morphTargetInfluences;\n\n if ( object.material.morphTargets && morphPosition && morphInfluences ) {\n\n _morphA.set( 0, 0, 0 );\n\n for ( var i = 0, il = morphPosition.length; i < il; i ++ ) {\n\n const influence = morphInfluences[ i ];\n const morphAttribute = morphPosition[ i ];\n\n if ( influence === 0 ) continue;\n\n _tempA.fromBufferAttribute( morphAttribute, a );\n\n _morphA.addScaledVector( _tempA.sub( _position ), influence );\n\n }\n\n _position.add( _morphA );\n\n }\n\n}\n\nexport { Points };","const THREE = require('three');\nconst toBufferGeometry = require('../utilities').toBufferGeometry;\n\n/**\n * Provides an object which stores lines.\n * This is created when a valid json file containing lines is read into a {@link Zinc.Scene}\n * object.\n * \n * @class\n * @author Alan Wu\n * @return {Lines}\n */\nconst Lines = function () {\n (require('./zincObject').ZincObject).call(this);\n\tthis.isLines = true;\n\n /**\n * Create the line segements using geometry and material.\n * \n * @param {THREE.Geomtry} geometryIn - Geometry of lines to be rendered.\n * @param {THREE.Material} materialIn - Material to be set for the lines.\n * @param {Object} options - Provide various options\n * @param {Boolean} options.localTimeEnabled - A flag to indicate either the lines is\n * time dependent.\n * @param {Boolean} options.localMorphColour - A flag to indicate either the colour is\n * time dependent.\n */\n\tthis.createLineSegment = (geometryIn, materialIn, options) => {\n\t\tif (geometryIn && materialIn) {\n\t\t\tlet geometry = toBufferGeometry(geometryIn, options);\n\t\t\tif (options.localMorphColour && geometry.morphAttributes[ \"color\" ])\n\t\t\t\tmaterialIn.onBeforeCompile = (require(\"./augmentShader\").augmentMorphColor)();\n let line = new (require(\"../three/line/LineSegments\").LineSegments)(geometry, materialIn);\n this.setMesh(line, options.localTimeEnabled, options.localMorphColour);\n\t\t}\n\t}\n\n /**\n * Set the width for the lines.\n * \n * @param {Number} width - Width of the lines.\n */\n\tthis.setWidth = width => {\n\t\tif (this.morph && this.morph.material) {\n\t\t\tthis.morph.material.linewidth = width;\n\t\t\tthis.morph.material.needsUpdate = true;\n\t\t}\n\t}\n\n /**\n * Add new lines to existing lines if it exists, otherwise\n * create a new one and add to it.\n * @param {Array} coords -An array of three components coordinates.\n\n * @param {Number} colour - A hex value of the colour for the points\n */\n\tthis.addLines = (coords, colour) => {\n if (coords && coords.length > 0) {\n const geometry = this.addVertices(coords);\n let mesh = this.getMorph();\n if (!mesh) {\n let material = new THREE.LineBasicMaterial({color:colour});\n const options = { localTimeEnabled: false, localMorphColour: false};\n geometry.colorsNeedUpdate = true;\n this.createLineSegment(geometry, material, options);\n }\n if (this.region) this.region.pickableUpdateRequired = true;\n }\n\t}\n}\n\nLines.prototype = Object.create((require('./zincObject').ZincObject).prototype);\nexports.Lines = Lines;\n","const THREE = require('three');\n\n/**\n * Texture array object for holding array of images into\n * texures unit that can be used by other texture primitives.\n * \n * @class\n * @author Alan Wu\n * @return {TextureArray}\n */\nconst TextureArray = function () {\n (require('./texture').Texture).call(this);\n this.isTextureArray = true;\n\n\n /**\n * Read images from an array containg src locations.\n * \n * @async\n * @param {Array} srcArrays - List of source location of the images.\n */\n this.loadFromImages = async (srcArrays) => {\n let w = 1;\n let h = 1;\n let d = 0;\n if (srcArrays && srcArrays.length) {\n this.isLoading = true;\n const image = new Image();\n image.crossOrigin = \"Anonymous\";\n const canvas = document.createElement(\"canvas\");\n let length = 0;\n const dataStacks = new Array(srcArrays.length);\n for (let i = 0; i < srcArrays.length; i++) {\n const data = await this.imageToUint8Array(this, image, srcArrays[i], canvas);\n if (data && data.array) {\n w = data.width;\n h = data.height;\n dataStacks[d] = data.array;\n length += dataStacks[d].length;\n d++;\n }\n }\n const fullArray = new Uint8Array(length);\n length = 0;\n dataStacks.forEach(data => {\n fullArray.set(data, length);\n length += data.length;\n });\n\n this.impl = new THREE.DataTexture2DArray(fullArray, w, h, d);\n this.size = {\n width: w,\n height: h,\n depth: d\n };\n this.isLoading = false;\n this.impl.needsUpdate = true;\n }\n }\n\n /**\n * Get and create the material containing shaders and the textures.\n * The texture must be read and ready before calling this function.\n * \n *\n * @param {Object} options - Customise the material with the options object.\n * @param {String} options.fs - string of the fragment shader used for \n * visualisation.\n * @param {String} options.vs - string of the vertex shader used for \n * visualisation.\n * @param {Object} options.uniforms - Containing the data to be passed into the shaders.\n * @param {String} options.glslVersion - Version of glsl used for compile this shader.\n * \n */\n this.getMaterial = (options) => {\n if (this.impl) {\n let material = undefined;\n if (options) {\n if (options.vs && options.fs) {\n let transparent = true;\n if (options.transparent)\n transparent = options.transparent;\n let side = THREE.FrontSide;\n if (options.side)\n side = options.side;\n material = new THREE.ShaderMaterial({\n transparent,\n uniforms: options.uniforms,\n vertexShader: options.vs,\n fragmentShader: options.fs,\n side\n });\n if (options.glslVersion) {\n material.glslVersion = options.glslVersion;\n }\n }\n } else {\n material = new THREE.MeshBasicMaterial({\n color: new THREE.Color(1, 1, 1),\n transparent: false,\n opacity: 1.0,\n map: this.impl,\n side: THREE.DoubleSide\n });\n }\n if (material) {\n material.needsUpdate = true;\n return material;\n }\n }\n }\n}\n\nTextureArray.prototype = Object.create((require('./texture').Texture).prototype);\nexports.TextureArray = TextureArray;\n","const THREE = require('three');\n\n/**\n * Base texture object for importing images and turning them into\n * texures unit that can be used by other texture primitives.\n * \n * @class\n * @author Alan Wu\n * @return {Texture}\n */\nconst Texture = function () {\n this.isTexture = true;\n this.impl = undefined;\n this.isLoading = false;\n this.size = {\n width: 1,\n height: 1,\n depth: 0\n };\n}\n\n/**\n * Read an image from src.\n * \n * @async\n * @param {Image} img - An image object.\n * @param {String} src - Source location of the image.\n * \n * @return {Promise} img on resolve.\n */\nTexture.prototype.loadImage = function (img, src) {\n return new Promise((resolve, reject) => {\n img.onload = () => resolve(img);\n img.onerror = reject;\n img.src = src;\n })\n}\n\n/**\n @typedef IMAGE_UINT8_RETURN\n @type {Set}\n @property {Uint8Array} array - Array containing the uint8 image value.\n @property {Number} width - Phyiscal image width.\n @property {Number} height - Phyiscal image height.\n */\n/**\n * Read an image from src and turn it into Uint8Array.\n * \n * @async\n * @param {Image} img - An image object.\n * @param {String} src - Source location of the image.\n * @param {Canvas} canvas - Canvas html element used for the conversion.\n * \n * @return {IMAGE_UNIT8_RETURN}\n */\nTexture.prototype.imageToUint8Array = async function (instance, img, src, canvas) {\n await instance.loadImage(img, src);\n canvas.width = img.width;\n canvas.height = img.height;\n const ctx = canvas.getContext(\"2d\");\n ctx.drawImage(img, 0, 0);\n return {\n array: new Uint8Array(ctx.getImageData(0, 0, canvas.width, canvas.height).data.buffer),\n width: canvas.width,\n height: canvas.height\n };\n}\n\nTexture.prototype.loadFromImages = async function (srcArrays) {\n return\n}\n\n/**\n * Return true if the texture is ready for consumption.\n * \n * @return {Boolean}\n */\nTexture.prototype.isReady = function () {\n if (this.impl && !this.isLoading)\n return true;\n return false;\n}\n\n/**\n * Return true if the texture is ready for consumption, otherwise false.\n * \n * @return {Boolean}\n */\nTexture.prototype.getMaterial = function () {\n if (this.impl) {\n return new THREE.MeshBasicMaterial({\n color: new THREE.Color(1, 1, 1),\n transparent: false,\n opacity: 1.0,\n map: this.impl,\n side: THREE.DoubleSide\n });\n }\n}\n\nexports.Texture = Texture;\n","const THREE = require('three');\nconst shader = require(\"../shaders/textureSlide.js\");\n/**\n * Provides a class which create a texture stacks in a block\n * with shaders allowing slices of texture to be displayed.\n * \n * @param {TextureArray} textureIn - An object of texture array\n * holding texture information.\n * \n * @class\n * @author Alan Wu\n * @return {TextureSlides}\n */\nconst TextureSlides = function (textureIn) {\n (require('./texturePrimitive').TexturePrimitive).call(this, textureIn);\n this.isTextureSlides = true;\n const textureSettings = [];\n const idTextureMap = {};\n this.morph = new THREE.Group();\n this.group = this.morph;\n this.morph.userData = this;\n let flipY = true;\n\n /**\n @typedef SLIDE_SETTINGS\n @type {Set}\n @property {String} direction - the value must be x, y or z, specify the\n direction the slide should be facing.\n @property {Number} value - Normalised value of the location on direction.\n @property {String} id - ID of the mesh, it is only available if the settings\n is returned from {@link TextureSlides.createSlide} or \n {@link TextureSlides.getTextureSettings}.\n */\n /**\n * Create the slides required for visualisation based on the slide settings.\n * The slides themselves are {THREE.PlanGeometry} objects.\n * \n * @param {SLIDE_SETTINGS} slideSettings - An array to each slide settings.\n */\n this.createSlides = slideSettings => {\n slideSettings.forEach(slide => this.createSlide(slide));\n }\n\n /**\n * Set the value of the uniforms for a specific mesh in this\n * texture slide object.\n *\n * @param {THREE.Mesh} mesh - Mesh to be modified\n * @param {SLIDE_SETTINGS} slideSettings - Slide settings.\n */\n const setUniformSlideSettingsOfMesh = (mesh, settings) => {\n const material = mesh.material;\n const uniforms = material.uniforms;\n mesh.rotation.x = 0;\n mesh.rotation.y = 0;\n mesh.rotation.z = 0;\n mesh.position.x = 0;\n mesh.position.y = 0;\n mesh.position.z = 0;\n switch (settings.direction) {\n case \"x\":\n const rotation = flipY ? -Math.PI / 2 : Math.PI / 2;\n mesh.rotation.y = rotation;\n uniforms.direction.value = 1;\n uniforms.slide.value.set(settings.value, 0, 0);\n mesh.position.x = settings.value;\n break;\n case \"y\":\n mesh.rotation.x = Math.PI / 2;\n uniforms.direction.value = 2;\n uniforms.slide.value.set(0, settings.value, 0);\n mesh.position.y = settings.value;\n break;\n case \"z\":\n uniforms.direction.value = 3;\n uniforms.slide.value.set(0, 0, settings.value);\n mesh.position.z = settings.value;\n break;\n default:\n break;\n }\n material.needsUpdate = true;\n this.boundingBoxUpdateRequired = true;\n }\n\n /**\n * Modify the mesh based on a setting\n *\n * @param {SLIDE_SETTINGS} settings - s.\n */\n this.modifySlideSettings = (settings) => {\n if (settings && settings.id &&\n settings.id in idTextureMap &&\n idTextureMap[settings.id]) {\n setUniformSlideSettingsOfMesh(idTextureMap[settings.id], settings);\n }\n }\n\n /**\n * Create a slide required for visualisation based on the slide settings.\n * The slide itself is an {THREE.PlanGeometry} object.\n *\n * @param {SLIDE_SETTINGS} settings -settings of the slide to be created.\n * @return {SLIDE_SETTINGS} - Returned settings, it includes the newly\n * created mesh's id.\n */\n this.createSlide = settings => {\n if (this.texture && this.texture.isTextureArray && this.texture.isReady()) {\n if (settings && settings.direction && settings.value !== undefined) {\n const geometry = new THREE.PlaneGeometry(1, 1);\n geometry.translate(0.5, 0.5, 0);\n const uniforms = shader.getUniforms();\n uniforms.diffuse.value = this.texture.impl;\n uniforms.depth.value = this.texture.size.depth;\n uniforms.flipY.value = flipY;\n \n const options = {\n fs: shader.fs,\n vs: shader.vs,\n uniforms: uniforms,\n glslVersion: shader.glslVersion,\n side: THREE.DoubleSide,\n transparent: false\n };\n const material = this.texture.getMaterial(options);\n material.needsUpdate = true;\n const mesh = new THREE.Mesh(geometry, material);\n mesh.name = this.groupName;\n mesh.userData = this;\n const slideSettings = {\n value: settings.value,\n direction: settings.direction,\n id: mesh.id,\n };\n textureSettings.push(slideSettings);\n setUniformSlideSettingsOfMesh(mesh, slideSettings);\n idTextureMap[mesh.id] = mesh;\n this.morph.add(mesh);\n this.boundingBoxUpdateRequired = true;\n return slideSettings;\n }\n }\n }\n\n /**\n * Return a copy of texture settings used by this object.\n *\n * @return {SLIDE_SETTINGS} - Returned the list of settings.\n */\n this.getTextureSettings = () => {\n return [...textureSettings];\n }\n\n /**\n * Return a copy of texture settings with corresponding id used by this object.\n *\n * @return {SLIDE_SETTINGS} - Returned a copy of settings with corresponding id.\n */\n this.getTextureSettingsWithId = (id) => {\n for (let i = 0; i < textureSettings.length; i++) {\n if (id === textureSettings[i].id) {\n return {...textureSettings[i]};\n }\n }\n }\n\n /**\n * Get the array of slides, return them in an array\n *\n * @return {Array} - Return an array of {@link THREE.Object)\n */\n this.getSlides = () => {\n if (this.morph) return [...this.morph.children];\n return [];\n }\n\n /**\n * Remove a slide, this will dispose the slide and its material.\n *\n * @param {Slide} slide - Slide to be remvoed\n */\n this.removeSlide = slide => {\n if (slide) {\n this.removeSlideWithId(slide.id);\n }\n }\n\n /**\n * Remove a slide, this will dispose the slide and its material.\n *\n * @param {Number} id - id of slide to be remvoed\n */\n this.removeSlideWithId = id => {\n if (this.morph && id in idTextureMap && idTextureMap[id]) {\n if (this.morph.getObjectById(id)) {\n const slide = idTextureMap[id];\n this.morph.remove(slide);\n slide.clear();\n if (slide.geometry)\n slide.geometry.dispose();\n if (slide.material)\n slide.material.dispose();\n this.boundingBoxUpdateRequired = true;\n }\n const index = textureSettings.findIndex(item => item.id === id);\n if (index > -1) {\n textureSettings.splice(index, 1);\n }\n }\n }\n\n /**\n * Clean up all internal objects.\n */\n this.dispose = () => {\n this.morph.children.forEach(slide => {\n if (slide.geometry)\n slide.geometry.dispose();\n if (slide.material)\n slide.material.dispose();\n });\n (require('./texturePrimitive').TexturePrimitive).prototype.dispose.call(this);\n this.boundingBoxUpdateRequired = true;\n }\n\n //Expand the boundingbox with slide settings\n const expandBoxWithSettings = (box, settings, vector) => {\n switch (settings.direction.value) {\n case 1:\n vector.copy(settings.slide.value);\n box.expandByPoint(vector);\n vector.setY(1.0);\n vector.setZ(1.0);\n box.expandByPoint(vector);\n break;\n case 2:\n vector.copy(settings.slide.value);\n box.expandByPoint(vector);\n vector.setX(1.0);\n vector.setZ(1.0);\n box.expandByPoint(vector);\n break;\n case 3:\n vector.copy(settings.slide.value);\n box.expandByPoint(vector);\n vector.setX(1.0);\n vector.setY(1.0);\n box.expandByPoint(vector);\n break;\n default:\n break;\n }\n }\n\n /**\n * Get the bounding box of this slides.\n * It uses the max and min of the slides position and the\n * transformation to calculate the position of the box.\n * \n * @return {THREE.Box3}.\n */\n this.getBoundingBox = () => {\n if (this.morph && this.morph.children && this.morph.visible &&\n this.boundingBoxUpdateRequired) {\n this.cachedBoundingBox.makeEmpty();\n const vector = new THREE.Vector3(0, 0, 0);\n this.morph.children.forEach(slide => {\n expandBoxWithSettings(this.cachedBoundingBox, slide.material.uniforms,\n vector);\n });\n this.morph.updateMatrixWorld (true, true);\n this.cachedBoundingBox.applyMatrix4(this.morph.matrixWorld);\n this.boundingBoxUpdateRequired = false;\n }\n return this.cachedBoundingBox;\n }\n\n this.applyTransformation = (rotation, position, scale) => {\n const matrix = new THREE.Matrix4();\n matrix.set(\n rotation[0],\n rotation[1],\n rotation[2],\n 0,\n rotation[3],\n rotation[4],\n rotation[5],\n 0,\n rotation[6],\n rotation[7],\n rotation[8],\n 0,\n 0,\n 0,\n 0,\n 0\n );\n const quaternion = new THREE.Quaternion().setFromRotationMatrix(matrix);\n this.morph.position.set(...position);\n this.morph.quaternion.copy( quaternion );\n this.morph.scale.set(...scale);\n this.morph.updateMatrix();\n this.boundingBoxUpdateRequired = true;\n }\n\n this.initialise = (textureData, finishCallback) => {\n if (textureData) {\n\n const locations = textureData.locations;\n if (locations && locations.length > 0) {\n this.applyTransformation(locations[0].orientation,\n locations[0].position, locations[0].scale);\n if (\"flipY\" in locations[0]) {\n flipY = locations[0].flipY;\n }\n }\n this.createSlides(textureData.settings.slides);\n if (finishCallback != undefined && (typeof finishCallback == 'function')) {\n finishCallback(this);\n }\n }\n }\n}\n\nTextureSlides.prototype = Object.create((require('./texturePrimitive').TexturePrimitive).prototype);\nTextureSlides.prototype.constructor = TextureSlides;\nexports.TextureSlides = TextureSlides;\n","const THREE = require('three');\n\nconst glslVersion = THREE.GLSL3;\n\nconst fs =\n`\nprecision highp float;\nprecision highp int;\nprecision highp sampler2DArray;\n\nuniform sampler2DArray diffuse;\nin vec3 vUw;\n\nout vec4 outColor;\n\nvoid main() {\n\n vec4 color = texture( diffuse, vUw );\n\n // lighten a bit\n outColor = vec4( color.rgb + .2, 1.0 );\n\n}\n`;\n\nconst vs = \n`\nout vec3 vUw;\nuniform float depth;\nuniform vec3 slide;\nuniform int direction;\nuniform bool flipY;\n\nvoid main() {\n\n vec3 slidePos = position.xyz;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position.xyz, 1.0 );\n\n if (direction == 1)\n slidePos = vec3(slide.x, position.y, position.x);\n if (direction == 2)\n slidePos = vec3(position.x, slide.y, position.y);\n if (direction == 3)\n slidePos = vec3(position.x, position.y, slide.z);\n\n if (flipY) \n slidePos.y = 1.0 - slidePos.y;\n\n vUw.xyz = vec3(slidePos.x, slidePos.y, slidePos.z * depth);\n\n}\n`;\n\nconst getUniforms = function() {\n return {\n diffuse: { value: undefined },\n depth: { value: 1 },\n slide: { value: new THREE.Vector3( 0, 0, 1 ) },\n direction: {value: 1},\n flipY: { value: true},\n };\n}\n\nexports.fs = fs;\nexports.vs = vs;\nexports.glslVersion = glslVersion;\nexports.getUniforms = getUniforms;\n","const THREE = require('three');\nconst resolveURL = require('../utilities').resolveURL;\n/**\n * Provides a base class object which stores textures and rendering object.\n * \n * @class\n * @author Alan Wu\n * @return {TexturePrimitive}\n */\nconst TexturePrimitive = function (textureIn) {\n (require('./zincObject').ZincObject).call(this);\n this.isTexturePrimitive = true;\n this.texture = textureIn;\n\n /**\n * Load texture data into this primitves.\n * \n * @param {Object} textureData - contains the informations about the textures.\n * @param {Function} finishCallback - User's function to be called once texture's\n * is loaded.\n */\n this.load = (textureData, finishCallback, isInline) => {\n if (textureData) {\n if (textureData.images && textureData.images.source) {\n const texture = new (require('../texture/textureArray').TextureArray)();\n const imgArray = [];\n textureData.images.source.forEach(img => {\n imgArray.push(resolveURL(img));\n });\n const _this = this;\n texture.loadFromImages(imgArray).then(() => {\n _this.texture = texture;\n _this.initialise(textureData, finishCallback);\n });\n }\n }\n }\n\n /**\n * Initialise a texture based on the provided textureData, this should be used\n * internally only.\n * \n * @param {Object} textureData - contains the informations about the textures.\n * @param {Function} finishCallback - User's function to be called once texture's\n * is loaded.\n */\n this.initialise = (textureData, finishCallback) => {\n if (finishCallback != undefined && (typeof finishCallback == 'function')) {\n finishCallback(this);\n }\n }\n\n\n}\n\nTexturePrimitive.prototype = Object.create((require('./zincObject').ZincObject).prototype);\nTexturePrimitive.prototype.constructor = TexturePrimitive;\nexports.TexturePrimitive = TexturePrimitive;\n","const THREE = require('three');\r\nconst ResizeSensor = require('css-element-queries/src/ResizeSensor');\r\n/**\r\n * Create a Zinc 3D renderer in the container provided.\r\n * The primary function of a Zinc 3D renderer is to display the current\r\n * scene (@link Scene} set to the renderer and each scene may contain as \r\n * many geometries, glyphset and other primitives as the system can support.\r\n * Zinc.Renderer also allows additional scenes to be displayed.\r\n * \r\n * @param {Object} containerIn - Container to create the renderer on.\r\n * @class\r\n * @author Alan Wu\r\n * @return {Renderer}\r\n */\r\nexports.Renderer = function (containerIn) {\r\n\r\n\tlet container = containerIn;\r\n\t\r\n\tconst stats = 0;\r\n\t\r\n\tlet renderer = undefined;\r\n\tlet currentScene = undefined;\r\n\r\n\t//myGezincGeometriestains a tuple of the threejs mesh, timeEnabled, morphColour flag, unique id and morph\r\n\tconst clock = new THREE.Clock(false);\r\n\tthis.playAnimation = true;\r\n /* default animation update rate, rate is 1000 and duration \r\n is default to 6000, 6s to finish a full animation */\r\n\tlet playRate = 1000;\r\n\tlet preRenderCallbackFunctions = [];\r\n let preRenderCallbackFunctions_id = 0;\r\n let postRenderCallbackFunctions = [];\r\n\tlet postRenderCallbackFunctions_id = 0;\r\n\tlet animated_id = undefined;\r\n\tlet cameraOrtho = undefined, sceneOrtho = undefined, logoSprite = undefined;\r\n\tlet sceneMap = [];\r\n\tlet additionalActiveScenes = [];\r\n\tlet scenesGroup = new THREE.Group();\r\n\tlet canvas = undefined;\r\n let sensor = undefined;\r\n let isRendering = false;\r\n\tconst _this = this;\r\n\tconst currentSize = [0, 0];\r\n\tconst currentOffset = [0, 0];\r\n\t\r\n\tthis.getDrawingWidth = () => {\r\n\t\tif (container) {\r\n\t\t\treturn container.clientWidth;\r\n\t\t} else if (canvas)\r\n\t\t\tif (typeof canvas.clientWidth !== 'undefined')\r\n\t\t\t\treturn Math.round(canvas.clientWidth);\r\n\t\t\telse\r\n\t\t\t\treturn Math.round(canvas.width);\r\n\t\treturn 0;\r\n\t}\r\n\t\r\n\tthis.getDrawingHeight = () => {\r\n\t\tif (container) {\r\n\t\t\treturn container.clientHeight;\r\n\t\t} else if (canvas)\r\n\t\t\tif (typeof canvas.clientHeight !== 'undefined')\r\n\t\t\t\treturn Math.round(canvas.clientHeight);\r\n\t\t\telse\r\n\t\t\t\treturn Math.round(canvas.height);\r\n\t\treturn 0;\r\n\t}\r\n\t\r\n\t/** \r\n\t * Call this to resize the renderer, this is normally call automatically.\r\n\t */\r\n\tthis.onWindowResize = () => {\r\n\t\tcurrentScene.onWindowResize();\r\n\t\tconst width = this.getDrawingWidth();\r\n\t\tconst height = this.getDrawingHeight();\r\n\t\tif (renderer != undefined) {\r\n\t\t\tlet localRect = undefined;\r\n\t\t\tif (container) {\r\n\t\t\t\tlocalRect = container.getBoundingClientRect();\r\n\t\t\t\trenderer.setSize(width, height);\r\n\t\t\t} else if (canvas) {\r\n\t\t\t\tif (typeof canvas.getBoundingClientRect !== 'undefined') {\r\n\t\t\t\t\tlocalRect = canvas.getBoundingClientRect();\r\n\t\t\t\t\tcanvas.width = width;\r\n\t\t\t\t\tcanvas.height = height;\r\n\t\t\t\t\trenderer.setSize(width, height, false);\r\n\t\t\t\t} else {\r\n\t\t\t\t\trenderer.setSize(width, height, false);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (localRect) {\r\n\t\t\t\tcurrentOffset[0] = localRect.left;\r\n\t\t\t\tcurrentOffset[1] = localRect.top;\r\n\t\t\t}\r\n\t\t\tconst target = new THREE.Vector2();\r\n\t\t\trenderer.getSize(target);\r\n\t\t\tcurrentSize[0] = target.x;\r\n\t\t\tcurrentSize[1] = target.y;\r\n\t\t}\r\n\t}\r\n\t\r\n\t/**\r\n\t * Initialise the renderer and its visualisations.\r\n\t */\r\n\tthis.initialiseVisualisation = parameters => {\r\n\t parameters = parameters || {};\r\n\t if (parameters['antialias'] === undefined) {\r\n let onMobile = false;\r\n try {\r\n if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {\r\n onMobile = true;\r\n }\r\n }\r\n catch(err) {\r\n onMobile = false;\r\n }\r\n if (onMobile)\r\n parameters['antialias'] = false;\r\n else\r\n parameters['antialias'] = true;\r\n\t }\r\n\t if (parameters[\"canvas\"]) {\r\n\t\t container = undefined;\r\n\t\t canvas = parameters[\"canvas\"];\r\n\t }\r\n renderer = new THREE.WebGLRenderer(parameters);\r\n if (container !== undefined) {\r\n\t\t container.appendChild( renderer.domElement );\r\n }\r\n\t renderer.setClearColor( 0xffffff, 1);\r\n\t if (canvas && canvas.style) {\r\n\t\t canvas.style.height = \"100%\";\r\n\t\t canvas.style.width = \"100%\";\r\n }\r\n renderer.autoClear = false;\r\n\t const scene = this.createScene(\"default\");\r\n\t this.setCurrentScene(scene);\r\n\t}\r\n\t\r\n\t/**\r\n\t * Get the current scene on display.\r\n\t * @return {Zinc.Scene};\r\n\t */\r\n\tthis.getCurrentScene = () => {\r\n\t\treturn currentScene;\r\n\t}\r\n\t\r\n\t/**\r\n\t * Set the current scene on display.\r\n\t * \r\n\t * @param {Zinc.Scene} sceneIn - The scene to be set, only scene created by this instance\r\n\t * of ZincRenderer is supported currently.\r\n\t */\r\n\tthis.setCurrentScene = sceneIn => {\r\n\t\tif (sceneIn) {\r\n\t\t\tthis.removeActiveScene(sceneIn);\r\n\t\t\tconst oldScene = currentScene;\r\n\t\t\tcurrentScene = sceneIn;\r\n\t\t\tif (oldScene) {\r\n\t\t\t\toldScene.setInteractiveControlEnable(false);\r\n\t\t\t}\r\n\t\t\tcurrentScene.setInteractiveControlEnable(true);\r\n\t\t\tcurrentScene.setAdditionalScenesGroup(scenesGroup);\r\n\t\t\tthis.onWindowResize();\r\n\t\t}\r\n\t}\r\n\t\r\n\t/**\r\n\t * Return scene with the matching name if scene with that name has been created.\r\n\t * \r\n\t * @param {String} name - Name to match\r\n\t * @return {Zinc.Scene}\r\n\t */\r\n\tthis.getSceneByName = name => {\r\n\t\treturn sceneMap[name];\r\n\t}\r\n\t\r\n\t/**\r\n\t * Create a new scene with the provided name if scene with the same name exists,\r\n\t * return undefined.\r\n\t * \r\n\t * @param {String} name - Name of the scene to be created.\r\n\t * @return {Zinc.Scene}\r\n\t */\r\n\tthis.createScene = name => {\r\n\t\tif (sceneMap[name] != undefined){\r\n\t\t\treturn undefined;\r\n\t\t} else {\r\n\t\t\tlet new_scene = undefined;\r\n\t\t\tif (canvas)\r\n\t\t\t\tnew_scene = new (require('./scene').Scene)(canvas, renderer);\r\n\t\t\telse\r\n\t\t\t\tnew_scene = new (require('./scene').Scene)(container, renderer);\r\n\t\t\tsceneMap[name] = new_scene;\r\n\t\t\tnew_scene.sceneName = name;\r\n\t\t\treturn new_scene;\r\n\t\t}\r\n\t}\r\n\t\r\n\tconst updateOrthoScene = () => {\r\n\t\tif (logoSprite != undefined) {\r\n\t\t\tconst material = logoSprite.material;\r\n\t\t\tif (material.map) {\r\n\t\t\t\tconst width = this.getDrawingWidth();\r\n\t\t\t\tconst height = this.getDrawingHeight();\r\n\t\t\t\tconst calculatedWidth = (width - material.map.image.width)/2;\r\n\t\t\t\tconst calculatedHeight = (-height + material.map.image.height)/2;\r\n\t\t\t\tlogoSprite.position.set(calculatedWidth, calculatedHeight, 1 );\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\tconst updateOrthoCamera = () => {\r\n\t\tif (cameraOrtho != undefined) {\r\n\t\t\tconst width = this.getDrawingWidth();\r\n\t\t\tconst height = this.getDrawingHeight();\r\n\t\t\tcameraOrtho.left = -width / 2;\r\n\t\t\tcameraOrtho.right = width / 2;\r\n\t\t\tcameraOrtho.top = height / 2;\r\n\t\t\tcameraOrtho.bottom = -height / 2;\r\n\t\t\tcameraOrtho.updateProjectionMatrix();\r\n\t\t}\r\n\t};\r\n\t\r\n\t/**\r\n\t * Reset the viewport of the current scene to its original state.\r\n\t */\r\n\tthis.resetView = () => {\r\n\t\tcurrentScene.resetView();\r\n\t}\r\n\t\r\n\t/**\r\n\t * Adjust zoom distance to include all primitives in scene and also the additional scenes\r\n\t * but the lookat direction and up vectors will remain constant.\r\n\t */\r\n\tthis.viewAll = () => {\r\n\t\tif (currentScene) {\t\r\n\t\t\tconst boundingBox = currentScene.getBoundingBox();\r\n\t\t\tif (boundingBox) {\r\n\t\t\t for(let i = 0; i < additionalActiveScenes.length; i++) {\r\n\t\t\t const boundingBox2 = additionalActiveScenes[i].getBoundingBox();\r\n\t\t\t if (boundingBox2) {\r\n\t\t\t \tboundingBox.union(boundingBox2);\r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t\tcurrentScene.viewAllWithBoundingBox(boundingBox);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t/**\r\n\t * Load a legacy model(s) format with the provided URLs and parameters. This only loads the geometry\r\n\t * without any of the metadata. Therefore, extra parameters should be provided. This should be\r\n\t * called from {@link Zinc.Scene}.\r\n\t * \r\n\t * @deprecated\r\n\t */\r\n\tthis.loadModelsURL = (urls, colours, opacities, timeEnabled, morphColour, finishCallback) => {\r\n\t\tcurrentScene.loadModelsURL(urls, colours, opacities, timeEnabled, morphColour, finishCallback);\r\n\t}\r\n\t\r\n\tconst loadView = viewData => {\r\n\t\tcurrentScene.loadView(viewData);\r\n\t};\r\n\t\r\n\t/**\r\n\t * Load the viewport from an external location provided by the url. This should be\r\n\t * called from {@link Zinc.Scene};\r\n\t * @param {String} URL - address to the file containing viewport information.\r\n\t * @deprecated\r\n\t */\r\n\tthis.loadViewURL = url => {\r\n\t\tcurrentScene.loadViewURL(url);\r\n\t}\r\n\t\r\n\t/**\r\n\t * Load a legacy file format containing the viewport and its model file from an external \r\n\t * location provided by the url. Use the new metadata format with\r\n\t * {@link Zinc.Scene#loadMetadataURL} instead. This should be\r\n\t * called from {@link Zinc.Scene};\r\n\t * \r\n\t * @param {String} URL - address to the file containing viewport and model information.\r\n\t * @deprecated\r\n\t */\r\n\tthis.loadFromViewURL = (jsonFilePrefix, finishCallback) => {\r\n\t\tcurrentScene.loadFromViewURL(jsonFilePrefix, finishCallback);\r\n\t}\r\n\t\r\n\tthis.updateDirectionalLight = () => {\r\n\t\tcurrentScene.updateDirectionalLight();\r\n\t}\r\n \r\n let runAnimation = () => {\r\n if (isRendering) {\r\n animated_id = requestAnimationFrame( runAnimation );\r\n this.render();\r\n } else {\r\n cancelAnimationFrame(animated_id);\r\n animated_id = undefined;\r\n }\r\n }\r\n\r\n\t/**\r\n\t * Stop the animation and renderer to get into the render loop.\r\n\t */\r\n\tthis.stopAnimate = () => {\r\n if (isRendering) {\r\n clock.stop();\r\n isRendering = false;\r\n }\r\n\t}\r\n\r\n\t/**\r\n\t * Start the animation and begin the rendering loop.\r\n\t */\r\n\tthis.animate = () => {\r\n if (!isRendering) {\r\n clock.start();\r\n isRendering = true;\r\n runAnimation();\r\n }\r\n\t}\r\n\r\n\tconst prevTime = Date.now();\r\n\t\r\n\t/**\r\n\t * Add a callback function which will be called everytime before the renderer renders its scene.\r\n\t * @param {Function} callbackFunction - callbackFunction to be added.\r\n\t * \r\n\t * @return {Number}\r\n\t */\r\n\tthis.addPreRenderCallbackFunction = callbackFunction => {\r\n\t\tpreRenderCallbackFunctions_id = preRenderCallbackFunctions_id + 1;\r\n\t\tpreRenderCallbackFunctions[preRenderCallbackFunctions_id] = callbackFunction;\r\n\t\treturn preRenderCallbackFunctions_id;\r\n\t}\r\n\t\r\n\t/**\r\n\t * Remove a callback function that is previously added to the scene.\r\n\t * @param {Number} id - identifier of the previously added callback function.\r\n\t */\r\n\tthis.removePreRenderCallbackFunction = id => {\r\n\t\tif (id in preRenderCallbackFunctions) {\r\n \t\t\tdelete preRenderCallbackFunctions[id];\r\n\t\t}\r\n\t}\r\n \r\n\t/**\r\n\t * Add a callback function which will be called everytime after the renderer renders its scene.\r\n\t * @param {Function} callbackFunction - callbackFunction to be added.\r\n\t * \r\n\t * @return {Number}\r\n\t */\r\n\tthis.addPostRenderCallbackFunction = callbackFunction => {\r\n\t\tpostRenderCallbackFunctions_id = postRenderCallbackFunctions_id + 1;\r\n\t\tpostRenderCallbackFunctions[postRenderCallbackFunctions_id] = callbackFunction;\r\n\t\treturn postRenderCallbackFunctions_id;\r\n\t}\r\n\t\r\n\t/**\r\n\t * Remove a callback function that is previously added to the scene.\r\n\t * @param {Number} id - identifier of the previously added callback function.\r\n\t */\r\n\tthis.removePostRenderCallbackFunction = id => {\r\n\t\tif (id in postRenderCallbackFunctions) {\r\n \t\t\tdelete postRenderCallbackFunctions[id];\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Get the current play rate, playrate affects how fast an animated object animates.\r\n\t * Also see {@link Zinc.Scene#duration}.\r\n\t */\r\n\tthis.getPlayRate = () => {\r\n\t\treturn playRate;\r\n\t}\r\n\t\r\n\t/**\r\n\t * Set the current play rate, playrate affects how fast an animated object animates.\r\n\t * @param {Number} PlayRateIn - value to set the playrate to.\r\n\t * Also see {@link Zinc.Scene#duration}.\r\n\t */\r\n\tthis.setPlayRate = playRateIn => {\r\n\t\tplayRate = playRateIn;\r\n\t}\r\n\t\r\n\tthis.getCurrentTime = () => {\r\n\t\treturn currentScene.getCurrentTime();\r\n\t}\r\n\t\r\n\t\r\n\t/**\r\n\t * Get the current play rate, playrate affects how fast an animated object animates.\r\n\t * Also see {@link Zinc.Scene#duration}.\r\n\t */\r\n\tthis.setMorphsTime = time => {\r\n\t\tcurrentScene.setMorphsTime(time);\r\n\t}\r\n\t\r\n\t/**\r\n\t * Get {Zinc.Geoemtry} by its id. This should be called from {@link Zinc.Scene};\r\n\t * \r\n\t * @depreacted\r\n\t * @return {Zinc.Geometry}\r\n\t */\r\n\tthis.getZincGeometryByID = id => {\r\n\t\treturn currentScene.getZincGeometryByID(id);\r\n\t}\t\r\n\t\r\n\t/**\r\n\t * Add {Three.Object} to the current scene.\r\n\t */\r\n\tthis.addToScene = object => {\r\n\t\tcurrentScene.addObject(object)\r\n\t}\r\n\t\r\n\t/**\r\n\t * Add {Three.Object} to the ortho scene, objects added to the ortho scene are rendered in\r\n\t * normalised coordinates and overlay on top of current scene. \r\n\t * \r\n\t */\r\n\tthis.addToOrthoScene = object => {\r\n\t\tif (sceneOrtho == undefined)\r\n\t\t\tsceneOrtho = new THREE.Scene();\r\n\t\tif (cameraOrtho == undefined) {\r\n\t\t\tconst width = this.getDrawingWidth();\r\n\t\t\tconst height = this.getDrawingHeight();\r\n\t\t\tcameraOrtho = new THREE.OrthographicCamera( -width / 2,\r\n\t\t\t\t\twidth / 2, height/ 2, -height / 2, 1, 10 );\r\n\t\t\tcameraOrtho.position.z = 10;\r\n\t\t}\r\n\t\tsceneOrtho.add(object)\r\n\t}\r\n\t\r\n\tconst createHUDSprites = logoSprite => {\r\n\t\treturn texture => {\r\n\t\t\ttexture.needsUpdate = true;\r\n\t\t\tconst material = new THREE.SpriteMaterial( { map: texture } );\r\n\t\t\tconst imagewidth = material.map.image.width;\r\n\t\t\tconst imageheight = material.map.image.height;\r\n\t\t\tlogoSprite.material = material;\r\n\t\t\tlogoSprite.scale.set( imagewidth, imageheight, 1 );\r\n\t\t\tconst width = this.getDrawingWidth();\r\n\t\t\tconst height = this.getDrawingHeight();\r\n\t\t\tlogoSprite.position.set( (width - imagewidth)/2, (-height + imageheight)/2, 1 );\r\n\t\t\tthis.addToOrthoScene(logoSprite);\r\n\t\t};\r\n\t};\r\n\t\r\n\tthis.addLogo = () => {\r\n\t\tlogoSprite = new THREE.Sprite();\r\n\t\tconst logo = THREE.ImageUtils.loadTexture(\r\n\t\t\t\t\"images/abi_big_logo_transparent_small.png\", undefined, createHUDSprites(logoSprite));\r\n\t}\r\n\t\r\n\t/**\r\n\t * Render the current and all additional scenes. It will first update all geometries and glyphsets\r\n\t * in scenes, clear depth buffer and render the ortho scene, call the preRenderCallbackFunctions stack\r\n\t * , render the scenes then postRenderCallback.\r\n\t */\r\n\tthis.render = () => {\r\n\t\tif (!sensor) {\r\n\t\t\tif (container) {\r\n\t\t\t\tif (container.clientWidth > 0 && container.clientHeight > 0)\r\n\t\t\t\t\tsensor = new ResizeSensor(container, this.onWindowResize);\r\n\t\t\t} else if (canvas) {\r\n\t\t\t\tif (canvas.width > 0 && canvas.height > 0)\r\n\t\t\t\t\tsensor = new ResizeSensor(canvas, this.onWindowResize);\r\n\t\t\t}\r\n\t\t}\r\n\t\tconst delta = clock.getDelta();\r\n\t\tcurrentScene.renderGeometries(playRate, delta, this.playAnimation);\r\n\t for(let i = 0; i < additionalActiveScenes.length; i++) {\r\n\t const sceneItem = additionalActiveScenes[i];\r\n\t sceneItem.renderGeometries(playRate, delta, this.playAnimation);\r\n\t }\r\n\t\tif (cameraOrtho != undefined && sceneOrtho != undefined) {\r\n\t\t\trenderer.clearDepth();\r\n\t\t\trenderer.render( sceneOrtho, cameraOrtho );\r\n\t\t}\r\n for (let key in preRenderCallbackFunctions) {\r\n if (preRenderCallbackFunctions.hasOwnProperty(key)) {\r\n preRenderCallbackFunctions[key].call();\r\n }\r\n }\r\n currentScene.render(renderer);\r\n for (let key in postRenderCallbackFunctions) {\r\n if (postRenderCallbackFunctions.hasOwnProperty(key)) {\r\n postRenderCallbackFunctions[key].call();\r\n }\r\n }\r\n\t}\r\n\t\r\n\t/**\r\n\t * Get the internal {@link Three.Renderer}, to gain access to ThreeJS APIs.\r\n\t */\r\n\tthis.getThreeJSRenderer = () => {\r\n\t\treturn renderer;\r\n\t}\r\n\t\r\n\t/**\r\n\t * Check if a scene is currently active.\r\n\t * @param {Zinc.Scene} sceneIn - Scene to check if it is currently\r\n\t * rendered.\r\n\t */\r\n\tthis.isSceneActive = sceneIn => {\r\n\t\tif (currentScene === sceneIn) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t for(let i = 0; i < additionalActiveScenes.length; i++) {\r\n\t\t const sceneItem = additionalActiveScenes[i];\r\n\t\t if (sceneItem === sceneIn)\r\n\t\t \treturn true;\r\n\t\t }\r\n\t\t}\r\n\t return false;\r\n\t} \r\n\t\r\n\t/**\r\n\t * Add additional active scene for rendering, this scene will also be rendered but \r\n\t * viewport of the currentScene will be used. \r\n\t * @param {Zinc.Scene} additionalScene - Scene to be added to the rendering.\r\n\t */\r\n\tthis.addActiveScene = additionalScene => {\r\n\t\tif (!this.isSceneActive(additionalScene)) {\r\n\t\t\tadditionalActiveScenes.push(additionalScene);\r\n\t\t\tscenesGroup.add(additionalScene.getThreeJSScene());\r\n\t\t}\r\n\t}\r\n\t\r\n\t/**\r\n\t * Remove a currenrtly active scene from the renderer, this scene will also be rendered but \r\n\t * viewport of the currentScene will be used. \r\n\t * @param {Zinc.Scene} additionalScene - Scene to be removed from rendering.\r\n\t */\r\n\tthis.removeActiveScene = additionalScene => {\r\n\t for(let i = 0; i < additionalActiveScenes.length; i++) {\r\n\t const sceneItem = additionalActiveScenes[i];\r\n\t if (sceneItem === additionalScene) {\r\n\t \tadditionalActiveScenes.splice(i, 1);\r\n\t \tscenesGroup.remove(additionalScene.getThreeJSScene());\r\n\t \treturn;\r\n\t }\r\n\t }\r\n\t}\r\n\t\r\n\t/**\r\n\t * Clear all additional scenes from rendering except for curentScene.\r\n\t */\r\n\tthis.clearAllActiveScene = () => {\r\n\t\tfor (let i = 0; i < additionalActiveScenes.length; i++) {\r\n\t\t\tscenesGroup.remove(additionalActiveScenes[i].getThreeJSScene());\r\n\t\t}\r\n\t\tadditionalActiveScenes.splice(0,additionalActiveScenes.length);\r\n\t}\r\n\t\r\n\t/**\r\n\t * Dispose all memory allocated, this will effetively destroy all scenes.\r\n\t */\r\n\tthis.dispose = () => {\r\n if (isRendering)\r\n cancelAnimationFrame(animated_id);\r\n\t for (const key in sceneMap) {\r\n\t if (sceneMap.hasOwnProperty(key)) {\r\n\t sceneMap[key].clearAll();\r\n\t }\r\n\t }\r\n\t sceneMap = [];\r\n\t additionalActiveScenes = [];\r\n\t scenesGroup = new THREE.Group();\r\n\t this.stopAnimate();\r\n\t preRenderCallbackFunctions = [];\r\n\t preRenderCallbackFunctions_id = 0;\r\n\t cameraOrtho = undefined;\r\n\t sceneOrtho = undefined;\r\n\t logoSprite = undefined;\r\n\t const scene = this.createScene(\"default\");\r\n\t this.setCurrentScene(scene);\r\n\t sensor = undefined;\r\n\t}\r\n\t\r\n\t/**\r\n\t * Transition from the current viewport to the endingScene's viewport in the specified duration.\r\n\t * \r\n\t * @param {Zinc.Scene} endingScene - Viewport of this scene will be used as the destination.\r\n\t * @param {Number} duration - Amount of time to transition from current viewport to the \r\n\t * endingScene's viewport.\r\n\t */\r\n\tthis.transitionScene = (endingScene, duration) => {\r\n\t\tif (currentScene) {\r\n\t\t\tconst currentCamera = currentScene.getZincCameraControls();\r\n\t\t\tconst boundingBox = endingScene.getBoundingBox();\r\n\t\t\tif (boundingBox) {\r\n\t\t\t\tconst radius = boundingBox.min.distanceTo(boundingBox.max)/2.0;\r\n\t\t\t\tconst centreX = (boundingBox.min.x + boundingBox.max.x) / 2.0;\r\n\t\t\t\tconst centreY = (boundingBox.min.y + boundingBox.max.y) / 2.0;\r\n\t\t\t\tconst centreZ = (boundingBox.min.z + boundingBox.max.z) / 2.0;\r\n\t\t\t\tconst clip_factor = 4.0;\r\n\t\t\t\tconst endingViewport = currentCamera.getViewportFromCentreAndRadius(centreX, centreY, centreZ, radius, 40, radius * clip_factor );\r\n\t\t\t\tconst startingViewport = currentCamera.getCurrentViewport();\r\n\t\t\t\tcurrentCamera.cameraTransition(startingViewport, endingViewport, duration);\r\n\t\t\t\tcurrentCamera.enableCameraTransition();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n this.isWebGL2 = () => {\r\n if (renderer)\r\n return renderer.capabilities.isWebGL2;\r\n return false;\r\n }\r\n};\r\n","module.exports = require(\"css-element-queries/src/ResizeSensor\");","const THREE = require('three');\nconst MarkerCluster = require('./primitives/markerCluster').MarkerCluster;\nconst SceneLoader = require('./sceneLoader').SceneLoader;\nconst SceneExporter = require('./sceneExporter').SceneExporter;\nconst Viewport = require('./controls').Viewport;\nconst createBufferGeometry = require('./utilities').createBufferGeometry;\nconst getCircularTexture = require('./utilities').getCircularTexture;\nlet uniqueiId = 0;\n\nconst getUniqueId = function () {\n return \"sc\" + uniqueiId++;\n}\n\nconst defaultMetadata = function() {\n return { \n Duration: \"6 secs\",\n OriginalDuration: \"-\",\n TimeStamps: {}\n }\n};\n\nconst defaultDuration = 6000;\n\n/**\n * A Scene contains {@link Region},and \n * {@link CameraControls} which controls the viewport and additional features.\n * It is the main object used for controlling what is and what is not displayed\n * on the renderer.\n * \n * @class\n * @param {Object} containerIn - Container to create the renderer on.\n * @author Alan Wu\n * @return {Scene}\n */\nexports.Scene = function (containerIn, rendererIn) {\n const container = containerIn;\n let videoHandler = undefined;\n let sceneLoader = new SceneLoader(this);\n let minimap = undefined;\n let zincObjectAddedCallbacks = {};\n let zincObjectAddedCallbacks_id = 0;\n let zincObjectRemovedCallbacks = {};\n let zincObjectRemovedCallbacks_id = 0;\n const scene = new THREE.Scene();\n const rootRegion = new (require('./region').Region)(undefined, this);\n scene.add(rootRegion.getGroup());\n const tempGroup = new THREE.Group();\n scene.add(tempGroup);\n /**\n * A {@link THREE.DirectionalLight} object for controlling lighting of this scene.\n */\n this.directionalLight = undefined;\n /**\n * a {@link THREE.AmbientLight} for controlling the ambient lighting of this scene.\n */\n this.ambient = undefined;\n this.camera = undefined;\n let duration = 6000;\n let zincCameraControls = undefined;\n this.sceneName = undefined;\n let stereoEffectFlag = false;\n let stereoEffect = undefined;\n this.autoClearFlag = true;\n this.displayMarkers = false;\n this.displayMinimap = false;\n this.minimapScissor = {\n x_offset: 16,\n y_offset: 16,\n width: 128,\n height: 128,\n align: \"top-left\",\n updateRequired: true\n };\n let scissor = {x: 0, y: 0};\n let metadata = defaultMetadata();\n let _markerTarget = new THREE.Vector2();\n let pickableObjectsList = [];\n this.forcePickableObjectsUpdate = false;\n this.uuid = getUniqueId();\n let markerCluster = new MarkerCluster(this);\n markerCluster.disable();\n scene.add(markerCluster.group);\n\n const getDrawingWidth = () => {\n if (container)\n if (typeof container.clientWidth !== \"undefined\")\n return container.clientWidth;\n else\n return container.width;\n return 0;\n }\n \n const getDrawingHeight = () => {\n if (container)\n if (typeof container.clientHeight !== \"undefined\")\n return container.clientHeight;\n else\n return container.height;\n return 0;\n }\n\n /**\n * This function returns a three component array, which contains\n * [totalsize, totalLoaded and errorDownload] of all the downloads happening\n * in this scene.\n * @returns {Array} \n */\n this.getDownloadProgress = () => {\n return sceneLoader.getDownloadProgress();\n }\n\n //called from Renderer when panel has been resized\n this.onWindowResize = () => {\n const wHeight = getDrawingHeight();\n this.camera.aspect = getDrawingWidth() / wHeight;\n this.camera.updateProjectionMatrix();\n this.minimapScissor.updateRequired = true;\n zincCameraControls.onResize();\n zincCameraControls.calculateHeightPerPixelAtZeroDepth(wHeight);\n }\n\n /**\n * Reset the viewport of this scene to its original state. \n */\n this.resetView = () => {\n this.onWindowResize();\n zincCameraControls.resetView();\n }\n\n /**\n * Set the zoom level by unit scroll rate\n */\n this.changeZoomByScrollRateUnit = unit => {\n zincCameraControls.changeZoomByScrollRateUnit(unit);\n }\n\n //Setup the camera for this scene, it also initialise the lighting\n const setupCamera = () => {\n this.camera = new THREE.PerspectiveCamera(40, getDrawingWidth() / getDrawingHeight(), 0.0, 10.0);\n this.ambient = new THREE.AmbientLight(0xffffff, 0.2);\n scene.add(this.ambient);\n\n this.directionalLight = new THREE.DirectionalLight(0xffffff, 0.8);\n scene.add(this.directionalLight);\n zincCameraControls = new (require('./controls').CameraControls)(this.camera, rendererIn.domElement, rendererIn, this);\n\n zincCameraControls.setDirectionalLight(this.directionalLight);\n zincCameraControls.resetView();\n\n minimap = new (require('./minimap').Minimap)(this);\n };\n\n setupCamera();\n\n /**\n * Load the viewport Data from the argument {@link Zinc.Viewport} and set it as \n * the default viewport of this scene.\n * \n * @param {Zinc.Viewport} viewData - Viewport data to be loaded. \n */\n this.loadView = settings => {\n const viewPort = new Viewport();\n viewPort.setFromObject(settings);\n zincCameraControls.setCurrentCameraSettings(viewPort);\n return true;\n }\n\n /**\n * Set up multiple views.\n * \n * @param {Zinc.Viewport} viewData - Viewport data to be loaded. \n */\n this.setupMultipleViews = (defaultView, entries) => {\n for (const [name, settings] of Object.entries(entries)) {\n const viewport = new Viewport();\n viewport.setFromObject(settings);\n zincCameraControls.addViewport(name, viewport);\n }\n zincCameraControls.setDefaultViewport(defaultView);\n }\n\n /**\n * Get the bounding box of all the object in this scene only.\n * \n * @returns {THREE.Box3} \n */\n this.getBoundingBox = () => {\n return rootRegion.getBoundingBox(true);\n }\n\n /**\n * Adjust the viewport to display the desired volume provided by the bounding box.\n * \n * @param {THREE.Box3} boundingBox - The bounding box which describes the volume of\n * which we the viewport should be displaying.\n */\n this.viewAllWithBoundingBox = boundingBox => {\n if (boundingBox) {\n const viewport = zincCameraControls.getViewportFromBoundingBox(boundingBox, 1.0);\n zincCameraControls.setCurrentCameraSettings(viewport);\n zincCameraControls.calculateHeightPerPixelAtZeroDepth(getDrawingHeight());\n markerCluster.markerUpdateRequired = true;\n }\n }\n\n /**\n * Adjust zoom distance to include all primitives in scene only.\n */\n this.viewAll = () => {\n const boundingBox = this.getBoundingBox();\n this.viewAllWithBoundingBox(boundingBox);\n markerCluster.markerUpdateRequired = true;\n }\n\n /**\n * A function which iterates through the list of geometries and call the callback\n * function with the geometries as the argument.\n * @param {Function} callbackFunction - Callback function with the geometry\n * as an argument.\n */\n this.forEachGeometry = callbackFunction => {\n rootRegion.forEachGeometry(callbackFunction, true);\n }\n\n /**\n * A function which iterates through the list of glyphsets and call the callback\n * function with the glyphset as the argument.\n * @param {Function} callbackFunction - Callback function with the glyphset\n * as an argument.\n */\n this.forEachGlyphset = callbackFunction => {\n rootRegion.forEachGlyphset(callbackFunction, true);\n }\n\n /**\n * A function which iterates through the list of pointsets and call the callback\n * function with the pointset as the argument.\n * @param {Function} callbackFunction - Callback function with the pointset\n * as an argument.\n */\n this.forEachPointset = callbackFunction => {\n rootRegion.forEachPointset(callbackFunction, true);\n }\n\n /**\n * A function which iterates through the list of lines and call the callback\n * function with the lines as the argument.\n * @param {Function} callbackFunction - Callback function with the lines\n * as an argument.\n */\n this.forEachLine = callbackFunction => {\n rootRegion.forEachLine(callbackFunction, true);\n }\n\n /** \n * Find and return all geometries in this scene with the matching GroupName.\n * \n * @param {String} GroupName - Groupname to match with.\n * @returns {Array}\n */\n this.findGeometriesWithGroupName = GroupName => {\n return rootRegion.findGeometriesWithGroupName(GroupName, true);\n }\n\n /** \n * Find and return all pointsets in this scene with the matching GroupName.\n * \n * @param {String} GroupName - Groupname to match with.\n * @returns {Array}\n */\n this.findPointsetsWithGroupName = GroupName => {\n return rootRegion.findPointsetsWithGroupName(GroupName, true);\n }\n /** \n * Find and return all glyphsets in this scene with the matching GroupName.\n * \n * @param {String} GroupName - Groupname to match with.\n * @returns {Array}\n */\n this.findGlyphsetsWithGroupName = GroupName => {\n return rootRegion.findGlyphsetsWithGroupName(GroupName, true);\n }\n\n /** \n * Find and return all lines in this scene with the matching GroupName.\n * \n * @param {String} GroupName - Groupname to match with.\n * @returns {Array}\n */\n this.findLinesWithGroupName = GroupName => {\n return rootRegion.findLinesWithGroupName(GroupName, true);\n }\n\n /** \n * Find a list of objects with the specified name, this will\n * tranverse through the region tree to find all child objects\n * with matching name.\n * \n * @param {String} GroupName - Groupname to match with.\n * @returns {Array}\n */\n this.findObjectsWithGroupName = GroupName => {\n return rootRegion.findObjectsWithGroupName(GroupName, true);\n }\n\n this.findObjectsWithAnatomicalId = anatomicalId => {\n return rootRegion.findObjectsWithAnatomicalId(anatomicalId, true);\n }\n\n /** \n * Get the bounding box of all zinc objects in list.\n * \n * @param {Array} objectsArray - Groupname to match with.\n * @returns {THREE.Box3}\n */\n this.getBoundingBoxOfZincObjects = objectsArray => {\n let boundingBox = undefined;\n for (let i = 0; i < objectsArray.length; i++) {\n let box = objectsArray[i].getBoundingBox();\n if (box) {\n if (!boundingBox)\n boundingBox = box;\n else\n boundingBox.union(box);\n }\n }\n return boundingBox;\n }\n\n /** \n * Convert the vector3 into screen coordinates.\n * \n * @param {THREE.Vector3} point - Vector 3 containing the point to convert,\n * this vector will be overwritten with the returned value.\n * @param {Array} objectsArray - Groupname to match with.\n * @returns {THREE.Vector3}\n */\n this.vectorToScreenXY = point => {\n point.project(this.camera);\n let width = getDrawingWidth();\n let height = getDrawingHeight();\n let widthHalf = (width / 2);\n let heightHalf = (height / 2);\n point.x = (point.x * widthHalf) + widthHalf;\n point.y = - (point.y * heightHalf) + heightHalf;\n return point;\n }\n\n /** \n * Get the screen coordinate of the centroid of provided list of objects.\n * \n * @param {Array} zincObjects - List of {@link ZincObject}.\n * @returns {THREE.Vector3}\n */\n this.getObjectsScreenXY = zincObjects => {\n if (zincObjects && zincObjects.length > 0) {\n let boundingBox = this.getBoundingBoxOfZincObjects(zincObjects);\n const center = new THREE.Vector3();\n boundingBox.getCenter(center);\n return this.vectorToScreenXY(center);\n }\n return undefined;\n }\n\n /** \n * Get the screen coordinate of the centroid of all objects \n * in scene with the provided name.\n * \n * @param {String} name - List of {@link ZincObject}.\n * @returns {THREE.Vector3}\n */\n this.getNamedObjectsScreenXY = name => {\n let zincObjects = this.findObjectsWithGroupName(name);\n return this.getObjectsScreenXY(zincObjects);\n };\n\n /** \n * Add zinc object into the root {@link Region} of sfcene.\n * \n * @param {ZincObject} - zinc object ot be added.\n * @returns {THREE.Vector3}\n */\n this.addZincObject = zincObject => {\n if (zincObject) {\n rootRegion.addZincObject(zincObject);\n if (zincCameraControls)\n zincCameraControls.calculateMaxAllowedDistance(this);\n }\n }\n\n /**\n * Load a glyphset into this scene object.\n * \n * @param {String} metaurl - Provide informations such as transformations, colours \n * and others for each of the glyph in the glyphsset.\n * @param {String} glyphurl - regular json model file providing geometry of the glyph.\n * @param {String} groupName - name to assign the glyphset's groupname to.\n * @param {Function} finishCallback - Callback function which will be called\n * once the glyphset is succssfully load in.\n */\n this.loadGlyphsetURL = (metaurl, glyphurl, groupName, finishCallback) => {\n sceneLoader.loadGlyphsetURL(rootRegion, metaurl, glyphurl, groupName, finishCallback);\n }\n\n /**\n * Load a pointset into this scene object.\n * \n * @param {String} metaurl - Provide informations such as transformations, colours \n * and others for each of the glyph in the glyphsset.\n * @param {Boolean} timeEnabled - Indicate if morphing is enabled.\n * @param {Boolean} morphColour - Indicate if color morphing is enabled.\n * @param {STRING} groupName - name to assign the pointset's groupname to.\n * @param {Function} finishCallback - Callback function which will be called\n * once the glyphset is succssfully load in.\n */\n this.loadPointsetURL = (url, timeEnabled, morphColour, groupName, finishCallback) => {\n sceneLoader.loadPointsetURL(rootRegion, url, timeEnabled, morphColour, groupName, finishCallback);\n }\n\n /**\n * Load lines into this scene object.\n * \n * @param {String} metaurl - Provide informations such as transformations, colours \n * and others for each of the glyph in the glyphsset.\n * @param {Boolean} timeEnabled - Indicate if morphing is enabled.\n * @param {Boolean} morphColour - Indicate if color morphing is enabled.\n * @param {STRING} groupName - name to assign the pointset's groupname to.\n * @param {Function} finishCallback - Callback function which will be called\n * once the glyphset is succssfully load in.\n */\n this.loadLinesURL = (url, timeEnabled, morphColour, groupName, finishCallback) => {\n sceneLoader.loadLinesURL(rootRegion, url, timeEnabled, morphColour, groupName, finishCallback);\n }\n\n /**\n * Read a STL file into this scene, the geometry will be presented as\n * {@link Zinc.Geometry}. \n * \n * @param {STRING} url - location to the STL file.\n * @param {STRING} groupName - name to assign the geometry's groupname to.\n * @param {Function} finishCallback - Callback function which will be called\n * once the STL geometry is succssfully loaded.\n */\n this.loadSTL = (url, groupName, finishCallback) => {\n sceneLoader.loadSTL(rootRegion, url, groupName, finishCallback);\n }\n\n /**\n * Read a OBJ file into this scene, the geometry will be presented as\n * {@link Zinc.Geometry}. \n * \n * @param {STRING} url - location to the STL file.\n * @param {STRING} groupName - name to assign the geometry's groupname to.\n * @param {Function} finishCallback - Callback function which will be called\n * once the OBJ geometry is succssfully loaded.\n */\n this.loadOBJ = (url, groupName, finishCallback) => {\n sceneLoader.loadOBJ(rootRegion, url, groupName, finishCallback);\n }\n\n /**\n * Load a metadata file from the provided URL into this scene. Once\n * succssful scene proceeds to read each items into scene for visualisations.\n * \n * @param {String} url - Location of the metafile\n * @param {Function} finishCallback - Callback function which will be called\n * for each glyphset and geometry that has been written in.\n */\n this.loadMetadataURL = (url, finishCallback, allCompletedCallback) => {\n sceneLoader.loadMetadataURL(rootRegion, url, finishCallback, allCompletedCallback);\n }\n\n /**\n * Load a legacy model(s) format with the provided URLs and parameters. This only loads the geometry\n * without any of the metadata. Therefore, extra parameters should be provided.\n * \n * @deprecated\n */\n this.loadModelsURL = (urls, colours, opacities, timeEnabled, morphColour, finishCallback) => {\n sceneLoader.loadModelsURL(rootRegion. urls, colours, opacities, timeEnabled, morphColour, finishCallback);\n }\n\n /**\n * Load the viewport from an external location provided by the url.\n * @param {String} URL - address to the file containing viewport information.\n */\n this.loadViewURL = url => {\n sceneLoader.loadViewURL(url);\n }\n\n /**\n * Load a legacy file format containing the viewport and its meta file from an external \n * location provided by the url. Use the new metadata format with\n * {@link Zinc.Scene#loadMetadataURL} instead.\n * \n * @param {String} URL - address to the file containing viewport and model information.\n * @deprecated\n */\n this.loadFromViewURL = (jsonFilePrefix, finishCallback) => {\n sceneLoader.loadFromViewURL(jsonFilePrefix, finishCallback);\n }\n\n /**\n * Load GLTF into this scene object.\n */\n this.loadGLTF = (url, finishCallback, allCompletedCallback, options) => {\n sceneLoader.loadGLTF(rootRegion, url, finishCallback, allCompletedCallback, options);\n }\n\n //Update the directional light for this scene.\n this.updateDirectionalLight = () => {\n zincCameraControls.updateDirectionalLight();\n }\n\n /**\n * Add any {THREE.Object} into this scene.\n * @param {THREE.Object} object - to be addded into this scene.\n */\n this.addObject = object => {\n scene.add(object);\n }\n\n /**\n * Remove any {THREE.Object} from this scene.\n * @param {THREE.Object} object - to be removed from this scene.\n */\n this.removeObject = object => {\n scene.remove(object);\n }\n\n /**\n * Get the current time of the scene.\n * @return {Number}\n */\n this.getCurrentTime = () => {\n if (videoHandler != undefined) {\n return videoHandler.getCurrentTime(duration);\n }\n const time = rootRegion.getCurrentTime();\n if (time !== -1) \n return time;\n \n return 0;\n }\n\n /**\n * Set the current time of all the geometries and glyphsets of this scene.\n * @param {Number} time - Value to set the time to.\n */\n this.setMorphsTime = (time) => {\n if (videoHandler != undefined) {\n videoHandler.setMorphTime(time, duration);\n }\n rootRegion.setMorphTime(time, true);\n }\n\n /**\n * Check if any object in this scene is time varying.\n * \n * @return {Boolean}\n */\n this.isTimeVarying = () => {\n if (videoHandler && videoHandler.video && !videoHandler.video.error) {\n \treturn true;\n }\n return rootRegion.isTimeVarying();\n }\n\n /**\n * Update geometries and glyphsets based on the calculated time.\n * @private\n */\n this.renderGeometries = (playRate, delta, playAnimation) => {\n // Let video dictates the progress if one is present\n let options = {};\n options.camera = zincCameraControls;\n //Global markers flag, marker can be set at individual zinc object level\n //overriding this flag.\n options.displayMarkers = this.displayMarkers;\n options.markerCluster = markerCluster;\n options.markersList = markerCluster.markers;\n options.ndcToBeUpdated = false;\n //Always set marker cluster update required when playAnimation is true\n //to make sure it is updated when it stops\n if (playAnimation) {\n options.markerCluster.markerUpdateRequired = true;\n }\n\t if (videoHandler) {\n\t\t if (videoHandler.isReadyToPlay()) {\n\t\t\t if (playAnimation) {\n videoHandler.video.play();\n\t\t\t } else {\n\t\t\t\t videoHandler.video.pause();\n\t\t\t }\n const currentTime = videoHandler.video.currentTime /\n videoHandler.getVideoDuration() * duration;\n\t\t\t if (0 == sceneLoader.toBeDownloaded) {\n\t\t\t\t zincCameraControls.setTime(currentTime);\n\t\t\t\t options.ndcToBeUpdated = zincCameraControls.update(0);\n if (options.ndcToBeUpdated) {\n zincCameraControls.calculateHeightPerPixelAtZeroDepth(getDrawingHeight());\n }\n rootRegion.setMorphTime(currentTime, true);\n rootRegion.renderGeometries(0, 0, playAnimation, zincCameraControls, options, true);\n\t\t\t } else {\n\t\t\t\t zincCameraControls.update(0);\n\t\t\t }\n\t\t\t //console.log(videoHandler.video.currentTime / videoHandler.getVideoDuration() * 6000);\n\t\t } else {\n\t\t\t myPlayRate = 0;\n\t\t }\n\t } else {\n\t\t if (0 == sceneLoader.toBeDownloaded) {\n options.ndcToBeUpdated = zincCameraControls.update(delta);\n if (options.ndcToBeUpdated) {\n zincCameraControls.calculateHeightPerPixelAtZeroDepth(getDrawingHeight());\n }\n rootRegion.renderGeometries(playRate, delta, playAnimation, zincCameraControls, options, true);\n\t\t } else {\n\t\t\t zincCameraControls.update(0);\n\t\t }\n }\n }\n\n /**\n * Return the internal {THREE.Scene}.\n * @return {THREE.Scene}\n */\n this.getThreeJSScene = () => {\n return scene;\n }\n\n this.setVideoHandler = (videoHandlerIn) => {\n if (!videoHandler)\n videoHandler = videoHandlerIn;\n }\n\n /**\n * Set a group of scenes into this parent scene. This group of\n * scenes will also be rendered when this scene is rendered.\n * @private\n */\n this.setAdditionalScenesGroup = scenesGroup => {\n scene.add(scenesGroup);\n }\n\n let getWindowsPosition = (align, x_offset, y_offset, width, height,\n renderer_width, renderer_height) => {\n let x = 0;\n let y = 0;\n if (align.includes(\"top\")) {\n y = renderer_height - height - y_offset;\n } else if (align.includes(\"bottom\")) {\n y = y_offset;\n } else {\n y = Math.floor((renderer_height - height) / 2.0);\n }\n if (align.includes(\"left\")) {\n x = x_offset;\n } else if (align.includes(\"right\")) {\n x = renderer_width - x_offset- width;\n } else {\n x = Math.floor((renderer_width - width) / 2.0);\n }\n return {x: x, y: y};\n }\n\n const renderMinimap = renderer => {\n if (this.displayMinimap === true) {\n renderer.setScissorTest(true);\n renderer.getSize(_markerTarget);\n if (this.minimapScissor.updateRequired) {\n scissor = getWindowsPosition(this.minimapScissor.align,\n this.minimapScissor.x_offset, \n this.minimapScissor.y_offset, \n this.minimapScissor.width,\n this.minimapScissor.height,\n _markerTarget.x, _markerTarget.y);\n this.minimapScissor.updateRequired = false;\n }\n renderer.setScissor(\n scissor.x,\n scissor.y,\n this.minimapScissor.width,\n this.minimapScissor.height);\n renderer.setViewport(\n scissor.x,\n scissor.y,\n this.minimapScissor.width,\n this.minimapScissor.height); \n minimap.updateCamera();\n scene.add(minimap.mask);\n renderer.render(scene, minimap.camera);\n scene.remove(minimap.mask);\n renderer.setScissorTest(false);\n renderer.setViewport(0, 0, _markerTarget.x, _markerTarget.y);\n }\n }\n\n /**\n * Render the scene.\n * @private\n */\n this.render = renderer => {\n if (this.autoClearFlag)\n renderer.clear();\n if (stereoEffectFlag && stereoEffect) {\n stereoEffect.render(scene, this.camera);\n } else {\n renderer.render(scene, this.camera);\n renderMinimap(renderer);\n }\n }\n\n /**\n * Enable or disable interactive control, this is on by default.\n * \n * @param {Boolean} flag - Indicate either interactive control \n * should be enabled or disabled.\n */\n this.setInteractiveControlEnable = flag => {\n if (flag == true)\n zincCameraControls.enable();\n else\n zincCameraControls.disable();\n }\n\n /**\n * Get the camera control of this scene.\n * @return {Zinc.CameraControls}\n */\n this.getZincCameraControls = () => {\n return zincCameraControls;\n }\n\n /**\n * Get the internal {THREE.Scene}.\n * @return {THREE.Scene}\n */\n this.getThreeJSScene = () => {\n return scene;\n }\n\n /**\n * Set the default duration value for geometries and glyphsets\n * that are to be loaded into this scene.\n * @param {Number} durationIn - duration of the scene.\n */\n this.setDuration = durationIn => {\n rootRegion.setDuration(durationIn);\n duration = durationIn;\n zincCameraControls.setPathDuration(durationIn);\n sceneLoader.duration = durationIn;\n }\n\n /**\n * Get the default duration value.\n * @return {Number}\n */\n this.getDuration = () => {\n return duration;\n }\n\n /**\n * Enable or disable stereo effect of this scene.\n * @param {Boolean} stereoFlag - Indicate either stereo effect control \n * should be enabled or disabled.\n */\n this.setStereoEffectEnable = stereoFlag => {\n if (stereoFlag == true) {\n if (!stereoEffect) {\n stereoEffect = new require('./controls').StereoEffect(rendererIn);\n }\n }\n rendererIn.setSize(getDrawingWidth(), getDrawingHeight());\n this.camera.updateProjectionMatrix();\n stereoEffectFlag = stereoFlag;\n }\n\n\n /**\n * Check rather object is in scene.\n * \n * @return {Boolean}\n */\n this.objectIsInScene = zincObject => {\n return rootRegion.objectIsInRegion(zincObject, true);\n }\n\n /**\n * Rotate the camera view to view the entirety of the \n * bounding box with a smooth transition within the providied\n * transitionTime.\n * \n * @param {THREE.Box3} boundingBox - the bounding box to target\n * @param {Number} transitionTime - Duration to perform the transition.\n */\n this.alignBoundingBoxToCameraView = (boundingBox, transitionTime) => {\n if (boundingBox) {\n const center = new THREE.Vector3();\n boundingBox.getCenter(center);\n const viewport = this.getZincCameraControls().getCurrentViewport();\n const target = new THREE.Vector3(viewport.targetPosition[0],\n viewport.targetPosition[1], viewport.targetPosition[2]);\n const eyePosition = new THREE.Vector3(viewport.eyePosition[0],\n viewport.eyePosition[1], viewport.eyePosition[2]);\n const newVec1 = new THREE.Vector3();\n const newVec2 = new THREE.Vector3();\n newVec1.subVectors(target, eyePosition).normalize();\n newVec2.subVectors(target, center).normalize();\n const newVec3 = new THREE.Vector3();\n newVec3.crossVectors(newVec1, newVec2);\n const angle = newVec1.angleTo(newVec2);\n if (transitionTime > 0) {\n this.getZincCameraControls().rotateCameraTransition(newVec3,\n angle, transitionTime);\n this.getZincCameraControls().enableCameraTransition();\n } else {\n this.getZincCameraControls().rotateAboutLookAtpoint(newVec3, angle);\n }\n markerCluster.markerUpdateRequired = true;\n }\n }\n\n\n /**\n * Translate the camera view to the center of the \n * bounding box with a smooth transition within the providied\n * transitionTime.\n * \n * @param {THREE.Box3} boundingBox - the bounding box to target\n * @param {Number} transitionTime - Duration to perform the transition.\n */\n this.translateBoundingBoxToCameraView = (boundingBox, scaleRadius, transitionTime) => {\n if (boundingBox) {\n const oldViewport = this.getZincCameraControls().getCurrentViewport();\n const viewport = this.getZincCameraControls().getViewportFromBoundingBox(boundingBox, scaleRadius);\n if (transitionTime > 0) {\n this.getZincCameraControls().cameraTransition(oldViewport,\n viewport, transitionTime);\n this.getZincCameraControls().enableCameraTransition();\n }\n markerCluster.markerUpdateRequired = true;\n }\n }\n\n /**\n * Transition the camera into viewing the zinc object with a \n * smooth transition within the providied transitionTime.\n * \n * @param {ZincObject} zincObject - the bounding box to target\n * @param {Number} transitionTime - Duration to perform the transition.\n */\n this.alignObjectToCameraView = (zincObject, transitionTime) => {\n if (this.objectIsInScene(zincObject)) {\n const boundingBox = zincObject.getBoundingBox();\n this.alignBoundingBoxToCameraView(boundingBox, transitionTime);\n }\n }\n\n /**\n * Set the camera to point to the centroid of the zinc object.\n * \n * @param {ZincObject} zincObject - the bounding box to target\n */\n this.setCameraTargetToObject = zincObject => {\n if (this.objectIsInScene(zincObject)) {\n const center = new THREE.Vector3();\n const boundingBox = zincObject.getBoundingBox();\n const viewport = this.getZincCameraControls().getCurrentViewport();\n boundingBox.getCenter(center);\n const target = new THREE.Vector3(viewport.targetPosition[0],\n viewport.targetPosition[1], viewport.targetPosition[2]);\n const eyePosition = new THREE.Vector3(viewport.eyePosition[0],\n viewport.eyePosition[1], viewport.eyePosition[2]);\n const newVec1 = new THREE.Vector3();\n const newVec2 = new THREE.Vector3();\n newVec1.subVectors(eyePosition, target);\n newVec2.addVectors(center, newVec1);\n viewport.eyePosition[0] = newVec2.x;\n viewport.eyePosition[1] = newVec2.y;\n viewport.eyePosition[2] = newVec2.z;\n viewport.targetPosition[0] = center.x;\n viewport.targetPosition[1] = center.y;\n viewport.targetPosition[2] = center.z;\n this.getZincCameraControls().setCurrentCameraSettings(viewport);\n markerCluster.markerUpdateRequired = true;\n }\n }\n\n /**\n * Check if stereo effect is enabled.\n * @returns {Boolean}\n */\n this.isStereoEffectEnable = () => {\n return stereoEffectFlag;\n }\n\n /**\n * Remove a ZincObject from this scene if it presents. This will eventually\n * destroy the object and free up the memory.\n * @param {Zinc.Object} zincObject - object to be removed from this scene.\n */\n this.removeZincObject = zincObject => {\n rootRegion.removeZincObject(zincObject);\n if (zincCameraControls) {\n zincCameraControls.calculateMaxAllowedDistance(this);\n }\n markerCluster.markerUpdateRequired = true;\n }\n\n /**\n * Update pickable objects list\n */\n this.updatePickableThreeJSObjects = () => {\n pickableObjectsList.length = 0;\n if (markerCluster.isEnabled) {\n pickableObjectsList.push(markerCluster.group);\n }\n rootRegion.getPickableThreeJSObjects(pickableObjectsList, true);\n this.forcePickableObjectsUpdate = false;\n }\n\n /**\n * Get all pickable objects.\n */\n this.getPickableThreeJSObjects = () => {\n //The list will only be updated if changes have been made\n //in region or a flag has been raise\n if (this.forcePickableObjectsUpdate || \n rootRegion.checkPickableUpdateRequred(true)) {\n this.updatePickableThreeJSObjects();\n }\n return pickableObjectsList;\n }\n\n /**\n * Get the Normalised coordinates on minimap if mouse event is\n * inside the minimap \n */\n this.getNormalisedMinimapCoordinates = (renderer, event) => {\n if (this.displayMinimap) {\n const target = new THREE.Vector2();\n renderer.getSize(target);\n let offsetY = target.y - event.clientY;\n if (((scissor.x + this.minimapScissor.width) > event.clientX) &&\n (event.clientX > scissor.x) && \n ((scissor.y + this.minimapScissor.height) > offsetY) &&\n (offsetY > scissor.y)) {\n let x = ((event.clientX - scissor.x) /\n this.minimapScissor.width) * 2.0 - 1.0;\n let y = ((offsetY - scissor.y) /\n this.minimapScissor.height) * 2.0 - 1.0;\n return {\"x\": x, \"y\": y};\n }\n }\n return undefined;\n }\n\n /**\n * Get the coordinates difference of the current viewing\n * point and projected coordinates.\n */\n this.getMinimapDiffFromNormalised = (x, y) => {\n if (minimap)\n return minimap.getDiffFromNormalised(x, y);\n return undefined;\n }\n\n this.isWebGL2 = () => {\n return rendererIn.isWebGL2();\n }\n\n /**\n * Remove all objects that are created with ZincJS APIs and it will free the memory allocated.\n * This does not remove obejcts that are added using the addObject APIs.\n */\n this.clearAll = () => {\n markerCluster.clear();\n rootRegion.clear(true);\n this.clearZincObjectAddedCallbacks();\n this.clearZincObjectRemovedCallbacks();\n sceneLoader.toBeDwonloaded = 0;\n if (zincCameraControls) {\n zincCameraControls.calculateMaxAllowedDistance(this);\n }\n markerCluster.markerUpdateRequired = true;\n }\n\n /**\n * All time stamp to the metadata TimeStamps field.\n */\n this.addMetadataTimeStamp = (key, time) => {\n metadata[\"TimeStamps\"][key] = convertDurationObjectTomSec(time);\n }\n \n /**\n * Get a specific metadata field.\n */\n this.getMetadataTag = key => {\n return metadata[key];\n }\n\n /**\n * Get all metadata set for the scene.\n */\n this.getMetadata = () => {\n return metadata;\n }\n\n /**\n * Set a specific metadata field.\n */\n this.setMetadataTag = (key, value) => {\n metadata[key] = value;\n }\n\n /**\n * Remove a specific metadata field.\n */\n this.removeMetadataTag = key => {\n delete metadata[key];\n }\n\n /**\n * Reset all metadata fields to original value.\n */\n this.resetMetadata = () => {\n metadata = defaultMetadata();\n }\n\n /**\n * Reset duration of scene to default value.\n */\n this.resetDuration = () => {\n this.setDuration(defaultDuration);\n }\n\n // Turn the object into a readable string {years: years,months: months, \n // weeks: weeks, days: days, hours: hours, mins: mins, secs: secs } \n const convertDurationObjectToString = duration => {\n return [\n ...(duration.years ? [`${duration.years}years`] : []),\n ...(duration.months ? [`${duration.months}months`] : []),\n ...(duration.weeks ? [`${duration.weeks}weeks`] : []),\n ...(duration.days ? [`${duration.days}days`] : []),\n ...(duration.hours ? [`${duration.hours}hours`] : []),\n ...(duration.mins ? [`${duration.mins}mins`] : []),\n ...(duration.secs ? [`${duration.secs}secs`] : []),\n ].join(' ');\n }\n\n // Turn the object into a number representing milliesecond {years: years,months: months, \n // weeks: weeks, days: days, hours: hours, mins: mins, secs: secs } \n const convertDurationObjectTomSec = duration => {\n return duration.years ? duration.years * 31536000000 : 0 +\n duration.months ? duration.months * 2592000000 : 0 +\n duration.weeks ? duration.weeks * 604800000 : 0 +\n duration.days ? duration.days * 86400000 : 0 +\n duration.hours ? duration.hours * 3600000 : 0 +\n duration.mins ? duration.mins * 60000 : 0 +\n duration.secs ? duration.secs * 1000 : 0;\n }\n\n // Set the readable duration and timer using an object\n // with the following format {years: years,months: months, weeks: weeks, days: days,\n // hours: hours, mins: mins, secs: secs } \n this.setDurationFromObject = duration => {\n const string = convertDurationObjectToString(duration);\n const millisec = convertDurationObjectTomSec(duration);\n this.setMetadataTag(\"Duration\", string);\n this.setDuration(millisec);\n }\n\n // Set the readable original duration using an object\n // with the following format {years: years,months: months, weeks: weeks, days: days,\n // hours: hours, mins: mins, secs: secs } \n this.setOriginalDurationFromObject = duration => {\n const string = convertDurationObjectToString(duration);\n this.setMetadataTag(\"OriginalDuration\", string);\n }\n\n /**\n * Export the scene in GLTF format, it can either return it in\n * string or binary form.\n * \n * @param {Boolean} binary - Indicate it should be exported as binary or\n * text.\n * \n * @return {Promise} The exported data if the promise resolve successfully\n */\n this.exportGLTF = (binary) => {\n const exporter = new SceneExporter(this);\n return exporter.exportGLTF(binary);\n }\n\n /**\n * Get the root region of the scene.\n * \n * @return {Region} Return the root region of the scene\n */\n this.getRootRegion = () => {\n return rootRegion;\n }\n\n /**\n * Create points in region specified in the path \n *\n */\n this.createLines = ( regionPath, groupName, coords, colour ) => {\n let region = rootRegion.findChildFromPath(regionPath);\n if (region === undefined) {\n region = rootRegion.createChildFromPath(regionPath);\n }\n return region.createLines(groupName, coords, colour);\n }\n\n /**\n * Create points in region specified in the path \n *\n */\n this.createPoints = ( regionPath, groupName, coords, labels, colour ) => {\n let region = rootRegion.findChildFromPath(regionPath);\n if (region === undefined) {\n region = rootRegion.createChildFromPath(regionPath);\n }\n return region.createPoints(groupName, coords, labels, colour);\n }\n\n\t/**\n\t * Add a callback function which will be called everytime zinc object is added.\n\t * @param {Function} callbackFunction - callbackFunction to be added.\n\t * \n\t * @return {Number}\n\t */\n\tthis.addZincObjectAddedCallbacks = callbackFunction => {\n\t\tzincObjectAddedCallbacks_id = zincObjectAddedCallbacks_id + 1;\n\t\tzincObjectAddedCallbacks[zincObjectAddedCallbacks_id] = callbackFunction;\n\t\treturn zincObjectAddedCallbacks_id;\n\t}\n\n\t/**\n\t * Add a callback function which will be called everytime zinc object is removed.\n\t * @param {Function} callbackFunction - callbackFunction to be added.\n\t * \n\t * @return {Number}\n\t */\n\tthis.addZincObjectRemovedCallbacks = callbackFunction => {\n\t\tzincObjectRemovedCallbacks_id = zincObjectRemovedCallbacks_id + 1;\n\t\tzincObjectRemovedCallbacks[zincObjectRemovedCallbacks_id] = callbackFunction;\n\t\treturn zincObjectRemovedCallbacks_id;\n\t}\n\t\n\t/**\n\t * Remove a callback function that is previously added to the scene.\n\t * @param {Number} id - identifier of the previously added callback function.\n\t */\n\tthis.removeZincObjectAddedCallbacks = id => {\n\t\tif (id in zincObjectAddedCallbacks_id) {\n \t\t\tdelete zincObjectAddedCallbacks[id];\n\t\t}\n\t}\n\n\t/**\n\t * Remove a callback function that is previously added to the scene.\n\t * @param {Number} id - identifier of the previously added callback function.\n\t */\n\tthis.removeZincObjectRemovedCallbacks = id => {\n\t\tif (id in zincObjectRemovedCallbacks_id) {\n \t\t\tdelete zincObjectRemovedCallbacks[id];\n\t\t}\n\t}\n\n /**\n\t * Clear all zinc object callback function\n\t */\n\tthis.clearZincObjectAddedCallbacks = () => {\n\t\tzincObjectAddedCallbacks = {};\n zincObjectAddedCallbacks_id = 0;\n\t}\n\n /**\n\t * Clear all zinc object callback function\n\t */\n\tthis.clearZincObjectRemovedCallbacks = () => {\n\t\tzincObjectRemovedCallbacks = {};\n zincObjectRemovedCallbacks_id = 0;\n\t}\n\n /**\n\t * Used to trigger zinc object added callback\n\t */\n this.triggerObjectAddedCallback = (zincObject) => {\n for (let key in zincObjectAddedCallbacks) {\n if (zincObjectAddedCallbacks.hasOwnProperty(key)) {\n zincObjectAddedCallbacks[key](zincObject);\n }\n }\n }\n\n /**\n\t * Used to trigger zinc object removed callback\n\t */\n this.triggerObjectRemovedCallback= (zincObject) => {\n for (let key in zincObjectRemovedCallbacks) {\n if (zincObjectRemovedCallbacks.hasOwnProperty(key)) {\n zincObjectRemovedCallbacks[key](zincObject);\n }\n }\n }\n\n /*\n\t * Add temporary points to the scene which can be removed\n * with clearTemporaryPrimitives method.\n\t */\n this.addTemporaryPoints = (coords, colour) => {\n const geometry = createBufferGeometry(coords.length, coords);\n let material = new THREE.PointsMaterial({ alphaTest: 0.5, size: 15,\n color: colour, sizeAttenuation: false });\n const texture = getCircularTexture();\n material.map = texture;\n let point = new (require('./three/Points').Points)(geometry, material);\n tempGroup.add(point);\n return point;\n }\n\n /*\n\t * Add temporary lines to the scene which can be removed\n * with clearTemporaryPrimitives method.\n\t */\n this.addTemporaryLines = (coords, colour) => {\n const geometry = createBufferGeometry(coords.length, coords);\n const material = new THREE.LineBasicMaterial({color:colour});\n const line = new (require(\"./three/line/LineSegments\").LineSegments)(geometry, material);\n tempGroup.add(line);\n return line;\n }\n\n /*\n\t * Remove object from temporary objects list\n\t */\n this.removeTemporaryPrimitive = (object) => {\n tempGroup.remove(object);\n object.geometry.dispose();\n object.material.dispose();\n }\n\n /*\n\t * Remove all temporary primitives.\n * Return number of primitives removed;\n\t */\n this.clearTemporaryPrimitives = () => {\n let i = 0;\n const children = tempGroup.children;\n children.forEach(child => {\n child.geometry.dispose();\n child.material.dispose();\n i++;\n });\n tempGroup.clear();\n return i;\n }\n\n /*\n\t * Create primitive based on the bounding box of scene and\n * add to specify region and group name.\n\t */\n this.addBoundingBoxPrimitive = (regionPath, group, colour, opacity,\n visibility, boundingBox = undefined) => {\n let region = rootRegion.findChildFromPath(regionPath);\n if (region === undefined) {\n region = rootRegion.createChildFromPath(regionPath);\n }\n const box = boundingBox ? boundingBox : this.getBoundingBox();\n const dim = new THREE.Vector3().subVectors(box.max, box.min);\n const boxGeo = new THREE.BoxGeometry(dim.x, dim.y, dim.z);\n const primitive = region.createGeometryFromThreeJSGeometry(\n group, boxGeo, colour, opacity, visibility, 10000);\n dim.addVectors(box.min, box.max).multiplyScalar( 0.5 );\n primitive.setPosition(dim.x, dim.y, dim.z);\n return primitive;\n }\n\n /*\n\t * Create primitive based on the bounding box of scene and\n * add to specify region and group name.\n\t */\n this.addSlicesPrimitive = (regionPath, groups, colours, opacity,\n visibility, boundingBox = undefined) => {\n if (groups && groups.length >= 3 &&\n colours && colours.length >= 3) {\n let region = rootRegion.findChildFromPath(regionPath);\n if (region === undefined) {\n region = rootRegion.createChildFromPath(regionPath);\n }\n const box = boundingBox ? boundingBox : this.getBoundingBox();\n const dim = new THREE.Vector3().subVectors(box.max, box.min);\n const directions = [\"x\", \"y\", \"z\"];\n const primitives = [];\n let index = 0;\n directions.forEach((direction) => {\n let planeGeo = undefined;\n switch(direction) {\n //YZ plane\n case \"x\":\n planeGeo = new THREE.PlaneGeometry(dim.z, dim.y);\n planeGeo.rotateY(Math.PI / 2);\n // code block\n break;\n //XZ plane\n case \"y\":\n planeGeo = new THREE.PlaneGeometry(dim.x, dim.z);\n planeGeo.rotateX(Math.PI / 2);\n // code block\n break;\n //XY plane\n case \"z\":\n planeGeo = new THREE.PlaneGeometry(dim.x, dim.y);\n // code block\n break;\n default:\n break;\n }\n const primitive = region.createGeometryFromThreeJSGeometry(\n groups[index], planeGeo, colours[index], opacity, visibility, 10001);\n primitives.push(primitive);\n index++;\n });\n\n dim.addVectors(box.min, box.max).multiplyScalar( 0.5 );\n primitives.forEach((primitive) => {\n primitive.setPosition(dim.x, dim.y, dim.z);\n });\n return primitives;\n }\n }\n\n /*\n\t * Enable marker cluster to work with markers\n\t */\n this.enableMarkerCluster = (flag) => {\n if (flag) {\n markerCluster.markerUpdateRequired = true;\n markerCluster.enable();\n } else {\n markerCluster.markerUpdateRequired = false;\n markerCluster.disable();\n }\n this.forcePickableObjectsUpdate = true;\n }\n}\n\n\n","const THREE = require('three');\nconst markerImage = new Image(128, 128);\nmarkerImage.src = require(\"../assets/mapMarkerOrange.svg\");\nconst texture = new THREE.Texture();\ntexture.image = markerImage;\ntexture.needsUpdate = true;\nconst size = [0.02, 0.03, 1];\nconst spriteMaterial = new THREE.SpriteMaterial({\n map: texture,\n alphaTest: 0.5,\n transparent: true,\n depthTest: false,\n depthWrite: false,\n sizeAttenuation: false\n});\nconst createNewSpriteText = require('../utilities').createNewSpriteText;\n\n/**\n * A special graphics type with a tear drop shape.\n * It forms a cluster a marker based on distance.\n * \n * @class\n * @author Alan Wu\n * @return {Marker}\n */\nconst MarkerCluster = function(sceneIn) {\n (require('./zincObject').ZincObject).call(this);\n this.texture = texture;\n let sprite = undefined;\n let scene = sceneIn;\n this.morph = new THREE.Group();\n this.group = this.morph;\n this.isMarkerCluster = true;\n let enabled = true;\n let sprites = [];\n this.markers = {};\n let _v21 = new THREE.Vector2();\n let _v22 = new THREE.Vector2();\n let _radius = 0.1;\n let start = Date.now();\n\n /**\n * Set the size of the marker.\n * \n * @param {Number} size - size to be set.\n */ \n this.setSpriteSize = size => {\n sprite.scale.set(0.015, 0.02, 1);\n sprite.scale.multiplyScalar(size);\n }\n\n this.clear = () => {\n this.group.clear();\n this.markers = {};\n }\n\n /**\n * Clean up this object,\n */ \n this.dispose = () => {\n this.clear();\n if (this.morph) {\n this.morph.clear();\n }\n }\n\n const createNewSprite = (index) => {\n //Group is needed to set the position after scaling\n //the sprite\n const localGroup = new THREE.Group();\n const sprite = new THREE.Sprite(spriteMaterial);\n sprite.clusterIndex = index;\n sprite.center.set(0.5, 0);\n sprite.position.set(0, 0, 0);\n sprite.renderOrder = 10000;\n sprite.scale.set(size[0], size[1], size[2]);\n sprite.userData = this;\n localGroup.add(sprite);\n this.group.add(localGroup);\n return {\n \"group\": localGroup,\n \"marker\": sprite,\n \"label\": undefined,\n \"number\": 0,\n \"min\": [0, 0, 0],\n \"max\": [1, 1, 1],\n };\n }\n\n const activateSpriteForCluster = (sprite, cluster, number) => {\n sprite.group.visible = true;\n sprite.group.position.set(\n cluster.coords[0], cluster.coords[1], cluster.coords[2]\n );\n if (sprite.label === undefined || (number !== sprite.number)) {\n if (sprite.label) {\n sprite.group.remove(sprite.label);\n sprite.label.material.map.dispose();\n sprite.label.material.dispose();\n }\n sprite.label = createNewSpriteText(number, 0.012, \"black\", \"Asap\", 50, 500);\n sprite.number = number;\n sprite.group.add(sprite.label);\n }\n sprite.min = cluster.min;\n sprite.max = cluster.max;\n }\n\n const drawClusters = (clusters) => {\n let currentIndex = 0;\n clusters.forEach((cluster) => {\n const length = cluster.members.length;\n let number = 0;\n if (length === 1) {\n cluster.members[0].setVisibility(true);\n } else {\n cluster.members.forEach((marker) => {\n number += marker.getNumber();\n marker.setVisibility(false);\n });\n if (!sprites[currentIndex]) {\n sprites.push(createNewSprite(currentIndex));\n }\n activateSpriteForCluster(sprites[currentIndex], cluster, number);\n currentIndex++;\n }\n });\n for (currentIndex; currentIndex < sprites.length; currentIndex++) {\n sprites[currentIndex].group.visible = false;\n }\n }\n\n //Get clusters based on the ndc coordinate for each cluster.\n const getCluster = (markersObj, clusters) => {\n let first = true;\n let newCluster = {members: [], coords: [0,0,0], min: [0, 0, 0], max: [1, 1, 1]};\n let dist = 0\n for (let prop in markersObj) {\n if (first) {\n _v21.set(markersObj[prop].ndc.x, markersObj[prop].ndc.y);\n this._b1.setFromPoints([markersObj[prop].morph.position]);\n first = false;\n newCluster.members.push(markersObj[prop]);\n newCluster.coords = [\n markersObj[prop].morph.position.x,\n markersObj[prop].morph.position.y,\n markersObj[prop].morph.position.z,\n ]\n clusters.push(newCluster);\n delete markersObj[prop];\n } else {\n _v22.set(markersObj[prop].ndc.x, markersObj[prop].ndc.y);\n dist = _v21.distanceTo(_v22);\n if (_radius > dist) {\n newCluster.members.push(markersObj[prop]);\n this._b1.expandByPoint(markersObj[prop].morph.position);\n delete markersObj[prop];\n }\n }\n }\n newCluster.min = [this._b1.min.x, this._b1.min.y, this._b1.min.z];\n newCluster.max = [this._b1.max.x, this._b1.max.y, this._b1.max.z];\n //this._b1.getCenter(this._v2);\n //newCluster.coords = [this._v2.x, this._v2.y, this._v2.z];\n //The following will not be called if there is object left and\n //thus finishing clustering\n if (first !== true) {\n getCluster(markersObj, clusters);\n }\n }\n\n this.calculate = () => {\n if (enabled) {\n const current = Date.now();\n if ((current - start) > 500) {\n let clusters = [];\n getCluster({...this.markers}, clusters);\n drawClusters(clusters);\n start = Date.now();\n this.markerUpdateRequired = false;\n }\n }\n }\n\n this.isEnabled = () => {\n return enabled;\n }\n\n /**\n * Enable and visualise the marker.\n */ \n this.enable = () => {\n enabled = true;\n this.morph.visible = true;\n }\n\n /**\n * Disable and hide the marker.\n */ \n this.disable = () => {\n enabled = false;\n this.morph.visible = false;\n //turn all markers back on\n for (let prop in this.markers) {\n if (this.markers[prop]?.isMarker &&\n this.markers[prop].isEnabled()) {\n this.markers[prop].setVisibility(true);\n }\n }\n }\n\n this.zoomToCluster = (index) => {\n if (index !== undefined && index > -1) {\n this._v1.set(...sprites[index].min);\n this._v2.set(...sprites[index].max);\n if (Math.abs(this._v1.distanceTo(this._v2) > 0.0)) {\n this._b1.set(this._v1, this._v2);\n scene.translateBoundingBoxToCameraView(this._b1, 3, 300);\n this.markerUpdateRequired = true;\n return true;\n }\n }\n return false;\n }\n\n this.clusterIsVisible = (index) => {\n if (index !== undefined && index > -1) {\n if (sprites[index]) {\n return sprites[index].group?.visible;\n }\n }\n return false;\n }\n}\n\nMarkerCluster.prototype = Object.create((require('./zincObject').ZincObject).prototype);\nexports.MarkerCluster = MarkerCluster;\n","module.exports = \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIiA/Pgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHZlcnNpb249IjEuMSIgd2lkdGg9IjM2NSIgaGVpZ2h0PSI1NjAiIHZpZXdCb3g9IjAgMCAzNjUgNTYwIiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPGRlc2M+Q3JlYXRlZCB3aXRoIEZhYnJpYy5qcyA1LjIuNDwvZGVzYz4KPGRlZnM+CjwvZGVmcz4KPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idHJhbnNwYXJlbnQiPjwvcmVjdD4KPGcgdHJhbnNmb3JtPSJtYXRyaXgoMCAwIDAgM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Njk5OTk5OTk5OTk5OTg5IEMgOTYuMyA3LjkgNy41IDY0LjUgNy41IDE5NC42IEMgNy41IDI4MyAxODIuOCA1NTIgMTgyLjggNTUyIEMgMTgyLjggNTUyIDE4Mi45IDU1MS43IDE4Mi45IDU1MS43IHogTSAxMjIuMiAxODcuMiBDIDEyMi4yIDE1My42IDE0OS40IDEyNi4zOTk5OTk5OTk5OTk5OSAxODMgMTI2LjM5OTk5OTk5OTk5OTk5IEMgMjE2LjYgMTI2LjM5OTk5OTk5OTk5OTk5IDI0My44IDE1My42IDI0My44IDE4Ny4yIEMgMjQzLjggMjIwLjc5OTk5OTk5OTk5OTk4IDIxNi41IDI0OCAxODIuOSAyNDggQyAxNDkuNCAyNDggMTIyLjIgMjIwLjggMTIyLjIgMTg3LjIgeiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiAvPgo8L2c+CgkJPGcgdHJhbnNmb3JtPSJtYXRyaXgoMy44MiAwIDAgMy44MiAwIC0xMDAuNzcpIiAgPgo8Y2lyY2xlIHN0eWxlPSJzdHJva2U6IHJnYigwLDAsMCk7IHN0cm9rZS13aWR0aDogMDsgc3Ryb2tlLWRhc2hhcnJheTogbm9uZTsgc3Ryb2tlLWxpbmVjYXA6IGJ1dHQ7IHN0cm9rZS1kYXNob2Zmc2V0OiAwOyBzdHJva2UtbGluZWpvaW46IG1pdGVyOyBzdHJva2UtbWl0ZXJsaW1pdDogNDsgZmlsbDogcmdiKDI1NSwyNTUsMjU1KTsgZmlsbC1ydWxlOiBub256ZXJvOyBvcGFjaXR5OiAxOyIgdmVjdG9yLWVmZmVjdD0ibm9uLXNjYWxpbmctc3Ryb2tlIiAgY3g9IjAiIGN5PSIwIiByPSIzNSIgLz4KPC9nPgo8L2c+CjwvZz4KPC9zdmc+\"","const THREE = require('three');\nconst resolveURL = require('./utilities').resolveURL;\nconst createNewURL = require('./utilities').createNewURL;\n\nconst STLLoader = require('./loaders/STLLoader').STLLoader;\nconst OBJLoader = require('./loaders/OBJLoader').OBJLoader;\nconst PrimitivesLoader = require('./loaders/primitivesLoader').PrimitivesLoader;\n\n/**\n * A helper class to help with reading / importing primitives and\n * settings into a {@link Scene}.\n * \n * @class\n * @param {Object} containerIn - Container to create the renderer on.\n * @author Alan Wu\n * @return {SceneLoader}\n */\nexports.SceneLoader = function (sceneIn) {\n const scene = sceneIn;\n this.toBeDownloaded = 0;\n this.progressMap = {};\n let viewLoaded = false;\n let errorDownload = false;\n const primitivesLoader = new PrimitivesLoader();\n /**\n * This function returns a three component array, which contains\n * [totalsize, totalLoaded and errorDownload] of all the downloads happening\n * in this scene.\n * @returns {Array} \n */\n this.getDownloadProgress = () => {\n let totalSize = 0;\n let totalLoaded = 0;\n let unknownFound = false;\n\n for (const key in this.progressMap) {\n const progress = this.progressMap[key];\n\n totalSize += progress[1];\n totalLoaded += progress[0];\n\n if (progress[1] == 0)\n unknownFound = true;\n }\n if (unknownFound) {\n totalSize = 0;\n }\n return [ totalSize, totalLoaded, errorDownload ];\n }\n\n //Stores the current progress of downloads\n this.onProgress = id => {\n return xhr => {\n this.progressMap[id] = [ xhr.loaded, xhr.total ];\n };\n }\n\n this.onError = finishCallback => {\n return xhr => {\n this.toBeDownloaded = this.toBeDownloaded - 1;\n errorDownload = true;\n console.error(`There is an issue with one of the external resource: ${xhr?.responseURL}.`);\n if (finishCallback) {\n finishCallback();\n }\n }\n };\n\n let loadMultipleViews = (referenceURL, views) => {\n const defaultView = views.Default;\n if (views.Inline) {\n scene.setupMultipleViews(defaultView, views.Entries);\n } else {\n const promises = [];\n for (const [key, value] of Object.entries(views.Entries)) {\n if (referenceURL) {\n newURL = createNewURL(value, referenceURL);\n promises.push(new Promise((resolve, reject) => {\n // Add parameters if we are sent them\n fetch(newURL)\n .then(response => response.json())\n .then(data => resolve({key: key, data: data}))\n .catch(data => reject(data));\n }));\n }\n }\n Promise.all(promises)\n .then(values => {\n const entries = {};\n values.forEach(entry => {\n entries[entry.key] = entry.data;\n });\n scene.setupMultipleViews(defaultView, entries);\n let zincCameraControls = scene.getZincCameraControls();\n if (zincCameraControls)\n zincCameraControls.setCurrentViewport(defaultView);\n viewLoaded = true;\n });\n }\n }\n\n /**\n * Load the viewport from an external location provided by the url.\n * @param {String} URL - address to the file containing viewport information.\n */\n this.loadViewURL = (url, finishCallback) => {\n this.toBeDownloaded += 1;\n const xmlhttp = new XMLHttpRequest();\n xmlhttp.onreadystatechange = () => {\n if (xmlhttp.readyState == 4) {\n if(xmlhttp.status == 200) {\n const viewData = JSON.parse(xmlhttp.responseText);\n scene.setupMultipleViews(\"default\", { \"default\" : viewData });\n scene.resetView();\n viewLoaded = true;\n --this.toBeDownloaded;\n if (finishCallback != undefined && (typeof finishCallback == 'function'))\n finishCallback();\n } else {\n this.onError();\n }\n }\n }\n const requestURL = resolveURL(url);\n xmlhttp.open(\"GET\", requestURL, true);\n xmlhttp.send();\n }\n\n/**\n * Load a legacy model(s) format with the provided URLs and parameters. This only loads the geometry\n * without any of the metadata. Therefore, extra parameters should be provided.\n * \n * @deprecated\n */\n this.loadModelsURL = (region, urls, colours, opacities, timeEnabled, morphColour, finishCallback) => {\n const number = urls.length;\n this.toBeDownloaded += number;\n for (let i = 0; i < number; i++) {\n const filename = urls[i];\n let colour = require('./zinc').defaultMaterialColor;\n let opacity = require('./zinc').defaultOpacity;\n if (colours != undefined && colours[i] != undefined)\n colour = colours[i] ? true : false;\n if (opacities != undefined && opacities[i] != undefined)\n opacity = opacities[i];\n let localTimeEnabled = 0;\n if (timeEnabled != undefined && timeEnabled[i] != undefined)\n localTimeEnabled = timeEnabled[i] ? true : false;\n let localMorphColour = 0;\n if (morphColour != undefined && morphColour[i] != undefined)\n localMorphColour = morphColour[i] ? true : false;\n primitivesLoader.load(resolveURL(filename), meshloader(region, colour, opacity, localTimeEnabled, localMorphColour, undefined, undefined,\n undefined, undefined, finishCallback), this.onProgress(filename), this.onError(finishCallback));\n }\n }\n\n /**\n * Load a legacy file format containing the viewport and its meta file from an external \n * location provided by the url. Use the new metadata format with\n * {@link Zinc.SceneLoader.#loadMetadataURL} instead.\n * \n * @param {String} URL - address to the file containing viewport and model information.\n * @deprecated\n */\n this.loadFromViewURL = (targetRegion, jsonFilePrefix, finishCallback) => {\n const xmlhttp = new XMLHttpRequest();\n xmlhttp.onreadystatechange = () => {\n if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {\n const viewData = JSON.parse(xmlhttp.responseText);\n scene.loadView(viewData);\n const urls = [];\n const filename_prefix = jsonFilePrefix + \"_\";\n for (let i = 0; i < viewData.numberOfResources; i++) {\n const filename = filename_prefix + (i + 1) + \".json\";\n urls.push(filename);\n }\n this.loadModelsURL(targetRegion, urls, viewData.colour, viewData.opacity, viewData.timeEnabled, viewData.morphColour, finishCallback);\n }\n }\n const requestURL = resolveURL(jsonFilePrefix + \"_view.json\");\n xmlhttp.open(\"GET\", requestURL, true);\n xmlhttp.send();\n }\n\n //Internal loader for a regular zinc geometry.\n const linesloader = (region, localTimeEnabled, localMorphColour, groupName,\n anatomicalId, renderOrder, lod, finishCallback) => {\n return (geometry, materials) => {\n const newLines = new (require('./primitives/lines').Lines)();\n let material = undefined;\n if (materials && materials[0]) {\n material = new THREE.LineBasicMaterial({color:materials[0].color.clone()});\n if (1.0 > materials[0].opacity) {\n material.transparent = true;\n }\n material.opacity = materials[0].opacity;\n material.morphTargets = localTimeEnabled;\n material.vertexColors = materials[0].vertexColors;\n }\n let options = {};\n options.localTimeEnabled = localTimeEnabled;\n options.localMorphColour = localMorphColour;\n if (newLines) {\n newLines.createLineSegment(geometry, material, options);\n newLines.setName(groupName);\n newLines.anatomicalId = anatomicalId;\n newLines.setRenderOrder(renderOrder);\n region.addZincObject(newLines);\n newLines.setDuration(scene.getDuration());\n console.log(lod)\n if (lod && lod.levels) {\n for (const [key, value] of Object.entries(lod.levels)) {\n \n newLines.addLOD(primitivesLoader, key, value.URL, value.Index, lod.preload);\n }\n }\n }\n --this.toBeDownloaded;\n geometry.dispose();\n if (finishCallback != undefined && (typeof finishCallback == 'function'))\n finishCallback(newLines);\n };\n } \n\n /**\n * Load lines into this scene object.\n * \n * @param {Boolean} timeEnabled - Indicate if morphing is enabled.\n * @param {Boolean} morphColour - Indicate if color morphing is enabled.\n * @param {STRING} groupName - name to assign the pointset's groupname to.\n * @param {Function} finishCallback - Callback function which will be called\n * once the glyphset is succssfully load in.\n */\n this.loadLinesURL = (region, url, timeEnabled, morphColour, groupName, finishCallback, options) => {\n\t let localTimeEnabled = 0;\n this.toBeDownloaded += 1;\n let isInline = (options && options.isInline) ? options.isInline : false;\n let anatomicalId = (options && options.anatomicalId) ? options.anatomicalId : undefined;\n let renderOrder = (options && options.renderOrder) ? options.renderOrder : undefined;\n\t if (timeEnabled != undefined)\n\t\t localTimeEnabled = timeEnabled ? true : false;\n\t let localMorphColour = 0;\n\t if (morphColour != undefined)\n\t\t localMorphColour = morphColour ? true : false;\n if (isInline) {\n let object = primitivesLoader.parse( url );\n (linesloader(region, localTimeEnabled, localMorphColour, groupName, anatomicalId,\n renderOrder, options.lod, finishCallback))( object.geometry, object.materials );\n } else {\n primitivesLoader.load(url, linesloader(region, localTimeEnabled, localMorphColour, groupName, \n anatomicalId, renderOrder, options.lod, finishCallback), this.onProgress(url), this.onError(finishCallback),\n options.loaderOptions);\n }\n }\n\n const loadGlyphset = (region, glyphsetData, glyphurl, groupName, finishCallback, options) => {\n let isInline = (options && options.isInline) ? options.isInline : undefined;\n let anatomicalId = (options && options.anatomicalId) ? options.anatomicalId : undefined;\n let displayLabels = (options && options.displayLabels) ? options.displayLabels : undefined;\n let renderOrder = (options && options.renderOrder) ? options.renderOrder : undefined;\n const newGlyphset = new (require('./primitives/glyphset').Glyphset)();\n newGlyphset.setDuration(scene.getDuration());\n newGlyphset.groupName = groupName;\n let myCallback = () => {\n --this.toBeDownloaded;\n if (finishCallback != undefined && (typeof finishCallback == 'function'))\n finishCallback(newGlyphset);\n }\n ++this.toBeDownloaded;\n if (isInline) {\n newGlyphset.load(glyphsetData, glyphurl, myCallback, isInline, displayLabels);\n }\n else {\n newGlyphset.load(glyphsetData, resolveURL(glyphurl), myCallback, isInline, displayLabels);\n }\n newGlyphset.anatomicalId = anatomicalId;\n newGlyphset.setRenderOrder(renderOrder);\n region.addZincObject(newGlyphset);\n };\n\n //Load a glyphset into this scene.\n const onLoadGlyphsetReady = (region, xmlhttp, glyphurl, groupName, finishCallback, options) => {\n return () => {\n if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {\n const glyphsetData = JSON.parse(xmlhttp.responseText);\n loadGlyphset(region, glyphsetData, glyphurl, groupName, finishCallback, options);\n }\n };\n };\n\n //Internal loader for zinc pointset.\n const pointsetloader = (region, localTimeEnabled, localMorphColour, groupName, anatomicalId, renderOrder, finishCallback) => {\n return (geometry, materials) => {\n const newPointset = new (require('./primitives/pointset').Pointset)();\n let material = new THREE.PointsMaterial({ alphaTest: 0.5, size: 10, sizeAttenuation: false });\n if (materials && materials[0]) {\n if (1.0 > materials[0].opacity) {\n material.transparent = true;\n }\n material.opacity = materials[0].opacity;\n material.color = materials[0].color;\n material.morphTargets = localTimeEnabled;\n material.vertexColors = materials[0].vertexColors;\n }\n let options = {};\n options.localTimeEnabled = localTimeEnabled;\n options.localMorphColour = localMorphColour;\n if (newPointset) {\n newPointset.createMesh(geometry, material, options);\n newPointset.setName(groupName);\n newPointset.anatomicalId = anatomicalId;\n region.addZincObject(newPointset);\n newPointset.setDuration(scene.getDuration());\n newPointset.setRenderOrder(renderOrder);\n }\n geometry.dispose();\n --this.toBeDownloaded;\n if (finishCallback != undefined && (typeof finishCallback == 'function'))\n finishCallback(newPointset);\n };\n }\n\n /**\n * Read a STL file into this scene, the geometry will be presented as\n * {@link Zinc.Geometry}. \n * \n * @param {STRING} url - location to the STL file.\n * @param {STRING} groupName - name to assign the geometry's groupname to.\n * @param {Function} finishCallback - Callback function which will be called\n * once the STL geometry is succssfully loaded.\n */\n this.loadSTL = (region, url, groupName, finishCallback) => {\n this.toBeDownloaded += 1;\n const colour = require('./zinc').defaultMaterialColor;\n const opacity = require('./zinc').defaultOpacity;\n const loader = new STLLoader();\n loader.crossOrigin = \"Anonymous\";\n loader.load(resolveURL(url), meshloader(region, colour, opacity, false,\n false, groupName, undefined, undefined, undefined, finishCallback));\n }\n\n /**\n * Read a OBJ file into this scene, the geometry will be presented as\n * {@link Zinc.Geometry}. \n * \n * @param {STRING} url - location to the STL file.\n * @param {STRING} groupName - name to assign the geometry's groupname to.\n * @param {Function} finishCallback - Callback function which will be called\n * once the OBJ geometry is succssfully loaded.\n */\n this.loadOBJ = (region, url, groupName, finishCallback) => {\n this.toBeDownloaded += 1;\n const colour = require('./zinc').defaultMaterialColor;\n const opacity = require('./zinc').defaultOpacity;\n const loader = new OBJLoader();\n loader.crossOrigin = \"Anonymous\";\n loader.load(resolveURL(url), meshloader(region, colour, opacity, false,\n false, groupName, undefined, undefined, undefined, finishCallback));\n }\n\n /**\n * Load a geometry into this scene, this is a subsequent called from \n * {@link Zinc.Scene#loadMetadataURL}, although it can be used to read\n * in geometry into the scene externally.\n * \n * @param {String} url - regular json model file providing geometry.\n * @param {Boolean} timeEnabled - Indicate if geometry morphing is enabled.\n * @param {Boolean} morphColour - Indicate if color morphing is enabled.\n * @param {STRING} groupName - name to assign the geometry's groupname to.\n * @param {STRING} fileFormat - name supported formats are STL, OBJ and JSON.\n * @param {Function} finishCallback - Callback function which will be called\n * once the geometry is succssfully loaded in.\n */\n const loadSurfaceURL = (region ,url, timeEnabled, morphColour, groupName, finishCallback, options) => {\n this.toBeDownloaded += 1;\n const colour = require('./zinc').defaultMaterialColor;\n const opacity = require('./zinc').defaultOpacity;\n let localTimeEnabled = 0;\n let isInline = (options && options.isInline) ? options.isInline : false;\n let fileFormat = (options && options.fileFormat) ? options.fileFormat : undefined;\n let anatomicalId = (options && options.anatomicalId) ? options.anatomicalId : undefined;\n let renderOrder = (options && options.renderOrder) ? options.renderOrder : undefined;\n if (timeEnabled != undefined)\n localTimeEnabled = timeEnabled ? true : false;\n let localMorphColour = 0;\n if (morphColour != undefined)\n localMorphColour = morphColour ? true : false;\n let loader = primitivesLoader;\n if (fileFormat !== undefined) {\n if (fileFormat == \"STL\") {\n loader = new STLLoader();\n } else if (fileFormat == \"OBJ\") {\n loader = new OBJLoader();\n loader.crossOrigin = \"Anonymous\";\n loader.load(url, objloader(region, colour, opacity, localTimeEnabled,\n localMorphColour, groupName, anatomicalId, finishCallback), this.onProgress(url), this.onError,\n options.loaderOptions);\n return;\n }\n }\n if (isInline) {\n const object = primitivesLoader.parse( url );\n\t\t\t(meshloader(region, colour, opacity, localTimeEnabled,\n localMorphColour, groupName, anatomicalId, renderOrder, options, finishCallback))( object.geometry, object.materials );\n } else {\n loader.crossOrigin = \"Anonymous\";\n primitivesLoader.load(url, meshloader(region, colour, opacity, localTimeEnabled,\n localMorphColour, groupName, anatomicalId, renderOrder, options, finishCallback),\n this.onProgress(url), this.onError(finishCallback), options.loaderOptions);\n }\n };\n\n //Object to keep track of number of items downloaded and when all items are downloaded\n //allCompletedCallback is called\n const metaFinishCallback = function (numberOfDownloaded, finishCallback, allCompletedCallback) {\n let downloadedItem = 0;\n return zincObject => {\n downloadedItem = downloadedItem + 1;\n if (zincObject && (finishCallback != undefined) && (typeof finishCallback == 'function')) {\n finishCallback(zincObject);\n let zincCameraControls = scene.getZincCameraControls();\n if (zincCameraControls) {\n zincCameraControls.calculateMaxAllowedDistance(scene);\n }\n }\n if (downloadedItem == numberOfDownloaded) {\n if (viewLoaded === false)\n scene.viewAll();\n if (allCompletedCallback != undefined && (typeof allCompletedCallback == 'function'))\n allCompletedCallback();\n \n }\n };\n };\n\n /**\n * Load a pointset into this scene object.\n * \n * @param {Boolean} timeEnabled - Indicate if morphing is enabled.\n * @param {Boolean} morphColour - Indicate if color morphing is enabled.\n * @param {STRING} groupName - name to assign the pointset's groupname to.\n * @param {Function} finishCallback - Callback function which will be called\n * once the glyphset is succssfully load in.\n */\n this.loadPointsetURL = (region, url, timeEnabled, morphColour, groupName, finishCallback, options) => {\n let localTimeEnabled = 0;\n this.toBeDownloaded += 1;\n if (timeEnabled != undefined)\n localTimeEnabled = timeEnabled ? true : false;\n let localMorphColour = 0;\n if (morphColour != undefined)\n localMorphColour = morphColour ? true : false;\n let isInline = (options && options.isInline) ? options.isInline : false;\n let anatomicalId = (options && options.anatomicalId) ? options.anatomicalId : undefined;\n let renderOrder = (options && options.renderOrder) ? options.renderOrder : undefined;\n if (isInline) {\n const object = primitivesLoader.parse( url );\n (pointsetloader(region, localTimeEnabled, localMorphColour, groupName,\n anatomicalId, renderOrder, finishCallback))(object.geometry, object.materials );\n } else {\n primitivesLoader.load(url, pointsetloader(region, localTimeEnabled, localMorphColour,\n groupName, anatomicalId, renderOrder, finishCallback),\n this.onProgress(url), this.onError(finishCallback), options.loaderOptions);\n }\n }\n\n const loadTexture = (region, referenceURL, textureData, groupName, finishCallback, options) => {\n let isInline = (options && options.isInline) ? options.isInline : undefined;\n let anatomicalId = (options && options.anatomicalId) ? options.anatomicalId : undefined;\n let renderOrder = (options && options.renderOrder) ? options.renderOrder : undefined;\n let newTexture = undefined;\n if (textureData) {\n if (referenceURL && textureData.images && textureData.images.source) {\n const source = textureData.images.source;\n for (let i = 0; i < source.length; i++) {\n const newURL = createNewURL(source[i], referenceURL);\n textureData.images.source[i] = newURL;\n }\n }\n if (textureData.type === \"slides\") {\n newTexture = new (require('./primitives/textureSlides').TextureSlides)();\n }\n if (newTexture) {\n newTexture.groupName = groupName;\n let myCallback = () => {\n --this.toBeDownloaded;\n if (finishCallback != undefined && (typeof finishCallback == 'function'))\n finishCallback(newTexture);\n }\n ++this.toBeDownloaded;\n newTexture.load(textureData, myCallback, isInline);\n newTexture.anatomicalId = anatomicalId;\n newTexture.setRenderOrder(renderOrder);\n region.addZincObject(newTexture);\n }\n }\n };\n\n\n //Load a glyphset into this scene.\n const onLoadTextureReady = (region, xmlhttp, groupName, finishCallback, options) => {\n return () => {\n if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {\n const textureData = JSON.parse(xmlhttp.responseText);\n loadTexture(region, xmlhttp.responseURL, textureData, groupName, finishCallback, options);\n }\n };\n };\n\n /**\n * Load a texture into this scene object.\n * \n * @param {STRING} groupName - name to assign the pointset's groupname to.\n * @param {Function} finishCallback - Callback function which will be called\n * once the glyphset is succssfully load in.\n */\n this.loadTextureURL = (region, url, groupName, finishCallback, options) => {\n const isInline = (options && options.isInline) ? options.isInline : false;\n if (isInline) {\n loadTexture(region, undefined, url, groupName, finishCallback, options);\n } else {\n const xmlhttp = new XMLHttpRequest();\n xmlhttp.onreadystatechange = onLoadTextureReady(region, xmlhttp,\n groupName, finishCallback, options);\n xmlhttp.open(\"GET\", resolveURL(url), true);\n xmlhttp.send();\n }\n }\n\n /**\n * Load a glyphset into this scene object.\n * \n * @param {String} metaurl - Provide informations such as transformations, colours \n * and others for each of the glyph in the glyphsset.\n * @param {String} glyphurl - regular json model file providing geometry of the glyph.\n * @param {String} groupName - name to assign the glyphset's groupname to.\n * @param {Function} finishCallback - Callback function which will be called\n * once the glyphset is succssfully load in.\n */\n this.loadGlyphsetURL = (region, metaurl, glyphurl, groupName, finishCallback, options) => {\n const isInline = (options && options.isInline) ? options.isInline : false;\n if (isInline) {\n loadGlyphset(region, metaurl, glyphurl, groupName, finishCallback, options);\n } else {\n const xmlhttp = new XMLHttpRequest();\n xmlhttp.onreadystatechange = onLoadGlyphsetReady(region, xmlhttp, glyphurl,\n groupName, finishCallback, options);\n xmlhttp.open(\"GET\", resolveURL(metaurl), true);\n xmlhttp.send();\n }\n }\n\n /**\n * Add a user provided {THREE.Geometry} into the scene as zinc geometry.\n * \n * @param {Three.Geometry} geometry - The threejs geometry to be added as {@link Zinc.Geometry}.\n * @param {THREE.Color} color - Colour to be assigned to this geometry, overrided if materialIn is provided.\n * @param {Number} opacity - Opacity to be set for this geometry, overrided if materialIn is provided.\n * @param {Boolean} localTimeEnabled - Set this to true if morph geometry is present, overrided if materialIn is provided.\n * @param {Boolean} localMorphColour - Set this to true if morph colour is present, overrided if materialIn is provided.\n * @param {Boolean} external - Set this to true if morph geometry is present, overrided if materialIn is provided.\n * @param {Function} finishCallback - Callback once the geometry has been added succssfully.\n * @param {THREE.Material} materialIn - Material to be set for this geometry if it is present.\n * \n * @returns {Zinc.Geometry}\n */\n const addZincGeometry = (\n region,\n geometryIn,\n colour,\n opacity,\n localTimeEnabled,\n localMorphColour,\n finishCallback,\n materialIn,\n groupName\n ) => {\n let options = {};\n options.colour = colour;\n options.opacity = opacity;\n options.localTimeEnabled = localTimeEnabled;\n options.localMorphColour = localMorphColour\n const newGeometry = new (require('./primitives/geometry').Geometry)();\n newGeometry.createMesh(geometryIn, materialIn, options);\n if (newGeometry.getMorph()) {\n newGeometry.setName(groupName);\n if (region) region.addZincObject(newGeometry);\n newGeometry.setDuration(scene.getDuration());\n if (finishCallback != undefined && (typeof finishCallback == 'function'))\n finishCallback(newGeometry);\n if (newGeometry.videoHandler)\n scene.setVideoHandler(newGeometry.videoHandler);\n return newGeometry;\n }\n return undefined;\n }\n\n //Internal loader for a regular zinc geometry.\n const meshloader = (\n region,\n colour,\n opacity,\n localTimeEnabled,\n localMorphColour,\n groupName,\n anatomicalId,\n renderOrder,\n options,\n finishCallback\n ) => {\n return (geometry, materials) => {\n let material = undefined;\n if (materials && materials[0]) {\n material = materials[0];\n }\n const zincGeometry = addZincGeometry(region, geometry, colour, opacity, \n localTimeEnabled, localMorphColour, undefined, material, groupName, renderOrder);\n zincGeometry.anatomicalId = anatomicalId;\n zincGeometry.setRenderOrder(renderOrder);\n if (options.lod && options.lod.levels) {\n for (const [key, value] of Object.entries(options.lod.levels)) {\n zincGeometry.addLOD(primitivesLoader, key, value.URL, value.Index, options.lod.preload);\n }\n }\n --this.toBeDownloaded;\n geometry.dispose();\n if (finishCallback != undefined && (typeof finishCallback == 'function'))\n finishCallback(zincGeometry);\n };\n }\n\n //Turn ISO 8601 duration string into an array.\n const parseDuration = (durationString) => {\n const regex = /P(?:(\\d+)Y)?(?:(\\d+)M)?(?:(\\d+)W)?(?:(\\d+)D)?(?:T(?:(\\d+)H)?(?:(\\d+)M)?(?:(\\d+)S)?)?$/;\n const [, years, months, weeks, days, hours, mins, secs] = \n durationString.match(regex);\n return {years: years,months: months, weeks: weeks, days: days,\n hours: hours, mins: mins, secs: secs };\n }\n\n //Load settings from metadata item.\n this.loadSettings = (item) => {\n if (item) {\n //duration uses the ISO 8601 standard - PnYnMnDTnHnMnS\n if (item.Duration) {\n const duration = parseDuration(item.Duration);\n scene.setDurationFromObject(duration);\n }\n if (item.OriginalDuration) {\n const duration = parseDuration(item.OriginalDuration);\n scene.setOriginalDurationFromObject(duration);\n }\n if (item.TimeStamps) {\n for (const key in item.TimeStamps) {\n const time = parseDuration(item.TimeStamps[key]);\n scene.addMetadataTimeStamp(key, time);\n }\n }\n }\n }\n\n //Function to process each of the graphical metadata item except for view and\n //settings.\n const readPrimitivesItem = (region, referenceURL, item, order, finishCallback) => {\n if (item) {\n let newURL = undefined;\n let isInline = false;\n if (item.URL) {\n //Convert it into an array\n newURL = item.URL;\n if (referenceURL)\n newURL = createNewURL(newURL, referenceURL);\n } else if (item.Inline) {\n newURL = item.Inline.URL;\n isInline = true;\n }\n const lod = {};\n if (item.LOD && item.LOD.Levels) {\n lod.preload = item.LOD.Preload ? true : false;\n lod.levels = {};\n for (const [key, value] of Object.entries(item.LOD.Levels)) {\n lod.levels[key] = {};\n lod.levels[key][\"URL\"] = createNewURL(value.URL, referenceURL);\n lod.levels[key][\"Index\"] = value.Index;\n }\n }\n let groupName = item.GroupName;\n if (groupName === undefined || groupName === \"\") {\n groupName = \"_Unnamed\";\n }\n\n let options = {\n loaderOptions: {\n index: item.Index,\n },\n isInline: isInline,\n fileFormat: item.FileFormat,\n anatomicalId: item.AnatomicalId,\n compression: item.compression,\n lod: lod,\n renderOrder: order\n };\n \n switch (item.Type) {\n case \"Surfaces\":\n loadSurfaceURL(region, newURL, item.MorphVertices, item.MorphColours, groupName, finishCallback, options);\n break;\n case \"Glyph\":\n let newGeometryURL = undefined;\n if (!isInline) {\n newGeometryURL = item.GlyphGeometriesURL;\n newGeometryURL = createNewURL(item.GlyphGeometriesURL, referenceURL);\n } else {\n newGeometryURL = item.Inline.GlyphGeometriesURL;\n }\n if (item.DisplayLabels) {\n options.displayLabels = true;\n }\n this.loadGlyphsetURL(region, newURL, newGeometryURL, groupName, finishCallback, options);\n break;\n case \"Points\":\n this.loadPointsetURL(region, newURL, item.MorphVertices, item.MorphColours, groupName, finishCallback, options);\n break;\n case \"Lines\":\n this.loadLinesURL(region, newURL, item.MorphVertices, item.MorphColours, groupName, finishCallback, options);\n break;\n case \"Texture\":\n this.loadTextureURL(region, newURL, groupName, finishCallback, options);\n break;\n default:\n break;\n }\n }\n };\n\n //Function to read the view item first\n const readViewAndSettingsItem = (referenceURL, item, finishCallback) => {\n if (item) {\n let newURL = undefined;\n let isInline = false;\n if (item.URL) {\n newURL = item.URL;\n if (referenceURL)\n newURL = createNewURL(item.URL, referenceURL);\n } else if (item.Inline) {\n newURL = item.Inline.URL;\n isInline = true;\n }\n switch (item.Type) {\n case \"View\":\n if (isInline) {\n scene.setupMultipleViews(\"default\", { \"default\" : newURL});\n viewLoaded = true;\n if (finishCallback != undefined && (typeof finishCallback == 'function'))\n finishCallback();\n }\n else\n this.loadViewURL(newURL, finishCallback);\n break;\n case \"Settings\":\n this.loadSettings(item);\n break;\n default:\n break;\n }\n }\n };\n\n /**\n * Load GLTF into this scene object.\n * \n * @param {String} url - URL to the GLTF file\n * @param {Function} finishCallback - Callback function which will be called\n * once the glyphset is succssfully load in.\n */\n this.loadGLTF = (region, url, finishCallback, allCompletedCallback, options) => {\n const GLTFToZincJSLoader = new (require('./loaders/GLTFToZincJSLoader').GLTFToZincJSLoader)();\n GLTFToZincJSLoader.load(scene, region, url, finishCallback, allCompletedCallback, options);\n }\n\n let loadRegions = (currentRegion, referenceURL, regions, callback) => {\n if (regions.Primitives) {\n regions.Primitives.forEach(primitive => {\n let order = 1;\n if (primitive.Order)\n order = primitive.Order;\n readPrimitivesItem(currentRegion, referenceURL, primitive, order, callback);\n });\n }\n if (regions.Transformation) {\n currentRegion.setTransformation(regions.Transformation);\n }\n if (regions.Children) {\n for (const [regionName, value] of Object.entries(regions.Children)) {\n const childRegion = currentRegion.findOrCreateChildFromPath(regionName);\n if (childRegion) {\n loadRegions(childRegion, referenceURL, value, callback);\n }\n }\n }\n }\n\n let getNumberOfDownloadsInArray = (array, includeViews) => {\n if (Array.isArray(array)) {\n let count = 0;\n for (let i = 0; i < array.length; i++) {\n if (array[i].Type && (\n (includeViews && array[i].Type === \"View\") ||\n array[i].Type === \"Surfaces\" ||\n array[i].Type === \"Glyph\" ||\n array[i].Type === \"Points\" ||\n array[i].Type === \"Lines\" ||\n array[i].Type === \"Texture\"))\n {\n count++;\n }\n }\n return count;\n }\n return 0;\n }\n\n let getNumberOfObjectsInRegions = (regionJson) => {\n let counts = regionJson.Primitives ? \n getNumberOfDownloadsInArray(regionJson.Primitives, false) : 0;\n if (regionJson.Children) {\n Object.values(regionJson.Children).forEach(childRegion => {\n counts += getNumberOfObjectsInRegions(childRegion);\n });\n }\n return counts;\n }\n\n let getNumberOfObjects = (metadata) => {\n if (Array.isArray(metadata)) {\n return getNumberOfDownloadsInArray(metadata, true);\n } else if ((typeof metadata) === \"object\" && metadata !== null) {\n if (metadata.Version === \"2.0\") {\n return getNumberOfObjectsInRegions(metadata.Regions);\n }\n }\n }\n\n let readVersionOneRegionPath = (region, referenceURL, item, order, callback) => {\n let targetRegion = region;\n if (item.RegionPath && item.RegionPath !== \"\") {\n targetRegion = region.findOrCreateChildFromPath(item.RegionPath);\n }\n //Render order is set to i * 2 to account for front and back rendering\n readPrimitivesItem(targetRegion, referenceURL, item, order * 2, callback);\n }\n\n let loadVersionOne = (targetRegion, metadata, referenceURL, finishCallback, allCompletedCallback) => {\n let numberOfObjects = getNumberOfObjects(metadata);\n // view file does not receive callback\n let callback = new metaFinishCallback(numberOfObjects, finishCallback, allCompletedCallback);\n // Prioritise the view file and settings before loading anything else\n for (let i = 0; i < metadata.length; i++)\n readViewAndSettingsItem(referenceURL, metadata[i], callback);\n for (let i = 0; i < metadata.length; i++) {\n readVersionOneRegionPath(targetRegion, referenceURL, metadata[i], i, callback);\n }\n }\n\n let loadVersionTwo = (targetRegion, metadata, referenceURL, finishCallback, allCompletedCallback) => {\n let numberOfObjects = getNumberOfObjects(metadata);\n // view file does not receive callback\n let callback = new metaFinishCallback(numberOfObjects, finishCallback, allCompletedCallback);\n if (metadata.Settings)\n this.loadSettings(metadata.Settings);\n if (metadata.Views)\n loadMultipleViews(referenceURL, metadata.Views, referenceURL);\n if (metadata.Regions)\n loadRegions(targetRegion, referenceURL, metadata.Regions, callback);\n }\n\n /**\n * Load a metadata file from the provided URL into this scene. Once\n * succssful scene proceeds to read each items into scene for visualisations.\n * \n * @param {String} url - Location of the metafile\n * @param {Function} finishCallback - Callback function which will be called\n * for each glyphset and geometry that has been written in.\n */\n this.loadMetadataURL = (targetRegion, url, finishCallback, allCompletedCallback) => {\n const xmlhttp = new XMLHttpRequest();\n const requestURL = resolveURL(url);\n xmlhttp.onreadystatechange = () => {\n if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {\n scene.resetMetadata();\n scene.resetDuration();\n viewLoaded = false;\n let referenceURL = xmlhttp.responseURL;\n if (referenceURL === undefined)\n referenceURL = (new URL(requestURL)).href;\n const metadata = JSON.parse(xmlhttp.responseText);\n if (Array.isArray(metadata)) {\n loadVersionOne(targetRegion, metadata, referenceURL, finishCallback, allCompletedCallback);\n } else if (typeof metadata === \"object\" && metadata !== null) {\n if (metadata.Version == \"2.0\") {\n loadVersionTwo(targetRegion, metadata, referenceURL, finishCallback, allCompletedCallback);\n }\n }\n }\n }\n\n xmlhttp.open(\"GET\", requestURL, true);\n xmlhttp.send();\n }\n}\n","import {\n\tBufferAttribute,\n\tBufferGeometry,\n\tFileLoader,\n\tFloat32BufferAttribute,\n\tLoader,\n\tLoaderUtils,\n\tVector3\n} from 'three';\n\n/**\n * Description: A THREE loader for STL ASCII files, as created by Solidworks and other CAD programs.\n *\n * Supports both binary and ASCII encoded files, with automatic detection of type.\n *\n * The loader returns a non-indexed buffer geometry.\n *\n * Limitations:\n * Binary decoding supports \"Magics\" color format (http://en.wikipedia.org/wiki/STL_(file_format)#Color_in_binary_STL).\n * There is perhaps some question as to how valid it is to always assume little-endian-ness.\n * ASCII decoding assumes file is UTF-8.\n *\n * Usage:\n * const loader = new STLLoader();\n * loader.load( './models/stl/slotted_disk.stl', function ( geometry ) {\n * scene.add( new THREE.Mesh( geometry ) );\n * });\n *\n * For binary STLs geometry might contain colors for vertices. To use it:\n * // use the same code to load STL as above\n * if (geometry.hasColors) {\n * material = new THREE.MeshPhongMaterial({ opacity: geometry.alpha, vertexColors: true });\n * } else { .... }\n * const mesh = new THREE.Mesh( geometry, material );\n *\n * For ASCII STLs containing multiple solids, each solid is assigned to a different group.\n * Groups can be used to assign a different color by defining an array of materials with the same length of\n * geometry.groups and passing it to the Mesh constructor:\n *\n * const mesh = new THREE.Mesh( geometry, material );\n *\n * For example:\n *\n * const materials = [];\n * const nGeometryGroups = geometry.groups.length;\n *\n * const colorMap = ...; // Some logic to index colors.\n *\n * for (let i = 0; i < nGeometryGroups; i++) {\n *\n *\t\tconst material = new THREE.MeshPhongMaterial({\n *\t\t\tcolor: colorMap[i],\n *\t\t\twireframe: false\n *\t\t});\n *\n * }\n *\n * materials.push(material);\n * const mesh = new THREE.Mesh(geometry, materials);\n */\n\n\nclass STLLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setResponseType( 'arraybuffer' );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\n\t\tloader.load( url, function ( text ) {\n\n\t\t\ttry {\n\n\t\t\t\tonLoad( scope.parse( text ) );\n\n\t\t\t} catch ( e ) {\n\n\t\t\t\tif ( onError ) {\n\n\t\t\t\t\tonError( e );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( e );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t}\n\n\tparse( data ) {\n\n\t\tfunction isBinary( data ) {\n\n\t\t\tconst reader = new DataView( data );\n\t\t\tconst face_size = ( 32 / 8 * 3 ) + ( ( 32 / 8 * 3 ) * 3 ) + ( 16 / 8 );\n\t\t\tconst n_faces = reader.getUint32( 80, true );\n\t\t\tconst expect = 80 + ( 32 / 8 ) + ( n_faces * face_size );\n\n\t\t\tif ( expect === reader.byteLength ) {\n\n\t\t\t\treturn true;\n\n\t\t\t}\n\n\t\t\t// An ASCII STL data must begin with 'solid ' as the first six bytes.\n\t\t\t// However, ASCII STLs lacking the SPACE after the 'd' are known to be\n\t\t\t// plentiful. So, check the first 5 bytes for 'solid'.\n\n\t\t\t// Several encodings, such as UTF-8, precede the text with up to 5 bytes:\n\t\t\t// https://en.wikipedia.org/wiki/Byte_order_mark#Byte_order_marks_by_encoding\n\t\t\t// Search for \"solid\" to start anywhere after those prefixes.\n\n\t\t\t// US-ASCII ordinal values for 's', 'o', 'l', 'i', 'd'\n\n\t\t\tconst solid = [ 115, 111, 108, 105, 100 ];\n\n\t\t\tfor ( let off = 0; off < 5; off ++ ) {\n\n\t\t\t\t// If \"solid\" text is matched to the current offset, declare it to be an ASCII STL.\n\n\t\t\t\tif ( matchDataViewAt( solid, reader, off ) ) return false;\n\n\t\t\t}\n\n\t\t\t// Couldn't find \"solid\" text at the beginning; it is binary STL.\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\tfunction matchDataViewAt( query, reader, offset ) {\n\n\t\t\t// Check if each byte in query matches the corresponding byte from the current offset\n\n\t\t\tfor ( let i = 0, il = query.length; i < il; i ++ ) {\n\n\t\t\t\tif ( query[ i ] !== reader.getUint8( offset + i, false ) ) return false;\n\n\t\t\t}\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\tfunction parseBinary( data ) {\n\n\t\t\tconst reader = new DataView( data );\n\t\t\tconst faces = reader.getUint32( 80, true );\n\n\t\t\tlet r, g, b, hasColors = false, colors;\n\t\t\tlet defaultR, defaultG, defaultB, alpha;\n\n\t\t\t// process STL header\n\t\t\t// check for default color in header (\"COLOR=rgba\" sequence).\n\n\t\t\tfor ( let index = 0; index < 80 - 10; index ++ ) {\n\n\t\t\t\tif ( ( reader.getUint32( index, false ) == 0x434F4C4F /*COLO*/ ) &&\n\t\t\t\t\t( reader.getUint8( index + 4 ) == 0x52 /*'R'*/ ) &&\n\t\t\t\t\t( reader.getUint8( index + 5 ) == 0x3D /*'='*/ ) ) {\n\n\t\t\t\t\thasColors = true;\n\t\t\t\t\tcolors = new Float32Array( faces * 3 * 3 );\n\n\t\t\t\t\tdefaultR = reader.getUint8( index + 6 ) / 255;\n\t\t\t\t\tdefaultG = reader.getUint8( index + 7 ) / 255;\n\t\t\t\t\tdefaultB = reader.getUint8( index + 8 ) / 255;\n\t\t\t\t\talpha = reader.getUint8( index + 9 ) / 255;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconst dataOffset = 84;\n\t\t\tconst faceLength = 12 * 4 + 2;\n\n\t\t\tconst geometry = new BufferGeometry();\n\n\t\t\tconst vertices = new Float32Array( faces * 3 * 3 );\n\t\t\tconst normals = new Float32Array( faces * 3 * 3 );\n\n\t\t\tfor ( let face = 0; face < faces; face ++ ) {\n\n\t\t\t\tconst start = dataOffset + face * faceLength;\n\t\t\t\tconst normalX = reader.getFloat32( start, true );\n\t\t\t\tconst normalY = reader.getFloat32( start + 4, true );\n\t\t\t\tconst normalZ = reader.getFloat32( start + 8, true );\n\n\t\t\t\tif ( hasColors ) {\n\n\t\t\t\t\tconst packedColor = reader.getUint16( start + 48, true );\n\n\t\t\t\t\tif ( ( packedColor & 0x8000 ) === 0 ) {\n\n\t\t\t\t\t\t// facet has its own unique color\n\n\t\t\t\t\t\tr = ( packedColor & 0x1F ) / 31;\n\t\t\t\t\t\tg = ( ( packedColor >> 5 ) & 0x1F ) / 31;\n\t\t\t\t\t\tb = ( ( packedColor >> 10 ) & 0x1F ) / 31;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tr = defaultR;\n\t\t\t\t\t\tg = defaultG;\n\t\t\t\t\t\tb = defaultB;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tfor ( let i = 1; i <= 3; i ++ ) {\n\n\t\t\t\t\tconst vertexstart = start + i * 12;\n\t\t\t\t\tconst componentIdx = ( face * 3 * 3 ) + ( ( i - 1 ) * 3 );\n\n\t\t\t\t\tvertices[ componentIdx ] = reader.getFloat32( vertexstart, true );\n\t\t\t\t\tvertices[ componentIdx + 1 ] = reader.getFloat32( vertexstart + 4, true );\n\t\t\t\t\tvertices[ componentIdx + 2 ] = reader.getFloat32( vertexstart + 8, true );\n\n\t\t\t\t\tnormals[ componentIdx ] = normalX;\n\t\t\t\t\tnormals[ componentIdx + 1 ] = normalY;\n\t\t\t\t\tnormals[ componentIdx + 2 ] = normalZ;\n\n\t\t\t\t\tif ( hasColors ) {\n\n\t\t\t\t\t\tcolors[ componentIdx ] = r;\n\t\t\t\t\t\tcolors[ componentIdx + 1 ] = g;\n\t\t\t\t\t\tcolors[ componentIdx + 2 ] = b;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tgeometry.setAttribute( 'position', new BufferAttribute( vertices, 3 ) );\n\t\t\tgeometry.setAttribute( 'normal', new BufferAttribute( normals, 3 ) );\n\n\t\t\tif ( hasColors ) {\n\n\t\t\t\tgeometry.setAttribute( 'color', new BufferAttribute( colors, 3 ) );\n\t\t\t\tgeometry.hasColors = true;\n\t\t\t\tgeometry.alpha = alpha;\n\n\t\t\t}\n\n\t\t\treturn geometry;\n\n\t\t}\n\n\t\tfunction parseASCII( data ) {\n\n\t\t\tconst geometry = new BufferGeometry();\n\t\t\tconst patternSolid = /solid([\\s\\S]*?)endsolid/g;\n\t\t\tconst patternFace = /facet([\\s\\S]*?)endfacet/g;\n\t\t\tlet faceCounter = 0;\n\n\t\t\tconst patternFloat = /[\\s]+([+-]?(?:\\d*)(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)/.source;\n\t\t\tconst patternVertex = new RegExp( 'vertex' + patternFloat + patternFloat + patternFloat, 'g' );\n\t\t\tconst patternNormal = new RegExp( 'normal' + patternFloat + patternFloat + patternFloat, 'g' );\n\n\t\t\tconst vertices = [];\n\t\t\tconst normals = [];\n\n\t\t\tconst normal = new Vector3();\n\n\t\t\tlet result;\n\n\t\t\tlet groupCount = 0;\n\t\t\tlet startVertex = 0;\n\t\t\tlet endVertex = 0;\n\n\t\t\twhile ( ( result = patternSolid.exec( data ) ) !== null ) {\n\n\t\t\t\tstartVertex = endVertex;\n\n\t\t\t\tconst solid = result[ 0 ];\n\n\t\t\t\twhile ( ( result = patternFace.exec( solid ) ) !== null ) {\n\n\t\t\t\t\tlet vertexCountPerFace = 0;\n\t\t\t\t\tlet normalCountPerFace = 0;\n\n\t\t\t\t\tconst text = result[ 0 ];\n\n\t\t\t\t\twhile ( ( result = patternNormal.exec( text ) ) !== null ) {\n\n\t\t\t\t\t\tnormal.x = parseFloat( result[ 1 ] );\n\t\t\t\t\t\tnormal.y = parseFloat( result[ 2 ] );\n\t\t\t\t\t\tnormal.z = parseFloat( result[ 3 ] );\n\t\t\t\t\t\tnormalCountPerFace ++;\n\n\t\t\t\t\t}\n\n\t\t\t\t\twhile ( ( result = patternVertex.exec( text ) ) !== null ) {\n\n\t\t\t\t\t\tvertices.push( parseFloat( result[ 1 ] ), parseFloat( result[ 2 ] ), parseFloat( result[ 3 ] ) );\n\t\t\t\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\t\t\t\t\t\tvertexCountPerFace ++;\n\t\t\t\t\t\tendVertex ++;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// every face have to own ONE valid normal\n\n\t\t\t\t\tif ( normalCountPerFace !== 1 ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.STLLoader: Something isn\\'t right with the normal of face number ' + faceCounter );\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// each face have to own THREE valid vertices\n\n\t\t\t\t\tif ( vertexCountPerFace !== 3 ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.STLLoader: Something isn\\'t right with the vertices of face number ' + faceCounter );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfaceCounter ++;\n\n\t\t\t\t}\n\n\t\t\t\tconst start = startVertex;\n\t\t\t\tconst count = endVertex - startVertex;\n\n\t\t\t\tgeometry.addGroup( start, count, groupCount );\n\t\t\t\tgroupCount ++;\n\n\t\t\t}\n\n\t\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\t\tgeometry.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\n\t\t\treturn geometry;\n\n\t\t}\n\n\t\tfunction ensureString( buffer ) {\n\n\t\t\tif ( typeof buffer !== 'string' ) {\n\n\t\t\t\treturn LoaderUtils.decodeText( new Uint8Array( buffer ) );\n\n\t\t\t}\n\n\t\t\treturn buffer;\n\n\t\t}\n\n\t\tfunction ensureBinary( buffer ) {\n\n\t\t\tif ( typeof buffer === 'string' ) {\n\n\t\t\t\tconst array_buffer = new Uint8Array( buffer.length );\n\t\t\t\tfor ( let i = 0; i < buffer.length; i ++ ) {\n\n\t\t\t\t\tarray_buffer[ i ] = buffer.charCodeAt( i ) & 0xff; // implicitly assumes little-endian\n\n\t\t\t\t}\n\n\t\t\t\treturn array_buffer.buffer || array_buffer;\n\n\t\t\t} else {\n\n\t\t\t\treturn buffer;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// start\n\n\t\tconst binData = ensureBinary( data );\n\n\t\treturn isBinary( binData ) ? parseBinary( binData ) : parseASCII( ensureString( data ) );\n\n\t}\n\n}\n\nexport { STLLoader };\n","import {\n\tBufferGeometry,\n\tFileLoader,\n\tFloat32BufferAttribute,\n\tGroup,\n\tLineBasicMaterial,\n\tLineSegments,\n\tLoader,\n\tMaterial,\n\tMesh,\n\tMeshPhongMaterial,\n\tPoints,\n\tPointsMaterial,\n\tVector3\n} from 'three';\n\n// o object_name | g group_name\nconst _object_pattern = /^[og]\\s*(.+)?/;\n// mtllib file_reference\nconst _material_library_pattern = /^mtllib /;\n// usemtl material_name\nconst _material_use_pattern = /^usemtl /;\n// usemap map_name\nconst _map_use_pattern = /^usemap /;\n\nconst _vA = new Vector3();\nconst _vB = new Vector3();\nconst _vC = new Vector3();\n\nconst _ab = new Vector3();\nconst _cb = new Vector3();\n\nfunction ParserState() {\n\n\tconst state = {\n\t\tobjects: [],\n\t\tobject: {},\n\n\t\tvertices: [],\n\t\tnormals: [],\n\t\tcolors: [],\n\t\tuvs: [],\n\n\t\tmaterials: {},\n\t\tmaterialLibraries: [],\n\n\t\tstartObject: function ( name, fromDeclaration ) {\n\n\t\t\t// If the current object (initial from reset) is not from a g/o declaration in the parsed\n\t\t\t// file. We need to use it for the first parsed g/o to keep things in sync.\n\t\t\tif ( this.object && this.object.fromDeclaration === false ) {\n\n\t\t\t\tthis.object.name = name;\n\t\t\t\tthis.object.fromDeclaration = ( fromDeclaration !== false );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tconst previousMaterial = ( this.object && typeof this.object.currentMaterial === 'function' ? this.object.currentMaterial() : undefined );\n\n\t\t\tif ( this.object && typeof this.object._finalize === 'function' ) {\n\n\t\t\t\tthis.object._finalize( true );\n\n\t\t\t}\n\n\t\t\tthis.object = {\n\t\t\t\tname: name || '',\n\t\t\t\tfromDeclaration: ( fromDeclaration !== false ),\n\n\t\t\t\tgeometry: {\n\t\t\t\t\tvertices: [],\n\t\t\t\t\tnormals: [],\n\t\t\t\t\tcolors: [],\n\t\t\t\t\tuvs: [],\n\t\t\t\t\thasUVIndices: false\n\t\t\t\t},\n\t\t\t\tmaterials: [],\n\t\t\t\tsmooth: true,\n\n\t\t\t\tstartMaterial: function ( name, libraries ) {\n\n\t\t\t\t\tconst previous = this._finalize( false );\n\n\t\t\t\t\t// New usemtl declaration overwrites an inherited material, except if faces were declared\n\t\t\t\t\t// after the material, then it must be preserved for proper MultiMaterial continuation.\n\t\t\t\t\tif ( previous && ( previous.inherited || previous.groupCount <= 0 ) ) {\n\n\t\t\t\t\t\tthis.materials.splice( previous.index, 1 );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst material = {\n\t\t\t\t\t\tindex: this.materials.length,\n\t\t\t\t\t\tname: name || '',\n\t\t\t\t\t\tmtllib: ( Array.isArray( libraries ) && libraries.length > 0 ? libraries[ libraries.length - 1 ] : '' ),\n\t\t\t\t\t\tsmooth: ( previous !== undefined ? previous.smooth : this.smooth ),\n\t\t\t\t\t\tgroupStart: ( previous !== undefined ? previous.groupEnd : 0 ),\n\t\t\t\t\t\tgroupEnd: - 1,\n\t\t\t\t\t\tgroupCount: - 1,\n\t\t\t\t\t\tinherited: false,\n\n\t\t\t\t\t\tclone: function ( index ) {\n\n\t\t\t\t\t\t\tconst cloned = {\n\t\t\t\t\t\t\t\tindex: ( typeof index === 'number' ? index : this.index ),\n\t\t\t\t\t\t\t\tname: this.name,\n\t\t\t\t\t\t\t\tmtllib: this.mtllib,\n\t\t\t\t\t\t\t\tsmooth: this.smooth,\n\t\t\t\t\t\t\t\tgroupStart: 0,\n\t\t\t\t\t\t\t\tgroupEnd: - 1,\n\t\t\t\t\t\t\t\tgroupCount: - 1,\n\t\t\t\t\t\t\t\tinherited: false\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tcloned.clone = this.clone.bind( cloned );\n\t\t\t\t\t\t\treturn cloned;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\tthis.materials.push( material );\n\n\t\t\t\t\treturn material;\n\n\t\t\t\t},\n\n\t\t\t\tcurrentMaterial: function () {\n\n\t\t\t\t\tif ( this.materials.length > 0 ) {\n\n\t\t\t\t\t\treturn this.materials[ this.materials.length - 1 ];\n\n\t\t\t\t\t}\n\n\t\t\t\t\treturn undefined;\n\n\t\t\t\t},\n\n\t\t\t\t_finalize: function ( end ) {\n\n\t\t\t\t\tconst lastMultiMaterial = this.currentMaterial();\n\t\t\t\t\tif ( lastMultiMaterial && lastMultiMaterial.groupEnd === - 1 ) {\n\n\t\t\t\t\t\tlastMultiMaterial.groupEnd = this.geometry.vertices.length / 3;\n\t\t\t\t\t\tlastMultiMaterial.groupCount = lastMultiMaterial.groupEnd - lastMultiMaterial.groupStart;\n\t\t\t\t\t\tlastMultiMaterial.inherited = false;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// Ignore objects tail materials if no face declarations followed them before a new o/g started.\n\t\t\t\t\tif ( end && this.materials.length > 1 ) {\n\n\t\t\t\t\t\tfor ( let mi = this.materials.length - 1; mi >= 0; mi -- ) {\n\n\t\t\t\t\t\t\tif ( this.materials[ mi ].groupCount <= 0 ) {\n\n\t\t\t\t\t\t\t\tthis.materials.splice( mi, 1 );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// Guarantee at least one empty material, this makes the creation later more straight forward.\n\t\t\t\t\tif ( end && this.materials.length === 0 ) {\n\n\t\t\t\t\t\tthis.materials.push( {\n\t\t\t\t\t\t\tname: '',\n\t\t\t\t\t\t\tsmooth: this.smooth\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t}\n\n\t\t\t\t\treturn lastMultiMaterial;\n\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Inherit previous objects material.\n\t\t\t// Spec tells us that a declared material must be set to all objects until a new material is declared.\n\t\t\t// If a usemtl declaration is encountered while this new object is being parsed, it will\n\t\t\t// overwrite the inherited material. Exception being that there was already face declarations\n\t\t\t// to the inherited material, then it will be preserved for proper MultiMaterial continuation.\n\n\t\t\tif ( previousMaterial && previousMaterial.name && typeof previousMaterial.clone === 'function' ) {\n\n\t\t\t\tconst declared = previousMaterial.clone( 0 );\n\t\t\t\tdeclared.inherited = true;\n\t\t\t\tthis.object.materials.push( declared );\n\n\t\t\t}\n\n\t\t\tthis.objects.push( this.object );\n\n\t\t},\n\n\t\tfinalize: function () {\n\n\t\t\tif ( this.object && typeof this.object._finalize === 'function' ) {\n\n\t\t\t\tthis.object._finalize( true );\n\n\t\t\t}\n\n\t\t},\n\n\t\tparseVertexIndex: function ( value, len ) {\n\n\t\t\tconst index = parseInt( value, 10 );\n\t\t\treturn ( index >= 0 ? index - 1 : index + len / 3 ) * 3;\n\n\t\t},\n\n\t\tparseNormalIndex: function ( value, len ) {\n\n\t\t\tconst index = parseInt( value, 10 );\n\t\t\treturn ( index >= 0 ? index - 1 : index + len / 3 ) * 3;\n\n\t\t},\n\n\t\tparseUVIndex: function ( value, len ) {\n\n\t\t\tconst index = parseInt( value, 10 );\n\t\t\treturn ( index >= 0 ? index - 1 : index + len / 2 ) * 2;\n\n\t\t},\n\n\t\taddVertex: function ( a, b, c ) {\n\n\t\t\tconst src = this.vertices;\n\t\t\tconst dst = this.object.geometry.vertices;\n\n\t\t\tdst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] );\n\t\t\tdst.push( src[ b + 0 ], src[ b + 1 ], src[ b + 2 ] );\n\t\t\tdst.push( src[ c + 0 ], src[ c + 1 ], src[ c + 2 ] );\n\n\t\t},\n\n\t\taddVertexPoint: function ( a ) {\n\n\t\t\tconst src = this.vertices;\n\t\t\tconst dst = this.object.geometry.vertices;\n\n\t\t\tdst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] );\n\n\t\t},\n\n\t\taddVertexLine: function ( a ) {\n\n\t\t\tconst src = this.vertices;\n\t\t\tconst dst = this.object.geometry.vertices;\n\n\t\t\tdst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] );\n\n\t\t},\n\n\t\taddNormal: function ( a, b, c ) {\n\n\t\t\tconst src = this.normals;\n\t\t\tconst dst = this.object.geometry.normals;\n\n\t\t\tdst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] );\n\t\t\tdst.push( src[ b + 0 ], src[ b + 1 ], src[ b + 2 ] );\n\t\t\tdst.push( src[ c + 0 ], src[ c + 1 ], src[ c + 2 ] );\n\n\t\t},\n\n\t\taddFaceNormal: function ( a, b, c ) {\n\n\t\t\tconst src = this.vertices;\n\t\t\tconst dst = this.object.geometry.normals;\n\n\t\t\t_vA.fromArray( src, a );\n\t\t\t_vB.fromArray( src, b );\n\t\t\t_vC.fromArray( src, c );\n\n\t\t\t_cb.subVectors( _vC, _vB );\n\t\t\t_ab.subVectors( _vA, _vB );\n\t\t\t_cb.cross( _ab );\n\n\t\t\t_cb.normalize();\n\n\t\t\tdst.push( _cb.x, _cb.y, _cb.z );\n\t\t\tdst.push( _cb.x, _cb.y, _cb.z );\n\t\t\tdst.push( _cb.x, _cb.y, _cb.z );\n\n\t\t},\n\n\t\taddColor: function ( a, b, c ) {\n\n\t\t\tconst src = this.colors;\n\t\t\tconst dst = this.object.geometry.colors;\n\n\t\t\tif ( src[ a ] !== undefined ) dst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] );\n\t\t\tif ( src[ b ] !== undefined ) dst.push( src[ b + 0 ], src[ b + 1 ], src[ b + 2 ] );\n\t\t\tif ( src[ c ] !== undefined ) dst.push( src[ c + 0 ], src[ c + 1 ], src[ c + 2 ] );\n\n\t\t},\n\n\t\taddUV: function ( a, b, c ) {\n\n\t\t\tconst src = this.uvs;\n\t\t\tconst dst = this.object.geometry.uvs;\n\n\t\t\tdst.push( src[ a + 0 ], src[ a + 1 ] );\n\t\t\tdst.push( src[ b + 0 ], src[ b + 1 ] );\n\t\t\tdst.push( src[ c + 0 ], src[ c + 1 ] );\n\n\t\t},\n\n\t\taddDefaultUV: function () {\n\n\t\t\tconst dst = this.object.geometry.uvs;\n\n\t\t\tdst.push( 0, 0 );\n\t\t\tdst.push( 0, 0 );\n\t\t\tdst.push( 0, 0 );\n\n\t\t},\n\n\t\taddUVLine: function ( a ) {\n\n\t\t\tconst src = this.uvs;\n\t\t\tconst dst = this.object.geometry.uvs;\n\n\t\t\tdst.push( src[ a + 0 ], src[ a + 1 ] );\n\n\t\t},\n\n\t\taddFace: function ( a, b, c, ua, ub, uc, na, nb, nc ) {\n\n\t\t\tconst vLen = this.vertices.length;\n\n\t\t\tlet ia = this.parseVertexIndex( a, vLen );\n\t\t\tlet ib = this.parseVertexIndex( b, vLen );\n\t\t\tlet ic = this.parseVertexIndex( c, vLen );\n\n\t\t\tthis.addVertex( ia, ib, ic );\n\t\t\tthis.addColor( ia, ib, ic );\n\n\t\t\t// normals\n\n\t\t\tif ( na !== undefined && na !== '' ) {\n\n\t\t\t\tconst nLen = this.normals.length;\n\n\t\t\t\tia = this.parseNormalIndex( na, nLen );\n\t\t\t\tib = this.parseNormalIndex( nb, nLen );\n\t\t\t\tic = this.parseNormalIndex( nc, nLen );\n\n\t\t\t\tthis.addNormal( ia, ib, ic );\n\n\t\t\t} else {\n\n\t\t\t\tthis.addFaceNormal( ia, ib, ic );\n\n\t\t\t}\n\n\t\t\t// uvs\n\n\t\t\tif ( ua !== undefined && ua !== '' ) {\n\n\t\t\t\tconst uvLen = this.uvs.length;\n\n\t\t\t\tia = this.parseUVIndex( ua, uvLen );\n\t\t\t\tib = this.parseUVIndex( ub, uvLen );\n\t\t\t\tic = this.parseUVIndex( uc, uvLen );\n\n\t\t\t\tthis.addUV( ia, ib, ic );\n\n\t\t\t\tthis.object.geometry.hasUVIndices = true;\n\n\t\t\t} else {\n\n\t\t\t\t// add placeholder values (for inconsistent face definitions)\n\n\t\t\t\tthis.addDefaultUV();\n\n\t\t\t}\n\n\t\t},\n\n\t\taddPointGeometry: function ( vertices ) {\n\n\t\t\tthis.object.geometry.type = 'Points';\n\n\t\t\tconst vLen = this.vertices.length;\n\n\t\t\tfor ( let vi = 0, l = vertices.length; vi < l; vi ++ ) {\n\n\t\t\t\tconst index = this.parseVertexIndex( vertices[ vi ], vLen );\n\n\t\t\t\tthis.addVertexPoint( index );\n\t\t\t\tthis.addColor( index );\n\n\t\t\t}\n\n\t\t},\n\n\t\taddLineGeometry: function ( vertices, uvs ) {\n\n\t\t\tthis.object.geometry.type = 'Line';\n\n\t\t\tconst vLen = this.vertices.length;\n\t\t\tconst uvLen = this.uvs.length;\n\n\t\t\tfor ( let vi = 0, l = vertices.length; vi < l; vi ++ ) {\n\n\t\t\t\tthis.addVertexLine( this.parseVertexIndex( vertices[ vi ], vLen ) );\n\n\t\t\t}\n\n\t\t\tfor ( let uvi = 0, l = uvs.length; uvi < l; uvi ++ ) {\n\n\t\t\t\tthis.addUVLine( this.parseUVIndex( uvs[ uvi ], uvLen ) );\n\n\t\t\t}\n\n\t\t}\n\n\t};\n\n\tstate.startObject( '', false );\n\n\treturn state;\n\n}\n\n//\n\nclass OBJLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t\tthis.materials = null;\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\t\tloader.load( url, function ( text ) {\n\n\t\t\ttry {\n\n\t\t\t\tonLoad( scope.parse( text ) );\n\n\t\t\t} catch ( e ) {\n\n\t\t\t\tif ( onError ) {\n\n\t\t\t\t\tonError( e );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( e );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t}\n\n\tsetMaterials( materials ) {\n\n\t\tthis.materials = materials;\n\n\t\treturn this;\n\n\t}\n\n\tparse( text ) {\n\n\t\tconst state = new ParserState();\n\n\t\tif ( text.indexOf( '\\r\\n' ) !== - 1 ) {\n\n\t\t\t// This is faster than String.split with regex that splits on both\n\t\t\ttext = text.replace( /\\r\\n/g, '\\n' );\n\n\t\t}\n\n\t\tif ( text.indexOf( '\\\\\\n' ) !== - 1 ) {\n\n\t\t\t// join lines separated by a line continuation character (\\)\n\t\t\ttext = text.replace( /\\\\\\n/g, '' );\n\n\t\t}\n\n\t\tconst lines = text.split( '\\n' );\n\t\tlet line = '', lineFirstChar = '';\n\t\tlet lineLength = 0;\n\t\tlet result = [];\n\n\t\t// Faster to just trim left side of the line. Use if available.\n\t\tconst trimLeft = ( typeof ''.trimLeft === 'function' );\n\n\t\tfor ( let i = 0, l = lines.length; i < l; i ++ ) {\n\n\t\t\tline = lines[ i ];\n\n\t\t\tline = trimLeft ? line.trimLeft() : line.trim();\n\n\t\t\tlineLength = line.length;\n\n\t\t\tif ( lineLength === 0 ) continue;\n\n\t\t\tlineFirstChar = line.charAt( 0 );\n\n\t\t\t// @todo invoke passed in handler if any\n\t\t\tif ( lineFirstChar === '#' ) continue;\n\n\t\t\tif ( lineFirstChar === 'v' ) {\n\n\t\t\t\tconst data = line.split( /\\s+/ );\n\n\t\t\t\tswitch ( data[ 0 ] ) {\n\n\t\t\t\t\tcase 'v':\n\t\t\t\t\t\tstate.vertices.push(\n\t\t\t\t\t\t\tparseFloat( data[ 1 ] ),\n\t\t\t\t\t\t\tparseFloat( data[ 2 ] ),\n\t\t\t\t\t\t\tparseFloat( data[ 3 ] )\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif ( data.length >= 7 ) {\n\n\t\t\t\t\t\t\tstate.colors.push(\n\t\t\t\t\t\t\t\tparseFloat( data[ 4 ] ),\n\t\t\t\t\t\t\t\tparseFloat( data[ 5 ] ),\n\t\t\t\t\t\t\t\tparseFloat( data[ 6 ] )\n\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// if no colors are defined, add placeholders so color and vertex indices match\n\n\t\t\t\t\t\t\tstate.colors.push( undefined, undefined, undefined );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'vn':\n\t\t\t\t\t\tstate.normals.push(\n\t\t\t\t\t\t\tparseFloat( data[ 1 ] ),\n\t\t\t\t\t\t\tparseFloat( data[ 2 ] ),\n\t\t\t\t\t\t\tparseFloat( data[ 3 ] )\n\t\t\t\t\t\t);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'vt':\n\t\t\t\t\t\tstate.uvs.push(\n\t\t\t\t\t\t\tparseFloat( data[ 1 ] ),\n\t\t\t\t\t\t\tparseFloat( data[ 2 ] )\n\t\t\t\t\t\t);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t} else if ( lineFirstChar === 'f' ) {\n\n\t\t\t\tconst lineData = line.substr( 1 ).trim();\n\t\t\t\tconst vertexData = lineData.split( /\\s+/ );\n\t\t\t\tconst faceVertices = [];\n\n\t\t\t\t// Parse the face vertex data into an easy to work with format\n\n\t\t\t\tfor ( let j = 0, jl = vertexData.length; j < jl; j ++ ) {\n\n\t\t\t\t\tconst vertex = vertexData[ j ];\n\n\t\t\t\t\tif ( vertex.length > 0 ) {\n\n\t\t\t\t\t\tconst vertexParts = vertex.split( '/' );\n\t\t\t\t\t\tfaceVertices.push( vertexParts );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// Draw an edge between the first vertex and all subsequent vertices to form an n-gon\n\n\t\t\t\tconst v1 = faceVertices[ 0 ];\n\n\t\t\t\tfor ( let j = 1, jl = faceVertices.length - 1; j < jl; j ++ ) {\n\n\t\t\t\t\tconst v2 = faceVertices[ j ];\n\t\t\t\t\tconst v3 = faceVertices[ j + 1 ];\n\n\t\t\t\t\tstate.addFace(\n\t\t\t\t\t\tv1[ 0 ], v2[ 0 ], v3[ 0 ],\n\t\t\t\t\t\tv1[ 1 ], v2[ 1 ], v3[ 1 ],\n\t\t\t\t\t\tv1[ 2 ], v2[ 2 ], v3[ 2 ]\n\t\t\t\t\t);\n\n\t\t\t\t}\n\n\t\t\t} else if ( lineFirstChar === 'l' ) {\n\n\t\t\t\tconst lineParts = line.substring( 1 ).trim().split( ' ' );\n\t\t\t\tlet lineVertices = [];\n\t\t\t\tconst lineUVs = [];\n\n\t\t\t\tif ( line.indexOf( '/' ) === - 1 ) {\n\n\t\t\t\t\tlineVertices = lineParts;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tfor ( let li = 0, llen = lineParts.length; li < llen; li ++ ) {\n\n\t\t\t\t\t\tconst parts = lineParts[ li ].split( '/' );\n\n\t\t\t\t\t\tif ( parts[ 0 ] !== '' ) lineVertices.push( parts[ 0 ] );\n\t\t\t\t\t\tif ( parts[ 1 ] !== '' ) lineUVs.push( parts[ 1 ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tstate.addLineGeometry( lineVertices, lineUVs );\n\n\t\t\t} else if ( lineFirstChar === 'p' ) {\n\n\t\t\t\tconst lineData = line.substr( 1 ).trim();\n\t\t\t\tconst pointData = lineData.split( ' ' );\n\n\t\t\t\tstate.addPointGeometry( pointData );\n\n\t\t\t} else if ( ( result = _object_pattern.exec( line ) ) !== null ) {\n\n\t\t\t\t// o object_name\n\t\t\t\t// or\n\t\t\t\t// g group_name\n\n\t\t\t\t// WORKAROUND: https://bugs.chromium.org/p/v8/issues/detail?id=2869\n\t\t\t\t// let name = result[ 0 ].substr( 1 ).trim();\n\t\t\t\tconst name = ( ' ' + result[ 0 ].substr( 1 ).trim() ).substr( 1 );\n\n\t\t\t\tstate.startObject( name );\n\n\t\t\t} else if ( _material_use_pattern.test( line ) ) {\n\n\t\t\t\t// material\n\n\t\t\t\tstate.object.startMaterial( line.substring( 7 ).trim(), state.materialLibraries );\n\n\t\t\t} else if ( _material_library_pattern.test( line ) ) {\n\n\t\t\t\t// mtl file\n\n\t\t\t\tstate.materialLibraries.push( line.substring( 7 ).trim() );\n\n\t\t\t} else if ( _map_use_pattern.test( line ) ) {\n\n\t\t\t\t// the line is parsed but ignored since the loader assumes textures are defined MTL files\n\t\t\t\t// (according to https://www.okino.com/conv/imp_wave.htm, 'usemap' is the old-style Wavefront texture reference method)\n\n\t\t\t\tconsole.warn( 'THREE.OBJLoader: Rendering identifier \"usemap\" not supported. Textures must be defined in MTL files.' );\n\n\t\t\t} else if ( lineFirstChar === 's' ) {\n\n\t\t\t\tresult = line.split( ' ' );\n\n\t\t\t\t// smooth shading\n\n\t\t\t\t// @todo Handle files that have varying smooth values for a set of faces inside one geometry,\n\t\t\t\t// but does not define a usemtl for each face set.\n\t\t\t\t// This should be detected and a dummy material created (later MultiMaterial and geometry groups).\n\t\t\t\t// This requires some care to not create extra material on each smooth value for \"normal\" obj files.\n\t\t\t\t// where explicit usemtl defines geometry groups.\n\t\t\t\t// Example asset: examples/models/obj/cerberus/Cerberus.obj\n\n\t\t\t\t/*\n\t\t\t\t\t * http://paulbourke.net/dataformats/obj/\n\t\t\t\t\t * or\n\t\t\t\t\t * http://www.cs.utah.edu/~boulos/cs3505/obj_spec.pdf\n\t\t\t\t\t *\n\t\t\t\t\t * From chapter \"Grouping\" Syntax explanation \"s group_number\":\n\t\t\t\t\t * \"group_number is the smoothing group number. To turn off smoothing groups, use a value of 0 or off.\n\t\t\t\t\t * Polygonal elements use group numbers to put elements in different smoothing groups. For free-form\n\t\t\t\t\t * surfaces, smoothing groups are either turned on or off; there is no difference between values greater\n\t\t\t\t\t * than 0.\"\n\t\t\t\t\t */\n\t\t\t\tif ( result.length > 1 ) {\n\n\t\t\t\t\tconst value = result[ 1 ].trim().toLowerCase();\n\t\t\t\t\tstate.object.smooth = ( value !== '0' && value !== 'off' );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// ZBrush can produce \"s\" lines #11707\n\t\t\t\t\tstate.object.smooth = true;\n\n\t\t\t\t}\n\n\t\t\t\tconst material = state.object.currentMaterial();\n\t\t\t\tif ( material ) material.smooth = state.object.smooth;\n\n\t\t\t} else {\n\n\t\t\t\t// Handle null terminated files without exception\n\t\t\t\tif ( line === '\\0' ) continue;\n\n\t\t\t\tconsole.warn( 'THREE.OBJLoader: Unexpected line: \"' + line + '\"' );\n\n\t\t\t}\n\n\t\t}\n\n\t\tstate.finalize();\n\n\t\tconst container = new Group();\n\t\tcontainer.materialLibraries = [].concat( state.materialLibraries );\n\n\t\tconst hasPrimitives = ! ( state.objects.length === 1 && state.objects[ 0 ].geometry.vertices.length === 0 );\n\n\t\tif ( hasPrimitives === true ) {\n\n\t\t\tfor ( let i = 0, l = state.objects.length; i < l; i ++ ) {\n\n\t\t\t\tconst object = state.objects[ i ];\n\t\t\t\tconst geometry = object.geometry;\n\t\t\t\tconst materials = object.materials;\n\t\t\t\tconst isLine = ( geometry.type === 'Line' );\n\t\t\t\tconst isPoints = ( geometry.type === 'Points' );\n\t\t\t\tlet hasVertexColors = false;\n\n\t\t\t\t// Skip o/g line declarations that did not follow with any faces\n\t\t\t\tif ( geometry.vertices.length === 0 ) continue;\n\n\t\t\t\tconst buffergeometry = new BufferGeometry();\n\n\t\t\t\tbuffergeometry.setAttribute( 'position', new Float32BufferAttribute( geometry.vertices, 3 ) );\n\n\t\t\t\tif ( geometry.normals.length > 0 ) {\n\n\t\t\t\t\tbuffergeometry.setAttribute( 'normal', new Float32BufferAttribute( geometry.normals, 3 ) );\n\n\t\t\t\t}\n\n\t\t\t\tif ( geometry.colors.length > 0 ) {\n\n\t\t\t\t\thasVertexColors = true;\n\t\t\t\t\tbuffergeometry.setAttribute( 'color', new Float32BufferAttribute( geometry.colors, 3 ) );\n\n\t\t\t\t}\n\n\t\t\t\tif ( geometry.hasUVIndices === true ) {\n\n\t\t\t\t\tbuffergeometry.setAttribute( 'uv', new Float32BufferAttribute( geometry.uvs, 2 ) );\n\n\t\t\t\t}\n\n\t\t\t\t// Create materials\n\n\t\t\t\tconst createdMaterials = [];\n\n\t\t\t\tfor ( let mi = 0, miLen = materials.length; mi < miLen; mi ++ ) {\n\n\t\t\t\t\tconst sourceMaterial = materials[ mi ];\n\t\t\t\t\tconst materialHash = sourceMaterial.name + '_' + sourceMaterial.smooth + '_' + hasVertexColors;\n\t\t\t\t\tlet material = state.materials[ materialHash ];\n\n\t\t\t\t\tif ( this.materials !== null ) {\n\n\t\t\t\t\t\tmaterial = this.materials.create( sourceMaterial.name );\n\n\t\t\t\t\t\t// mtl etc. loaders probably can't create line materials correctly, copy properties to a line material.\n\t\t\t\t\t\tif ( isLine && material && ! ( material instanceof LineBasicMaterial ) ) {\n\n\t\t\t\t\t\t\tconst materialLine = new LineBasicMaterial();\n\t\t\t\t\t\t\tMaterial.prototype.copy.call( materialLine, material );\n\t\t\t\t\t\t\tmaterialLine.color.copy( material.color );\n\t\t\t\t\t\t\tmaterial = materialLine;\n\n\t\t\t\t\t\t} else if ( isPoints && material && ! ( material instanceof PointsMaterial ) ) {\n\n\t\t\t\t\t\t\tconst materialPoints = new PointsMaterial( { size: 10, sizeAttenuation: false } );\n\t\t\t\t\t\t\tMaterial.prototype.copy.call( materialPoints, material );\n\t\t\t\t\t\t\tmaterialPoints.color.copy( material.color );\n\t\t\t\t\t\t\tmaterialPoints.map = material.map;\n\t\t\t\t\t\t\tmaterial = materialPoints;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( material === undefined ) {\n\n\t\t\t\t\t\tif ( isLine ) {\n\n\t\t\t\t\t\t\tmaterial = new LineBasicMaterial();\n\n\t\t\t\t\t\t} else if ( isPoints ) {\n\n\t\t\t\t\t\t\tmaterial = new PointsMaterial( { size: 1, sizeAttenuation: false } );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tmaterial = new MeshPhongMaterial();\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmaterial.name = sourceMaterial.name;\n\t\t\t\t\t\tmaterial.flatShading = sourceMaterial.smooth ? false : true;\n\t\t\t\t\t\tmaterial.vertexColors = hasVertexColors;\n\n\t\t\t\t\t\tstate.materials[ materialHash ] = material;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tcreatedMaterials.push( material );\n\n\t\t\t\t}\n\n\t\t\t\t// Create mesh\n\n\t\t\t\tlet mesh;\n\n\t\t\t\tif ( createdMaterials.length > 1 ) {\n\n\t\t\t\t\tfor ( let mi = 0, miLen = materials.length; mi < miLen; mi ++ ) {\n\n\t\t\t\t\t\tconst sourceMaterial = materials[ mi ];\n\t\t\t\t\t\tbuffergeometry.addGroup( sourceMaterial.groupStart, sourceMaterial.groupCount, mi );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( isLine ) {\n\n\t\t\t\t\t\tmesh = new LineSegments( buffergeometry, createdMaterials );\n\n\t\t\t\t\t} else if ( isPoints ) {\n\n\t\t\t\t\t\tmesh = new Points( buffergeometry, createdMaterials );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tmesh = new Mesh( buffergeometry, createdMaterials );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( isLine ) {\n\n\t\t\t\t\t\tmesh = new LineSegments( buffergeometry, createdMaterials[ 0 ] );\n\n\t\t\t\t\t} else if ( isPoints ) {\n\n\t\t\t\t\t\tmesh = new Points( buffergeometry, createdMaterials[ 0 ] );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tmesh = new Mesh( buffergeometry, createdMaterials[ 0 ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tmesh.name = object.name;\n\n\t\t\t\tcontainer.add( mesh );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// if there is only the default parser state object with no geometry data, interpret data as point cloud\n\n\t\t\tif ( state.vertices.length > 0 ) {\n\n\t\t\t\tconst material = new PointsMaterial( { size: 1, sizeAttenuation: false } );\n\n\t\t\t\tconst buffergeometry = new BufferGeometry();\n\n\t\t\t\tbuffergeometry.setAttribute( 'position', new Float32BufferAttribute( state.vertices, 3 ) );\n\n\t\t\t\tif ( state.colors.length > 0 && state.colors[ 0 ] !== undefined ) {\n\n\t\t\t\t\tbuffergeometry.setAttribute( 'color', new Float32BufferAttribute( state.colors, 3 ) );\n\t\t\t\t\tmaterial.vertexColors = true;\n\n\t\t\t\t}\n\n\t\t\t\tconst points = new Points( buffergeometry, material );\n\t\t\t\tcontainer.add( points );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn container;\n\n\t}\n\n}\n\nexport { OBJLoader };\n","const JSONLoader = require('./JSONLoader').JSONLoader;\nconst THREE = require('three');\nconst FileLoader = THREE.FileLoader;\n\nconst mergeGeometries = (geometries) => {\n const merge = (geometry1, geometry2) => {\n geometry1.merge(geometry2);\n }\n\n if (geometries && geometries.length > 0) {\n while (geometries.length > 1) {\n const geometry2 = geometries.splice(1,1);\n merge(geometries[0], geometry2[0]);\n }\n return geometries[0];\n }\n return undefined;\n}\n\nconst IndexedSourcesHandler = function(urlIn, crossOrigin, onDownloadedCallback) {\n const loader = new FileLoader();\n const jsonLoader = new JSONLoader();\n loader.crossOrigin = crossOrigin;\n const url = urlIn;\n const onDownloaded = onDownloadedCallback;\n let data = undefined;\n let downloading = false;\n let finished = false;\n let error = undefined;\n const items = [];\n\n const processItemDownloaded = (item) => {\n const modelData = data[item.index];\n if (modelData) {\n let obj = jsonLoader.parse( modelData );\n item.onLoad(obj.geometry, obj.materials);\n } else {\n processItemError(item, {responseURL: url});\n }\n }\n\n const processItemError = (item) => {\n if (item.onError) {\n if (!error) {\n error = {responseURL: url};\n }\n item.onError(error);\n }\n }\n\n this.downloadCompleted = (args) => {\n try {\n data = JSON.parse(args[0]);\n downloading = false;\n finished = true;\n if (Array.isArray(data)) {\n items.forEach(item => processItemDownloaded(item));\n } else {\n items.forEach(item => processItemError(item));\n }\n } catch {\n items.forEach(item => processItemError(item));\n }\n }\n\n const errorHandling = () => {\n return xhr => {\n error = xhr;\n finished = true;\n downloading = false;\n items.forEach((item) => {\n processItemError(item);\n });\n }\n }\n\n const progressHandling = () => {\n return xhr => {\n items.forEach((item) => {\n if (item.onProgress) {\n item.onProgress(xhr);\n }\n });\n }\n }\n\n this.load = (index, onLoad, onProgress, onError) => {\n const item = {\n index,\n onLoad,\n onProgress,\n onError,\n };\n if (finished) {\n if (data) {\n processItemDownloaded(item);\n } else {\n processItemError(error);\n }\n } else if (downloading) {\n //quene it up\n items.push(item);\n } else {\n items.push(item);\n downloading = true;\n loader.load(url, onDownloaded, progressHandling, errorHandling);\n }\n }\n}\n\nconst MultiSourcesHandler = function(numberIn, onLoadCallback) {\n const allData = [];\n const number = numberIn;\n const onLoad = onLoadCallback;\n let totalDownloaded = 0;\n\n this.itemDownloaded = (order, args) => {\n allData[order]= args;\n totalDownloaded++;\n if (totalDownloaded == number) {\n const materials = allData[0][1];\n const geometries = allData.map((data) => data[0]);\n //All geometries will be merged into the first one\n const geometry = mergeGeometries(geometries);\n for (let i = 1; i < number; i++) {\n allData[order][0].dispose();\n allData[order][1].forEach((material) => material.dispose());\n }\n onLoad(geometry, materials);\n }\n }\n}\n\nexports.PrimitivesLoader = function () {\n let concurrentDownloads = 0;\n const MAX_DOWNLOAD = 20;\n this.crossOrigin = \"Anonymous\";\n const loader = new JSONLoader();\n const waitingList = [];\n //URL to loader pair\n const indexedLoaders = {};\n\n //Load the first file then the rest will be handled separately\n const loadFromMultipleSources = (urls, onLoad, onProgress, onError, options) => {\n const number = urls.length;\n const msHandler = new MultiSourcesHandler(number, onLoad);\n //The order here will give us hint on the sequence on merging the primitives\n let order = 0;\n urls.forEach((url) => {\n const newOptions = options ? {...options} : {};\n newOptions.msHandler = msHandler;\n newOptions.order = order;\n order++;\n loadFromSingleSource(url, onLoad, onProgress, onError, newOptions);\n });\n }\n\n const handleIndexedSource = (url, onLoad, onProgress, onError, options) => {\n const newOptions = options ? {...options} : {};\n let indexedLoader = indexedLoaders[url];\n if (!indexedLoader) {\n if (MAX_DOWNLOAD > concurrentDownloads) {\n const onLoadCallback = new onFinally(undefined, this, newOptions);\n ++concurrentDownloads;\n indexedLoader = new IndexedSourcesHandler(url, this.crossOrigin, onLoadCallback);\n indexedLoaders[url] = indexedLoader;\n } else {\n waitingList.push({\n url,\n onLoad,\n onProgress,\n onError,\n options,\n });\n }\n }\n if (indexedLoader) {\n newOptions.isHandler = indexedLoader;\n indexedLoader.load(options.index, onLoad, onProgress, onError);\n }\n }\n\n const loadFromSingleSource = (url, onLoad, onProgress, onError, options) => {\n if (options && (options.index !== undefined) ) {\n handleIndexedSource(url, onLoad, onProgress, onError, options);\n } else {\n //Standard loading\n if (MAX_DOWNLOAD > concurrentDownloads) {\n ++concurrentDownloads;\n const onLoadCallback = new onFinally(onLoad, this, options);\n const onErrorCallback = new onFinally(onError, this, options);\n loader.crossOrigin = this.crossOrigin;\n loader.load(url, onLoadCallback, onProgress, onErrorCallback);\n } else {\n waitingList.push({\n url,\n onLoad,\n onProgress,\n onError,\n options,\n });\n }\n }\n }\n\n this.load = (url, onLoad, onProgress, onError, options) => {\n if (Array.isArray(url)) {\n loadFromMultipleSources(url, onLoad, onProgress, onError, options);\n } else {\n loadFromSingleSource(url, onLoad, onProgress, onError, options);\n }\n }\n\n this.loadFromWaitingList = () => {\n while (MAX_DOWNLOAD > concurrentDownloads) {\n const item = waitingList.shift();\n if (item) {\n this.load(item.url, item.onLoad, item.onProgress, item.onError, item.options);\n } else {\n return;\n }\n }\n }\n\n this.itemRemainingCheck = () => {\n if (waitingList.length === 0 && concurrentDownloads === 0) {\n for (let key in indexedLoaders) {\n if (indexedLoaders.hasOwnProperty(key)) {\n delete indexedLoaders[key];\n }\n }\n }\n }\n\n const onFinally = function(callback, loader, options) {\n return (...args) => {\n --concurrentDownloads;\n if (options?.msHandler) {\n options.msHandler.itemDownloaded(options.order, args);\n } else if (options?.isHandler) {\n options.isHandler.downloadCompleted(args);\n } else {\n if (callback) {\n callback(...args);\n }\n }\n loader.loadFromWaitingList();\n loader.itemRemainingCheck();\n }\n }\n\n this.parse = data => {\n return loader.parse(data);\n }\n\n}\n","const THREE = require('three');\n\nconst GLTFLoader = require('three/examples/jsm/loaders/GLTFLoader').GLTFLoader;\n\nconst GLTFToZincJSLoader = function () {\n\n const _this = this;\n\n this.parseGLTFObjects = (object, region, depth, finishCallback) => {\n let childRegion = region;\n if (depth !== 0) {\n if (object.type === \"Object3D\") {\n if (object.name !== \"\") {\n if (region)\n childRegion = region.findOrCreateChildFromPath(object.name);\n if (childRegion) {\n const group = childRegion.getGroup();\n group.position.copy(object.position);\n group.rotation.copy(object.rotation);\n group.quaternion.copy(object.quaternion);\n group.matrixAutoUpdate = true;\n }\n }\n } else {\n let zincGeometry = undefined;\n if (object.type === \"Mesh\") {\n zincGeometry = new (require('../primitives/geometry').Geometry)();\n } else if (object.type === \"LineSegments\") {\n zincGeometry = new (require('../primitives/lines').Lines)();\n } else if (object.type === \"Points\") {\n zincGeometry = new (require('../primitives/pointset').Pointset)();\n }\n if (zincGeometry) {\n let localTimeEnabled = false;\n let localMorphColour = false;\n if (object.geometry && object.geometry.morphAttributes) {\n localTimeEnabled = object.geometry.morphAttributes.position ? true : false;\n localMorphColour = object.geometry.morphAttributes.color ? true : false;\n }\n zincGeometry.setMesh(object.clone(), localTimeEnabled, localMorphColour);\n const morph = zincGeometry.getMorph();\n zincGeometry.groupName = morph.name;\n morph.matrixAutoUpdate = true;\n region.addZincObject(zincGeometry);\n if (finishCallback != undefined && (typeof finishCallback == 'function'))\n finishCallback(zincGeometry);\n }\n }\n }\n depth++;\n object.children.forEach( child => {\n _this.parseGLTFObjects(child, childRegion, depth, finishCallback);\n });\n }\n\n this.setCamera = scene => {\n scene.viewAll();\n const cameraControls = scene.getZincCameraControls();\n const viewport = cameraControls.getCurrentViewport();\n cameraControls.addViewport('default', viewport);\n cameraControls.setDefaultViewport('default');\n }\n\n /**\n * Load GLTF into this scene object.\n * \n * @param {String} url - URL to the GLTF file\n * @param {Function} finishCallback - Callback function which will be called\n * once the glyphset is succssfully load in.\n */\n this.load = (scene, region, url, finishCallback, allCompletedCallback, options) => {\n const path = url.substring(0, url.lastIndexOf(\"/\") + 1);\n const filename = url.substring(url.lastIndexOf(\"/\") + 1, url.length);\n const loader = new GLTFLoader().setPath(path);\n \n loader.load( filename, function ( gltf ) {\n console.log(gltf)\n _this.parseGLTFObjects(gltf.scene, region, 0, finishCallback);\n _this.setCamera(scene);\n if (allCompletedCallback != undefined && (typeof allCompletedCallback == 'function'))\n allCompletedCallback();\n });\n }\n}\n\nexports.GLTFToZincJSLoader = GLTFToZincJSLoader;\n","module.exports = require(\"three/examples/jsm/loaders/GLTFLoader\");","const GLTFExporter = require('./three/GLTFExporter').GLTFExporter;\n\n/**\n * Provides an object which uses for exporting the scene\n * \n * @class\n * @author Alan Wu\n * @return {SceneExporter}\n */\nconst SceneExporter = function (sceneIn) {\n const scene = sceneIn;\n\n\tthis.exportGLTF = (binary) => {\n const rootRegion = scene.getRootRegion();\n const zincObjects = rootRegion.getAllObjects(true);\n const animations = [];\n zincObjects.forEach(zincObject => {\n if (zincObject.animationClip) {\n animations.push({clip: zincObject.animationClip[0], mesh: zincObject.getMorph()});\n }\n });\n const exporter = new GLTFExporter();\n const options = { binary, animations };\n return new Promise((resolve, reject) => {\n exporter.parse( scene.getThreeJSScene(), function ( gltf ) {\n resolve(gltf);\n }, options );\n });\n\t}\n}\n\nexports.SceneExporter = SceneExporter;\n","import {\n\tBufferAttribute,\n\tClampToEdgeWrapping,\n\tDoubleSide,\n\tInterpolateDiscrete,\n\tInterpolateLinear,\n\tLinearFilter,\n\tLinearMipmapLinearFilter,\n\tLinearMipmapNearestFilter,\n\tMathUtils,\n\tMatrix4,\n\tMirroredRepeatWrapping,\n\tNearestFilter,\n\tNearestMipmapLinearFilter,\n\tNearestMipmapNearestFilter,\n\tPropertyBinding,\n\tRGBAFormat,\n\tRGBFormat,\n\tRepeatWrapping,\n\tScene,\n\tVector3\n} from 'three';\n\n\nclass GLTFExporter {\n\n\tconstructor() {\n\n\t\tthis.pluginCallbacks = [];\n\n\t\tthis.register( function ( writer ) {\n\n\t\t\treturn new GLTFLightExtension( writer );\n\n\t\t} );\n\n\t\tthis.register( function ( writer ) {\n\n\t\t\treturn new GLTFMaterialsUnlitExtension( writer );\n\n\t\t} );\n\n\t\tthis.register( function ( writer ) {\n\n\t\t\treturn new GLTFMaterialsPBRSpecularGlossiness( writer );\n\n\t\t} );\n\n\t}\n\n\tregister( callback ) {\n\n\t\tif ( this.pluginCallbacks.indexOf( callback ) === - 1 ) {\n\n\t\t\tthis.pluginCallbacks.push( callback );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tunregister( callback ) {\n\n\t\tif ( this.pluginCallbacks.indexOf( callback ) !== - 1 ) {\n\n\t\t\tthis.pluginCallbacks.splice( this.pluginCallbacks.indexOf( callback ), 1 );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t/**\n\t * Parse scenes and generate GLTF output\n\t * @param {Scene or [THREE.Scenes]} input Scene or Array of THREE.Scenes\n\t * @param {Function} onDone Callback on completed\n\t * @param {Object} options options\n\t */\n\tparse( input, onDone, options ) {\n\n\t\tconst writer = new GLTFWriter();\n\t\tconst plugins = [];\n\n\t\tfor ( let i = 0, il = this.pluginCallbacks.length; i < il; i ++ ) {\n\n\t\t\tplugins.push( this.pluginCallbacks[ i ]( writer ) );\n\n\t\t}\n\n\t\twriter.setPlugins( plugins );\n\t\twriter.write( input, onDone, options );\n\n\t}\n\n}\n\n//------------------------------------------------------------------------------\n// Constants\n//------------------------------------------------------------------------------\n\nconst WEBGL_CONSTANTS = {\n\tPOINTS: 0x0000,\n\tLINES: 0x0001,\n\tLINE_LOOP: 0x0002,\n\tLINE_STRIP: 0x0003,\n\tTRIANGLES: 0x0004,\n\tTRIANGLE_STRIP: 0x0005,\n\tTRIANGLE_FAN: 0x0006,\n\n\tUNSIGNED_BYTE: 0x1401,\n\tUNSIGNED_SHORT: 0x1403,\n\tFLOAT: 0x1406,\n\tUNSIGNED_INT: 0x1405,\n\tARRAY_BUFFER: 0x8892,\n\tELEMENT_ARRAY_BUFFER: 0x8893,\n\n\tNEAREST: 0x2600,\n\tLINEAR: 0x2601,\n\tNEAREST_MIPMAP_NEAREST: 0x2700,\n\tLINEAR_MIPMAP_NEAREST: 0x2701,\n\tNEAREST_MIPMAP_LINEAR: 0x2702,\n\tLINEAR_MIPMAP_LINEAR: 0x2703,\n\n\tCLAMP_TO_EDGE: 33071,\n\tMIRRORED_REPEAT: 33648,\n\tREPEAT: 10497\n};\n\nconst THREE_TO_WEBGL = {};\n\nTHREE_TO_WEBGL[ NearestFilter ] = WEBGL_CONSTANTS.NEAREST;\nTHREE_TO_WEBGL[ NearestMipmapNearestFilter ] = WEBGL_CONSTANTS.NEAREST_MIPMAP_NEAREST;\nTHREE_TO_WEBGL[ NearestMipmapLinearFilter ] = WEBGL_CONSTANTS.NEAREST_MIPMAP_LINEAR;\nTHREE_TO_WEBGL[ LinearFilter ] = WEBGL_CONSTANTS.LINEAR;\nTHREE_TO_WEBGL[ LinearMipmapNearestFilter ] = WEBGL_CONSTANTS.LINEAR_MIPMAP_NEAREST;\nTHREE_TO_WEBGL[ LinearMipmapLinearFilter ] = WEBGL_CONSTANTS.LINEAR_MIPMAP_LINEAR;\n\nTHREE_TO_WEBGL[ ClampToEdgeWrapping ] = WEBGL_CONSTANTS.CLAMP_TO_EDGE;\nTHREE_TO_WEBGL[ RepeatWrapping ] = WEBGL_CONSTANTS.REPEAT;\nTHREE_TO_WEBGL[ MirroredRepeatWrapping ] = WEBGL_CONSTANTS.MIRRORED_REPEAT;\n\nconst PATH_PROPERTIES = {\n\tscale: 'scale',\n\tposition: 'translation',\n\tquaternion: 'rotation',\n\tmorphTargetInfluences: 'weights'\n};\n\n// GLB constants\n// https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#glb-file-format-specification\n\nconst GLB_HEADER_BYTES = 12;\nconst GLB_HEADER_MAGIC = 0x46546C67;\nconst GLB_VERSION = 2;\n\nconst GLB_CHUNK_PREFIX_BYTES = 8;\nconst GLB_CHUNK_TYPE_JSON = 0x4E4F534A;\nconst GLB_CHUNK_TYPE_BIN = 0x004E4942;\n\n//------------------------------------------------------------------------------\n// Utility functions\n//------------------------------------------------------------------------------\n\n/**\n * Compare two arrays\n * @param {Array} array1 Array 1 to compare\n * @param {Array} array2 Array 2 to compare\n * @return {Boolean} Returns true if both arrays are equal\n */\nfunction equalArray( array1, array2 ) {\n\n\treturn ( array1.length === array2.length ) && array1.every( function ( element, index ) {\n\n\t\treturn element === array2[ index ];\n\n\t} );\n\n}\n\n/**\n * Converts a string to an ArrayBuffer.\n * @param {string} text\n * @return {ArrayBuffer}\n */\nfunction stringToArrayBuffer( text ) {\n\n\tif ( window.TextEncoder !== undefined ) {\n\n\t\treturn new TextEncoder().encode( text ).buffer;\n\n\t}\n\n\tconst array = new Uint8Array( new ArrayBuffer( text.length ) );\n\n\tfor ( let i = 0, il = text.length; i < il; i ++ ) {\n\n\t\tconst value = text.charCodeAt( i );\n\n\t\t// Replacing multi-byte character with space(0x20).\n\t\tarray[ i ] = value > 0xFF ? 0x20 : value;\n\n\t}\n\n\treturn array.buffer;\n\n}\n\n/**\n * Is identity matrix\n *\n * @param {Matrix4} matrix\n * @returns {Boolean} Returns true, if parameter is identity matrix\n */\nfunction isIdentityMatrix( matrix ) {\n\n\treturn equalArray( matrix.elements, [ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ] );\n\n}\n\n/**\n * Get the min and max vectors from the given attribute\n * @param {BufferAttribute} attribute Attribute to find the min/max in range from start to start + count\n * @param {Integer} start\n * @param {Integer} count\n * @return {Object} Object containing the `min` and `max` values (As an array of attribute.itemSize components)\n */\nfunction getMinMax( attribute, start, count ) {\n\n\tconst output = {\n\n\t\tmin: new Array( attribute.itemSize ).fill( Number.POSITIVE_INFINITY ),\n\t\tmax: new Array( attribute.itemSize ).fill( Number.NEGATIVE_INFINITY )\n\n\t};\n\n\tfor ( let i = start; i < start + count; i ++ ) {\n\n\t\tfor ( let a = 0; a < attribute.itemSize; a ++ ) {\n\n\t\t\tlet value;\n\n\t\t\tif ( attribute.itemSize > 4 ) {\n\n\t\t\t\t // no support for interleaved data for itemSize > 4\n\n\t\t\t\tvalue = attribute.array[ i * attribute.itemSize + a ];\n\n\t\t\t} else {\n\n\t\t\t\tif ( a === 0 ) value = attribute.getX( i );\n\t\t\t\telse if ( a === 1 ) value = attribute.getY( i );\n\t\t\t\telse if ( a === 2 ) value = attribute.getZ( i );\n\t\t\t\telse if ( a === 3 ) value = attribute.getW( i );\n\n\t\t\t}\n\n\t\t\toutput.min[ a ] = Math.min( output.min[ a ], value );\n\t\t\toutput.max[ a ] = Math.max( output.max[ a ], value );\n\n\t\t}\n\n\t}\n\n\treturn output;\n\n}\n\n/**\n * Get the required size + padding for a buffer, rounded to the next 4-byte boundary.\n * https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#data-alignment\n *\n * @param {Integer} bufferSize The size the original buffer.\n * @returns {Integer} new buffer size with required padding.\n *\n */\nfunction getPaddedBufferSize( bufferSize ) {\n\n\treturn Math.ceil( bufferSize / 4 ) * 4;\n\n}\n\n/**\n * Returns a buffer aligned to 4-byte boundary.\n *\n * @param {ArrayBuffer} arrayBuffer Buffer to pad\n * @param {Integer} paddingByte (Optional)\n * @returns {ArrayBuffer} The same buffer if it's already aligned to 4-byte boundary or a new buffer\n */\nfunction getPaddedArrayBuffer( arrayBuffer, paddingByte = 0 ) {\n\n\tconst paddedLength = getPaddedBufferSize( arrayBuffer.byteLength );\n\n\tif ( paddedLength !== arrayBuffer.byteLength ) {\n\n\t\tconst array = new Uint8Array( paddedLength );\n\t\tarray.set( new Uint8Array( arrayBuffer ) );\n\n\t\tif ( paddingByte !== 0 ) {\n\n\t\t\tfor ( let i = arrayBuffer.byteLength; i < paddedLength; i ++ ) {\n\n\t\t\t\tarray[ i ] = paddingByte;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn array.buffer;\n\n\t}\n\n\treturn arrayBuffer;\n\n}\n\nlet cachedCanvas = null;\n\n/**\n * Writer\n */\nclass GLTFWriter {\n\n\tconstructor() {\n\n\t\tthis.plugins = [];\n\n\t\tthis.options = {};\n\t\tthis.pending = [];\n\t\tthis.buffers = [];\n\n\t\tthis.byteOffset = 0;\n\t\tthis.buffers = [];\n\t\tthis.nodeMap = new Map();\n\t\tthis.skins = [];\n\t\tthis.extensionsUsed = {};\n\n\t\tthis.uids = new Map();\n\t\tthis.uid = 0;\n\n\t\tthis.json = {\n\t\t\tasset: {\n\t\t\t\tversion: '2.0',\n\t\t\t\tgenerator: 'THREE.GLTFExporter'\n\t\t\t}\n\t\t};\n\n\t\tthis.cache = {\n\t\t\tmeshes: new Map(),\n\t\t\tattributes: new Map(),\n\t\t\tattributesNormalized: new Map(),\n\t\t\tmaterials: new Map(),\n\t\t\ttextures: new Map(),\n\t\t\timages: new Map()\n\t\t};\n\n\t}\n\n\tsetPlugins( plugins ) {\n\n\t\tthis.plugins = plugins;\n\n\t}\n\n\t/**\n\t * Parse scenes and generate GLTF output\n\t * @param {Scene or [THREE.Scenes]} input Scene or Array of THREE.Scenes\n\t * @param {Function} onDone Callback on completed\n\t * @param {Object} options options\n\t */\n\twrite( input, onDone, options ) {\n\n\t\tthis.options = Object.assign( {}, {\n\t\t\t// default options\n\t\t\tbinary: false,\n\t\t\ttrs: false,\n\t\t\tonlyVisible: true,\n\t\t\ttruncateDrawRange: true,\n\t\t\tembedImages: true,\n\t\t\tmaxTextureSize: Infinity,\n\t\t\tanimations: [],\n\t\t\tincludeCustomExtensions: false\n\t\t}, options );\n\n\t\tif ( this.options.animations.length > 0 ) {\n\n\t\t\t// Only TRS properties, and not matrices, may be targeted by animation.\n\t\t\tthis.options.trs = true;\n\n\t\t}\n\n\t\tthis.processInput( input );\n\n\t\tconst writer = this;\n\n\t\tPromise.all( this.pending ).then( function () {\n\n\t\t\tconst buffers = writer.buffers;\n\t\t\tconst json = writer.json;\n\t\t\tconst options = writer.options;\n\t\t\tconst extensionsUsed = writer.extensionsUsed;\n\n\t\t\t// Merge buffers.\n\t\t\tconst blob = new Blob( buffers, { type: 'application/octet-stream' } );\n\n\t\t\t// Declare extensions.\n\t\t\tconst extensionsUsedList = Object.keys( extensionsUsed );\n\n\t\t\tif ( extensionsUsedList.length > 0 ) json.extensionsUsed = extensionsUsedList;\n\n\t\t\t// Update bytelength of the single buffer.\n\t\t\tif ( json.buffers && json.buffers.length > 0 ) json.buffers[ 0 ].byteLength = blob.size;\n\n\t\t\tif ( options.binary === true ) {\n\n\t\t\t\t// https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#glb-file-format-specification\n\n\t\t\t\tconst reader = new window.FileReader();\n\t\t\t\treader.readAsArrayBuffer( blob );\n\t\t\t\treader.onloadend = function () {\n\n\t\t\t\t\t// Binary chunk.\n\t\t\t\t\tconst binaryChunk = getPaddedArrayBuffer( reader.result );\n\t\t\t\t\tconst binaryChunkPrefix = new DataView( new ArrayBuffer( GLB_CHUNK_PREFIX_BYTES ) );\n\t\t\t\t\tbinaryChunkPrefix.setUint32( 0, binaryChunk.byteLength, true );\n\t\t\t\t\tbinaryChunkPrefix.setUint32( 4, GLB_CHUNK_TYPE_BIN, true );\n\n\t\t\t\t\t// JSON chunk.\n\t\t\t\t\tconst jsonChunk = getPaddedArrayBuffer( stringToArrayBuffer( JSON.stringify( json ) ), 0x20 );\n\t\t\t\t\tconst jsonChunkPrefix = new DataView( new ArrayBuffer( GLB_CHUNK_PREFIX_BYTES ) );\n\t\t\t\t\tjsonChunkPrefix.setUint32( 0, jsonChunk.byteLength, true );\n\t\t\t\t\tjsonChunkPrefix.setUint32( 4, GLB_CHUNK_TYPE_JSON, true );\n\n\t\t\t\t\t// GLB header.\n\t\t\t\t\tconst header = new ArrayBuffer( GLB_HEADER_BYTES );\n\t\t\t\t\tconst headerView = new DataView( header );\n\t\t\t\t\theaderView.setUint32( 0, GLB_HEADER_MAGIC, true );\n\t\t\t\t\theaderView.setUint32( 4, GLB_VERSION, true );\n\t\t\t\t\tconst totalByteLength = GLB_HEADER_BYTES\n\t\t\t\t\t\t+ jsonChunkPrefix.byteLength + jsonChunk.byteLength\n\t\t\t\t\t\t+ binaryChunkPrefix.byteLength + binaryChunk.byteLength;\n\t\t\t\t\theaderView.setUint32( 8, totalByteLength, true );\n\n\t\t\t\t\tconst glbBlob = new Blob( [\n\t\t\t\t\t\theader,\n\t\t\t\t\t\tjsonChunkPrefix,\n\t\t\t\t\t\tjsonChunk,\n\t\t\t\t\t\tbinaryChunkPrefix,\n\t\t\t\t\t\tbinaryChunk\n\t\t\t\t\t], { type: 'application/octet-stream' } );\n\n\t\t\t\t\tconst glbReader = new window.FileReader();\n\t\t\t\t\tglbReader.readAsArrayBuffer( glbBlob );\n\t\t\t\t\tglbReader.onloadend = function () {\n\n\t\t\t\t\t\tonDone( glbReader.result );\n\n\t\t\t\t\t};\n\n\t\t\t\t};\n\n\t\t\t} else {\n\n\t\t\t\tif ( json.buffers && json.buffers.length > 0 ) {\n\n\t\t\t\t\tconst reader = new window.FileReader();\n\t\t\t\t\treader.readAsDataURL( blob );\n\t\t\t\t\treader.onloadend = function () {\n\n\t\t\t\t\t\tconst base64data = reader.result;\n\t\t\t\t\t\tjson.buffers[ 0 ].uri = base64data;\n\t\t\t\t\t\tonDone( json );\n\n\t\t\t\t\t};\n\n\t\t\t\t} else {\n\n\t\t\t\t\tonDone( json );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} );\n\n\t}\n\n\t/**\n\t * Serializes a userData.\n\t *\n\t * @param {THREE.Object3D|THREE.Material} object\n\t * @param {Object} objectDef\n\t */\n\tserializeUserData( object, objectDef ) {\n\n if (object.userData && object.userData.isZincObject) return;\n\n\t\tif ( Object.keys( object.userData ).length === 0 ) return;\n\n\t\tconst options = this.options;\n\t\tconst extensionsUsed = this.extensionsUsed;\n\n\t\ttry {\n\n\t\t\tconst json = JSON.parse( JSON.stringify( object.userData ) );\n\n\t\t\tif ( options.includeCustomExtensions && json.gltfExtensions ) {\n\n\t\t\t\tif ( objectDef.extensions === undefined ) objectDef.extensions = {};\n\n\t\t\t\tfor ( const extensionName in json.gltfExtensions ) {\n\n\t\t\t\t\tobjectDef.extensions[ extensionName ] = json.gltfExtensions[ extensionName ];\n\t\t\t\t\textensionsUsed[ extensionName ] = true;\n\n\t\t\t\t}\n\n\t\t\t\tdelete json.gltfExtensions;\n\n\t\t\t}\n\n\t\t\tif ( Object.keys( json ).length > 0 ) objectDef.extras = json;\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.warn( 'THREE.GLTFExporter: userData of \\'' + object.name + '\\' ' +\n\t\t\t\t'won\\'t be serialized because of JSON.stringify error - ' + error.message );\n\n\t\t}\n\n\t}\n\n\t/**\n\t * Assign and return a temporal unique id for an object\n\t * especially which doesn't have .uuid\n\t * @param {Object} object\n\t * @return {Integer}\n\t */\n\tgetUID( object ) {\n\n\t\tif ( ! this.uids.has( object ) ) this.uids.set( object, this.uid ++ );\n\n\t\treturn this.uids.get( object );\n\n\t}\n\n\t/**\n\t * Checks if normal attribute values are normalized.\n\t *\n\t * @param {BufferAttribute} normal\n\t * @returns {Boolean}\n\t */\n\tisNormalizedNormalAttribute( normal ) {\n\n\t\tconst cache = this.cache;\n\n\t\tif ( cache.attributesNormalized.has( normal ) ) return false;\n\n\t\tconst v = new Vector3();\n\n\t\tfor ( let i = 0, il = normal.count; i < il; i ++ ) {\n\n\t\t\t// 0.0005 is from glTF-validator\n\t\t\tif ( Math.abs( v.fromBufferAttribute( normal, i ).length() - 1.0 ) > 0.0005 ) return false;\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\t/**\n\t * Creates normalized normal buffer attribute.\n\t *\n\t * @param {BufferAttribute} normal\n\t * @returns {BufferAttribute}\n\t *\n\t */\n\tcreateNormalizedNormalAttribute( normal ) {\n\n\t\tconst cache = this.cache;\n\n\t\tif ( cache.attributesNormalized.has( normal ) )\treturn cache.attributesNormalized.get( normal );\n\n\t\tconst attribute = normal.clone();\n\t\tconst v = new Vector3();\n\n\t\tfor ( let i = 0, il = attribute.count; i < il; i ++ ) {\n\n\t\t\tv.fromBufferAttribute( attribute, i );\n\n\t\t\tif ( v.x === 0 && v.y === 0 && v.z === 0 ) {\n\n\t\t\t\t// if values can't be normalized set (1, 0, 0)\n\t\t\t\tv.setX( 1.0 );\n\n\t\t\t} else {\n\n\t\t\t\tv.normalize();\n\n\t\t\t}\n\n\t\t\tattribute.setXYZ( i, v.x, v.y, v.z );\n\n\t\t}\n\n\t\tcache.attributesNormalized.set( normal, attribute );\n\n\t\treturn attribute;\n\n\t}\n\n\t/**\n\t * Applies a texture transform, if present, to the map definition. Requires\n\t * the KHR_texture_transform extension.\n\t *\n\t * @param {Object} mapDef\n\t * @param {THREE.Texture} texture\n\t */\n\tapplyTextureTransform( mapDef, texture ) {\n\n\t\tlet didTransform = false;\n\t\tconst transformDef = {};\n\n\t\tif ( texture.offset.x !== 0 || texture.offset.y !== 0 ) {\n\n\t\t\ttransformDef.offset = texture.offset.toArray();\n\t\t\tdidTransform = true;\n\n\t\t}\n\n\t\tif ( texture.rotation !== 0 ) {\n\n\t\t\ttransformDef.rotation = texture.rotation;\n\t\t\tdidTransform = true;\n\n\t\t}\n\n\t\tif ( texture.repeat.x !== 1 || texture.repeat.y !== 1 ) {\n\n\t\t\ttransformDef.scale = texture.repeat.toArray();\n\t\t\tdidTransform = true;\n\n\t\t}\n\n\t\tif ( didTransform ) {\n\n\t\t\tmapDef.extensions = mapDef.extensions || {};\n\t\t\tmapDef.extensions[ 'KHR_texture_transform' ] = transformDef;\n\t\t\tthis.extensionsUsed[ 'KHR_texture_transform' ] = true;\n\n\t\t}\n\n\t}\n\n\t/**\n\t * Process a buffer to append to the default one.\n\t * @param {ArrayBuffer} buffer\n\t * @return {Integer}\n\t */\n\tprocessBuffer( buffer ) {\n\n\t\tconst json = this.json;\n\t\tconst buffers = this.buffers;\n\n\t\tif ( ! json.buffers ) json.buffers = [ { byteLength: 0 } ];\n\n\t\t// All buffers are merged before export.\n\t\tbuffers.push( buffer );\n\n\t\treturn 0;\n\n\t}\n\n\t/**\n\t * Process and generate a BufferView\n\t * @param {BufferAttribute} attribute\n\t * @param {number} componentType\n\t * @param {number} start\n\t * @param {number} count\n\t * @param {number} target (Optional) Target usage of the BufferView\n\t * @return {Object}\n\t */\n\tprocessBufferView( attribute, componentType, start, count, target ) {\n\n\t\tconst json = this.json;\n\n\t\tif ( ! json.bufferViews ) json.bufferViews = [];\n\n\t\t// Create a new dataview and dump the attribute's array into it\n\n\t\tlet componentSize;\n\n\t\tif ( componentType === WEBGL_CONSTANTS.UNSIGNED_BYTE ) {\n\n\t\t\tcomponentSize = 1;\n\n\t\t} else if ( componentType === WEBGL_CONSTANTS.UNSIGNED_SHORT ) {\n\n\t\t\tcomponentSize = 2;\n\n\t\t} else {\n\n\t\t\tcomponentSize = 4;\n\n\t\t}\n\n\t\tconst byteLength = getPaddedBufferSize( count * attribute.itemSize * componentSize );\n\t\tconst dataView = new DataView( new ArrayBuffer( byteLength ) );\n\t\tlet offset = 0;\n\n\t\tfor ( let i = start; i < start + count; i ++ ) {\n\n\t\t\tfor ( let a = 0; a < attribute.itemSize; a ++ ) {\n\n\t\t\t\tlet value;\n\n\t\t\t\tif ( attribute.itemSize > 4 ) {\n\n\t\t\t\t\t // no support for interleaved data for itemSize > 4\n\n\t\t\t\t\tvalue = attribute.array[ i * attribute.itemSize + a ];\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( a === 0 ) value = attribute.getX( i );\n\t\t\t\t\telse if ( a === 1 ) value = attribute.getY( i );\n\t\t\t\t\telse if ( a === 2 ) value = attribute.getZ( i );\n\t\t\t\t\telse if ( a === 3 ) value = attribute.getW( i );\n\n\t\t\t\t}\n\n\t\t\t\tif ( componentType === WEBGL_CONSTANTS.FLOAT ) {\n\n\t\t\t\t\tdataView.setFloat32( offset, value, true );\n\n\t\t\t\t} else if ( componentType === WEBGL_CONSTANTS.UNSIGNED_INT ) {\n\n\t\t\t\t\tdataView.setUint32( offset, value, true );\n\n\t\t\t\t} else if ( componentType === WEBGL_CONSTANTS.UNSIGNED_SHORT ) {\n\n\t\t\t\t\tdataView.setUint16( offset, value, true );\n\n\t\t\t\t} else if ( componentType === WEBGL_CONSTANTS.UNSIGNED_BYTE ) {\n\n\t\t\t\t\tdataView.setUint8( offset, value );\n\n\t\t\t\t}\n\n\t\t\t\toffset += componentSize;\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst bufferViewDef = {\n\n\t\t\tbuffer: this.processBuffer( dataView.buffer ),\n\t\t\tbyteOffset: this.byteOffset,\n\t\t\tbyteLength: byteLength\n\n\t\t};\n\n\t\tif ( target !== undefined ) bufferViewDef.target = target;\n\n\t\tif ( target === WEBGL_CONSTANTS.ARRAY_BUFFER ) {\n\n\t\t\t// Only define byteStride for vertex attributes.\n\t\t\tbufferViewDef.byteStride = attribute.itemSize * componentSize;\n\n\t\t}\n\n\t\tthis.byteOffset += byteLength;\n\n\t\tjson.bufferViews.push( bufferViewDef );\n\n\t\t// @TODO Merge bufferViews where possible.\n\t\tconst output = {\n\n\t\t\tid: json.bufferViews.length - 1,\n\t\t\tbyteLength: 0\n\n\t\t};\n\n\t\treturn output;\n\n\t}\n\n\t/**\n\t * Process and generate a BufferView from an image Blob.\n\t * @param {Blob} blob\n\t * @return {Promise}\n\t */\n\tprocessBufferViewImage( blob ) {\n\n\t\tconst writer = this;\n\t\tconst json = writer.json;\n\n\t\tif ( ! json.bufferViews ) json.bufferViews = [];\n\n\t\treturn new Promise( function ( resolve ) {\n\n\t\t\tconst reader = new window.FileReader();\n\t\t\treader.readAsArrayBuffer( blob );\n\t\t\treader.onloadend = function () {\n\n\t\t\t\tconst buffer = getPaddedArrayBuffer( reader.result );\n\n\t\t\t\tconst bufferViewDef = {\n\t\t\t\t\tbuffer: writer.processBuffer( buffer ),\n\t\t\t\t\tbyteOffset: writer.byteOffset,\n\t\t\t\t\tbyteLength: buffer.byteLength\n\t\t\t\t};\n\n\t\t\t\twriter.byteOffset += buffer.byteLength;\n\t\t\t\tresolve( json.bufferViews.push( bufferViewDef ) - 1 );\n\n\t\t\t};\n\n\t\t} );\n\n\t}\n\n\t/**\n\t * Process attribute to generate an accessor\n\t * @param {BufferAttribute} attribute Attribute to process\n\t * @param {THREE.BufferGeometry} geometry (Optional) Geometry used for truncated draw range\n\t * @param {Integer} start (Optional)\n\t * @param {Integer} count (Optional)\n\t * @return {Integer|null} Index of the processed accessor on the \"accessors\" array\n\t */\n\tprocessAccessor( attribute, geometry, start, count ) {\n\n\t\tconst options = this.options;\n\t\tconst json = this.json;\n\n\t\tconst types = {\n\n\t\t\t1: 'SCALAR',\n\t\t\t2: 'VEC2',\n\t\t\t3: 'VEC3',\n\t\t\t4: 'VEC4',\n\t\t\t16: 'MAT4'\n\n\t\t};\n\n\t\tlet componentType;\n\n\t\t// Detect the component type of the attribute array (float, uint or ushort)\n\t\tif ( attribute.array.constructor === Float32Array ) {\n\n\t\t\tcomponentType = WEBGL_CONSTANTS.FLOAT;\n\n\t\t} else if ( attribute.array.constructor === Uint32Array ) {\n\n\t\t\tcomponentType = WEBGL_CONSTANTS.UNSIGNED_INT;\n\n\t\t} else if ( attribute.array.constructor === Uint16Array ) {\n\n\t\t\tcomponentType = WEBGL_CONSTANTS.UNSIGNED_SHORT;\n\n\t\t} else if ( attribute.array.constructor === Uint8Array ) {\n\n\t\t\tcomponentType = WEBGL_CONSTANTS.UNSIGNED_BYTE;\n\n\t\t} else {\n\n\t\t\tthrow new Error( 'THREE.GLTFExporter: Unsupported bufferAttribute component type.' );\n\n\t\t}\n\n\t\tif ( start === undefined ) start = 0;\n\t\tif ( count === undefined ) count = attribute.count;\n\n\t\t// @TODO Indexed buffer geometry with drawRange not supported yet\n\t\tif ( options.truncateDrawRange && geometry !== undefined && geometry.index === null ) {\n\n\t\t\tconst end = start + count;\n\t\t\tconst end2 = geometry.drawRange.count === Infinity\n\t\t\t\t? attribute.count\n\t\t\t\t: geometry.drawRange.start + geometry.drawRange.count;\n\n\t\t\tstart = Math.max( start, geometry.drawRange.start );\n\t\t\tcount = Math.min( end, end2 ) - start;\n\n\t\t\tif ( count < 0 ) count = 0;\n\n\t\t}\n\n\t\t// Skip creating an accessor if the attribute doesn't have data to export\n\t\tif ( count === 0 ) return null;\n\n\t\tconst minMax = getMinMax( attribute, start, count );\n\t\tlet bufferViewTarget;\n\n\t\t// If geometry isn't provided, don't infer the target usage of the bufferView. For\n\t\t// animation samplers, target must not be set.\n\t\tif ( geometry !== undefined ) {\n\n\t\t\tbufferViewTarget = attribute === geometry.index ? WEBGL_CONSTANTS.ELEMENT_ARRAY_BUFFER : WEBGL_CONSTANTS.ARRAY_BUFFER;\n\n\t\t}\n\n\t\tconst bufferView = this.processBufferView( attribute, componentType, start, count, bufferViewTarget );\n\n\t\tconst accessorDef = {\n\n\t\t\tbufferView: bufferView.id,\n\t\t\tbyteOffset: bufferView.byteOffset,\n\t\t\tcomponentType: componentType,\n\t\t\tcount: count,\n\t\t\tmax: minMax.max,\n\t\t\tmin: minMax.min,\n\t\t\ttype: types[ attribute.itemSize ]\n\n\t\t};\n\n\t\tif ( attribute.normalized === true ) accessorDef.normalized = true;\n\t\tif ( ! json.accessors ) json.accessors = [];\n\n\t\treturn json.accessors.push( accessorDef ) - 1;\n\n\t}\n\n\t/**\n\t * Process image\n\t * @param {Image} image to process\n\t * @param {Integer} format of the image (e.g. RGBFormat, RGBAFormat etc)\n\t * @param {Boolean} flipY before writing out the image\n\t * @return {Integer} Index of the processed texture in the \"images\" array\n\t */\n\tprocessImage( image, format, flipY ) {\n\n\t\tconst writer = this;\n\t\tconst cache = writer.cache;\n\t\tconst json = writer.json;\n\t\tconst options = writer.options;\n\t\tconst pending = writer.pending;\n\n\t\tif ( ! cache.images.has( image ) ) cache.images.set( image, {} );\n\n\t\tconst cachedImages = cache.images.get( image );\n\t\tconst mimeType = format === RGBAFormat ? 'image/png' : 'image/jpeg';\n\t\tconst key = mimeType + ':flipY/' + flipY.toString();\n\n\t\tif ( cachedImages[ key ] !== undefined ) return cachedImages[ key ];\n\n\t\tif ( ! json.images ) json.images = [];\n\n\t\tconst imageDef = { mimeType: mimeType };\n\n\t\tif ( options.embedImages ) {\n\n\t\t\tconst canvas = cachedCanvas = cachedCanvas || document.createElement( 'canvas' );\n\n\t\t\tcanvas.width = Math.min( image.width, options.maxTextureSize );\n\t\t\tcanvas.height = Math.min( image.height, options.maxTextureSize );\n\n\t\t\tconst ctx = canvas.getContext( '2d' );\n\n\t\t\tif ( flipY === true ) {\n\n\t\t\t\tctx.translate( 0, canvas.height );\n\t\t\t\tctx.scale( 1, - 1 );\n\n\t\t\t}\n\n\t\t\tif ( ( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) ||\n\t\t\t\t( typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement ) ||\n\t\t\t\t( typeof OffscreenCanvas !== 'undefined' && image instanceof OffscreenCanvas ) ||\n\t\t\t\t( typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap ) ) {\n\n\t\t\t\tctx.drawImage( image, 0, 0, canvas.width, canvas.height );\n\n\t\t\t} else {\n\n\t\t\t\tif ( format !== RGBAFormat && format !== RGBFormat ) {\n\n\t\t\t\t\tconsole.error( 'GLTFExporter: Only RGB and RGBA formats are supported.' );\n\n\t\t\t\t}\n\n\t\t\t\tif ( image.width > options.maxTextureSize || image.height > options.maxTextureSize ) {\n\n\t\t\t\t\tconsole.warn( 'GLTFExporter: Image size is bigger than maxTextureSize', image );\n\n\t\t\t\t}\n\n\t\t\t\tconst data = new Uint8ClampedArray( image.height * image.width * 4 );\n\n\t\t\t\tif ( format === RGBAFormat ) {\n\n\t\t\t\t\tfor ( let i = 0; i < data.length; i += 4 ) {\n\n\t\t\t\t\t\tdata[ i + 0 ] = image.data[ i + 0 ];\n\t\t\t\t\t\tdata[ i + 1 ] = image.data[ i + 1 ];\n\t\t\t\t\t\tdata[ i + 2 ] = image.data[ i + 2 ];\n\t\t\t\t\t\tdata[ i + 3 ] = image.data[ i + 3 ];\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tfor ( let i = 0, j = 0; i < data.length; i += 4, j += 3 ) {\n\n\t\t\t\t\t\tdata[ i + 0 ] = image.data[ j + 0 ];\n\t\t\t\t\t\tdata[ i + 1 ] = image.data[ j + 1 ];\n\t\t\t\t\t\tdata[ i + 2 ] = image.data[ j + 2 ];\n\t\t\t\t\t\tdata[ i + 3 ] = 255;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tctx.putImageData( new ImageData( data, image.width, image.height ), 0, 0 );\n\n\t\t\t}\n\n\t\t\tif ( options.binary === true ) {\n\n\t\t\t\tpending.push( new Promise( function ( resolve ) {\n\n\t\t\t\t\tcanvas.toBlob( function ( blob ) {\n\n\t\t\t\t\t\twriter.processBufferViewImage( blob ).then( function ( bufferViewIndex ) {\n\n\t\t\t\t\t\t\timageDef.bufferView = bufferViewIndex;\n\t\t\t\t\t\t\tresolve();\n\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t}, mimeType );\n\n\t\t\t\t} ) );\n\n\t\t\t} else {\n\n\t\t\t\timageDef.uri = canvas.toDataURL( mimeType );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\timageDef.uri = image.src;\n\n\t\t}\n\n\t\tconst index = json.images.push( imageDef ) - 1;\n\t\tcachedImages[ key ] = index;\n\t\treturn index;\n\n\t}\n\n\t/**\n\t * Process sampler\n\t * @param {Texture} map Texture to process\n\t * @return {Integer} Index of the processed texture in the \"samplers\" array\n\t */\n\tprocessSampler( map ) {\n\n\t\tconst json = this.json;\n\n\t\tif ( ! json.samplers ) json.samplers = [];\n\n\t\tconst samplerDef = {\n\t\t\tmagFilter: THREE_TO_WEBGL[ map.magFilter ],\n\t\t\tminFilter: THREE_TO_WEBGL[ map.minFilter ],\n\t\t\twrapS: THREE_TO_WEBGL[ map.wrapS ],\n\t\t\twrapT: THREE_TO_WEBGL[ map.wrapT ]\n\t\t};\n\n\t\treturn json.samplers.push( samplerDef ) - 1;\n\n\t}\n\n\t/**\n\t * Process texture\n\t * @param {Texture} map Map to process\n\t * @return {Integer} Index of the processed texture in the \"textures\" array\n\t */\n\tprocessTexture( map ) {\n\n\t\tconst cache = this.cache;\n\t\tconst json = this.json;\n\n\t\tif ( cache.textures.has( map ) ) return cache.textures.get( map );\n\n\t\tif ( ! json.textures ) json.textures = [];\n\n\t\tconst textureDef = {\n\t\t\tsampler: this.processSampler( map ),\n\t\t\tsource: this.processImage( map.image, map.format, map.flipY )\n\t\t};\n\n\t\tif ( map.name ) textureDef.name = map.name;\n\n\t\tthis._invokeAll( function ( ext ) {\n\n\t\t\text.writeTexture && ext.writeTexture( map, textureDef );\n\n\t\t} );\n\n\t\tconst index = json.textures.push( textureDef ) - 1;\n\t\tcache.textures.set( map, index );\n\t\treturn index;\n\n\t}\n\n\t/**\n\t * Process material\n\t * @param {THREE.Material} material Material to process\n\t * @return {Integer|null} Index of the processed material in the \"materials\" array\n\t */\n\tprocessMaterial( material ) {\n\n\t\tconst cache = this.cache;\n\t\tconst json = this.json;\n\n\t\tif ( cache.materials.has( material ) ) return cache.materials.get( material );\n\n\t\tif ( material.isShaderMaterial ) {\n\n\t\t\tconsole.warn( 'GLTFExporter: THREE.ShaderMaterial not supported.' );\n\t\t\treturn null;\n\n\t\t}\n\n\t\tif ( ! json.materials ) json.materials = [];\n\n\t\t// @QUESTION Should we avoid including any attribute that has the default value?\n\t\tconst materialDef = {\tpbrMetallicRoughness: {} };\n\n\t\tif ( material.isMeshStandardMaterial !== true && material.isMeshBasicMaterial !== true ) {\n\n\t\t\tconsole.warn( 'GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.' );\n\n\t\t}\n\n\t\t// pbrMetallicRoughness.baseColorFactor\n\t\tconst color = material.color.toArray().concat( [ material.opacity ] );\n\n\t\tif ( ! equalArray( color, [ 1, 1, 1, 1 ] ) ) {\n\n\t\t\tmaterialDef.pbrMetallicRoughness.baseColorFactor = color;\n\n\t\t}\n\n\t\tif ( material.isMeshStandardMaterial ) {\n\n\t\t\tmaterialDef.pbrMetallicRoughness.metallicFactor = material.metalness;\n\t\t\tmaterialDef.pbrMetallicRoughness.roughnessFactor = material.roughness;\n\n\t\t} else {\n\n\t\t\tmaterialDef.pbrMetallicRoughness.metallicFactor = 0.5;\n\t\t\tmaterialDef.pbrMetallicRoughness.roughnessFactor = 0.5;\n\n\t\t}\n\n\t\t// pbrMetallicRoughness.metallicRoughnessTexture\n\t\tif ( material.metalnessMap || material.roughnessMap ) {\n\n\t\t\tif ( material.metalnessMap === material.roughnessMap ) {\n\n\t\t\t\tconst metalRoughMapDef = { index: this.processTexture( material.metalnessMap ) };\n\t\t\t\tthis.applyTextureTransform( metalRoughMapDef, material.metalnessMap );\n\t\t\t\tmaterialDef.pbrMetallicRoughness.metallicRoughnessTexture = metalRoughMapDef;\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'THREE.GLTFExporter: Ignoring metalnessMap and roughnessMap because they are not the same Texture.' );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// pbrMetallicRoughness.baseColorTexture or pbrSpecularGlossiness diffuseTexture\n\t\tif ( material.map ) {\n\n\t\t\tconst baseColorMapDef = { index: this.processTexture( material.map ) };\n\t\t\tthis.applyTextureTransform( baseColorMapDef, material.map );\n\t\t\tmaterialDef.pbrMetallicRoughness.baseColorTexture = baseColorMapDef;\n\n\t\t}\n\n\t\tif ( material.emissive ) {\n\n\t\t\t// note: emissive components are limited to stay within the 0 - 1 range to accommodate glTF spec. see #21849 and #22000.\n\t\t\tconst emissive = material.emissive.clone().multiplyScalar( material.emissiveIntensity );\n\t\t\tconst maxEmissiveComponent = Math.max( emissive.r, emissive.g, emissive.b );\n\n\t\t\tif ( maxEmissiveComponent > 1 ) {\n\n\t\t\t\temissive.multiplyScalar( 1 / maxEmissiveComponent );\n\n\t\t\t\tconsole.warn( 'THREE.GLTFExporter: Some emissive components exceed 1; emissive has been limited' );\n\n\t\t\t}\n\n\t\t\tif ( maxEmissiveComponent > 0 ) {\n\n\t\t\t\tmaterialDef.emissiveFactor = emissive.toArray();\n\n\t\t\t}\n\n\t\t\t// emissiveTexture\n\t\t\tif ( material.emissiveMap ) {\n\n\t\t\t\tconst emissiveMapDef = { index: this.processTexture( material.emissiveMap ) };\n\t\t\t\tthis.applyTextureTransform( emissiveMapDef, material.emissiveMap );\n\t\t\t\tmaterialDef.emissiveTexture = emissiveMapDef;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// normalTexture\n\t\tif ( material.normalMap ) {\n\n\t\t\tconst normalMapDef = { index: this.processTexture( material.normalMap ) };\n\n\t\t\tif ( material.normalScale && material.normalScale.x !== - 1 ) {\n\n\t\t\t\tif ( material.normalScale.x !== material.normalScale.y ) {\n\n\t\t\t\t\tconsole.warn( 'THREE.GLTFExporter: Normal scale components are different, ignoring Y and exporting X.' );\n\n\t\t\t\t}\n\n\t\t\t\tnormalMapDef.scale = material.normalScale.x;\n\n\t\t\t}\n\n\t\t\tthis.applyTextureTransform( normalMapDef, material.normalMap );\n\t\t\tmaterialDef.normalTexture = normalMapDef;\n\n\t\t}\n\n\t\t// occlusionTexture\n\t\tif ( material.aoMap ) {\n\n\t\t\tconst occlusionMapDef = {\n\t\t\t\tindex: this.processTexture( material.aoMap ),\n\t\t\t\ttexCoord: 1\n\t\t\t};\n\n\t\t\tif ( material.aoMapIntensity !== 1.0 ) {\n\n\t\t\t\tocclusionMapDef.strength = material.aoMapIntensity;\n\n\t\t\t}\n\n\t\t\tthis.applyTextureTransform( occlusionMapDef, material.aoMap );\n\t\t\tmaterialDef.occlusionTexture = occlusionMapDef;\n\n\t\t}\n\n\t\t// alphaMode\n\t\tif ( material.transparent ) {\n\n\t\t\tmaterialDef.alphaMode = 'BLEND';\n\n\t\t} else {\n\n\t\t\tif ( material.alphaTest > 0.0 ) {\n\n\t\t\t\tmaterialDef.alphaMode = 'MASK';\n\t\t\t\tmaterialDef.alphaCutoff = material.alphaTest;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// doubleSided\n\t\tif ( material.side === DoubleSide ) materialDef.doubleSided = true;\n\t\tif ( material.name !== '' ) materialDef.name = material.name;\n\n\t\tthis.serializeUserData( material, materialDef );\n\n\t\tthis._invokeAll( function ( ext ) {\n\n\t\t\text.writeMaterial && ext.writeMaterial( material, materialDef );\n\n\t\t} );\n\n\t\tconst index = json.materials.push( materialDef ) - 1;\n\t\tcache.materials.set( material, index );\n\t\treturn index;\n\n\t}\n\n\t/**\n\t * Process mesh\n\t * @param {THREE.Mesh} mesh Mesh to process\n\t * @return {Integer|null} Index of the processed mesh in the \"meshes\" array\n\t */\n\tprocessMesh( mesh ) {\n\n\t\tconst cache = this.cache;\n\t\tconst json = this.json;\n\n\t\tconst meshCacheKeyParts = [ mesh.geometry.uuid ];\n\n\t\tif ( Array.isArray( mesh.material ) ) {\n\n\t\t\tfor ( let i = 0, l = mesh.material.length; i < l; i ++ ) {\n\n\t\t\t\tmeshCacheKeyParts.push( mesh.material[ i ].uuid\t);\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tmeshCacheKeyParts.push( mesh.material.uuid );\n\n\t\t}\n\n\t\tconst meshCacheKey = meshCacheKeyParts.join( ':' );\n\n\t\tif ( cache.meshes.has( meshCacheKey ) ) return cache.meshes.get( meshCacheKey );\n\n\t\tconst geometry = mesh.geometry;\n\t\tlet mode;\n\n\t\t// Use the correct mode\n\t\tif ( mesh.isLineSegments ) {\n\n\t\t\tmode = WEBGL_CONSTANTS.LINES;\n\n\t\t} else if ( mesh.isLineLoop ) {\n\n\t\t\tmode = WEBGL_CONSTANTS.LINE_LOOP;\n\n\t\t} else if ( mesh.isLine ) {\n\n\t\t\tmode = WEBGL_CONSTANTS.LINE_STRIP;\n\n\t\t} else if ( mesh.isPoints ) {\n\n\t\t\tmode = WEBGL_CONSTANTS.POINTS;\n\n\t\t} else {\n\n\t\t\tmode = mesh.material.wireframe ? WEBGL_CONSTANTS.LINES : WEBGL_CONSTANTS.TRIANGLES;\n\n\t\t}\n\n\t\tif ( geometry.isBufferGeometry !== true ) {\n\n\t\t\tthrow new Error( 'THREE.GLTFExporter: Geometry is not of type THREE.BufferGeometry.' );\n\n\t\t}\n\n\t\tconst meshDef = {};\n\t\tconst attributes = {};\n\t\tconst primitives = [];\n\t\tconst targets = [];\n\n\t\t// Conversion between attributes names in threejs and gltf spec\n\t\tconst nameConversion = {\n\t\t\tuv: 'TEXCOORD_0',\n\t\t\tuv2: 'TEXCOORD_1',\n\t\t\tcolor: 'COLOR_0',\n\t\t\tskinWeight: 'WEIGHTS_0',\n\t\t\tskinIndex: 'JOINTS_0'\n\t\t};\n\n\t\tconst originalNormal = geometry.getAttribute( 'normal' );\n\n\t\tif ( originalNormal !== undefined && ! this.isNormalizedNormalAttribute( originalNormal ) ) {\n\n\t\t\tconsole.warn( 'THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one.' );\n\n\t\t\tgeometry.setAttribute( 'normal', this.createNormalizedNormalAttribute( originalNormal ) );\n\n\t\t}\n\n\t\t// @QUESTION Detect if .vertexColors = true?\n\t\t// For every attribute create an accessor\n\t\tlet modifiedAttribute = null;\n\n\t\tfor ( let attributeName in geometry.attributes ) {\n\n\t\t\t// Ignore morph target attributes, which are exported later.\n\t\t\tif ( attributeName.substr( 0, 5 ) === 'morph' ) continue;\n\n\t\t\tconst attribute = geometry.attributes[ attributeName ];\n\t\t\tattributeName = nameConversion[ attributeName ] || attributeName.toUpperCase();\n\n\t\t\t// Prefix all geometry attributes except the ones specifically\n\t\t\t// listed in the spec; non-spec attributes are considered custom.\n\t\t\tconst validVertexAttributes =\n\t\t\t\t\t/^(POSITION|NORMAL|TANGENT|TEXCOORD_\\d+|COLOR_\\d+|JOINTS_\\d+|WEIGHTS_\\d+)$/;\n\n\t\t\tif ( ! validVertexAttributes.test( attributeName ) ) attributeName = '_' + attributeName;\n\n\t\t\tif ( cache.attributes.has( this.getUID( attribute ) ) ) {\n\n\t\t\t\tattributes[ attributeName ] = cache.attributes.get( this.getUID( attribute ) );\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\t// JOINTS_0 must be UNSIGNED_BYTE or UNSIGNED_SHORT.\n\t\t\tmodifiedAttribute = null;\n\t\t\tconst array = attribute.array;\n\n\t\t\tif ( attributeName === 'JOINTS_0' &&\n\t\t\t\t! ( array instanceof Uint16Array ) &&\n\t\t\t\t! ( array instanceof Uint8Array ) ) {\n\n\t\t\t\tconsole.warn( 'GLTFExporter: Attribute \"skinIndex\" converted to type UNSIGNED_SHORT.' );\n\t\t\t\tmodifiedAttribute = new BufferAttribute( new Uint16Array( array ), attribute.itemSize, attribute.normalized );\n\n\t\t\t}\n\n\t\t\tconst accessor = this.processAccessor( modifiedAttribute || attribute, geometry );\n\n\t\t\tif ( accessor !== null ) {\n\n\t\t\t\tattributes[ attributeName ] = accessor;\n\t\t\t\tcache.attributes.set( this.getUID( attribute ), accessor );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( originalNormal !== undefined ) geometry.setAttribute( 'normal', originalNormal );\n\n\t\t// Skip if no exportable attributes found\n\t\tif ( Object.keys( attributes ).length === 0 ) return null;\n\n\t\t// Morph targets\n\t\tif ( mesh.morphTargetInfluences !== undefined && mesh.morphTargetInfluences.length > 0 ) {\n\n\t\t\tconst weights = [];\n\t\t\tconst targetNames = [];\n\t\t\tconst reverseDictionary = {};\n\n\t\t\tif ( mesh.morphTargetDictionary !== undefined ) {\n\n\t\t\t\tfor ( const key in mesh.morphTargetDictionary ) {\n\n\t\t\t\t\treverseDictionary[ mesh.morphTargetDictionary[ key ] ] = key;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tfor ( let i = 0; i < mesh.morphTargetInfluences.length; ++ i ) {\n\n\t\t\t\tconst target = {};\n\t\t\t\tlet warned = false;\n\n\t\t\t\tfor ( const attributeName in geometry.morphAttributes ) {\n \n\n\t\t\t\t\t// glTF 2.0 morph supports only POSITION/NORMAL/TANGENT.\n\t\t\t\t\t// Three.js doesn't support TANGENT yet.\n\n\t\t\t\t\tif ( attributeName !== 'position' && attributeName !== 'normal' && attributeName !== 'color' ) {\n\n\t\t\t\t\t\tif ( ! warned ) {\n\n\t\t\t\t\t\t\tconsole.warn( 'GLTFExporter: Only POSITION and NORMAL morph are supported.' );\n\t\t\t\t\t\t\twarned = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst attribute = geometry.morphAttributes[ attributeName ][ i ];\n\t\t\t\t\tlet gltfAttributeName = attributeName.toUpperCase();\n\n if ( nameConversion[ attributeName ] ) {\n\n gltfAttributeName = nameConversion[ attributeName ];\n\n }\n\n\t\t\t\t\t// Three.js morph attribute has absolute values while the one of glTF has relative values.\n\t\t\t\t\t//\n\t\t\t\t\t// glTF 2.0 Specification:\n\t\t\t\t\t// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#morph-targets\n\n\t\t\t\t\tconst baseAttribute = geometry.attributes[ attributeName ];\n\n\t\t\t\t\tif ( cache.attributes.has( this.getUID( attribute ) ) ) {\n\n\t\t\t\t\t\ttarget[ gltfAttributeName ] = cache.attributes.get( this.getUID( attribute ) );\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// Clones attribute not to override\n\t\t\t\t\tconst relativeAttribute = baseAttribute.clone();\n\n\t\t\t\t\tif ( ! geometry.morphTargetsRelative ) {\n\n if (baseAttribute) {\n \n for ( let j = 0, jl = attribute.count; j < jl; j ++ ) {\n\n if (baseAttribute.count > j) {\n\n relativeAttribute.setXYZ(\n j,\n attribute.getX( j ) - baseAttribute.getX( j ),\n attribute.getY( j ) - baseAttribute.getY( j ),\n attribute.getZ( j ) - baseAttribute.getZ( j )\n );\n\n }\n\n }\n\n } else {\n\n for ( let j = 0, jl = attribute.count; j < jl; j ++ ) {\n\n relativeAttribute.setXYZ(\n j,\n 0,\n 0,\n 0\n );\n\n }\n\n }\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttarget[ gltfAttributeName ] = this.processAccessor( relativeAttribute, geometry );\n\t\t\t\t\tcache.attributes.set( this.getUID( baseAttribute ), target[ gltfAttributeName ] );\n\n\t\t\t\t}\n\n\t\t\t\ttargets.push( target );\n\n\t\t\t\tweights.push( mesh.morphTargetInfluences[ i ] );\n\n\t\t\t\tif ( mesh.morphTargetDictionary !== undefined ) targetNames.push( reverseDictionary[ i ] );\n\n\t\t\t}\n\n\t\t\tmeshDef.weights = weights;\n\n\t\t\tif ( targetNames.length > 0 ) {\n\n\t\t\t\tmeshDef.extras = {};\n\t\t\t\tmeshDef.extras.targetNames = targetNames;\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst isMultiMaterial = Array.isArray( mesh.material );\n\n\t\tif ( isMultiMaterial && geometry.groups.length === 0 ) return null;\n\n\t\tconst materials = isMultiMaterial ? mesh.material : [ mesh.material ];\n\t\tconst groups = isMultiMaterial ? geometry.groups : [ { materialIndex: 0, start: undefined, count: undefined } ];\n\n\t\tfor ( let i = 0, il = groups.length; i < il; i ++ ) {\n\n\t\t\tconst primitive = {\n\t\t\t\tmode: mode,\n\t\t\t\tattributes: attributes,\n\t\t\t};\n\n\t\t\tthis.serializeUserData( geometry, primitive );\n\n\t\t\tif ( targets.length > 0 ) primitive.targets = targets;\n\n\t\t\tif ( geometry.index !== null ) {\n\n\t\t\t\tlet cacheKey = this.getUID( geometry.index );\n\n\t\t\t\tif ( groups[ i ].start !== undefined || groups[ i ].count !== undefined ) {\n\n\t\t\t\t\tcacheKey += ':' + groups[ i ].start + ':' + groups[ i ].count;\n\n\t\t\t\t}\n\n\t\t\t\tif ( cache.attributes.has( cacheKey ) ) {\n\n\t\t\t\t\tprimitive.indices = cache.attributes.get( cacheKey );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tprimitive.indices = this.processAccessor( geometry.index, geometry, groups[ i ].start, groups[ i ].count );\n\t\t\t\t\tcache.attributes.set( cacheKey, primitive.indices );\n\n\t\t\t\t}\n\n\t\t\t\tif ( primitive.indices === null ) delete primitive.indices;\n\n\t\t\t}\n\n\t\t\tconst material = this.processMaterial( materials[ groups[ i ].materialIndex ] );\n\n\t\t\tif ( material !== null ) primitive.material = material;\n\n\t\t\tprimitives.push( primitive );\n\n\t\t}\n\n\t\tmeshDef.primitives = primitives;\n\n\t\tif ( ! json.meshes ) json.meshes = [];\n\n\t\tthis._invokeAll( function ( ext ) {\n\n\t\t\text.writeMesh && ext.writeMesh( mesh, meshDef );\n\n\t\t} );\n\n\t\tconst index = json.meshes.push( meshDef ) - 1;\n\t\tcache.meshes.set( meshCacheKey, index );\n\t\treturn index;\n\n\t}\n\n\t/**\n\t * Process camera\n\t * @param {THREE.Camera} camera Camera to process\n\t * @return {Integer} Index of the processed mesh in the \"camera\" array\n\t */\n\tprocessCamera( camera ) {\n\n\t\tconst json = this.json;\n\n\t\tif ( ! json.cameras ) json.cameras = [];\n\n\t\tconst isOrtho = camera.isOrthographicCamera;\n\n\t\tconst cameraDef = {\n\t\t\ttype: isOrtho ? 'orthographic' : 'perspective'\n\t\t};\n\n\t\tif ( isOrtho ) {\n\n\t\t\tcameraDef.orthographic = {\n\t\t\t\txmag: camera.right * 2,\n\t\t\t\tymag: camera.top * 2,\n\t\t\t\tzfar: camera.far <= 0 ? 0.001 : camera.far,\n\t\t\t\tznear: camera.near < 0 ? 0 : camera.near\n\t\t\t};\n\n\t\t} else {\n\n\t\t\tcameraDef.perspective = {\n\t\t\t\taspectRatio: camera.aspect,\n\t\t\t\tyfov: MathUtils.degToRad( camera.fov ),\n\t\t\t\tzfar: camera.far <= 0 ? 0.001 : camera.far,\n\t\t\t\tznear: camera.near < 0 ? 0 : camera.near\n\t\t\t};\n\n\t\t}\n\n\t\t// Question: Is saving \"type\" as name intentional?\n\t\tif ( camera.name !== '' ) cameraDef.name = camera.type;\n\n\t\treturn json.cameras.push( cameraDef ) - 1;\n\n\t}\n\n\t/**\n\t * Creates glTF animation entry from AnimationClip object.\n\t *\n\t * Status:\n\t * - Only properties listed in PATH_PROPERTIES may be animated.\n\t *\n\t * @param {THREE.AnimationClip} clip\n\t * @param {THREE.Object3D} root\n\t * @return {number|null}\n\t */\n\tprocessAnimation( clip, root ) {\n\n\t\tconst json = this.json;\n\t\tconst nodeMap = this.nodeMap;\n\n\t\tif ( ! json.animations ) json.animations = [];\n\n\t\tclip = GLTFExporter.Utils.mergeMorphTargetTracks( clip.clone(), root );\n\n\t\tconst tracks = clip.tracks;\n\t\tconst channels = [];\n\t\tconst samplers = [];\n\n\t\tfor ( let i = 0; i < tracks.length; ++ i ) {\n\n\t\t\tconst track = tracks[ i ];\n\t\t\tconst trackBinding = PropertyBinding.parseTrackName( track.name );\n\t\t\tlet trackNode = PropertyBinding.findNode( root, trackBinding.nodeName );\n\t\t\tconst trackProperty = PATH_PROPERTIES[ trackBinding.propertyName ];\n\n\t\t\tif ( trackBinding.objectName === 'bones' ) {\n\n\t\t\t\tif ( trackNode.isSkinnedMesh === true ) {\n\n\t\t\t\t\ttrackNode = trackNode.skeleton.getBoneByName( trackBinding.objectIndex );\n\n\t\t\t\t} else {\n\n\t\t\t\t\ttrackNode = undefined;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( ! trackNode || ! trackProperty ) {\n\n\t\t\t\tconsole.warn( 'THREE.GLTFExporter: Could not export animation track \"%s\".', track.name );\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t\tconst inputItemSize = 1;\n\t\t\tlet outputItemSize = track.values.length / track.times.length;\n\n\t\t\tif ( trackProperty === PATH_PROPERTIES.morphTargetInfluences ) {\n\n\t\t\t\toutputItemSize /= trackNode.morphTargetInfluences.length;\n\n\t\t\t}\n\n\t\t\tlet interpolation;\n\n\t\t\t// @TODO export CubicInterpolant(InterpolateSmooth) as CUBICSPLINE\n\n\t\t\t// Detecting glTF cubic spline interpolant by checking factory method's special property\n\t\t\t// GLTFCubicSplineInterpolant is a custom interpolant and track doesn't return\n\t\t\t// valid value from .getInterpolation().\n\t\t\tif ( track.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline === true ) {\n\n\t\t\t\tinterpolation = 'CUBICSPLINE';\n\n\t\t\t\t// itemSize of CUBICSPLINE keyframe is 9\n\t\t\t\t// (VEC3 * 3: inTangent, splineVertex, and outTangent)\n\t\t\t\t// but needs to be stored as VEC3 so dividing by 3 here.\n\t\t\t\toutputItemSize /= 3;\n\n\t\t\t} else if ( track.getInterpolation() === InterpolateDiscrete ) {\n\n\t\t\t\tinterpolation = 'STEP';\n\n\t\t\t} else {\n\n\t\t\t\tinterpolation = 'LINEAR';\n\n\t\t\t}\n\n\t\t\tsamplers.push( {\n\t\t\t\tinput: this.processAccessor( new BufferAttribute( track.times, inputItemSize ) ),\n\t\t\t\toutput: this.processAccessor( new BufferAttribute( track.values, outputItemSize ) ),\n\t\t\t\tinterpolation: interpolation\n\t\t\t} );\n\n\t\t\tchannels.push( {\n\t\t\t\tsampler: samplers.length - 1,\n\t\t\t\ttarget: {\n\t\t\t\t\tnode: nodeMap.get( trackNode ),\n\t\t\t\t\tpath: trackProperty\n\t\t\t\t}\n\t\t\t} );\n\n\t\t}\n\n\t\tjson.animations.push( {\n\t\t\tname: clip.name || 'clip_' + json.animations.length,\n\t\t\tsamplers: samplers,\n\t\t\tchannels: channels\n\t\t} );\n\n\t\treturn json.animations.length - 1;\n\n\t}\n\n\t/**\n\t * @param {THREE.Object3D} object\n\t * @return {number|null}\n\t */\n\t processSkin( object ) {\n\n\t\tconst json = this.json;\n\t\tconst nodeMap = this.nodeMap;\n\n\t\tconst node = json.nodes[ nodeMap.get( object ) ];\n\n\t\tconst skeleton = object.skeleton;\n\n\t\tif ( skeleton === undefined ) return null;\n\n\t\tconst rootJoint = object.skeleton.bones[ 0 ];\n\n\t\tif ( rootJoint === undefined ) return null;\n\n\t\tconst joints = [];\n\t\tconst inverseBindMatrices = new Float32Array( skeleton.bones.length * 16 );\n\t\tconst temporaryBoneInverse = new Matrix4();\n\n\t\tfor ( let i = 0; i < skeleton.bones.length; ++ i ) {\n\n\t\t\tjoints.push( nodeMap.get( skeleton.bones[ i ] ) );\n\t\t\ttemporaryBoneInverse.copy( skeleton.boneInverses[ i ] );\n\t\t\ttemporaryBoneInverse.multiply( object.bindMatrix ).toArray( inverseBindMatrices, i * 16 );\n\n\t\t}\n\n\t\tif ( json.skins === undefined ) json.skins = [];\n\n\t\tjson.skins.push( {\n\t\t\tinverseBindMatrices: this.processAccessor( new BufferAttribute( inverseBindMatrices, 16 ) ),\n\t\t\tjoints: joints,\n\t\t\tskeleton: nodeMap.get( rootJoint )\n\t\t} );\n\n\t\tconst skinIndex = node.skin = json.skins.length - 1;\n\n\t\treturn skinIndex;\n\n\t}\n\n\t/**\n\t * Process Object3D node\n\t * @param {THREE.Object3D} node Object3D to processNode\n\t * @return {Integer} Index of the node in the nodes list\n\t */\n\tprocessNode( object ) {\n\n\t\tconst json = this.json;\n\t\tconst options = this.options;\n\t\tconst nodeMap = this.nodeMap;\n\n\t\tif ( ! json.nodes ) json.nodes = [];\n\n\t\tconst nodeDef = {};\n\n\t\tif ( options.trs ) {\n\n\t\t\tconst rotation = object.quaternion.toArray();\n\t\t\tconst position = object.position.toArray();\n\t\t\tconst scale = object.scale.toArray();\n\n\t\t\tif ( ! equalArray( rotation, [ 0, 0, 0, 1 ] ) ) {\n\n\t\t\t\tnodeDef.rotation = rotation;\n\n\t\t\t}\n\n\t\t\tif ( ! equalArray( position, [ 0, 0, 0 ] ) ) {\n\n\t\t\t\tnodeDef.translation = position;\n\n\t\t\t}\n\n\t\t\tif ( ! equalArray( scale, [ 1, 1, 1 ] ) ) {\n\n\t\t\t\tnodeDef.scale = scale;\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif ( object.matrixAutoUpdate ) {\n\n\t\t\t\tobject.updateMatrix();\n\n\t\t\t}\n\n\t\t\tif ( isIdentityMatrix( object.matrix ) === false ) {\n\n\t\t\t\tnodeDef.matrix = object.matrix.elements;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// We don't export empty strings name because it represents no-name in Three.js.\n\t\tif ( object.name !== '' ) nodeDef.name = String( object.name );\n\n\t\tthis.serializeUserData( object, nodeDef );\n\n\t\tif ( object.isMesh || object.isLine || object.isPoints ) {\n\n\t\t\tconst meshIndex = this.processMesh( object );\n\n\t\t\tif ( meshIndex !== null ) nodeDef.mesh = meshIndex;\n\n\t\t} else if ( object.isCamera ) {\n\n\t\t\tnodeDef.camera = this.processCamera( object );\n\n\t\t}\n\n\t\tif ( object.isSkinnedMesh ) this.skins.push( object );\n\n\t\tif ( object.children.length > 0 ) {\n\n\t\t\tconst children = [];\n\n\t\t\tfor ( let i = 0, l = object.children.length; i < l; i ++ ) {\n\n\t\t\t\tconst child = object.children[ i ];\n\n\t\t\t\tif ( child.visible || options.onlyVisible === false ) {\n\n\t\t\t\t\tconst nodeIndex = this.processNode( child );\n\n\t\t\t\t\tif ( nodeIndex !== null ) children.push( nodeIndex );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( children.length > 0 ) nodeDef.children = children;\n\n\t\t}\n\n\t\tthis._invokeAll( function ( ext ) {\n\n\t\t\text.writeNode && ext.writeNode( object, nodeDef );\n\n\t\t} );\n\n\t\tconst nodeIndex = json.nodes.push( nodeDef ) - 1;\n\t\tnodeMap.set( object, nodeIndex );\n\t\treturn nodeIndex;\n\n\t}\n\n\t/**\n\t * Process Scene\n\t * @param {Scene} node Scene to process\n\t */\n\tprocessScene( scene ) {\n\n\t\tconst json = this.json;\n\t\tconst options = this.options;\n\n\t\tif ( ! json.scenes ) {\n\n\t\t\tjson.scenes = [];\n\t\t\tjson.scene = 0;\n\n\t\t}\n\n\t\tconst sceneDef = {};\n\n\t\tif ( scene.name !== '' ) sceneDef.name = scene.name;\n\n\t\tjson.scenes.push( sceneDef );\n\n\t\tconst nodes = [];\n\n\t\tfor ( let i = 0, l = scene.children.length; i < l; i ++ ) {\n\n\t\t\tconst child = scene.children[ i ];\n\n\t\t\tif ( child.visible || options.onlyVisible === false ) {\n\n\t\t\t\tconst nodeIndex = this.processNode( child );\n\n\t\t\t\tif ( nodeIndex !== null ) nodes.push( nodeIndex );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( nodes.length > 0 ) sceneDef.nodes = nodes;\n\n\t\tthis.serializeUserData( scene, sceneDef );\n\n\t}\n\n\t/**\n\t * Creates a Scene to hold a list of objects and parse it\n\t * @param {Array} objects List of objects to process\n\t */\n\tprocessObjects( objects ) {\n\n\t\tconst scene = new Scene();\n\t\tscene.name = 'AuxScene';\n\n\t\tfor ( let i = 0; i < objects.length; i ++ ) {\n\n\t\t\t// We push directly to children instead of calling `add` to prevent\n\t\t\t// modify the .parent and break its original scene and hierarchy\n\t\t\tscene.children.push( objects[ i ] );\n\n\t\t}\n\n\t\tthis.processScene( scene );\n\n\t}\n\n\t/**\n\t * @param {THREE.Object3D|Array} input\n\t */\n\tprocessInput( input ) {\n\n\t\tconst options = this.options;\n\n\t\tinput = input instanceof Array ? input : [ input ];\n\n\t\tthis._invokeAll( function ( ext ) {\n\n\t\t\text.beforeParse && ext.beforeParse( input );\n\n\t\t} );\n\n\t\tconst objectsWithoutScene = [];\n\n\t\tfor ( let i = 0; i < input.length; i ++ ) {\n\n\t\t\tif ( input[ i ] instanceof Scene ) {\n\n\t\t\t\tthis.processScene( input[ i ] );\n\n\t\t\t} else {\n\n\t\t\t\tobjectsWithoutScene.push( input[ i ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( objectsWithoutScene.length > 0 ) this.processObjects( objectsWithoutScene );\n\n\t\tfor ( let i = 0; i < this.skins.length; ++ i ) {\n\n\t\t\tthis.processSkin( this.skins[ i ] );\n\n\t\t}\n\n\t\tfor ( let i = 0; i < options.animations.length; ++ i ) {\n\n\t\t\tthis.processAnimation( options.animations[ i ].clip, options.animations[i].mesh);\n\n\t\t}\n\n\t\tthis._invokeAll( function ( ext ) {\n\n\t\t\text.afterParse && ext.afterParse( input );\n\n\t\t} );\n\n\t}\n\n\t_invokeAll( func ) {\n\n\t\tfor ( let i = 0, il = this.plugins.length; i < il; i ++ ) {\n\n\t\t\tfunc( this.plugins[ i ] );\n\n\t\t}\n\n\t}\n\n}\n\n/**\n * Punctual Lights Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_lights_punctual\n */\nclass GLTFLightExtension {\n\n\tconstructor( writer ) {\n\n\t\tthis.writer = writer;\n\t\tthis.name = 'KHR_lights_punctual';\n\n\t}\n\n\twriteNode( light, nodeDef ) {\n\n\t\tif ( ! light.isLight ) return;\n\n\t\tif ( ! light.isDirectionalLight && ! light.isPointLight && ! light.isSpotLight ) {\n\n\t\t\tconsole.warn( 'THREE.GLTFExporter: Only directional, point, and spot lights are supported.', light );\n\t\t\treturn;\n\n\t\t}\n\n\t\tconst writer = this.writer;\n\t\tconst json = writer.json;\n\t\tconst extensionsUsed = writer.extensionsUsed;\n\n\t\tconst lightDef = {};\n\n\t\tif ( light.name ) lightDef.name = light.name;\n\n\t\tlightDef.color = light.color.toArray();\n\n\t\tlightDef.intensity = light.intensity;\n\n\t\tif ( light.isDirectionalLight ) {\n\n\t\t\tlightDef.type = 'directional';\n\n\t\t} else if ( light.isPointLight ) {\n\n\t\t\tlightDef.type = 'point';\n\n\t\t\tif ( light.distance > 0 ) lightDef.range = light.distance;\n\n\t\t} else if ( light.isSpotLight ) {\n\n\t\t\tlightDef.type = 'spot';\n\n\t\t\tif ( light.distance > 0 ) lightDef.range = light.distance;\n\n\t\t\tlightDef.spot = {};\n\t\t\tlightDef.spot.innerConeAngle = ( light.penumbra - 1.0 ) * light.angle * - 1.0;\n\t\t\tlightDef.spot.outerConeAngle = light.angle;\n\n\t\t}\n\n\t\tif ( light.decay !== undefined && light.decay !== 2 ) {\n\n\t\t\tconsole.warn( 'THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, '\n\t\t\t\t+ 'and expects light.decay=2.' );\n\n\t\t}\n\n\t\tif ( light.target\n\t\t\t\t&& ( light.target.parent !== light\n\t\t\t\t|| light.target.position.x !== 0\n\t\t\t\t|| light.target.position.y !== 0\n\t\t\t\t|| light.target.position.z !== - 1 ) ) {\n\n\t\t\tconsole.warn( 'THREE.GLTFExporter: Light direction may be lost. For best results, '\n\t\t\t\t+ 'make light.target a child of the light with position 0,0,-1.' );\n\n\t\t}\n\n\t\tif ( ! extensionsUsed[ this.name ] ) {\n\n\t\t\tjson.extensions = json.extensions || {};\n\t\t\tjson.extensions[ this.name ] = { lights: [] };\n\t\t\textensionsUsed[ this.name ] = true;\n\n\t\t}\n\n\t\tconst lights = json.extensions[ this.name ].lights;\n\t\tlights.push( lightDef );\n\n\t\tnodeDef.extensions = nodeDef.extensions || {};\n\t\tnodeDef.extensions[ this.name ] = { light: lights.length - 1 };\n\n\t}\n\n}\n\n/**\n * Unlit Materials Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit\n */\nclass GLTFMaterialsUnlitExtension {\n\n\tconstructor( writer ) {\n\n\t\tthis.writer = writer;\n\t\tthis.name = 'KHR_materials_unlit';\n\n\t}\n\n\twriteMaterial( material, materialDef ) {\n\n\t\tif ( ! material.isMeshBasicMaterial ) return;\n\n\t\tconst writer = this.writer;\n\t\tconst extensionsUsed = writer.extensionsUsed;\n\n\t\tmaterialDef.extensions = materialDef.extensions || {};\n\t\tmaterialDef.extensions[ this.name ] = {};\n\n\t\textensionsUsed[ this.name ] = true;\n\n\t\tmaterialDef.pbrMetallicRoughness.metallicFactor = 0.0;\n\t\tmaterialDef.pbrMetallicRoughness.roughnessFactor = 0.9;\n\n\t}\n\n}\n\n/**\n * Specular-Glossiness Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness\n */\nclass GLTFMaterialsPBRSpecularGlossiness {\n\n\tconstructor( writer ) {\n\n\t\tthis.writer = writer;\n\t\tthis.name = 'KHR_materials_pbrSpecularGlossiness';\n\n\t}\n\n\twriteMaterial( material, materialDef ) {\n\n\t\tif ( ! material.isGLTFSpecularGlossinessMaterial ) return;\n\n\t\tconst writer = this.writer;\n\t\tconst extensionsUsed = writer.extensionsUsed;\n\n\t\tconst extensionDef = {};\n\n\t\tif ( materialDef.pbrMetallicRoughness.baseColorFactor ) {\n\n\t\t\textensionDef.diffuseFactor = materialDef.pbrMetallicRoughness.baseColorFactor;\n\n\t\t}\n\n\t\tconst specularFactor = [ 1, 1, 1 ];\n\t\tmaterial.specular.toArray( specularFactor, 0 );\n\t\textensionDef.specularFactor = specularFactor;\n\t\textensionDef.glossinessFactor = material.glossiness;\n\n\t\tif ( materialDef.pbrMetallicRoughness.baseColorTexture ) {\n\n\t\t\textensionDef.diffuseTexture = materialDef.pbrMetallicRoughness.baseColorTexture;\n\n\t\t}\n\n\t\tif ( material.specularMap ) {\n\n\t\t\tconst specularMapDef = { index: writer.processTexture( material.specularMap ) };\n\t\t\twriter.applyTextureTransform( specularMapDef, material.specularMap );\n\t\t\textensionDef.specularGlossinessTexture = specularMapDef;\n\n\t\t}\n\n\t\tmaterialDef.extensions = materialDef.extensions || {};\n\t\tmaterialDef.extensions[ this.name ] = extensionDef;\n\t\textensionsUsed[ this.name ] = true;\n\n\t}\n\n}\n\n/**\n * Static utility functions\n */\nGLTFExporter.Utils = {\n\n\tinsertKeyframe: function ( track, time ) {\n\n\t\tconst tolerance = 0.001; // 1ms\n\t\tconst valueSize = track.getValueSize();\n\n\t\tconst times = new track.TimeBufferType( track.times.length + 1 );\n\t\tconst values = new track.ValueBufferType( track.values.length + valueSize );\n\t\tconst interpolant = track.createInterpolant( new track.ValueBufferType( valueSize ) );\n\n\t\tlet index;\n\n\t\tif ( track.times.length === 0 ) {\n\n\t\t\ttimes[ 0 ] = time;\n\n\t\t\tfor ( let i = 0; i < valueSize; i ++ ) {\n\n\t\t\t\tvalues[ i ] = 0;\n\n\t\t\t}\n\n\t\t\tindex = 0;\n\n\t\t} else if ( time < track.times[ 0 ] ) {\n\n\t\t\tif ( Math.abs( track.times[ 0 ] - time ) < tolerance ) return 0;\n\n\t\t\ttimes[ 0 ] = time;\n\t\t\ttimes.set( track.times, 1 );\n\n\t\t\tvalues.set( interpolant.evaluate( time ), 0 );\n\t\t\tvalues.set( track.values, valueSize );\n\n\t\t\tindex = 0;\n\n\t\t} else if ( time > track.times[ track.times.length - 1 ] ) {\n\n\t\t\tif ( Math.abs( track.times[ track.times.length - 1 ] - time ) < tolerance ) {\n\n\t\t\t\treturn track.times.length - 1;\n\n\t\t\t}\n\n\t\t\ttimes[ times.length - 1 ] = time;\n\t\t\ttimes.set( track.times, 0 );\n\n\t\t\tvalues.set( track.values, 0 );\n\t\t\tvalues.set( interpolant.evaluate( time ), track.values.length );\n\n\t\t\tindex = times.length - 1;\n\n\t\t} else {\n\n\t\t\tfor ( let i = 0; i < track.times.length; i ++ ) {\n\n\t\t\t\tif ( Math.abs( track.times[ i ] - time ) < tolerance ) return i;\n\n\t\t\t\tif ( track.times[ i ] < time && track.times[ i + 1 ] > time ) {\n\n\t\t\t\t\ttimes.set( track.times.slice( 0, i + 1 ), 0 );\n\t\t\t\t\ttimes[ i + 1 ] = time;\n\t\t\t\t\ttimes.set( track.times.slice( i + 1 ), i + 2 );\n\n\t\t\t\t\tvalues.set( track.values.slice( 0, ( i + 1 ) * valueSize ), 0 );\n\t\t\t\t\tvalues.set( interpolant.evaluate( time ), ( i + 1 ) * valueSize );\n\t\t\t\t\tvalues.set( track.values.slice( ( i + 1 ) * valueSize ), ( i + 2 ) * valueSize );\n\n\t\t\t\t\tindex = i + 1;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\ttrack.times = times;\n\t\ttrack.values = values;\n\n\t\treturn index;\n\n\t},\n\n\tmergeMorphTargetTracks: function ( clip, root ) {\n\n\t\tconst tracks = [];\n\t\tconst mergedTracks = {};\n\t\tconst sourceTracks = clip.tracks;\n\n\t\tfor ( let i = 0; i < sourceTracks.length; ++ i ) {\n\n\t\t\tlet sourceTrack = sourceTracks[ i ];\n\t\t\tconst sourceTrackBinding = PropertyBinding.parseTrackName( sourceTrack.name );\n\t\t\tconst sourceTrackNode = PropertyBinding.findNode( root, sourceTrackBinding.nodeName );\n\n\t\t\tif ( sourceTrackBinding.propertyName !== 'morphTargetInfluences' || sourceTrackBinding.propertyIndex === undefined ) {\n\n\t\t\t\t// Tracks that don't affect morph targets, or that affect all morph targets together, can be left as-is.\n\t\t\t\ttracks.push( sourceTrack );\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\tif ( sourceTrack.createInterpolant !== sourceTrack.InterpolantFactoryMethodDiscrete\n\t\t\t\t&& sourceTrack.createInterpolant !== sourceTrack.InterpolantFactoryMethodLinear ) {\n\n\t\t\t\tif ( sourceTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline ) {\n\n\t\t\t\t\t// This should never happen, because glTF morph target animations\n\t\t\t\t\t// affect all targets already.\n\t\t\t\t\tthrow new Error( 'THREE.GLTFExporter: Cannot merge tracks with glTF CUBICSPLINE interpolation.' );\n\n\t\t\t\t}\n\n\t\t\t\tconsole.warn( 'THREE.GLTFExporter: Morph target interpolation mode not yet supported. Using LINEAR instead.' );\n\n\t\t\t\tsourceTrack = sourceTrack.clone();\n\t\t\t\tsourceTrack.setInterpolation( InterpolateLinear );\n\n\t\t\t}\n\n\t\t\tconst targetCount = sourceTrackNode.morphTargetInfluences.length;\n\t\t\tconst targetIndex = sourceTrackNode.morphTargetDictionary[ sourceTrackBinding.propertyIndex ];\n\n\t\t\tif ( targetIndex === undefined ) {\n\n\t\t\t\tthrow new Error( 'THREE.GLTFExporter: Morph target name not found: ' + sourceTrackBinding.propertyIndex );\n\n\t\t\t}\n\n\t\t\tlet mergedTrack;\n\n\t\t\t// If this is the first time we've seen this object, create a new\n\t\t\t// track to store merged keyframe data for each morph target.\n\t\t\tif ( mergedTracks[ sourceTrackNode.uuid ] === undefined ) {\n\n\t\t\t\tmergedTrack = sourceTrack.clone();\n\n\t\t\t\tconst values = new mergedTrack.ValueBufferType( targetCount * mergedTrack.times.length );\n\n\t\t\t\tfor ( let j = 0; j < mergedTrack.times.length; j ++ ) {\n\n\t\t\t\t\tvalues[ j * targetCount + targetIndex ] = mergedTrack.values[ j ];\n\n\t\t\t\t}\n\n\t\t\t\t// We need to take into consideration the intended target node\n\t\t\t\t// of our original un-merged morphTarget animation.\n\t\t\t\tmergedTrack.name = ( sourceTrackBinding.nodeName || '' ) + '.morphTargetInfluences';\n\t\t\t\tmergedTrack.values = values;\n\n\t\t\t\tmergedTracks[ sourceTrackNode.uuid ] = mergedTrack;\n\t\t\t\ttracks.push( mergedTrack );\n\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\tconst sourceInterpolant = sourceTrack.createInterpolant( new sourceTrack.ValueBufferType( 1 ) );\n\n\t\t\tmergedTrack = mergedTracks[ sourceTrackNode.uuid ];\n\n\t\t\t// For every existing keyframe of the merged track, write a (possibly\n\t\t\t// interpolated) value from the source track.\n\t\t\tfor ( let j = 0; j < mergedTrack.times.length; j ++ ) {\n\n\t\t\t\tmergedTrack.values[ j * targetCount + targetIndex ] = sourceInterpolant.evaluate( mergedTrack.times[ j ] );\n\n\t\t\t}\n\n\t\t\t// For every existing keyframe of the source track, write a (possibly\n\t\t\t// new) keyframe to the merged track. Values from the previous loop may\n\t\t\t// be written again, but keyframes are de-duplicated.\n\t\t\tfor ( let j = 0; j < sourceTrack.times.length; j ++ ) {\n\n\t\t\t\tconst keyframeIndex = this.insertKeyframe( mergedTrack, sourceTrack.times[ j ] );\n\t\t\t\tmergedTrack.values[ keyframeIndex * targetCount + targetIndex ] = sourceTrack.values[ j ];\n\n\t\t\t}\n\n\t\t}\n\n\t\tclip.tracks = tracks;\n\n\t\treturn clip;\n\n\t}\n\n};\n\nexport { GLTFExporter };\n","const THREE = require('three');\nconst resolveURL = require('./utilities').resolveURL;\n\n/**\n * Object with containg viewport information used in ZincJS.\n * \n * @class\n * @author Alan Wu\n * @return {Viewport}\n */\nconst Viewport = function () {\n /** @property {Number} */\n\tthis.nearPlane = 0.168248;\n /** @property {Number} */\n\tthis.farPlane = 6.82906;\n /**@property {Array} */\n\tthis.eyePosition = [0.5, -2.86496, 0.5];\n /** @property {Array} */\n\tthis.targetPosition = [0.5, 0.5, 0.5];\n /** @property {Array} */\n\tthis.upVector = [ 0.0, 0.0, 1.0];\n\tconst _this = this;\n\n this.setFromObject = ({ nearPlane, farPlane, eyePosition, targetPosition, upVector }) => {\n _this.nearPlane = nearPlane;\n _this.farPlane = farPlane;\n _this.eyePosition = eyePosition;\n _this.targetPosition = targetPosition;\n _this.upVector = upVector;\n }\n};\n\n/**\n * Provides the basic controls for a scene.\n * \n * @class\n * @author Alan Wu\n * @return {CameraControls}\n */\nconst CameraControls = function ( object, domElement, renderer, scene ) {\n\tconst MODE = { NONE: -1, DEFAULT: 0, PATH: 1, SMOOTH_CAMERA_TRANSITION: 2, AUTO_TUMBLE: 3, ROTATE_TRANSITION: 4, MINIMAP: 5, SYNC_CONTROL: 6 };\n /** \n * Actions states.\n * Available states are NONE, ROTATE, ZOOM, PAN, TOUCH_ROTATE, TOUCH_ZOOM, TOUCH_PAN and SCROLL.\n * @property {Object} \n */\n\tconst STATE = { NONE: -1, ROTATE: 0, ZOOM: 1, PAN: 2, TOUCH_ROTATE: 3, TOUCH_ZOOM: 4, TOUCH_PAN: 5, SCROLL: 6 };\n const ROTATE_DIRECTION = { NONE: -1, FREE: 1, HORIZONTAL: 2, VERTICAL: 3 };\n /** \n * Available click actions are MAIN, AUXILIARY and SECONARY.\n * @property {Object} \n */\n\tconst CLICK_ACTION = {};\n\tCLICK_ACTION.MAIN = STATE.ROTATE;\n\tCLICK_ACTION.AUXILIARY = STATE.ZOOM;\n\tCLICK_ACTION.SECONDARY = STATE.PAN;\n\tthis.cameraObject = object;\n\tthis.domElement = ( domElement !== undefined ) ? domElement : document;\n\tthis.renderer = renderer;\n\tthis.scene = scene ;\n\tthis.tumble_rate = 1.5;\n\tthis.pointer_x = 0;\n\tthis.pointer_y = 0;\n\tthis.pointer_x_start = 0;\n\tthis.pointer_y_start = 0;\n\tthis.previous_pointer_x = 0;\n\tthis.previous_pointer_y = 0;\n\tthis.near_plane_fly_debt = 0.0;\n\tthis.touchZoomDistanceStart = 0;\n\tthis.touchZoomDistanceEnd = 0;\n\tthis.directionalLight = 0;\n\tthis.scrollRate = 50;\n\tthis.pixelHeight = 1;\n\tlet duration = 6000;\n let enabled = true;\n\tlet inbuildTime = 0;\n\tlet cameraPath = undefined;\n\tlet numberOfCameraPoint = undefined;\n\tlet updateLightWithPathFlag = false;\n\tlet playRate = 500;\n\tlet deviceOrientationControl = undefined;\n\tlet defaultViewport = \"default\";\n\tlet currentMode = MODE.DEFAULT;\n\tlet smoothCameraTransitionObject = undefined;\n\tlet rotateCameraTransitionObject = undefined;\n\tlet cameraAutoTumbleObject = undefined;\n\tlet mouseScroll = 0;\n let rotateMode = ROTATE_DIRECTION.FREE;\n\tthis._state = STATE.NONE;\n\tlet zincRayCaster = undefined;\n\tthis.targetTouchId = -1;\n let rect = undefined;\n const _a = new THREE.Vector3();\n const _b = new THREE.Vector3();\n const _c = new THREE.Vector3();\n const _new_b = new THREE.Vector3();\n const _new_c = new THREE.Vector3();\n const _axis = new THREE.Vector3();\n const _v = new THREE.Vector3();\n const _rel_eye = new THREE.Vector3();\n const sceneSphere = new THREE.Sphere();\n const _tempEye = new THREE.Vector3();\n let ndcControl = undefined;\n let maxDist = 0;\n const viewports = {\n \"default\" : new Viewport()\n };\n viewports.default.nearPlane = 0.1;\n\tviewports.default.farPlane = 2000;\n\tviewports.default.eyePosition = [0, 0, 0];\n\tviewports.default.targetPosition = [0, 0, -1.0];\n\tviewports.default.upVector = [ 0.0, 1.0, 0.0];\n\n //Add the target property\n\tif (this.cameraObject.target === undefined)\n\t\tthis.cameraObject.target = new THREE.Vector3( ...viewports.default.targetPosition );\n\n //Calculate the max distanc allowed, it is the longer\n //of 6 times the radius of the current scene and\n //the current distance between scene centroid and the postion\n //of the camera.\n this.calculateMaxAllowedDistance = (scene) => {\n const box = scene.getBoundingBox();\n if (box) {\n box.getBoundingSphere(sceneSphere);\n maxDist = sceneSphere.radius * 6;\n let currentDist = 0;\n if (this.cameraObject) {\n currentDist = this.cameraObject.position.distanceTo(sceneSphere.center);\n }\n maxDist = currentDist > maxDist ? currentDist : maxDist;\n } else {\n maxDist = 0;\n }\n }\n\n /**\n * Add a viewport to the list of available named viewports.\n * \n * @param {String} name - Name of the viewport\n * @param {Viewport} viewportName - Viewport to be added\n */\n this.addViewport = (viewportName, viewport) => {\n if (viewportName && viewport)\n viewports[viewportName] = viewport;\n }\n\n /**\n * Set the default viewport for this {@link CameraControls}.\n * \n * @param {String} defaultName - Name of the viewport\n * \n * @return {Boolean} true if set successfully, false otherwise.\n */\n this.setDefaultViewport = defaultName => {\n\t\tif (defaultName && (defaultName in viewports)) {\n defaultViewport = defaultName;\n return true;\n }\n return false\n\t}\n\n /**\n * Get the name of the default viewport.\n * \n * \n * @return {String}\n */\n this.getDefaultViewport = () => {\n\t\treturn defaultViewport;\n\t}\n\t\n /**\n * Get the viewport with the provied name stored in this object.\n * @param {String} name - Name of the viewport\n * \n * @return {Viewport}\n */\n\tthis.getViewportOfName = name => {\n\t\treturn viewports[name];\n\t}\n\n /**\n * Set the viewport with a name if it is found in the list.\n * @param {String} name - Name of the viewport\n * \n * @return {Boolean} if viewport is found and set, otherwise false.\n */\n this.setCurrentViewport = name => {\n if (name in viewports) {\n this.setCurrentCameraSettings(viewports[name])\n return true;\n }\n return false;\n\t}\n\n /**\n * Set the direction of rotation allowed with this control.\n * \n * @param {String} mode - available options are none, horizontal,\n * vertical and free.\n */\n this.setRotationMode = mode => {\n switch (mode) {\n case \"none\":\n rotateMode = ROTATE_DIRECTION.NONE;\n break;\n case \"horizontal\":\n rotateMode = ROTATE_DIRECTION.HORIZONTAL;\n break;\n case \"vertical\":\n rotateMode = ROTATE_DIRECTION.VERTICAL;\n break;\n case \"free\":\n default:\n rotateMode = ROTATE_DIRECTION.FREE;\n }\n }\n\t\n\tthis.onResize = () => {\n\t\tif (rect)\n\t\t\trect = undefined;\n if (ndcControl)\n ndcControl.setCurrentCameraSettings(this.cameraObject,\n viewports[defaultViewport]);\n\t}\n\n\tthis.getVisibleHeightAtZDepth = ( depth ) => {\n\t\t// compensate for cameras not positioned at z=0\n\t\t\n\t\tconst cameraOffset = this.cameraObject.position.distanceTo(this.cameraObject.target);\n\t\tif ( depth < cameraOffset ) depth -= cameraOffset;\n\t\telse depth += cameraOffset;\n\t\n\t\t// vertical fov in radians\n\t\tconst vFOV = this.cameraObject.fov * Math.PI / 180; \n\t\n\t\t// Math.abs to ensure the result is always positive\n\t\treturn 2 * Math.tan( vFOV / 2 ) * Math.abs( depth );\n\t};\n\n\tthis.calculateHeightPerPixelAtZeroDepth = ( wHeight ) => {\n\t\tconst height = this.getVisibleHeightAtZDepth(0);\n\t\tthis.pixelHeight = height / wHeight;\n\t\treturn this.pixelHeight;\n\t}\n\n /**\n * Get normalised coordinates from windows coordinates.\n * \n * @param {String} x\n * @param {String} y\n * @param {THREE.Vector2} positionIn - Optional, write the value into\n * this object if it is provided, otherwise a new object will \n * be created and returned.\n * \n * @return {THREE.Vector2} containing the normalised x and y coordinates.\n */\n this.getNDCFromDocumentCoords = (x, y, positionIn) => {\n updateRect(false);\n const position = positionIn ? positionIn : new THREE.Vector2();\n const out_x = ((x - rect.left) / rect.width) * 2 - 1;\n const out_y = -((y - rect.top) / rect.height) * 2 + 1;\n return position.set(out_x, out_y);\n }\n\n /**\n * Get the relative windows coordinates from normalised coordiantes.\n * \n * @param {String} x \n * @param {String} y\n * @param {THREE.Vector2} positionIn - Optional, write the value into\n * this object if it is provided, otherwise a new object will \n * be created and returned.\n * \n * @return {THREE.Vector2} containing the relative x and y coordinates.\n */\n this.getRelativeCoordsFromNDC = (x, y, positionIn) => {\n updateRect(false);\n const position = positionIn ? positionIn : new THREE.Vector2();\n position.x = (x + 1) * rect.width / 2.0;\n position.y = (1 - y) * rect.height / 2.0;\n return position;\n }\n\n /**\n * Map a mouse click to the specified action.\n * \n * @param {String} buttonName - please see {@link CLICK_ACTION}\n * @param {String} actionName - please see {@link STATE}\n */\n\tthis.setMouseButtonAction = (buttonName, actionName) => {\n\t\tCLICK_ACTION[buttonName] = STATE[actionName];\n }\n\n //Make sure the camera does not travel beyond limit\n const checkTravelDistance = () => {\n if (maxDist > 0) {\n const newDist = _tempEye.distanceTo(sceneSphere.center);\n return (maxDist > newDist || \n this.cameraObject.position.distanceTo(sceneSphere.center) > newDist );\n }\n return true;\n }\n \n const translateViewport = translation => {\n _tempEye.copy(this.cameraObject.position).add(translation);\n if (checkTravelDistance()) {\n this.cameraObject.target.add(translation);\n this.cameraObject.position.add(translation);\n this.updateDirectionalLight();\n }\n }\n\t\n\tconst onDocumentMouseDown = event => {\n updateRect(false);\n // Check if mouse event hapens inside the minimap\n let minimapCoordinates = undefined;\n if (currentMode === MODE.DEFAULT)\n minimapCoordinates = this.scene.getNormalisedMinimapCoordinates(\n this.renderer, event);\n if (!minimapCoordinates) {\n if (event.button == 0) {\n if (event.ctrlKey)\n this._state = CLICK_ACTION.AUXILIARY;\n else if (event.shiftKey)\n this._state = CLICK_ACTION.SECONDARY;\n else\n this._state = CLICK_ACTION.MAIN;\n } else if (event.button == 1) {\n event.preventDefault();\n this._state = CLICK_ACTION.AUXILIARY;\n } \n else if (event.button == 2) {\n this._state = CLICK_ACTION.SECONDARY;\n }\n this.pointer_x = event.clientX - rect.left;\n this.pointer_y = event.clientY - rect.top;\n this.pointer_x_start = this.pointer_x;\n this.pointer_y_start = this.pointer_y;\n this.previous_pointer_x = this.pointer_x;\n this.previous_pointer_y= this.pointer_y;\n } else {\n currentMode = MODE.MINIMAP;\n let translation = this.scene.getMinimapDiffFromNormalised(\n minimapCoordinates.x, minimapCoordinates.y);\n translateViewport(translation);\n }\n }\n\n\tconst onDocumentMouseMove = event => {\n updateRect(false);\n\t\tif (rect) {\n\t\t\tthis.pointer_x = event.clientX - rect.left;\n\t\t\tthis.pointer_y = event.clientY - rect.top;\n\t\t\tif (currentMode === MODE.MINIMAP) {\n\t\t\t\tlet minimapCoordinates = this.scene.getNormalisedMinimapCoordinates(this.renderer, event);\n\t\t\t\tif (minimapCoordinates) {\n\t\t\t\t\tlet translation = this.scene.getMinimapDiffFromNormalised(\n\t\t\t\t\t\tminimapCoordinates.x, minimapCoordinates.y);\n\t\t\t\t\ttranslateViewport(translation);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ((this._state === STATE.NONE) && (zincRayCaster !== undefined)) {\n\t\t\t\t\tzincRayCaster.move(this, event.clientX, event.clientY, this.renderer);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\tconst onDocumentMouseUp = event => {\n this._state = STATE.NONE;\n if (currentMode == MODE.MINIMAP)\n currentMode = MODE.DEFAULT;\n\t\tif (zincRayCaster !== undefined) {\n\t\t\tif (this.pointer_x_start==(event.clientX - rect.left) && this.pointer_y_start==(event.clientY- rect.top)) {\n\t\t\t\tzincRayCaster.pick(this, event.clientX, event.clientY, this.renderer);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tconst onDocumentMouseLeave = event => {\n\t\tthis._state = STATE.NONE;\n\t}\n\t\n\tconst onDocumentTouchStart = event => {\n updateRect(false);\n\t\tconst len = event.touches.length;\n\t\tif (len == 1) {\n\t\t\tthis._state = STATE.TOUCH_ROTATE;\n\t\t\tthis.pointer_x = event.touches[0].clientX - rect.left;\n\t\t\tthis.pointer_y = event.touches[0].clientY - rect.top;\n\t\t\tthis.pointer_x_start = this.pointer_x;\n\t\t\tthis.pointer_y_start = this.pointer_y;\n\t\t\tthis.previous_pointer_x = this.pointer_x;\n\t\t\tthis.previous_pointer_y= this.pointer_y;\n\t\t} else if (len == 2) {\n\t\t\tthis._state = STATE.TOUCH_ZOOM;\n\t\t\tconst dx = event.touches[ 0 ].clientX - event.touches[ 1 ].clientX;\n\t\t\tconst dy = event.touches[ 0 ].clientY - event.touches[ 1 ].clientY;\n\t\t\tthis.touchZoomDistanceEnd = this.touchZoomDistanceStart = Math.sqrt( dx * dx + dy * dy );\n\t\t} else if (len == 3) {\n\t\t\tthis._state = STATE.TOUCH_PAN;\n\t\t\tthis.targetTouchId = event.touches[0].identifier;\n\t\t\tthis.pointer_x = event.touches[0].clientX - rect.left;\n\t\t\tthis.pointer_y = event.touches[0].clientY - rect.top;\n\t\t\tthis.previous_pointer_x = this.pointer_x;\n\t\t\tthis.previous_pointer_y= this.pointer_y;\t\t\t\n\t\t}\n\t}\n\t\n\tconst onDocumentTouchMove = event => {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tconst len = event.touches.length;\n\t\tif (len == 1) {\n\t\t\tthis.pointer_x = event.touches[0].clientX - rect.left;\n\t\t\tthis.pointer_y = event.touches[0].clientY - rect.top;\n\t\t} else if (len == 2) {\n\t\t\tif (this._state === STATE.TOUCH_ZOOM) {\n\t\t\t\tconst dx = event.touches[ 0 ].clientX - event.touches[ 1 ].clientX;\n\t\t\t\tconst dy = event.touches[ 0 ].clientY - event.touches[ 1 ].clientY;\n\t\t\t\tthis.touchZoomDistanceEnd = Math.sqrt( dx * dx + dy * dy );\n\t\t\t}\n\t\t} else if (len == 3) {\n\t\t\tif (this._state === STATE.TOUCH_PAN) {\n\t\t\t\tfor (let i = 0; i < 3; i++) {\n\t\t\t\t\tif (event.touches[i].identifier == this.targetTouchId) {\n\t\t\t\t\t\tthis.pointer_x = event.touches[0].clientX - rect.left;\n\t\t\t\t\t\tthis.pointer_y = event.touches[0].clientY - rect.top;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\t\n\t\t}\n\t}\n\t\n\tconst onDocumentTouchEnd = event => {\n\t\tconst len = event.touches.length;\n\t\tthis.touchZoomDistanceStart = this.touchZoomDistanceEnd = 0;\n\t\tthis.targetTouchId = -1;\n\t\tthis._state = STATE.NONE;\n\t\tif (len == 1) {\n\t\t\tif (zincRayCaster !== undefined) {\n\t\t\t\tif (this.pointer_x_start==(event.touches[0].clientX- rect.left) && this.pointer_y_start==(event.touches[0].clientY- rect.top)) {\n\t\t\t\t\tzincRayCaster.pick(this.cameraObject, event.touches[0].clientX, event.touches[0].clientY, this.renderer);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n const onDocumentEnter = () => {\n\t\tupdateRect(true);\n\t}\n\n const updateRect = forced => {\n //Use intersectionObserver to reset the rect for ray tracing.\n if (forced || rect === undefined) {\n const observer = new IntersectionObserver((entries) => {\n for (const entry of entries) {\n rect = entry.boundingClientRect;\n }\n observer.disconnect();\n });\n \n observer.observe(this.domElement);\n }\n }\n\t\n\tconst onDocumentWheelEvent = event => {\n updateRect(false);\n\t\tthis._state = STATE.SCROLL;\n\t\tlet changes = 0;\n\t\tif (event.deltaY > 0)\n\t\t\tchanges = this.scrollRate;\n\t\telse if (event.deltaY < 0)\n\t\t\tchanges = this.scrollRate * -1;\n\t\tmouseScroll = mouseScroll + changes;\n\t\tevent.preventDefault(); \n\t\tevent.stopImmediatePropagation(); \n\t}\t\n\n\tconst translate = () => {\n\t\tif (typeof this.cameraObject !== \"undefined\")\n\t\t{\n\t\t\tconst height = rect.height;\n\t\t\tconst distance = this.cameraObject.position.distanceTo(this.cameraObject.target);\n\t\t\tlet fact = 0.0;\n\t\t\tif ((this.cameraObject.far > this.cameraObject.near) && (distance >= this.cameraObject.near) &&\n\t\t\t\t(distance <= this.cameraObject.far))\n\t\t\t{\n\t\t\t\t fact = (distance-this.cameraObject.near)/(this.cameraObject.far-this.cameraObject.near);\n }\n //_b == old_near, _c = old_far, _new_b = new_near, _new_c = new_far\n\t\t\t_b.set(this.previous_pointer_x,height - this.previous_pointer_y,0.0);\n\t\t\t_c.set(this.previous_pointer_x, height - this.previous_pointer_y,1.0);\n\t\t\t_new_b.set(this.pointer_x,height - this.pointer_y,0.0);\n\t\t\t_new_c.set(this.pointer_x,height - this.pointer_y,1.0);\n\t\t\t_b.unproject(this.cameraObject);\n\t\t\t_c.unproject(this.cameraObject);\n\t\t\t_new_b.unproject(this.cameraObject);\n\t\t\t_new_c.unproject( this.cameraObject);\n const translate_rate = -0.002;\n _new_b.sub(_b).multiplyScalar(1.0-fact);\n _new_c.sub(_c).multiplyScalar(fact);\n _new_b.add(_new_c).multiplyScalar(translate_rate);\n translateViewport(_new_b);\n\t\t}\n\t\tthis.previous_pointer_x = this.pointer_x;\n\t\tthis.previous_pointer_y = this.pointer_y;\n\t}\n\n\tthis.getVectorsFromRotateAboutLookAtPoints = (axis, angle) => {\n axis.normalize();\n\t _v.copy(this.cameraObject.position).sub(this.cameraObject.target);\n\t _rel_eye.copy(_v);\n\t _v.normalize()\n\t if (0.8 < Math.abs(_v.dot(axis))) {\n\t _v.copy(this.cameraObject.up);\n }\n _b.crossVectors(axis, _v).normalize();\n _c.crossVectors(axis, _b);\n\t const rel_eyea = axis.dot(_rel_eye);\n\t const rel_eyeb = _b.dot(_rel_eye);\n\t const rel_eyec = _c.dot(_rel_eye);\n\t const upa = axis.dot(this.cameraObject.up); \n\t const upb = _b.dot(this.cameraObject.up);\n\t const upc = _c.dot(this.cameraObject.up);\n\t const cos_angle = Math.cos(angle);\n\t const sin_angle = Math.sin(angle);\n _new_b.set(cos_angle*_b.x+sin_angle*_c.x,\n\t cos_angle*_b.y+sin_angle*_c.y,\n\t cos_angle*_b.z+sin_angle*_c.z);\n\t _new_c.set(cos_angle*_c.x-sin_angle*_b.x,\n\t cos_angle*_c.y-sin_angle*_b.y,\n\t cos_angle*_c.z-sin_angle*_b.z); \n _v.copy(this.cameraObject.target);\n\t _v.x = _v.x + axis.x*rel_eyea + _new_b.x*rel_eyeb+_new_c.x*rel_eyec;\n\t _v.y = _v.y + axis.y*rel_eyea + _new_b.y*rel_eyeb+_new_c.y*rel_eyec;\n\t _v.z = _v.z + axis.z*rel_eyea + _new_b.z*rel_eyeb+_new_c.z*rel_eyec;\n\t _a.set(axis.x*upa+_new_b.x*upb+_new_c.x*upc,\n axis.y*upa+_new_b.y*upb+_new_c.y*upc,\n axis.z*upa+_new_b.z*upb+_new_c.z*upc);\n\t return {position: _v, up: _a};\n\t}\n\t\n /**\n * Rotate around the axis with the amount specified by angle.\n * \n * @param {THREE.Vector3} axis - The rotational axis.\n * @param {Number} Angle - Specify how much the camera shoudl rotate by.\n */\n\tthis.rotateAboutLookAtpoint = (axis, angle) => {\n\t const returned_values = this.getVectorsFromRotateAboutLookAtPoints(axis, angle);\n\t this.cameraObject.position.copy(returned_values.position);\n\t this.updateDirectionalLight();\n\t this.cameraObject.up.copy(returned_values.up);\n\t}\n\n\tconst tumble = () => {\n\t\tif (typeof this.cameraObject !== \"undefined\")\n\t\t{\n\t\t\tconst width = rect.width;\n\t\t\tconst height = rect.height;\n\t\t\tif ((0 0)\n\t\t\t\t{\n\t\t\t\t\tconst dx=-delta_y*1.0/tangent_dist;\n\t\t\t\t\tconst dy=delta_x*1.0/tangent_dist;\n let d = 0;\n // Do not allow rotation on other direction around the origin if rotateMode is not free\n if (rotateMode === ROTATE_DIRECTION.FREE) {\n let d=dx*(this.pointer_x-0.5*(width-1))+dy*(0.5*(height-1)-this.pointer_y);\n if (d > radius)\t{\n d = radius;\n }\n else {\n if (d < -radius) {\n d = -radius;\n }\n }\n }\n\t\t\t\t\tconst phi=Math.acos(d/radius)-0.5*Math.PI;\n\t\t\t\t\tconst angle=this.tumble_rate*tangent_dist/radius;\n\t\t\t\t\t_a.copy(this.cameraObject.position).sub(this.cameraObject.target).normalize();\n\t\t\t\t\t_b.copy(this.cameraObject.up).normalize();\n _c.copy(_b).cross(_a).normalize().multiplyScalar(dx);\n _b.multiplyScalar(dy);\n _axis.addVectors(_c, _b).multiplyScalar(Math.cos(phi));\n _a.multiplyScalar(Math.sin(phi));\n _axis.add(_a);\n\t\t\t\t\tthis.rotateAboutLookAtpoint(_axis, -angle);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.previous_pointer_x = this.pointer_x;\n\t\tthis.previous_pointer_y = this.pointer_y;\n\t}\n\t\n\tconst calculateZoomDelta = () => {\n\t\tlet delta = 0;\n\t\tif (this._state === STATE.ZOOM)\n\t\t{\n\t\t\tdelta = this.previous_pointer_y-this.pointer_y;\n\t\t} else if (this._state === STATE.SCROLL) {\n\t\t\tdelta = mouseScroll;\n\t\t} else {\n\t\t\tdelta = -1.0 * (this.touchZoomDistanceEnd - this.touchZoomDistanceStart);\n\t\t\tthis.touchZoomDistanceStart = this.touchZoomDistanceEnd;\n\t\t}\n\t\treturn delta;\n }\n\n this.changeZoomByScrollRateUnit = unit => {\n const delta_y = unit * this.scrollRate;\n this.changeZoomByValue(delta_y);\n }\n\n this.changeZoomByValue = delta_y => {\n\t\tif (typeof this.cameraObject !== \"undefined\")\n\t\t{\n\t\t\tconst width = rect.width;\n const height = rect.height;\n\n\t\t\tconst a = this.cameraObject.position.clone();\n\t\t\ta.sub(this.cameraObject.target);\n\t\t\tconst dist = a.length();\n\t\t\tconst dy = 1.5 * delta_y/height;\n\t\t\tif ((dist + dy*dist) > 0.01) {\n\t\t\t\ta.normalize()\n _tempEye.copy(this.cameraObject.position);\n\t\t\t\t_tempEye.x += a.x*dy*dist;\n\t\t\t\t_tempEye.y += a.y*dy*dist;\n\t\t\t\t_tempEye.z += a.z*dy*dist;\n if (checkTravelDistance()) {\n this.cameraObject.position.copy(_tempEye);\n this.updateDirectionalLight();\n const near_far_minimum_ratio = 0.00001;\n if ((near_far_minimum_ratio * this.cameraObject.far) <\n (this.cameraObject.near + dy*dist + this.near_plane_fly_debt)) {\n if (this.near_plane_fly_debt != 0.0)\t{\n this.near_plane_fly_debt += dy*dist;\n if (this.near_plane_fly_debt > 0.0) {\n this.cameraObject.near += this.near_plane_fly_debt;\n this.cameraObject.far += this.near_plane_fly_debt;\n this.near_plane_fly_debt = 0.0;\n }\n else {\n this.cameraObject.near += dy*dist;\n this.cameraObject.far += dy*dist;\n }\n }\t\t\t\n }\n else {\n if (this.near_plane_fly_debt == 0.0) {\n const diff = this.cameraObject.near - near_far_minimum_ratio * this.cameraObject.far;\n this.cameraObject.near = near_far_minimum_ratio * this.cameraObject.far;\n this.cameraObject.far -= diff;\n this.near_plane_fly_debt -= near_far_minimum_ratio * this.cameraObject.far;\n }\n this.near_plane_fly_debt += dy*dist;\n }\n }\n\t\t\t}\n\t\t}\n }\n\t\n\tconst flyZoom = () => {\n const delta_y = calculateZoomDelta();\n this.changeZoomByValue(delta_y);\n \n\t\tif (this._state === STATE.ZOOM) {\n\t\t\tthis.previous_pointer_x = this.pointer_x;\n\t\t\tthis.previous_pointer_y = this.pointer_y;\n\t\t}\n\t\tif (this._state === STATE.SCROLL) {\n\t\t\tmouseScroll = 0;\n this._state = STATE.NONE;\n\t\t}\n\t}\n\t\n\tthis.setDirectionalLight = directionalLightIn => {\n\t\tthis.directionalLight = directionalLightIn;\n\t};\n\n /**\n * Force an update to the position of the directional light.\n */\n\tthis.updateDirectionalLight = () => {\n\t\tif (this.directionalLight != 0) {\n\t\t\tthis.directionalLight.position.set(this.cameraObject.position.x,\n\t\t\t\t\tthis.cameraObject.position.y,\n\t\t\t\t\tthis.cameraObject.position.z);\n\t\t}\n\t}\n\t\n\t/**\n * Enable the camera control.\n */\n\tthis.enable = function () {\n\t\tenabled = true;\n\t\tif (this.domElement && this.domElement.addEventListener) {\n\t\t\tthis.domElement.addEventListener( 'mousedown', onDocumentMouseDown, false );\n\t\t\tthis.domElement.addEventListener( 'mousemove', onDocumentMouseMove, false );\n\t\t\tthis.domElement.addEventListener( 'mouseup', onDocumentMouseUp, false );\n\t\t\tthis.domElement.addEventListener( 'mouseleave', onDocumentMouseLeave, false );\n\t\t\tthis.domElement.addEventListener( 'touchstart', onDocumentTouchStart, false);\n\t\t\tthis.domElement.addEventListener( 'touchmove', onDocumentTouchMove, false);\n\t\t\tthis.domElement.addEventListener( 'touchend', onDocumentTouchEnd, false);\n\t\t\tthis.domElement.addEventListener( 'wheel', onDocumentWheelEvent, false);\n\t\t\tthis.domElement.addEventListener( 'contextmenu', event => { event.preventDefault(); }, false );\n this.domElement.addEventListener( 'mouseenter', onDocumentEnter, false );\n\t }\n\t}\n\n /**\n * Disable the camera control.\n */\n\tthis.disable = function () {\n\t\tenabled = false;\n\t\tif (this.domElement && this.domElement.removeEventListener) {\n\t\t\tthis.domElement.removeEventListener( 'mousedown', onDocumentMouseDown, false );\n\t\t\tthis.domElement.removeEventListener( 'mousemove', onDocumentMouseMove, false );\n\t\t\tthis.domElement.removeEventListener( 'mouseup', onDocumentMouseUp, false );\n\t\t\tthis.domElement.removeEventListener( 'mouseleave', onDocumentMouseLeave, false );\n\t\t\tthis.domElement.removeEventListener( 'touchstart', onDocumentTouchStart, false);\n\t\t\tthis.domElement.removeEventListener( 'touchmove', onDocumentTouchMove, false);\n\t\t\tthis.domElement.removeEventListener( 'touchend', onDocumentTouchEnd, false);\n\t\t\tthis.domElement.removeEventListener( 'wheel', onDocumentWheelEvent, false);\n this.domElement.removeEventListener( 'mouseenter', onDocumentEnter, false );\n\t\t\tthis.domElement.removeEventListener( 'contextmenu', event => { event.preventDefault(); }, false );\n\t }\n\t}\n\n\tthis.loadPath = pathData => {\n\t\tcameraPath = pathData.CameraPath;\n\t\tnumberOfCameraPoint = pathData.NumberOfPoints;\n\t}\n\t\n /**\n * This is an experimental feature. It loads a path - point to point which\n * the camera will travel.\n * \n * @param {String} path_url - The path.\n * @param {requestCallback} finishCallback - The callback once the path is load.\n */\n\tthis.loadPathURL = (path_url, finishCallback) => {\n\t\tconst xmlhttp = new XMLHttpRequest();\n\t\txmlhttp.onreadystatechange = () => {\n\t\t if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {\n\t\t const pathData = JSON.parse(xmlhttp.responseText);\n\t\t this.loadPath(pathData);\n\t if (finishCallback != undefined && (typeof finishCallback == 'function'))\n\t finishCallback();\n\t\t }\n\t\t}\n\t\tconst requestURL = resolveURL(path_url);\n\t\txmlhttp.open(\"GET\", requestURL, true);\n\t\txmlhttp.send();\n\t}\n\n /**\n * Set the duration for the camera to travel along the path.\n * \n * @param {Number} durationIn - the duration for the path.\n */\n\tthis.setPathDuration = durationIn => {\n duration = durationIn;\n if (smoothCameraTransitionObject)\n smoothCameraTransitionObject.setDuration(duration);\n if (rotateCameraTransitionObject)\n rotateCameraTransitionObject.setDuration(duration);\n\t}\n\t\n /**\n * Get the playRate - this determines how fast it takes to \n * finish one duration.\n * \n * @return {Number}\n */\n\t this.getPlayRate = () => {\n\t return playRate;\n\t }\n\t\n /**\n * Set the playRate - this determines how fast it takes to \n * finish one duration.\n * \n * @param {Number} playRateIn - The play rate speed.\n */\n\tthis.setPlayRate = playRateIn => {\n\t\tplayRate = playRateIn;\n\t}\n\n /**\n * Update the internal timer by the set amount, this can\n * be used to force a time update by setting delta to zero.\n * \n * @param {Number} delta - The amount of time to increment\n * the time by.\n */\n\tconst updateTime = delta => {\n\t\tlet targetTime = inbuildTime + delta;\n\t\tif (targetTime > duration)\n\t\t\ttargetTime = targetTime - duration\n\t\tinbuildTime = targetTime;\n\t};\n\t\n /**\n * Get the current inbuild time,\n * \n * @return {Number}\n */\n\t this.getTime = () => {\n\t return inbuildTime;\n\t }\n\t\n /**\n * Set the current inbuild time,\n * \n * @param {Number} timeIn - this will be used as the current time,\n * it should be between the range of zero and the set duration.\n */\n\tthis.setTime = timeIn => {\n\t if (timeIn > duration)\n\t inbuildTime = duration;\n\t else if (timeIn < 0.0)\n\t inbuildTime = 0.0;\n\t else\n\t inbuildTime = timeIn;\n\t}\n\t\n /**\n * Get the number of frame which is determine by number of points\n * in the camera path.\n * \n * @return {Number}\n */\n\tthis.getNumberOfTimeFrame = () => {\n\t\treturn numberOfCameraPoint;\n\t}\n\n /**\n * Get the current time frame and it will return three values in\n * an array.\n * \n * @return {Array} - bottom frame, top frame and the proportion.\n */\n\tthis.getCurrentTimeFrame = () => {\n\t if (numberOfCameraPoint > 2) {\n \t\tconst current_time = inbuildTime/duration * (numberOfCameraPoint - 1);\n \t\tconst bottom_frame = Math.floor(current_time);\n \t\tconst proportion = 1 - (current_time - bottom_frame);\n \t\tconst top_frame = Math.ceil(current_time);\n \t\tif (bottom_frame == top_frame) {\n \t\t\tif (bottom_frame == numberOfCameraPoint - 1) {\n \t\t\t\treturn [bottom_frame - 1, top_frame, 0];\n \t\t\t} else {\n \t\t\t\treturn [bottom_frame, top_frame + 1, 1.0];\n \t\t\t}\n \t\t}\n \t\treturn [bottom_frame, top_frame, proportion];\n\t } else if (numberOfCameraPoint == 1) {\n\t return [0, 0, 0];\n\t }\n\t \n\t return undefined;\n\t}\n\t\n /**\n * Set the current time frame.\n * \n * @param {Number} targetTimeFrame - bottom frame, top frame and the proportion.\n */\n\tthis.setCurrentTimeFrame = targetTimeFrame => {\n\t if (numberOfCameraPoint > 2) {\n \t\tinbuildTime = duration * targetTimeFrame / (numberOfCameraPoint - 1);\n \t\tif (inbuildTime < 0.0)\n \t\t\tinbuildTime = 0.0;\n \t\tif (inbuildTime > duration)\n \t\t\tinbuildTime = duration;\n\t }\n\t}\n\n /**\n * Update the progress on the path by the specified amount - delta.\n * \n * @param {Number} delta - The amount of time to increment\n */\n\tconst updatePath = delta => {\n\t\tif (currentMode === MODE.PATH) {\n\t\t\tupdateTime(delta);\n\t\t\tif (cameraPath) {\n\t\t\t\tconst time_frame = this.getCurrentTimeFrame();\n\t\t\t\tconst bottom_frame = time_frame[0];\n\t\t\t\tconst top_frame = time_frame[1];\n\t\t\t\tconst proportion = time_frame[2];\n\t\t\t\tconst bot_pos = [cameraPath[bottom_frame*3], cameraPath[bottom_frame*3+1], cameraPath[bottom_frame*3+2]];\n\t\t\t\tconst top_pos = [cameraPath[top_frame*3], cameraPath[top_frame*3+1], cameraPath[top_frame*3+2]];\n\t\t\t\tconst current_positions = [];\n\t\t\t\tfor (let i = 0; i < bot_pos.length; i++) {\n\t\t\t\t\tcurrent_positions.push(proportion * bot_pos[i] + (1.0 - proportion) * top_pos[i]);\n\t\t\t\t}\n\t\t\t\tthis.cameraObject.position.set(current_positions[0], current_positions[1], current_positions[2]);\n\t\t\t\tthis.cameraObject.target.set(top_pos[0], top_pos[1], top_pos[2]);\n\t\t\t\tif (deviceOrientationControl)\n\t\t\t\t\tthis.cameraObject.lookAt( this.cameraObject.target );\n\t\t\t\tif (updateLightWithPathFlag) {\n\t\t\t\t\tthis.directionalLight.position.set(current_positions[0], current_positions[1], current_positions[2]);\n\t\t\t\t\tthis.directionalLight.target.position.set(top_pos[0], top_pos[1], top_pos[2]);\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t};\n\t\n /**\n * Force recalculation of the current path.\n */\n\tthis.calculatePathNow = () => {\n\t updatePath(0.0);\n\t}\n\n // handle synchronised control based on information in the idc\n const handleSyncControl = () => {\n if ((this._state === STATE.ROTATE) || (this._state === STATE.TOUCH_ROTATE)){\n //rotateion does not trigger callback\n tumble();\n } else if ((this._state === STATE.PAN) || (this._state === STATE.TOUCH_PAN)){\n translate();\n ndcControl.triggerCallback();\n } else if ((this._state === STATE.ZOOM) || (this._state === STATE.TOUCH_ZOOM) || (this._state === STATE.SCROLL)){\n ndcControl.zoom(calculateZoomDelta());\n this.previous_pointer_x = this.pointer_x;\n this.previous_pointer_y = this.pointer_y;\n if (this._state === STATE.SCROLL) {\n this._state = STATE.NONE;\n }\n mouseScroll = 0;\n ndcControl.triggerCallback();\n }\n }\n\t\n /**\n * Update all controls related changes - including calculation of the viewport.\n * \n * @param {Number} timeChanged - Time eclipse since last called.\n */\n\tthis.update = timeChanged => {\n\t\tconst delta = timeChanged * playRate;\n\t\tlet controlEnabled = enabled;\n\t\tlet updated = true;\n\t\tif (currentMode === MODE.PATH) {\n\t\t\tupdatePath(delta);\n\t\t} else if (currentMode === MODE.SMOOTH_CAMERA_TRANSITION && smoothCameraTransitionObject) {\n\t\t\tsmoothCameraTransitionObject.update(delta);\n\t\t\tif (smoothCameraTransitionObject.isTransitionCompleted()) {\n\t\t\t\tsmoothCameraTransitionObject == undefined;\n\t\t\t\tcurrentMode = MODE.DEFAULT;\n\t\t\t}\n\t\t\tcontrolEnabled = false;\n\t\t} else if (currentMode === MODE.ROTATE_CAMERA_TRANSITION && rotateCameraTransitionObject) {\n\t\t\trotateCameraTransitionObject.update(delta);\n\t\t\tif (rotateCameraTransitionObject.isTransitionCompleted()) {\n\t\t\t\trotateCameraTransitionObject == undefined;\n\t\t\t\tcurrentMode = MODE.DEFAULT;\n\t\t\t}\n\t\t\tcontrolEnabled = false;\n\t\t} else if (currentMode === MODE.AUTO_TUMBLE && cameraAutoTumbleObject) {\n\t\t\tcameraAutoTumbleObject.update(delta);\n\t\t} else if (currentMode === MODE.SYNC_CONTROL && ndcControl) {\n handleSyncControl();\n controlEnabled = false;\n } else {\n\t\t\tupdated = false;\n\t\t}\n\t\tif (controlEnabled) {\n\t\t\tif (this._state !== STATE.NONE) {\n\t\t\t\tupdated = true;\n\t\t\t}\n\t\t\tif ((this._state === STATE.ROTATE) || (this._state === STATE.TOUCH_ROTATE)){\n\t\t\t\ttumble();\n\t\t\t} else if ((this._state === STATE.PAN) || (this._state === STATE.TOUCH_PAN)){\n\t\t\t\ttranslate();\n\t\t\t} else if ((this._state === STATE.ZOOM) || (this._state === STATE.TOUCH_ZOOM) || (this._state === STATE.SCROLL)){\n\t\t\t\tflyZoom();\n\t\t\t}\n\t\t\tif (this._state !== STATE.NONE) {\n\t\t\t\tif (currentMode === MODE.AUTO_TUMBLE && cameraAutoTumbleObject &&\n\t\t\t\t\t\tcameraAutoTumbleObject.stopOnCameraInput) {\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this._state === STATE.SCROLL)\n\t\t\t\tthis._state = STATE.NONE;\n\t\t}\n\t\tif (deviceOrientationControl) {\n\t\t\tupdated = true;\n\t\t\tdeviceOrientationControl.update();\n\t\t\t//this.directionalLight.target.position.set(this.cameraObject.target.x, \n\t\t\t//\tthis.cameraObject.target.y, this.cameraObject.target.z);\n\t\t} else {\n\t\t\tthis.cameraObject.lookAt( this.cameraObject.target );\n\t\t}\n\n\t\treturn updated;\n\t};\n\t\n /**\n * Switch to path mode and begin traveling through the camera path.\n */\n\tthis.playPath = () => {\n\t\tcurrentMode = MODE.PATH;\n\t}\n\n /**\n * Stop playing path and switch back to normal control.\n */\n\tthis.stopPath = () => {\n\t\tcurrentMode = MODE.DEFAULT;\n\t}\n\t\n /**\n * Check rather the control is currently in path mode.\n * \n * @return {Boolean}\n */\n\tthis.isPlayingPath = () => {\n\t\treturn (currentMode === MODE.PATH);\n\t}\n\t\n /**\n * Enable directional light update as the camera\n * is traveling through path.\n * \n * @param {Boolean} flag\n */\n\tthis.enableDirectionalLightUpdateWithPath = flag => {\n\t\tupdateLightWithPathFlag = flag;\n\t}\n\t\n /**\n * Enable rotation using the devices's accelerometer.\n */\n\tthis.enableDeviceOrientation = () => {\n\t\tif (!deviceOrientationControl)\n\t\t\tdeviceOrientationControl = new ModifiedDeviceOrientationControls(this.cameraObject);\n\t}\n\n /**\n * Disable rotation using the devices's accelerometer.\n */\n\tthis.disableDeviceOrientation = () => {\n\t\tif (deviceOrientationControl) {\n\t\t\tdeviceOrientationControl.dispose();\n\t\t\tdeviceOrientationControl = undefined;\n\t\t}\n\t}\n\n /**\n * Check rather device orientation based on accelerometer is on.\n */\n\tthis.isDeviceOrientationEnabled = () => {\n\t\tif (deviceOrientationControl) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n /**\n * Reset the viewport settings to the one provided by default viewport.\n */\n\tthis.resetView = () => {\n const viewport = viewports[defaultViewport];\n\t\tthis.cameraObject.near = viewport.nearPlane;\n\t\tthis.cameraObject.far = viewport.farPlane;\n\t\tthis.cameraObject.position.set( viewport.eyePosition[0], viewport.eyePosition[1],\n viewport.eyePosition[2]);\n\t\tthis.cameraObject.target.set( viewport.targetPosition[0],\n viewport.targetPosition[1], viewport.targetPosition[2] );\n\t\tthis.cameraObject.up.set( viewport.upVector[0], viewport.upVector[1],\n viewport.upVector[2]);\n\t\tthis.cameraObject.updateProjectionMatrix();\n\t\tthis.updateDirectionalLight();\n\t}\n\n /**\n * Set the current camera settings with the provided viewport.\n * \n * @param {Viewport} newViewport - viewport settings.\n */\n\tthis.setCurrentCameraSettings = newViewport => {\n\t\tif (newViewport.nearPlane)\n\t\t\tthis.cameraObject.near = newViewport.nearPlane;\n\t\tif (newViewport.farPlane)\n\t\t\tthis.cameraObject.far = newViewport.farPlane;\n\t\tif (newViewport.eyePosition)\n\t\t\tthis.cameraObject.position.set( newViewport.eyePosition[0], \n\t\t\t\t\tnewViewport.eyePosition[1], newViewport.eyePosition[2]);\n\t\tif (newViewport.targetPosition)\n\t\t\tthis.cameraObject.target.set( newViewport.targetPosition[0],\n\t\t\t\t\tnewViewport.targetPosition[1], newViewport.targetPosition[2] );\n\t\tif (newViewport.upVector)\n\t\t\tthis.cameraObject.up.set( newViewport.upVector[0], newViewport.upVector[1],\n\t\t\t\t\tnewViewport.upVector[2]);\n\t\tthis.cameraObject.updateProjectionMatrix();\n\t\tthis.updateDirectionalLight();\n\t}\n\n /**\n * Get the viewport based on centre, radius, view_angle and clip distance.\n * \n * @param {Number} centreX - x coordinate of the centre.\n * @param {Number} centreY - y coordinate of the centre.\n * @param {Number} centreZ - z coordinate of the centre.\n * @param {Number} radius - radius if the viewport.\n * @param {Number} view_angle - view angle.\n * @param {Number} clip_distance - clip_distance between the near and far plane.\n * \n * @return {Viewport}\n */\t\n\tthis.getViewportFromCentreAndRadius = (centreX, centreY, centreZ, radius, view_angle, clip_distance) => {\n\t\tlet eyex = this.cameraObject.position.x-this.cameraObject.target.x;\n\t\tlet eyey = this.cameraObject.position.y-this.cameraObject.target.y;\n\t\tlet eyez = this.cameraObject.position.z-this.cameraObject.target.z;\n\t\tconst fact = 1.0/Math.sqrt(eyex*eyex+eyey*eyey+eyez*eyez);\n\t\teyex = eyex * fact;\n\t\teyey = eyey * fact;\n\t\teyez = eyez * fact;\n\t\t/* look at the centre of the sphere */\n\t\tconst localTargetPosition = [centreX, centreY, centreZ];\n\t\t/* shift the eye position to achieve the desired view_angle */\n\t\tconst eye_distance = radius/Math.tan(view_angle*Math.PI/360.0);\n\t\tconst localEyePosition = [ centreX + eyex*eye_distance, centreY + eyey*eye_distance,\n\t\t centreZ + eyez*eye_distance];\n\t\tconst localFarPlane = eye_distance+clip_distance;\n\t\tlet localNearPlane = 0.0;\n\t\tconst nearClippingFactor = 0.95;\n\t\tif (clip_distance > nearClippingFactor*eye_distance)\n\t\t{\n\t\t\tlocalNearPlane = (1.0 - nearClippingFactor)*eye_distance;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlocalNearPlane = eye_distance - clip_distance;\n\t\t}\n\t\tconst newViewport = new Viewport();\n\t\tnewViewport.nearPlane = localNearPlane;\n\t\tnewViewport.farPlane = localFarPlane;\n\t\tnewViewport.eyePosition = localEyePosition;\n\t\tnewViewport.targetPosition = localTargetPosition;\n\t\tnewViewport.upVector = [this.cameraObject.up.x, this.cameraObject.up.y,\n\t\t this.cameraObject.up.z];\n\t\t\n\t\treturn newViewport;\n\t}\n\n\t /**\n * Get the viewport for the boudning box\n * \n * @param {Number} boundingBox - y coordinate of the centre.\n * @return {Viewport}\n */\t\n\tthis.getViewportFromBoundingBox = (boundingBox, radiusScale) => {\n\t\tconst radius = boundingBox.min.distanceTo(boundingBox.max) / 2.0 * radiusScale;\n\t\tconst centreX = (boundingBox.min.x + boundingBox.max.x) / 2.0;\n\t\tconst centreY = (boundingBox.min.y + boundingBox.max.y) / 2.0;\n\t\tconst centreZ = (boundingBox.min.z + boundingBox.max.z) / 2.0;\n\t\tconst clip_factor = 4.0;\n\t\tconst viewport = this.getViewportFromCentreAndRadius(\n\t\t\tcentreX, centreY, centreZ, radius, 40, radius * clip_factor);\n\t\treturn viewport;\n\t}\n\n /**\n * Get the current camera viewport.\n * \n * @return {Viewport}\n */\n\tthis.getCurrentViewport = () => {\n\t\tconst currentViewport = new Viewport();\n\t\tcurrentViewport.nearPlane = this.cameraObject.near;\n\t\tcurrentViewport.farPlane = this.cameraObject.far;\n\t\tcurrentViewport.eyePosition[0] = this.cameraObject.position.x;\n\t\tcurrentViewport.eyePosition[1] = this.cameraObject.position.y;\n\t\tcurrentViewport.eyePosition[2] = this.cameraObject.position.z;\n\t\tcurrentViewport.targetPosition[0] = this.cameraObject.target.x;\n\t\tcurrentViewport.targetPosition[1] = this.cameraObject.target.y;\n\t\tcurrentViewport.targetPosition[2] = this.cameraObject.target.z;\n\t\tcurrentViewport.upVector[0] = this.cameraObject.up.x;\n\t\tcurrentViewport.upVector[1] = this.cameraObject.up.y;\n\t\tcurrentViewport.upVector[2] = this.cameraObject.up.z;\n\t\treturn currentViewport;\n\t}\n\t\n\tthis.getDefaultEyePosition = () => {\n\t\treturn eyePosition;\n\t}\n\t\n\tthis.getDefaultTargetPosition = () => {\n\t\treturn targetPosition;\n\t}\n\n /**\n * Setup a smooth transition object which transition the camera from one \n * viewport to the other in the specified duration. This will not work if \n * {@link rotateCameraTransition} is active.\n * To use this object, the transition must be enabled using\n * {@link enableCameraTransition}.\n * \n * @param {Viewport} startingViewport - the starting viewport\n * @param {Viewport} endingViewport - the viewport ti end the transistion with.\n * @param {Number} durationIn - duration of the smooth transition.\n */\n\tthis.cameraTransition = (startingViewport, endingViewport, durationIn) => {\n\t if (rotateCameraTransitionObject == undefined)\n\t smoothCameraTransitionObject = new SmoothCameraTransition(startingViewport, endingViewport,\n\t this, durationIn);\n\t}\n\n /**\n * Setup a rotate camera transition object which rotate the \n * camera by the specified the angle in the specified \n * duration. This will not work if {@link cameraTransition}\n * is active.\n * To use this object, the transition must be enabled using\n * {@link enableCameraTransition}.\n * \n * @param {THREE.Vector3} axis - the starting viewport\n * @param {Number} angle - the viewport ti end the transistion with.\n * @param {Number} duration - duration of the smooth transition.\n */\n\tthis.rotateCameraTransition = (axis, angle, duration) => {\n\t if (smoothCameraTransitionObject == undefined)\n\t rotateCameraTransitionObject = new RotateCameraTransition(axis, angle,\n\t this, duration);\n\t}\n\n /**\n * Enable camera transition, {@link rotateCameraTransition} amd\n * {@link cameraTransition} must be called before camera transition can\n * be enabled.\n */\n\tthis.enableCameraTransition = () => {\n\t if (smoothCameraTransitionObject)\n\t currentMode = MODE.SMOOTH_CAMERA_TRANSITION;\n\t if (rotateCameraTransitionObject)\n\t currentMode = MODE.ROTATE_CAMERA_TRANSITION;\n\t}\n\n /**\n * Pause the camera transition.\n */\n\tthis.pauseCameraTransition = () => {\n\t\tcurrentMode = MODE.DEFAULT;\n\t}\n\n /**\n * Stop the camera transition and remove camera transition\n * and rotate camera transition.\n */\n\tthis.stopCameraTransition = () => {\n\t\tcurrentMode = MODE.DEFAULT;\n\t\tsmoothCameraTransitionObject = undefined;\n\t\trotateCameraTransitionObject = undefined;\n\t}\n\n /**\n * Check if camera transition is active.\n */\n\tthis.isTransitioningCamera = () => {\n\t\treturn (currentMode === MODE.SMOOTH_CAMERA_TRANSITION ||\n\t\t currentMode === MODE.ROTATE_CAMERA_TRANSITION);\n\t}\n \n /**\n * Setup auto tumble object of the camera which will rotate the camera\n * around the target as if the user is rotating the camera by mouse/touch\n * interaction.\n * The tumbling will only be enabled with {@link enabelAutoTumble}. \n * \n * @param {Array} tumbleDirectionIn - direction of the mouse/touch.\n * @param {Number} tumbleRateIn - Speed of the tumbling.\n * @param {Boolean} stopOnCameraInputIn - Disable the tumbling once the user\n * start interacting with the scene.\n */\n\tthis.autoTumble = (tumbleDirectionIn, tumbleRateIn, stopOnCameraInputIn) => {\n\t\tcameraAutoTumbleObject = new CameraAutoTumble(tumbleDirectionIn, tumbleRateIn, stopOnCameraInputIn, this);\n\t}\n\n /**\n * Enable autotumble.\n */\n\tthis.enableAutoTumble = () => {\n\t\tcurrentMode = MODE.AUTO_TUMBLE;\n\t}\n\n /**\n * Disable the autotumble.\n */\n\tthis.stopAutoTumble = () => {\n\t\tcurrentMode = MODE.DEFAULT;\n\t\tcameraAutoTumbleObject = undefined;\n\t}\n\n /**\n * Update the autotumble object.\n */\n\tthis.updateAutoTumble = () => {\n\t\tif (cameraAutoTumbleObject)\n\t\t\tcameraAutoTumbleObject.requireUpdate = true;\n\t}\n\n /**\n * Check rather autotumble is active.\n * \n * @return {Boolean}\n */\n\tthis.isAutoTumble = () => {\n\t\treturn (currentMode === MODE.AUTO_TUMBLE);\n\t}\n\t\n /**\n * Create an internal raycaster object and enable it for picking.\n * \n * @param {Scene} sceneIn - The scene to pick from, it can be different from the\n * camera's scene.\n * @param {requestCallback} callbackFunctionIn - The callback for pick event.\n * @param {requestCallback} hoverCallbackFunctionIn - The callback for hover\n * over event.\n */\n this.enableRaycaster = (sceneIn, callbackFunctionIn, hoverCallbackFunctionIn) => {\n if (zincRayCaster == undefined)\n zincRayCaster = new RayCaster(sceneIn, this.scene, callbackFunctionIn, hoverCallbackFunctionIn, this.renderer);\n }\n\n /**\n * Disable raycaster and remove the internal ray caster object.\n */\n this.disableRaycaster = () => {\n zincRayCaster.disable();\n zincRayCaster = undefined;\n }\n\n /**\n * Check rather the camera is in syncControl mode.\n * \n * @return {Boolean}\n */\n this.isSyncControl = () => {\n return currentMpde === MODE.SYNC_CONTROL;\n }\n\n /**\n * Enable syncControl.\n */\n this.enableSyncControl = () => {\n currentMode = MODE.SYNC_CONTROL;\n if (!ndcControl)\n ndcControl = new NDCCameraControl();\n ndcControl.setCurrentCameraSettings(this.cameraObject,\n viewports[defaultViewport]);\n return ndcControl;\n }\n\n /**\n * Disable syncControl.\n */\n this.disableSyncControl = () => {\n currentMode = MODE.DEFAULT;\n this.cameraObject.zoom = 1;\n this.cameraObject.updateProjectionMatrix();\n }\n\t\n\tthis.enable();\n\n};\n\nconst SmoothCameraTransition = function(startingViewport, endingViewport, targetCameraIn, durationIn) {\n\tconst startingEyePosition = startingViewport.eyePosition;\n\tconst startingTargetPosition = startingViewport.targetPosition;\n\tconst startingUp = startingViewport.upVector;\n\tconst endingEyePosition = endingViewport.eyePosition;\n\tconst endingTargetPosition = endingViewport.targetPosition;\n\tconst endingUp = endingViewport.upVector;\n\tconst targetCamera = targetCameraIn;\n\tlet duration = durationIn;\n\tlet inbuildTime = 0;\n\tconst enabled = true;\n\tconst updateLightWithPathFlag = true;\n\tlet completed = false;\n\ttargetCamera.near = Math.min(startingViewport.nearPlane, endingViewport.nearPlane);\n\ttargetCamera.far = Math.max(startingViewport.farPlane, endingViewport.farPlane);\n\ttargetCamera.cameraObject.up.set( endingViewport.upVector[0], endingViewport.upVector[1],\n endingViewport.upVector[2]);\n \n this.setDuration = newDuration => {\n duration = newDuration;\n }\n\t\n\tconst updateTime = delta => {\n\t\tlet targetTime = inbuildTime + delta;\n\t\tif (targetTime > duration)\n\t\t\ttargetTime = duration;\n\t\tinbuildTime = targetTime;\n\t};\n\t\n\tconst updateCameraSettings = () => {\n\t\tconst ratio = inbuildTime / duration;\n\t\tconst eyePosition = [startingEyePosition[0] * (1.0 - ratio) + endingEyePosition[0] * ratio,\n\t\t startingEyePosition[1] * (1.0 - ratio) + endingEyePosition[1] * ratio,\n\t\t startingEyePosition[2] * (1.0 - ratio) + endingEyePosition[2] * ratio];\n\t\tconst targetPosition = [startingTargetPosition[0] * (1.0 - ratio) + endingTargetPosition[0] * ratio,\n\t\t startingTargetPosition[1] * (1.0 - ratio) + endingTargetPosition[1] * ratio,\n\t\t startingTargetPosition[2] * (1.0 - ratio) + endingTargetPosition[2] * ratio];\n const upVector = [startingUp[0] * (1.0 - ratio) + endingUp[0] * ratio,\n startingUp[1] * (1.0 - ratio) + endingUp[1] * ratio,\n startingUp[2] * (1.0 - ratio) + endingUp[2] * ratio];\n\t\ttargetCamera.cameraObject.position.set( eyePosition[0], eyePosition[1], eyePosition[2]);\n\t\ttargetCamera.cameraObject.target.set( targetPosition[0], targetPosition[1], targetPosition[2] );\n\t};\n\t\n\tthis.update = delta => {\n\n\t\tif ( this.enabled === false ) return;\n\t\t\n\t\tupdateTime(delta);\n\t\t\n\t\tupdateCameraSettings();\n\t\t\n\t\tif (inbuildTime == duration) {\n\t\t\tcompleted = true;\n\t\t}\n\n\t}\n\t\n\tthis.isTransitionCompleted = () => {\n\t\treturn completed;\n\t}\n\t\n};\n\nconst RotateCameraTransition = function(axisIn, angleIn, targetCameraIn, durationIn) {\n const axis = axisIn;\n const angle = angleIn;\n const targetCamera = targetCameraIn;\n let duration = durationIn;\n let inbuildTime = 0;\n const enabled = true;\n const ratio = inbuildTime / duration;\n let completed = false;\n\n this.setDuration = newDuration => {\n duration = newDuration;\n }\n\n const updateCameraSettings = delta => {\n const previousTime = inbuildTime;\n let targetTime = inbuildTime + delta;\n if (targetTime > duration)\n targetTime = duration;\n inbuildTime = targetTime;\n const actualDelta = inbuildTime - previousTime;\n const ratio = actualDelta / duration;\n const alpha = ratio * angle;\n targetCamera.rotateAboutLookAtpoint(axis, alpha);\n };\n \n this.update = delta => {\n\n if ( this.enabled === false ) return;\n \n updateCameraSettings(delta);\n \n if (inbuildTime == duration) {\n completed = true;\n }\n\n }\n \n this.isTransitionCompleted = () => {\n return completed;\n }\n}\n\nconst RayCaster = function (sceneIn, hostSceneIn, callbackFunctionIn, hoverCallbackFunctionIn, rendererIn) {\n const scene = sceneIn;\n const hostScene = hostSceneIn;\n\tconst renderer = rendererIn;\n\tconst callbackFunction = callbackFunctionIn;\n\tconst hoverCallbackFunction = hoverCallbackFunctionIn;\n\tconst enabled = true;\n\tconst raycaster = new THREE.Raycaster();\n\traycaster.params.Line.threshold = 0.1;\n\traycaster.params.Points.threshold = 1;\n const mouse = new THREE.Vector2();\n let awaiting = false;\n let lastHoveredDate = new Date();\n let lastHoveredEmpty = false;\n let timeDiff = 0;\n let pickedObjects = new Array();\n let lastPosition = { zincCamera: undefined, x: -1 ,y: -1};\n\tlet pickableObjects = undefined;\n\n\tthis.enable = () => {\n\t\tenable = true;\n\t}\n\n\tthis.disable = () => {\n\t\tenable = false;\n\t}\n\n\tthis.getIntersectsObject = (zincCamera) => {\n if (hostScene !== scene) {\n const threejsScene = scene.getThreeJSScene();\n renderer.render(threejsScene, zincCamera.cameraObject);\n }\n let objects = pickableObjects ? pickableObjects : scene.getPickableThreeJSObjects();\n //Reset pickedObjects array \n pickedObjects.length = 0;\n\t\treturn raycaster.intersectObjects( objects, true, pickedObjects );\n\t}\n\n\tthis.setPickableObjects = (zincObjects) => {\n\t\tif (zincObjects === undefined) {\n\t\t\tpickableObjects = undefined;\n\t\t} else {\n\t\t\tpickableObjects = [];\n\t\t\tzincObjects.forEach(zincObject => {\n\t\t\t\tif (zincObject.getGroup() && zincObject.getGroup().visible) {\n\t\t\t\t\tpickableObjects.push(zincObject.getGroup());\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tthis.getIntersectsObjectWithOrigin = (zincCamera, origin, direction) => {\n\t\traycaster.set(origin, direction);\n\t\treturn this.getIntersectsObject(zincCamera);\n\t}\n\n\tthis.getIntersectsObjectWithCamera = (zincCamera, x, y) => {\n zincCamera.getNDCFromDocumentCoords(x, y, mouse);\n\t\traycaster.setFromCamera(mouse, zincCamera.cameraObject);\n\t\treturn this.getIntersectsObject(zincCamera);\n\t};\n\t\n\tthis.pick = (zincCamera, x, y) => { \n\t\tif (enabled && renderer && scene && zincCamera && callbackFunction) {\n\t\t\tthis.getIntersectsObjectWithCamera(zincCamera, x, y);\n\t\t\tconst length = pickedObjects.length;\n\t\t\tfor (let i = 0; i < length; i++) {\n\t\t\t\tlet zincObject = pickedObjects[i].object ? pickedObjects[i].object.userData : undefined;\n\t\t\t\tif (zincObject && zincObject.isMarkerCluster && zincObject.visible\n\t\t\t\t\t&& zincObject.clusterIsVisible(pickedObjects[i].object.clusterIndex)) {\n\t\t\t\t\t//Can zoom into cluster\n\t\t\t\t\tif (zincObject.zoomToCluster(pickedObjects[i].object.clusterIndex)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcallbackFunction(pickedObjects, x, y);\n\t\t}\n }\n \n let hovered = (zincCamera, x, y) => {\n if (enabled && renderer && scene && zincCamera && hoverCallbackFunction) {\n this.getIntersectsObjectWithCamera(zincCamera, x, y);\n lastHoveredDate.setTime(Date.now());\n if (pickedObjects.length === 0) {\n //skip hovered callback if the previous one is empty\n if (lastHoveredEmpty)\n return\n lastHoveredEmpty = true;\n } else {\n lastHoveredEmpty = false;\n }\n hoverCallbackFunction(pickedObjects, x, y);\n }\n }\n\t\n\tthis.move = (zincCamera, x, y) => {\n if (enabled && renderer && scene && zincCamera && hoverCallbackFunction) {\n if (scene.displayMarkers) {\n hovered(zincCamera, x, y);\n } else {\n lastPosition.zincCamera = zincCamera;\n lastPosition.x = x;\n lastPosition.y = y;\n if (!awaiting) {\n timeDiff = lastHoveredDate ? Date.now() - lastHoveredDate.getTime() : 250;\n if (timeDiff >= 250) {\n hovered(zincCamera, x, y);\n } else {\n awaiting = true;\n setTimeout(awaitMove(lastPosition), timeDiff);\n }\n }\n }\n }\n }\n \n let awaitMove = (lastPosition) => {\n return function() {\n awaiting = false;\n hovered(lastPosition.zincCamera, lastPosition.x, lastPosition.y);\n }\n }\n};\n\nconst CameraAutoTumble = function (tumbleDirectionIn, tumbleRateIn, stopOnCameraInputIn, targetCameraIn) {\n\tconst tumbleAxis = new THREE.Vector3();\n\tconst angle = -tumbleRateIn;\n\tconst targetCamera = targetCameraIn;\n\tconst enabled = true;\n\tconst updateLightWithPathFlag = true;\n\tconst tumbleDirection = tumbleDirectionIn;\n\tthis.stopOnCameraInput = stopOnCameraInputIn;\n this.requireUpdate = true;\n const b = new THREE.Vector3();\n const c = new THREE.Vector3();\n\t\n\tconst computeTumbleAxisAngle = tumbleDirection => {\n\t\tconst tangent_dist = Math.sqrt(tumbleDirection[0]*tumbleDirection[0] +\n\t\t\ttumbleDirection[1]*tumbleDirection[1]);\n\t\tconst width = Math.abs(tumbleDirection[0]) * 4.0;\n\t\tconst height = Math.abs(tumbleDirection[1]) * 4.0;\n\t\tconst radius = 0.25 * (width + height);\n\t\tconst dx = -tumbleDirection[1]/tangent_dist;\n\t\tconst dy = tumbleDirection[0]/tangent_dist;\n\t\tlet d = dx*(tumbleDirection[0])+dy*(-tumbleDirection[1]);\n\t\t\n\t\tif (d > radius)\n\t\t{\n\t\t\td = radius;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (d < -radius)\n\t\t\t{\n\t\t\t\td = -radius;\n\t\t\t}\n\t\t}\n\t\t\n\t\tconst phi=Math.acos(d/radius)-0.5*Math.PI;\n\t\t/* get axis to rotate about */\n\t\ttumbleAxis.copy(targetCamera.cameraObject.position).sub(\n targetCamera.cameraObject.target).normalize();\n\t\tb.copy(targetCamera.cameraObject.up).normalize();\n c.crossVectors(b, tumbleAxis).normalize().multiplyScalar(dx);\n b.multiplyScalar(dy);\n b.add(c).multiplyScalar(Math.cos(phi));\n tumbleAxis.multiplyScalar(Math.sin(phi)).add(b);\n\t};\n\t\t\n\tthis.update = delta => {\n\n\t\tif ( this.enabled === false ) return;\n\t\t\n\t\tif (this.requireUpdate) {\n\t\t\tcomputeTumbleAxisAngle(tumbleDirection);\n\t\t\tthis.requireUpdate = false;\n\t\t}\n\t\ttargetCamera.rotateAboutLookAtpoint(tumbleAxis, angle * delta/1000);\n\n\t}\n\t\n};\n\n/**\n * @author mrdoob / http://mrdoob.com/\n */\nconst StereoCameraZoomFixed = function () {\n\n\tthis.type = 'StereoCamera';\n\n\tthis.aspect = 1;\n\n\tthis.cameraL = new THREE.PerspectiveCamera();\n\tthis.cameraL.layers.enable( 1 );\n\tthis.cameraL.matrixAutoUpdate = false;\n\n\tthis.cameraR = new THREE.PerspectiveCamera();\n\tthis.cameraR.layers.enable( 2 );\n\tthis.cameraR.matrixAutoUpdate = false;\n\n};\n\nObject.assign( StereoCameraZoomFixed.prototype, {\n\n\tupdate: (() => {\n\n\t\tlet focus, fov, aspect, near, far, zoom;\n\n\t\tconst eyeRight = new THREE.Matrix4();\n\t\tconst eyeLeft = new THREE.Matrix4();\n\n\t\treturn function update( camera ) {\n\n\t\t\tconst needsUpdate = focus !== camera.focus || fov !== camera.fov ||\n\t\t\t\t\t\t\t\t\t\t\t\taspect !== camera.aspect * this.aspect || near !== camera.near ||\n\t\t\t\t\t\t\t\t\t\t\t\tfar !== camera.far || zoom !== camera.zoom;\n\n\t\t\tif ( needsUpdate ) {\n\n\t\t\t\tfocus = camera.focus;\n\t\t\t\tfov = camera.fov;\n\t\t\t\taspect = camera.aspect * this.aspect;\n\t\t\t\tnear = camera.near;\n\t\t\t\tfar = camera.far;\n\t\t\t\tzoom = camera.zoom;\n\n\t\t\t\t// Off-axis stereoscopic effect based on\n\t\t\t\t// http://paulbourke.net/stereographics/stereorender/\n\n\t\t\t\tconst projectionMatrix = camera.projectionMatrix.clone();\n\t\t\t\tconst eyeSep = 0.064 / 2;\n\t\t\t\tconst eyeSepOnProjection = eyeSep * near / focus;\n\t\t\t\tconst ymax = near * Math.tan( THREE.Math.DEG2RAD * fov * 0.5 ) / camera.zoom;\n\t\t\t\tlet xmin, xmax;\n\n\t\t\t\t// translate xOffset\n\n\t\t\t\teyeLeft.elements[ 12 ] = - eyeSep;\n\t\t\t\teyeRight.elements[ 12 ] = eyeSep;\n\n\t\t\t\t// for left eye\n\n\t\t\t\txmin = - ymax * aspect + eyeSepOnProjection;\n\t\t\t\txmax = ymax * aspect + eyeSepOnProjection;\n\n\t\t\t\tprojectionMatrix.elements[ 0 ] = 2 * near / ( xmax - xmin );\n\t\t\t\tprojectionMatrix.elements[ 8 ] = ( xmax + xmin ) / ( xmax - xmin );\n\n\t\t\t\tthis.cameraL.projectionMatrix.copy( projectionMatrix );\n\n\t\t\t\t// for right eye\n\n\t\t\t\txmin = - ymax * aspect - eyeSepOnProjection;\n\t\t\t\txmax = ymax * aspect - eyeSepOnProjection;\n\n\t\t\t\tprojectionMatrix.elements[ 0 ] = 2 * near / ( xmax - xmin );\n\t\t\t\tprojectionMatrix.elements[ 8 ] = ( xmax + xmin ) / ( xmax - xmin );\n\n\t\t\t\tthis.cameraR.projectionMatrix.copy( projectionMatrix );\n\n\t\t\t}\n\n\t\t\tthis.cameraL.matrixWorld.copy( camera.matrixWorld ).multiply( eyeLeft );\n\t\t\tthis.cameraR.matrixWorld.copy( camera.matrixWorld ).multiply( eyeRight );\n\n\t\t};\n\n\t})()\n\n} );\n\n/** the following StereoEffect is written by third party */\n/**\n * @author alteredq / http://alteredqualia.com/\n * @authod mrdoob / http://mrdoob.com/\n * @authod arodic / http://aleksandarrodic.com/\n * @authod fonserbc / http://fonserbc.github.io/\n*/\nconst StereoEffect = function ( renderer ) {\n\n\tconst _stereo = new StereoCameraZoomFixed();\n\t_stereo.aspect = 0.5;\n\n\tthis.setSize = (width, height) => {\n\n\t\trenderer.setSize( width, height );\n\n\t};\n\n\tthis.render = (scene, camera) => {\n\n\t\tscene.updateMatrixWorld();\n\n\t\tif ( camera.parent === null ) camera.updateMatrixWorld();\n\n\t\t_stereo.update( camera );\n\n\t\tconst size = renderer.getSize();\n\n\t\trenderer.setScissorTest( true );\n\t\trenderer.clear();\n\n\t\trenderer.setScissor( 0, 0, size.width / 2, size.height );\n\t\trenderer.setViewport( 0, 0, size.width / 2, size.height );\n\t\trenderer.render( scene, _stereo.cameraL );\n\n\t\trenderer.setScissor( size.width / 2, 0, size.width / 2, size.height );\n\t\trenderer.setViewport( size.width / 2, 0, size.width / 2, size.height );\n\t\trenderer.render( scene, _stereo.cameraR );\n\n\t\trenderer.setScissorTest( false );\n\n\t};\n\n};\n\n\n/**\n * @author richt / http://richt.me\n * @author WestLangley / http://github.com/WestLangley\n *\n * W3C Device Orientation control (http://w3c.github.io/deviceorientation/spec-source-orientation.html)\n */\n\nconst ModifiedDeviceOrientationControls = function ( object ) {\n\n\tconst scope = this;\n\n\tthis.object = object; \n\tthis.object.rotation.reorder( \"YXZ\" );\n\n\tthis.enabled = true;\n\n\tthis.deviceOrientation = {};\n\tthis.screenOrientation = 0;\n\n\tconst onDeviceOrientationChangeEvent = event => {\n\n\t\tscope.deviceOrientation = event;\n\n\t};\n\n\tconst onScreenOrientationChangeEvent = () => {\n\t if (typeof(window) !== 'undefined')\n\t scope.screenOrientation = window.orientation || 0;\n\n\t};\n\n\t// The angles alpha, beta and gamma form a set of intrinsic Tait-Bryan angles of type Z-X'-Y''\n\n\tconst setObjectQuaternion = (() => {\n\n\t\tconst zee = new THREE.Vector3( 0, 0, 1 );\n\n\t\tconst euler = new THREE.Euler();\n\n\t\tconst q0 = new THREE.Quaternion();\n\n\t\tconst q1 = new THREE.Quaternion( - Math.sqrt( 0.5 ), 0, 0, Math.sqrt( 0.5 ) ); // - PI/2 around the x-axis\n\n\t\treturn (cameraObject, alpha, beta, gamma, orient) => {\n\t\t\t\n\t\t\tconst vector = new THREE.Vector3(0, 0, 1);\n\t\t\t\n\t\t\tvector.subVectors(cameraObject.target, cameraObject.position);\n\n\t\t\teuler.set( beta, alpha, - gamma, 'YXZ' ); // 'ZXY' for the device, but 'YXZ' for us\n\n\t\t\tconst quaternion = new THREE.Quaternion();\n\t\t\t\n\t\t\tquaternion.setFromEuler( euler ); // orient the device\n\n\t\t\tquaternion.multiply( q1 ); // camera looks out the back of the device, not the top\n\n\t\t\tquaternion.multiply( q0.setFromAxisAngle( zee, - orient ) ); // adjust for screen orientation\n\t\t\t\n\t\t\tvector.applyQuaternion(quaternion);\n\t\t\t\t\n\t\t\tvector.addVectors(cameraObject.position, vector);\n\t\t\t\n\t\t\tcameraObject.lookAt(vector);\n\n\t\t};\n\n\t})();\n\n\tthis.connect = () => {\n\n\t\tonScreenOrientationChangeEvent(); // run once on load\n\t\tif (typeof(window) !== 'undefined') {\n\t\t window.addEventListener( 'orientationchange', onScreenOrientationChangeEvent, false );\n\t\t window.addEventListener( 'deviceorientation', onDeviceOrientationChangeEvent, false );\n\t\t}\n\t\tscope.enabled = true;\n\n\t};\n\n\tthis.disconnect = () => {\n\t if (typeof(window) !== 'undefined') {\n\t window.removeEventListener( 'orientationchange', onScreenOrientationChangeEvent, false );\n\t\t window.removeEventListener( 'deviceorientation', onDeviceOrientationChangeEvent, false );\n\t }\n\t\tscope.enabled = false;\n\n\t};\n\n\tthis.update = () => {\n\n\t\tif ( scope.enabled === false ) return;\n\n\t\tconst alpha = scope.deviceOrientation.alpha ? THREE.Math.degToRad( scope.deviceOrientation.alpha ) : 0; // Z\n\t\tconst beta = scope.deviceOrientation.beta ? THREE.Math.degToRad( scope.deviceOrientation.beta ) : 0; // X'\n\t\tconst gamma = scope.deviceOrientation.gamma ? THREE.Math.degToRad( scope.deviceOrientation.gamma ) : 0; // Y''\n\t\tconst orient = scope.screenOrientation ? THREE.Math.degToRad( scope.screenOrientation ) : 0; // O\n\n\t\tsetObjectQuaternion( scope.object, alpha, beta, gamma, orient );\n\n\t};\n\n\tthis.dispose = function () {\n\n\t\tthis.disconnect();\n\n\t};\n\n\tthis.connect();\n\n};\n\nconst NDCCameraControl = function () {\n\tlet camera = undefined;\n let targetCamera = undefined;\n let defaultViewport = undefined;\n const position = new THREE.Vector3();\n const target = new THREE.Vector3();\n const v1 = new THREE.Vector3();\n const v2 = new THREE.Vector3();\n let eventCallback = undefined;\n\n this.setCurrentCameraSettings = (cameraIn, defaultViewportIn) => {\n camera = cameraIn.clone();\n targetCamera = cameraIn;\n defaultViewport = defaultViewportIn;\n camera.near = defaultViewport.nearPlane;\n if (defaultViewport.farPlane)\n camera.far = defaultViewport.farPlane;\n if (defaultViewport.eyePosition)\n camera.position.set(defaultViewport.eyePosition[0],\n defaultViewport.eyePosition[1], defaultViewport.eyePosition[2]);\n if (defaultViewport.upVector)\n camera.up.set(defaultViewport.upVector[0], defaultViewport.upVector[1],\n defaultViewport.upVector[2]);\n if (defaultViewport.targetPosition) {\n camera.target = new THREE.Vector3(defaultViewport.targetPosition[0],\n defaultViewport.targetPosition[1], defaultViewport.targetPosition[2]);\n camera.lookAt(camera.target);\n }\n camera.updateProjectionMatrix();\n position.copy(camera.position).project(camera);\n target.copy(camera.target).project(camera);\n }\n\t\n this.getCurrentPosition = () => {\n target.copy(targetCamera.target).project(camera);\n return [target.x, target.y];\n }\n\n this.zoom = delta => {\n let scaledDelta = delta * 0.002;\n let zoom = Math.max(targetCamera.zoom - scaledDelta, 1.0);\n targetCamera.zoom = zoom;\n targetCamera.updateProjectionMatrix();\n }\n\n this.zoomToBox = (box, zoom) => {\n box.getCenter(v1);\n v1.project(camera);\n this.setCenterZoom([v1.x, v1.y], zoom);\n }\n\t \n //return top left and size\n this.getPanZoom = () => {\n return {target: this.getCurrentPosition(), zoom: targetCamera.zoom };\n }\n\n this.setCenterZoom = (center, zoom) => {\n v1.set(center[0], center[1], target.z).unproject(camera);\n v2.copy(v1).sub(targetCamera.target);\n targetCamera.target.copy(v1);\n targetCamera.lookAt(targetCamera.target);\n targetCamera.position.add(v2);\n targetCamera.zoom = zoom;\n targetCamera.updateProjectionMatrix();\n }\n\n this.setEventCallback = (callback) => {\n if (callback === undefined || (typeof callback == 'function'))\n eventCallback = callback;\n }\n\n this.triggerCallback = () => {\n if (eventCallback !== undefined && (typeof eventCallback == 'function'))\n eventCallback();\n }\n};\n\nexports.Viewport = Viewport\nexports.CameraControls = CameraControls\nexports.SmoothCameraTransition = SmoothCameraTransition\nexports.RotateCameraTransition = RotateCameraTransition\nexports.RayCaster = RayCaster\nexports.CameraAutoTumble = CameraAutoTumble\nexports.StereoEffect = StereoEffect\nexports.NDCCameraControl = NDCCameraControl\n","const { Group, Matrix4 } = require('three');\nconst Pointset = require('./primitives/pointset').Pointset;\nconst Lines = require('./primitives/lines').Lines;\nconst Lines2 = require('./primitives/lines2').Lines2;\nconst Geometry = require('./primitives/geometry').Geometry;\nconst THREE = require('three');\nlet uniqueiId = 0;\n\nconst getUniqueId = function () {\n return \"re\" + uniqueiId++;\n}\n\n/**\n * Provides a hierachical structure to objects, Each region\n * may contain multiple child regions and {@link ZincObject}.\n * \n * @class\n * @author Alan Wu\n * @return {Region}\n */\nlet Region = function (parentIn, sceneIn) {\n let parent = parentIn;\n let group = new Group();\n group.matrixAutoUpdate = false;\n group.userData = this;\n let children = [];\n let name = \"\";\n let zincObjects = [];\n let scene = sceneIn;\n const tMatrix = new Matrix4();\n let duration = 3000;\n tMatrix.set(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n this.pickableUpdateRequired = true;\n this.isRegion = true;\n this.uuid = getUniqueId();\n \n\n /**\n * Hide all primitives belong to this region.\n */\n this.hideAllPrimitives = () => {\n children.forEach(child => child.hideAllPrimitives());\n zincObjects.forEach(zincObject => zincObject.setVisibility(false));\n }\n\n /**\n * Show all primitives belong to this region.\n */\n this.showAllPrimitives = () => {\n children.forEach(child => child.showAllPrimitives());\n zincObjects.forEach(zincObject => zincObject.setVisibility(true));\n }\n\n /**\n * Set the visibility and propagate it down the hierarchies\n * depending on the flag.\n * \n * @param {Boolean} flag - A flag indicating either the visibilty to be on/off.\n */\n this.setVisibility = (flag) => {\n if (flag != group.visible) {\n group.visible = flag;\n this.pickableUpdateRequired = true;\n }\n }\n\n /**\n * Get the visibility of the region and its children.\n * \n * @return {Boolean}\n */\n this.getVisibility = () => {\n return group.visible;\n }\n\n /**\n * Get the {THREE.Group} containing all child regions and their\n * primitives.\n * \n * @return {THREE.Group}\n */\n this.getGroup = () => {\n return group;\n }\n\n /**\n * Set the transformation with a {THREE.Matrix4} matrix, this will affect\n * all primitives in this and its child regions\n * \n * @param {THREE.Matrix4} transformation - The transformation matrix\n * used for the transformation.\n */\n this.setTransformation = transformation => {\n tMatrix.set(...transformation);\n group.matrix.copy(tMatrix);\n group.updateMatrixWorld();\n }\n\n /**\n * Set the name of this region.\n * \n * @param {String} nameIn - Name to be set for this region. It must be defined\n * and non-empty.\n */\n this.setName = (nameIn) => {\n if (nameIn && nameIn !== \"\") {\n name = nameIn;\n }\n }\n\n /**\n * Get the name of this region.\n * \n * @return {String}\n */\n this.getName = () => {\n return name;\n }\n\n /**\n * Get the parent region.\n * \n * @return {Region}\n */\n this.getParent = () => {\n return parent;\n }\n\n /**\n * Get the array of each hierarachy from the root region to this region.\n * \n * @return {Array}\n */\n this.getFullSeparatedPath = () => {\n const paths = [];\n if (name !== \"\") {\n paths.push(name);\n for (let p = parent; p !== undefined;) {\n const parentName = p.getName();\n if (parentName !== \"\") {\n paths.unshift(parentName);\n }\n p = p.getParent();\n }\n }\n return paths;\n }\n\n /**\n * Get the full paths from the root region to this region.\n * \n * @return {String}\n */\n this.getFullPath = () => {\n const paths = this.getFullSeparatedPath();\n if (paths.length > 0) {\n let fullPath = paths.shift();\n paths.forEach(path => {\n fullPath = fullPath.concat(\"/\", path);\n });\n return fullPath;\n }\n return \"\";\n }\n\n /**\n * Create a new child region with the provided name.\n * @param {String} nameIn - Name to be set for the new child region.\n * \n * @return {Region}\n */\n this.createChild = (nameIn) => {\n let childRegion = new Region(this, scene);\n childRegion.setName(nameIn);\n children.push(childRegion);\n group.add(childRegion.getGroup());\n return childRegion;\n }\n\n /**\n * Get the child region with matching childName.\n * @param {String} childName - Name to be matched.\n * \n * @return {Region}\n */\n this.getChildWithName = childName => {\n if (childName) {\n const lowerChildName = childName.toLowerCase();\n for (let i = 0; i < children.length; i++) {\n if (children[i].getName().toLowerCase() === lowerChildName)\n return children[i];\n }\n }\n return undefined;\n }\n\n /**\n * Find a child region using the path array.\n * @param {Array} pathArray - Array containing regions' name at each\n * hierarchy to match.\n * \n * @return {Region}\n */\n this.findChildFromSeparatedPath = pathArray => {\n if (pathArray && pathArray.length > 0) {\n if (pathArray[0] === \"\") {\n pathArray.shift();\n }\n }\n if (pathArray && pathArray.length > 0) {\n const childRegion = this.getChildWithName(pathArray[0]);\n if (childRegion) {\n pathArray.shift();\n return childRegion.findChildFromSeparatedPath(pathArray);\n } else {\n return undefined;\n }\n }\n return this;\n }\n\n /**\n * Find the region using the provided relative path.\n * \n * @param {String} path - Relative paths from this region\n * to the child region.\n * \n * @return {Region}\n */\n this.findChildFromPath = (path) => {\n const pathArray = path.split(\"/\");\n return this.findChildFromSeparatedPath(pathArray);\n }\n\n /**\n * Create a new child using the path array. All required new regions\n * down the path will be created.\n * \n * @param {Array} pathArray - Array containing regions' name, new regions\n * will be created along the path if not found.\n * \n * @return {Region}\n */\n this.createChildFromSeparatedPath = pathArray => {\n if (pathArray.length > 0) {\n if (pathArray[0] === \"\") {\n pathArray.shift();\n }\n }\n if (pathArray.length > 0) {\n let childRegion = this.getChildWithName(pathArray[0]);\n if (!childRegion) {\n childRegion = this.createChild(pathArray[0]);\n }\n pathArray.shift();\n return childRegion.createChildFromSeparatedPath(pathArray);\n }\n return this;\n }\n\n /**\n * Create a new child using the path. All required new regions\n * down the path will be created.\n * \n * @param {String} path - Relative paths from the region\n * to the child region.\n * \n * @return {Region}\n */\n this.createChildFromPath = (path) => {\n const pathArray = path.split(\"/\");\n return this.createChildFromSeparatedPath(pathArray);\n }\n\n\n /**\n * Return existing region if it exists, otherwise, create a new\n * region with the provided path.\n * \n * @param {String} path - Relative paths from the region\n * to the child region.\n * \n * @return {Region}\n */\n this.findOrCreateChildFromPath = (path) => {\n let childRegion = this.findChildFromPath(path);\n if (!childRegion) {\n childRegion = this.createChildFromPath(path);\n }\n return childRegion;\n }\n\n /**\n * Add a zinc object into this region, the morph will be added\n * to the group.\n * \n * @param {ZincObject} zincObject - Zinc object to be added into\n * this region.\n */\n this.addZincObject = zincObject => {\n if (zincObject) {\n zincObject.setRegion(this);\n group.add(zincObject.getGroup());\n zincObjects.push(zincObject);\n this.pickableUpdateRequired = true;\n if (scene) {\n scene.triggerObjectAddedCallback(zincObject);\n }\n }\n }\n\n\n /**\n * Remove a ZincObject from this region if it presents. This will eventually\n * destroy the object and free up the memory.\n * \n * @param {ZincObject} zincObject - object to be removed from this region.\n */\n this.removeZincObject = zincObject => {\n for (let i = 0; i < zincObjects.length; i++) {\n if (zincObject === zincObjects[i]) {\n group.remove(zincObject.getGroup());\n zincObjects.splice(i, 1);\n if (scene) {\n scene.triggerObjectRemovedCallback(zincObject);\n }\n zincObject.dispose();\n this.pickableUpdateRequired = true;\n return;\n }\n }\n }\n\n /**\n * Return true if pickable objects require an update.\n * \n * @param {Boolean} transverse - Check child regions as well\n * if this is set to true.\n * \n * @return {Boolean}\n */\n this.checkPickableUpdateRequred = (transverse) => {\n if (this.pickableUpdateRequired) return true;\n if (transverse) {\n let flag = false;\n for (let i = 0; i < children.length; i++) {\n flag = children[i].checkPickableUpdateRequred(transverse);\n if (flag) return true;\n }\n }\n return false;\n }\n\n /**\n * Get all pickable objects.\n */\n this.getPickableThreeJSObjects = (objectsList, transverse) => {\n if (group.visible) {\n zincObjects.forEach(zincObject => {\n if (zincObject.getGroup() && zincObject.getGroup().visible) {\n let marker = zincObject.marker;\n if (marker && marker.isEnabled()) {\n objectsList.push(marker.getMorph());\n }\n objectsList.push(zincObject.getGroup());\n }\n });\n if (transverse) {\n children.forEach(childRegion => {\n childRegion.getPickableThreeJSObjects(objectsList, transverse);\n });\n }\n this.pickableUpdateRequired = false;\n }\n return objectsList;\n }\n\n /**\n * Set the default duration value for all zinc objects\n * that are to be loaded into this region.\n * \n * @param {Number} durationIn - duration of the scene.\n */\n this.setDuration = durationIn => {\n duration = durationIn;\n zincObjects.forEach(zincObject => zincObject.setDuration(durationIn));\n children.forEach(childRegion => childRegion.setDuration(durationIn));\n }\n\n /**\n * Get the default duration value.\n * returns {Number}\n */\n this.getDuration = () => {\n return duration;\n }\n\n /**\n * Get the bounding box of all the object in this and child regions only.\n * Do not include the matrix transformation here, it is done at the primitives\n * level.\n * \n * @returns {THREE.Box3} \n */\n this.getBoundingBox = transverse => {\n let boundingBox1 = undefined, boundingBox2 = undefined;\n zincObjects.forEach(zincObject => {\n boundingBox2 = zincObject.getBoundingBox();\n if (boundingBox2) {\n if (boundingBox1 == undefined) {\n boundingBox1 = boundingBox2.clone();\n } else {\n boundingBox1.union(boundingBox2);\n }\n }\n });\n if (transverse) {\n children.forEach(childRegion => {\n boundingBox2 = childRegion.getBoundingBox(transverse);\n if (boundingBox2) {\n if (boundingBox1 == undefined) {\n boundingBox1 = boundingBox2.clone();\n } else {\n boundingBox1.union(boundingBox2);\n }\n }\n });\n }\n return boundingBox1;\n }\n\n /**\n * Clear and dispose all objects belong to this region.\n * \n * @param {Boolean} transverse - Clear and dispose child regions as well\n * if this is set to true.\n */\n this.clear = transverse => {\n if (transverse) {\n children.forEach(childRegion => childRegion.clear(transverse));\n }\n zincObjects.forEach(zincObject => {\n group.remove(zincObject.getGroup());\n zincObject.dispose();\n });\n children = [];\n zincObjects = [];\n }\n\n /**\n * Check if a zincObject is a member of this region.\n * \n * @param {ZincObject} zincObject - The ZincObject to be checked.\n * @param {Boolean} transverse - Also check the child regions.\n * \n * @return {Boolean}\n */\n this.objectIsInRegion = (zincObject, transverse) => {\n for (let i = 0; i < zincObjects.length; i++) {\n if (zincObject === zincObjects[i]) {\n return true;\n }\n }\n if (transverse) {\n for (let i = 0; i < children.length; i++) {\n if (children[i].objectIsInRegion(zincObject, transverse))\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * A function which iterates through the list of geometries and call the callback\n * function with the geometries as the argument.\n * \n * @param {Function} callbackFunction - Callback function with the geometry\n * as an argument.\n * @param {Boolean} transverse - Also perform the same callback function for\n * all child regions if this is set to be true.\n */\n this.forEachGeometry = (callbackFunction, transverse) => {\n zincObjects.forEach(zincObject => {\n if (zincObject.isGeometry)\n callbackFunction(zincObject);\n });\n if (transverse)\n children.forEach(childRegion => childRegion.forEachGeometry(\n callbackFunction, transverse));\n }\n\n /**\n * A function which iterates through the list of glyphsets and call the callback\n * function with the glyphset as the argument.\n * \n * @param {Function} callbackFunction - Callback function with the glyphset\n * as an argument.\n * @param {Boolean} transverse - Also perform the same callback function for\n * all child regions if this is set to be true.\n */\n this.forEachGlyphset = (callbackFunction, transverse) => {\n zincObjects.forEach(zincObject => {\n if (zincObject.isGlyphset)\n callbackFunction(zincObject);\n });\n if (transverse)\n children.forEach(childRegion => childRegion.forEachGlyphset(\n callbackFunction, transverse));\n }\n\n /**\n * A function which iterates through the list of pointsets and call the callback\n * function with the pointset as the argument.\n * \n * @param {Function} callbackFunction - Callback function with the pointset\n * as an argument.\n * @param {Boolean} transverse - Also perform the same callback function for\n * all child regions if this is set to be true.\n */\n this.forEachPointset = (callbackFunction, transverse) => {\n zincObjects.forEach(zincObject => {\n if (zincObject.isPointset)\n callbackFunction(zincObject);\n });\n if (transverse)\n children.forEach(childRegion => childRegion.forEachPointset(\n callbackFunction, transverse));\n }\n\n /**\n * A function which iterates through the list of lines and call the callback\n * function with the lines as the argument.\n * \n * @param {Function} callbackFunction - Callback function with the lines\n * as an argument.\n * @param {Boolean} transverse - Also perform the same callback function for\n * all child regions if this is set to be true.\n */\n this.forEachLine = (callbackFunction, transverse) => {\n zincObjects.forEach(zincObject => {\n if (zincObject.isLines)\n callbackFunction(zincObject);\n });\n if (transverse)\n children.forEach(childRegion => childRegion.forEachLine(\n callbackFunction, transverse));\n }\n\n this.findObjectsWithAnatomicalId = (anatomicalId, transverse) => {\n zincObjects.forEach(zincObject => {\n if (zincObject.anatomicalId === anatomicalId)\n objectsArray.push(zincObject);\n });\n if (transverse) {\n children.forEach(childRegion => {\n let childObjects = childRegion.findObjectsWithAnatomicalId(anatomicalId, transverse);\n objectsArray.push(...childObjects);\n });\n }\n\n return objectsArray;\n }\n\n /** \n * Find and return all zinc objects in this and child regions with \n * the matching GroupName.\n * \n * @param {String} groupName - Groupname to match with.\n * @param {Boolean} transverse - Also look for the object with groupName\n * in child regions if set to true.\n * @returns {Array}\n */\n this.findObjectsWithGroupName = (groupName, transverse) => {\n const objectsArray = [];\n zincObjects.forEach(zincObject => {\n const lowerObjectName = zincObject.groupName ? zincObject.groupName.toLowerCase() : zincObject.groupName;\n const lowerGroupName = groupName ? groupName.toLowerCase() : groupName;\n if (lowerObjectName === lowerGroupName)\n objectsArray.push(zincObject);\n });\n if (transverse) {\n children.forEach(childRegion => {\n let childObjects = childRegion.findObjectsWithGroupName(groupName, transverse);\n objectsArray.push(...childObjects);\n });\n }\n return objectsArray;\n }\n\n /** \n * Find and return all geometries in this and child regions with \n * the matching GroupName.\n * \n * @param {String} groupName - Groupname to match with.\n * @param {Boolean} transverse - Also look for the object with groupName\n * in child regions if set to true.\n * @returns {Array}\n */\n this.findGeometriesWithGroupName = (groupName, transverse) => {\n const primitivesArray = this.findObjectsWithGroupName(groupName, transverse);\n const geometriesArray = primitivesArray.filter(primitive => primitive.isGeometry);\n return geometriesArray;\n }\n\n /** \n * Find and return all pointsets in this and child regions with\n * the matching groupName.\n * \n * @param {String} groupName - Groupname to match with.\n * @param {Boolean} transverse - Also look for the object with groupName\n * in child regions if set to true.\n * @returns {Array}\n */\n this.findPointsetsWithGroupName = (groupName, transverse) => {\n const primitivesArray = this.findObjectsWithGroupName(groupName, transverse);\n const pointsetsArray = primitivesArray.filter(primitive => primitive.isPointset);\n return pointsetsArray;\n }\n\n /** \n * Find and return all glyphsets in this and child regions with\n * the matching groupName.\n * \n * @param {String} groupName - Groupname to match with.\n * @param {Boolean} transverse - Also look for the object with groupName\n * in child regions if set to true.\n * @returns {Array}\n */\n this.findGlyphsetsWithGroupName = (groupName, transverse) => {\n const primitivesArray = this.findObjectsWithGroupName(groupName, transverse);\n const glyphsetsArray = primitivesArray.filter(primitive => primitive.isGlyphset);\n return glyphsetsArray;\n }\n\n /** \n * Find and return all lines in this and child regions with\n * the matching groupName.\n * \n * @param {String} groupName - Groupname to match with.\n * @param {Boolean} transverse - Also look for the object with groupName\n * in child regions if set to true.\n * @returns {Array}\n */\n this.findLinesWithGroupName = (groupName, transverse) => {\n const primitivesArray = this.findObjectsWithGroupName(groupName, transverse);\n const linesArray = primitivesArray.filter(primitive => primitive.isLines);\n return linesArray;\n }\n\n /** \n * Get all zinc objects in this region.\n * \n * @param {Boolean} transverse - Include zinc objects in child regions if this is\n * set to true.\n * @returns {Array}\n */\n this.getAllObjects = transverse => {\n const objectsArray = [...zincObjects];\n if (transverse) {\n children.forEach(childRegion => {\n let childObjects = childRegion.getAllObjects(transverse);\n objectsArray.push(...childObjects);\n });\n }\n return objectsArray;\n }\n\n /** \n * Get all child regions.\n * \n * @param {Boolean} transverse - Include all regions which are descendants of \n * this reigon when this is set to true.\n * @returns {Array}\n */\n this.getChildRegions = transverse => {\n const objectsArray = [...children];\n if (transverse) {\n children.forEach(childRegion => {\n const childObjects = childRegion.getChildRegions(transverse);\n objectsArray.push(...childObjects);\n });\n }\n return objectsArray;\n }\n\n /**\n * Get the current time of the region.\n * Return -1 if no graphics in the region.\n * \n * @return {Number}\n */\n this.getCurrentTime = () => {\n if (zincObjects[0] != undefined) {\n return zincObjects[0].getCurrentTime();\n } else {\n for (let i = 0; i < children.length; i++) {\n const time = children[i].getCurrentTime();\n if (time !== -1)\n return time;\n }\n }\n return -1;\n }\n\n /**\n * Set the current time of all the objects of this region.\n * \n * @param {Number} time - Value to set the time to.\n * @param {Boolean} transverse - Set the time for chidl regions if\n * this is set to true.\n */\n this.setMorphTime = (time, transverse) => {\n zincObjects.forEach(zincObject => {\n zincObject.setMorphTime(time);\n });\n if (transverse) {\n children.forEach(childRegion => {\n childRegion.setMorphTime(time);\n });\n }\n }\n\n /**\n * Check if any object in this region is time varying.\n * \n * @return {Boolean}\n */\n this.isTimeVarying = () => {\n for (let i = 0; i < zincObjects.length; i++) {\n if (zincObjects[i].isTimeVarying()) {\n return true;\n }\n }\n for (let i = 0; i < children.length; i++) {\n if (children[i].isTimeVarying()) {\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Update geometries and glyphsets based on the calculated time.\n * @private\n */\n this.renderGeometries = (playRate, delta, playAnimation, cameraControls, options, transverse) => {\n // Let video dictates the progress if one is present\n const allObjects = this.getAllObjects(transverse);\n allObjects.forEach(zincObject => {\n zincObject.render(playRate * delta, playAnimation, cameraControls, options);\n });\n //process markers visibility and size, as long as there are more than\n //one entry in markersList is greater than 1, markers have been enabled.\n if (options && (playAnimation === false) &&\n options.markerCluster?.markerUpdateRequired) {\n /** \n const markerDepths = Object.values(options.markersList)\n .map((marker) => marker.ndc.z);\n if (markerDepths.length > 1) {\n const min = Math.min(...markerDepths);\n const max = Math.max(...markerDepths);\n allObjects.forEach(zincObject => {\n zincObject.processMarkerVisual(min, max);\n });\n }\n */\n options.markerCluster.calculate();\n }\n }\n\n /**\n * Update geometries and glyphsets based on the calculated time.\n */\n this.createPoints = ( groupName, coords, labels, colour ) => {\n let isNew = false;\n const zincObjects = this.findObjectsWithGroupName(groupName, false);\n const index = zincObjects.findIndex((zincObject) => zincObject.isPointset);\n const pointset = index > -1 ? zincObjects[index] : new Pointset();\n pointset.addPoints(coords, labels, colour);\n if (index === -1) {\n pointset.setName(groupName);\n this.addZincObject(pointset);\n isNew = true;\n } else {\n this.pickableUpdateRequired = true;\n }\n return { zincObject: pointset, isNew };\n }\n\n /**\n * Update geometries and glyphsets based on the calculated time.\n */\n this.createLines = ( groupName, coords, colour ) => {\n let isNew = false;\n const zincObjects = this.findObjectsWithGroupName(groupName, false);\n const index = zincObjects.findIndex((zincObject) => zincObject.isLines);\n const lines = index > -1 ? zincObjects[index] : new Lines2();\n lines.addLines(coords, colour);\n if (index === -1) {\n lines.setName(groupName);\n this.addZincObject(lines);\n isNew = true;\n } else {\n this.pickableUpdateRequired = true;\n }\n return { zincObject: lines, isNew };\n }\n\n /**\n * Add a new geometry\n */\n this.createGeometryFromThreeJSGeometry = (\n groupName, geometry, colour, opacity, visibility, renderOrder) => {\n const zincGeometry = new Geometry();\n const material = new THREE.MeshPhongMaterial({\n color : colour,\n morphTargets : false,\n morphNormals : false,\n transparent : true,\n opacity : opacity,\n side : THREE.DoubleSide\n });\n zincGeometry.createMesh(\n geometry,\n material,\n {localTimeEnabled: false, localMorphColour: false,},\n );\n if (zincGeometry.getMorph()) {\n zincGeometry.setVisibility(false);\n zincGeometry.setName(groupName);\n zincGeometry.setRenderOrder(renderOrder);\n this.addZincObject(zincGeometry);\n return zincGeometry;\n }\n return undefined;\n }\n}\n\nexports.Region = Region;\n","const THREE = require('three');\nconst toBufferGeometry = require('../utilities').toBufferGeometry;\nconst LineSegments2 = require(\"../three/line/LineSegments2\").LineSegments2;\nconst LineMaterial = require(\"../three/line/LineMaterial\").LineMaterial;\nconst LineSegmentsGeometry = require(\"../three/line/LineSegmentsGeometry\").LineSegmentsGeometry;\n\n/**\n * Provides an object which stores lines.\n * This is created when a valid json file containing lines is read into a {@link Zinc.Scene}\n * object.\n * \n * @class\n * @author Alan Wu\n * @return {Lines}\n */\nconst Lines2 = function () {\n (require('./lines').Lines).call(this);\n\tthis.isLines2 = true;\n let positions = new Array(300);\n\n /**\n * Create the line segements using geometry and material.\n * \n * @param {Array} arrayIn - Geometry of lines to be rendered.\n * @param {THREE.Material} materialIn - Material to be set for the lines.\n * @param {Object} options - Provide various options\n * @param {Boolean} options.localTimeEnabled - A flag to indicate either the lines is\n * time dependent.\n * @param {Boolean} options.localMorphColour - A flag to indicate either the colour is\n * time dependent.\n */\n\tthis.createLineSegment = (arrayIn, materialIn, options) => {\n\t\tif (arrayIn && materialIn) {\n const linesGeometry = new LineSegmentsGeometry();\n linesGeometry.setPositions(arrayIn);\n linesGeometry.colorsNeedUpdate = true;\n const line = new LineSegments2(linesGeometry, materialIn);\n line.scale.set(1, 1, 1);\n line.computeLineDistances();\n this.setMesh(line, options.localTimeEnabled, options.localMorphColour);\n\t\t}\n\t}\n\n /**\n * Set the width for the lines.\n * \n * @param {Number} width - Width of the lines.\n */\n\tthis.setWidth = width => {\n\t\tif (this.morph && this.morph.material) {\n\t\t\tthis.morph.material.linewidth = width;\n\t\t\tthis.morph.material.needsUpdate = true;\n\t\t}\n\t}\n\n /**\n * Add new vertices into the array\n */\n this.addVertices = function(coords) {\n if (coords && coords.length) {\n let mesh = this.getMorph();\n if (!mesh) {\n this.drawRange = 0;\n }\n let index = this.drawRange * 3;\n coords.forEach(coord => {\n positions[index++] = coord[0];\n positions[index++] = coord[1];\n positions[index++] = coord[2];\n this.drawRange++;\n });\n //fill the rest of the array.\n if (!mesh) {\n while (index < 300) {\n positions[index++] = coords[0][0];\n positions[index++] = coords[0][1];\n positions[index++] = coords[0][2];\n }\n }\n\n if (mesh) {\n mesh.geometry.setPositions(positions);\n mesh.computeLineDistances();\n this.boundingBoxUpdateRequired = true;\n }\n }\n return positions;\n }\n\n /**\n * Get the vertices by face index\n */\n this.getVerticesByFaceIndex = function(faceIndex) {\n let vIndex = faceIndex * 2 * 3;\n const mesh = this.getMorph();\n if (mesh && (this.drawRange * 3) > vIndex) {\n const position = mesh.geometry.getAttribute( 'instanceStart' );\n return [\n [\n position.data.array[vIndex],\n position.data.array[++vIndex],\n position.data.array[++vIndex],\n ],\n [\n position.data.array[++vIndex],\n position.data.array[++vIndex],\n position.data.array[++vIndex],\n ],\n ];\n }\n return [];\n }\n\n /**\n * Edit Vertice in index.\n */\n this.editVertices = function(coords, i) {\n if (coords && coords.length) {\n let mesh = this.getMorph();\n const maxIndex = i + coords.length - 1;\n if (!mesh || 0 > i || maxIndex >= this.drawRange) {\n return;\n } else {\n let index = i * 3;\n coords.forEach(coord => {\n positions[index++] = coord[0];\n positions[index++] = coord[1];\n positions[index++] = coord[2];\n });\n index = this.drawRange * 3;\n while (index < 300) {\n positions[index++] = coords[0][0];\n positions[index++] = coords[0][1];\n positions[index++] = coords[0][2];\n }\n mesh.geometry.setPositions(positions);\n mesh.computeLineDistances();\n this.boundingBoxUpdateRequired = true;\n }\n }\n return positions;\n }\n\n /**\n * Add new lines to existing lines if it exists, otherwise\n * create a new one and add to it.\n * @param {Array} coords -An array of three components coordinates.\n\n * @param {Number} colour - A hex value of the colour for the points\n */\n\tthis.addLines = (coords, colour) => {\n if (coords && coords.length > 0) {\n this.addVertices(coords);\n let mesh = this.getMorph();\n if (!mesh) {\n const material = new LineMaterial( {\n color: colour,\n linewidth:1,\n vertexColors: false,\n worldUnits: false,\n });\n material.resolution.set( window.innerWidth, window.innerHeight );\n const options = { localTimeEnabled: false, localMorphColour: false};\n this.createLineSegment(positions, material, options);\n }\n if (this.region) this.region.pickableUpdateRequired = true;\n }\n\t}\n\n this.render = (delta, playAnimation, cameraControls, options) => {\n const material = this.getMorph().material;\n material.resolution.set( window.innerWidth, window.innerHeight );\n }\n}\n\nLines2.prototype = Object.create((require('./lines').Lines).prototype);\nLines2.prototype.constructor = Lines2;\nexports.Lines2 = Lines2;\n","import {\n\tBox3,\n\tInstancedInterleavedBuffer,\n\tInterleavedBufferAttribute,\n\tLine3,\n\tMathUtils,\n\tMatrix4,\n\tMesh,\n\tSphere,\n\tVector3,\n\tVector4\n} from 'three';\nimport { LineSegmentsGeometry } from './LineSegmentsGeometry.js';\nimport { LineMaterial } from './LineMaterial.js';\n\nconst _start = new Vector3();\nconst _end = new Vector3();\n\nconst _start4 = new Vector4();\nconst _end4 = new Vector4();\n\nconst _ssOrigin = new Vector4();\nconst _ssOrigin3 = new Vector3();\nconst _mvMatrix = new Matrix4();\nconst _line = new Line3();\nconst _closestPoint = new Vector3();\n\nconst _box = new Box3();\nconst _sphere = new Sphere();\nconst _clipToWorldVector = new Vector4();\n\nclass LineSegments2 extends Mesh {\n\n\tconstructor( geometry = new LineSegmentsGeometry(), material = new LineMaterial( { color: Math.random() * 0xffffff } ) ) {\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'LineSegments2';\n\n\t}\n\n\t// for backwards-compatability, but could be a method of LineSegmentsGeometry...\n\n\tcomputeLineDistances() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tconst instanceStart = geometry.attributes.instanceStart;\n\t\tconst instanceEnd = geometry.attributes.instanceEnd;\n\t\tconst lineDistances = new Float32Array( 2 * instanceStart.count );\n\n\t\tfor ( let i = 0, j = 0, l = instanceStart.count; i < l; i ++, j += 2 ) {\n\n\t\t\t_start.fromBufferAttribute( instanceStart, i );\n\t\t\t_end.fromBufferAttribute( instanceEnd, i );\n\n\t\t\tlineDistances[ j ] = ( j === 0 ) ? 0 : lineDistances[ j - 1 ];\n\t\t\tlineDistances[ j + 1 ] = lineDistances[ j ] + _start.distanceTo( _end );\n\n\t\t}\n\n\t\tconst instanceDistanceBuffer = new InstancedInterleavedBuffer( lineDistances, 2, 1 ); // d0, d1\n\n\t\tgeometry.setAttribute( 'instanceDistanceStart', new InterleavedBufferAttribute( instanceDistanceBuffer, 1, 0 ) ); // d0\n\t\tgeometry.setAttribute( 'instanceDistanceEnd', new InterleavedBufferAttribute( instanceDistanceBuffer, 1, 1 ) ); // d1\n\n\t\treturn this;\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tif ( raycaster.camera === null ) {\n\n\t\t\tconsole.error( 'LineSegments2: \"Raycaster.camera\" needs to be set in order to raycast against LineSegments2.' );\n\n\t\t}\n\n\t\tconst threshold = ( raycaster.params.Line2 !== undefined ) ? raycaster.params.Line2.threshold || 0 : 0;\n\n\t\tconst ray = raycaster.ray;\n\t\tconst camera = raycaster.camera;\n\t\tconst projectionMatrix = camera.projectionMatrix;\n\n\t\tconst matrixWorld = this.matrixWorld;\n\t\tconst geometry = this.geometry;\n\t\tconst material = this.material;\n\t\tconst resolution = material.resolution;\n\t\tconst lineWidth = material.linewidth + threshold;\n\n\t\tconst instanceStart = geometry.attributes.instanceStart;\n\t\tconst instanceEnd = geometry.attributes.instanceEnd;\n\n\t\t// camera forward is negative\n\t\tconst near = - camera.near;\n\n\t\t// clip space is [ - 1, 1 ] so multiply by two to get the full\n\t\t// width in clip space\n\t\tconst ssMaxWidth = 2.0 * Math.max( lineWidth / resolution.width, lineWidth / resolution.height );\n\n\t\t//\n\n\t\t// check if we intersect the sphere bounds\n\t\tif ( geometry.boundingSphere === null ) {\n\n\t\t\tgeometry.computeBoundingSphere();\n\n\t\t}\n\n\t\t_sphere.copy( geometry.boundingSphere ).applyMatrix4( matrixWorld );\n\t\tconst distanceToSphere = Math.max( camera.near, _sphere.distanceToPoint( ray.origin ) );\n\n\t\t// get the w component to scale the world space line width\n\t\t_clipToWorldVector.set( 0, 0, - distanceToSphere, 1.0 ).applyMatrix4( camera.projectionMatrix );\n\t\t_clipToWorldVector.multiplyScalar( 1.0 / _clipToWorldVector.w );\n\t\t_clipToWorldVector.applyMatrix4( camera.projectionMatrixInverse );\n\n\t\t// increase the sphere bounds by the worst case line screen space width\n\t\tconst sphereMargin = Math.abs( ssMaxWidth / _clipToWorldVector.w ) * 0.5;\n\t\t_sphere.radius += sphereMargin;\n\n\t\tif ( raycaster.ray.intersectsSphere( _sphere ) === false ) {\n\n\t\t\treturn;\n\n\t\t}\n\n\t\t//\n\n\t\t// check if we intersect the box bounds\n\t\tif ( geometry.boundingBox === null ) {\n\n\t\t\tgeometry.computeBoundingBox();\n\n\t\t}\n\n\t\t_box.copy( geometry.boundingBox ).applyMatrix4( matrixWorld );\n\t\tconst distanceToBox = Math.max( camera.near, _box.distanceToPoint( ray.origin ) );\n\n\t\t// get the w component to scale the world space line width\n\t\t_clipToWorldVector.set( 0, 0, - distanceToBox, 1.0 ).applyMatrix4( camera.projectionMatrix );\n\t\t_clipToWorldVector.multiplyScalar( 1.0 / _clipToWorldVector.w );\n\t\t_clipToWorldVector.applyMatrix4( camera.projectionMatrixInverse );\n\n\t\t// increase the sphere bounds by the worst case line screen space width\n\t\tconst boxMargin = Math.abs( ssMaxWidth / _clipToWorldVector.w ) * 0.5;\n\t\t_box.max.x += boxMargin;\n\t\t_box.max.y += boxMargin;\n\t\t_box.max.z += boxMargin;\n\t\t_box.min.x -= boxMargin;\n\t\t_box.min.y -= boxMargin;\n\t\t_box.min.z -= boxMargin;\n\n\t\tif ( raycaster.ray.intersectsBox( _box ) === false ) {\n\n\t\t\treturn;\n\n\t\t}\n\n\t\t//\n\n\t\t// pick a point 1 unit out along the ray to avoid the ray origin\n\t\t// sitting at the camera origin which will cause \"w\" to be 0 when\n\t\t// applying the projection matrix.\n\t\tray.at( 1, _ssOrigin );\n\n\t\t// ndc space [ - 1.0, 1.0 ]\n\t\t_ssOrigin.w = 1;\n\t\t_ssOrigin.applyMatrix4( camera.matrixWorldInverse );\n\t\t_ssOrigin.applyMatrix4( projectionMatrix );\n\t\t_ssOrigin.multiplyScalar( 1 / _ssOrigin.w );\n\n\t\t// screen space\n\t\t_ssOrigin.x *= resolution.x / 2;\n\t\t_ssOrigin.y *= resolution.y / 2;\n\t\t_ssOrigin.z = 0;\n\n\t\t_ssOrigin3.copy( _ssOrigin );\n\n\t\t_mvMatrix.multiplyMatrices( camera.matrixWorldInverse, matrixWorld );\n\n\t\tfor ( let i = 0, l = instanceStart.count; i < l; i ++ ) {\n\n\t\t\t_start4.fromBufferAttribute( instanceStart, i );\n\t\t\t_end4.fromBufferAttribute( instanceEnd, i );\n\n\t\t\t_start4.w = 1;\n\t\t\t_end4.w = 1;\n\n\t\t\t// camera space\n\t\t\t_start4.applyMatrix4( _mvMatrix );\n\t\t\t_end4.applyMatrix4( _mvMatrix );\n\n\t\t\t// skip the segment if it's entirely behind the camera\n\t\t\tvar isBehindCameraNear = _start4.z > near && _end4.z > near;\n\t\t\tif ( isBehindCameraNear ) {\n\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\t// trim the segment if it extends behind camera near\n\t\t\tif ( _start4.z > near ) {\n\n\t\t\t\tconst deltaDist = _start4.z - _end4.z;\n\t\t\t\tconst t = ( _start4.z - near ) / deltaDist;\n\t\t\t\t_start4.lerp( _end4, t );\n\n\t\t\t} else if ( _end4.z > near ) {\n\n\t\t\t\tconst deltaDist = _end4.z - _start4.z;\n\t\t\t\tconst t = ( _end4.z - near ) / deltaDist;\n\t\t\t\t_end4.lerp( _start4, t );\n\n\t\t\t}\n\n\t\t\t// clip space\n\t\t\t_start4.applyMatrix4( projectionMatrix );\n\t\t\t_end4.applyMatrix4( projectionMatrix );\n\n\t\t\t// ndc space [ - 1.0, 1.0 ]\n\t\t\t_start4.multiplyScalar( 1 / _start4.w );\n\t\t\t_end4.multiplyScalar( 1 / _end4.w );\n\n\t\t\t// screen space\n\t\t\t_start4.x *= resolution.x / 2;\n\t\t\t_start4.y *= resolution.y / 2;\n\n\t\t\t_end4.x *= resolution.x / 2;\n\t\t\t_end4.y *= resolution.y / 2;\n\n\t\t\t// create 2d segment\n\t\t\t_line.start.copy( _start4 );\n\t\t\t_line.start.z = 0;\n\n\t\t\t_line.end.copy( _end4 );\n\t\t\t_line.end.z = 0;\n\n\t\t\t// get closest point on ray to segment\n\t\t\tconst param = _line.closestPointToPointParameter( _ssOrigin3, true );\n\t\t\t_line.at( param, _closestPoint );\n\n\t\t\t// check if the intersection point is within clip space\n\t\t\tconst zPos = MathUtils.lerp( _start4.z, _end4.z, param );\n\t\t\tconst isInClipSpace = zPos >= - 1 && zPos <= 1;\n\n\t\t\tconst isInside = _ssOrigin3.distanceTo( _closestPoint ) < lineWidth * 0.5;\n\n\t\t\tif ( isInClipSpace && isInside ) {\n\n\t\t\t\t_line.start.fromBufferAttribute( instanceStart, i );\n\t\t\t\t_line.end.fromBufferAttribute( instanceEnd, i );\n\n\t\t\t\t_line.start.applyMatrix4( matrixWorld );\n\t\t\t\t_line.end.applyMatrix4( matrixWorld );\n\n\t\t\t\tconst pointOnLine = new Vector3();\n\t\t\t\tconst point = new Vector3();\n\n\t\t\t\tray.distanceSqToSegment( _line.start, _line.end, point, pointOnLine );\n\n\t\t\t\tintersects.push( {\n\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpointOnLine: pointOnLine,\n\t\t\t\t\tdistance: ray.origin.distanceTo( point ),\n\n\t\t\t\t\tobject: this,\n\t\t\t\t\tface: null,\n\t\t\t\t\tfaceIndex: i,\n\t\t\t\t\tuv: null,\n\t\t\t\t\tuv2: null,\n\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n}\n\nLineSegments2.prototype.LineSegments2 = true;\n\nexport { LineSegments2 };\n","import {\n\tBox3,\n\tFloat32BufferAttribute,\n\tInstancedBufferGeometry,\n\tInstancedInterleavedBuffer,\n\tInterleavedBufferAttribute,\n\tSphere,\n\tVector3,\n\tWireframeGeometry\n} from 'three';\n\nconst _box = new Box3();\nconst _vector = new Vector3();\n\nclass LineSegmentsGeometry extends InstancedBufferGeometry {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.type = 'LineSegmentsGeometry';\n\n\t\tconst positions = [ - 1, 2, 0, 1, 2, 0, - 1, 1, 0, 1, 1, 0, - 1, 0, 0, 1, 0, 0, - 1, - 1, 0, 1, - 1, 0 ];\n\t\tconst uvs = [ - 1, 2, 1, 2, - 1, 1, 1, 1, - 1, - 1, 1, - 1, - 1, - 2, 1, - 2 ];\n\t\tconst index = [ 0, 2, 1, 2, 3, 1, 2, 4, 3, 4, 5, 3, 4, 6, 5, 6, 7, 5 ];\n\n\t\tthis.setIndex( index );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t}\n\n\tapplyMatrix4( matrix ) {\n\n\t\tconst start = this.attributes.instanceStart;\n\t\tconst end = this.attributes.instanceEnd;\n\n\t\tif ( start !== undefined ) {\n\n\t\t\tstart.applyMatrix4( matrix );\n\n\t\t\tend.applyMatrix4( matrix );\n\n\t\t\tstart.needsUpdate = true;\n\n\t\t}\n\n\t\tif ( this.boundingBox !== null ) {\n\n\t\t\tthis.computeBoundingBox();\n\n\t\t}\n\n\t\tif ( this.boundingSphere !== null ) {\n\n\t\t\tthis.computeBoundingSphere();\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetPositions( array ) {\n\n\t\tlet lineSegments;\n\n\t\tif ( array instanceof Float32Array ) {\n\n\t\t\tlineSegments = array;\n\n\t\t} else if ( Array.isArray( array ) ) {\n\n\t\t\tlineSegments = new Float32Array( array );\n\n\t\t}\n\n\t\tconst instanceBuffer = new InstancedInterleavedBuffer( lineSegments, 6, 1 ); // xyz, xyz\n\n\t\tthis.setAttribute( 'instanceStart', new InterleavedBufferAttribute( instanceBuffer, 3, 0 ) ); // xyz\n\t\tthis.setAttribute( 'instanceEnd', new InterleavedBufferAttribute( instanceBuffer, 3, 3 ) ); // xyz\n\n\t\t//\n\n\t\tthis.computeBoundingBox();\n\t\tthis.computeBoundingSphere();\n\n\t\treturn this;\n\n\t}\n\n\tsetColors( array ) {\n\n\t\tlet colors;\n\n\t\tif ( array instanceof Float32Array ) {\n\n\t\t\tcolors = array;\n\n\t\t} else if ( Array.isArray( array ) ) {\n\n\t\t\tcolors = new Float32Array( array );\n\n\t\t}\n\n\t\tconst instanceColorBuffer = new InstancedInterleavedBuffer( colors, 6, 1 ); // rgb, rgb\n\n\t\tthis.setAttribute( 'instanceColorStart', new InterleavedBufferAttribute( instanceColorBuffer, 3, 0 ) ); // rgb\n\t\tthis.setAttribute( 'instanceColorEnd', new InterleavedBufferAttribute( instanceColorBuffer, 3, 3 ) ); // rgb\n\n\t\treturn this;\n\n\t}\n\n\tfromWireframeGeometry( geometry ) {\n\n\t\tthis.setPositions( geometry.attributes.position.array );\n\n\t\treturn this;\n\n\t}\n\n\tfromEdgesGeometry( geometry ) {\n\n\t\tthis.setPositions( geometry.attributes.position.array );\n\n\t\treturn this;\n\n\t}\n\n\tfromMesh( mesh ) {\n\n\t\tthis.fromWireframeGeometry( new WireframeGeometry( mesh.geometry ) );\n\n\t\t// set colors, maybe\n\n\t\treturn this;\n\n\t}\n\n\tfromLineSegments( lineSegments ) {\n\n\t\tconst geometry = lineSegments.geometry;\n\n\t\tif ( geometry.isGeometry ) {\n\n\t\t\tconsole.error( 'THREE.LineSegmentsGeometry no longer supports Geometry. Use THREE.BufferGeometry instead.' );\n\t\t\treturn;\n\n\t\t} else if ( geometry.isBufferGeometry ) {\n\n\t\t\tthis.setPositions( geometry.attributes.position.array ); // assumes non-indexed\n\n\t\t}\n\n\t\t// set colors, maybe\n\n\t\treturn this;\n\n\t}\n\n\tcomputeBoundingBox() {\n\n\t\tif ( this.boundingBox === null ) {\n\n\t\t\tthis.boundingBox = new Box3();\n\n\t\t}\n\n\t\tconst start = this.attributes.instanceStart;\n\t\tconst end = this.attributes.instanceEnd;\n\n\t\tif ( start !== undefined && end !== undefined ) {\n\n\t\t\tthis.boundingBox.setFromBufferAttribute( start );\n\n\t\t\t_box.setFromBufferAttribute( end );\n\n\t\t\tthis.boundingBox.union( _box );\n\n\t\t}\n\n\t}\n\n\tcomputeBoundingSphere() {\n\n\t\tif ( this.boundingSphere === null ) {\n\n\t\t\tthis.boundingSphere = new Sphere();\n\n\t\t}\n\n\t\tif ( this.boundingBox === null ) {\n\n\t\t\tthis.computeBoundingBox();\n\n\t\t}\n\n\t\tconst start = this.attributes.instanceStart;\n\t\tconst end = this.attributes.instanceEnd;\n\n\t\tif ( start !== undefined && end !== undefined ) {\n\n\t\t\tconst center = this.boundingSphere.center;\n\n\t\t\tthis.boundingBox.getCenter( center );\n\n\t\t\tlet maxRadiusSq = 0;\n\n\t\t\tfor ( let i = 0, il = start.count; i < il; i ++ ) {\n\n\t\t\t\t_vector.fromBufferAttribute( start, i );\n\t\t\t\tmaxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( _vector ) );\n\n\t\t\t\t_vector.fromBufferAttribute( end, i );\n\t\t\t\tmaxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( _vector ) );\n\n\t\t\t}\n\n\t\t\tthis.boundingSphere.radius = Math.sqrt( maxRadiusSq );\n\n\t\t\tif ( isNaN( this.boundingSphere.radius ) ) {\n\n\t\t\t\tconsole.error( 'THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.', this );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttoJSON() {\n\n\t\t// todo\n\n\t}\n\n\tapplyMatrix( matrix ) {\n\n\t\tconsole.warn( 'THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4().' );\n\n\t\treturn this.applyMatrix4( matrix );\n\n\t}\n\n}\n\nLineSegmentsGeometry.prototype.isLineSegmentsGeometry = true;\n\nexport { LineSegmentsGeometry };\n","import {\n\tShaderLib,\n\tShaderMaterial,\n\tUniformsLib,\n\tUniformsUtils,\n\tVector2\n} from 'three';\n\n/**\n * parameters = {\n * color: ,\n * linewidth: ,\n * dashed: ,\n * dashScale: ,\n * dashSize: ,\n * dashOffset: ,\n * gapSize: ,\n * resolution: , // to be set by renderer\n * }\n */\n\nUniformsLib.line = {\n\n\tlinewidth: { value: 1 },\n\tresolution: { value: new Vector2( 1, 1 ) },\n\tdashScale: { value: 1 },\n\tdashSize: { value: 1 },\n\tdashOffset: { value: 0 },\n\tgapSize: { value: 1 }, // todo FIX - maybe change to totalSize\n\topacity: { value: 1 }\n\n};\n\nShaderLib[ 'line' ] = {\n\n\tuniforms: UniformsUtils.merge( [\n\t\tUniformsLib.common,\n\t\tUniformsLib.fog,\n\t\tUniformsLib.line\n\t] ),\n\n\tvertexShader: /* glsl */`\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\n\t\tuniform float linewidth;\n\t\tuniform vec2 resolution;\n\n\t\tattribute vec3 instanceStart;\n\t\tattribute vec3 instanceEnd;\n\n\t\tattribute vec3 instanceColorStart;\n\t\tattribute vec3 instanceColorEnd;\n\n\t\tvarying vec2 vUv;\n\n\t\t#ifdef USE_DASH\n\n\t\t\tuniform float dashScale;\n\t\t\tattribute float instanceDistanceStart;\n\t\t\tattribute float instanceDistanceEnd;\n\t\t\tvarying float vLineDistance;\n\n\t\t#endif\n\n\t\tvoid trimSegment( const in vec4 start, inout vec4 end ) {\n\n\t\t\t// trim end segment so it terminates between the camera plane and the near plane\n\n\t\t\t// conservative estimate of the near plane\n\t\t\tfloat a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column\n\t\t\tfloat b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column\n\t\t\tfloat nearEstimate = - 0.5 * b / a;\n\n\t\t\tfloat alpha = ( nearEstimate - start.z ) / ( end.z - start.z );\n\n\t\t\tend.xyz = mix( start.xyz, end.xyz, alpha );\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\t#ifdef USE_COLOR\n\n\t\t\t\tvColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;\n\n\t\t\t#endif\n\n\t\t\t#ifdef USE_DASH\n\n\t\t\t\tvLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;\n\n\t\t\t#endif\n\n\t\t\tfloat aspect = resolution.x / resolution.y;\n\n\t\t\tvUv = uv;\n\n\t\t\t// camera space\n\t\t\tvec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );\n\t\t\tvec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );\n\n\t\t\t// special case for perspective projection, and segments that terminate either in, or behind, the camera plane\n\t\t\t// clearly the gpu firmware has a way of addressing this issue when projecting into ndc space\n\t\t\t// but we need to perform ndc-space calculations in the shader, so we must address this issue directly\n\t\t\t// perhaps there is a more elegant solution -- WestLangley\n\n\t\t\tbool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column\n\n\t\t\tif ( perspective ) {\n\n\t\t\t\tif ( start.z < 0.0 && end.z >= 0.0 ) {\n\n\t\t\t\t\ttrimSegment( start, end );\n\n\t\t\t\t} else if ( end.z < 0.0 && start.z >= 0.0 ) {\n\n\t\t\t\t\ttrimSegment( end, start );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// clip space\n\t\t\tvec4 clipStart = projectionMatrix * start;\n\t\t\tvec4 clipEnd = projectionMatrix * end;\n\n\t\t\t// ndc space\n\t\t\tvec2 ndcStart = clipStart.xy / clipStart.w;\n\t\t\tvec2 ndcEnd = clipEnd.xy / clipEnd.w;\n\n\t\t\t// direction\n\t\t\tvec2 dir = ndcEnd - ndcStart;\n\n\t\t\t// account for clip-space aspect ratio\n\t\t\tdir.x *= aspect;\n\t\t\tdir = normalize( dir );\n\n\t\t\t// perpendicular to dir\n\t\t\tvec2 offset = vec2( dir.y, - dir.x );\n\n\t\t\t// undo aspect ratio adjustment\n\t\t\tdir.x /= aspect;\n\t\t\toffset.x /= aspect;\n\n\t\t\t// sign flip\n\t\t\tif ( position.x < 0.0 ) offset *= - 1.0;\n\n\t\t\t// endcaps\n\t\t\tif ( position.y < 0.0 ) {\n\n\t\t\t\toffset += - dir;\n\n\t\t\t} else if ( position.y > 1.0 ) {\n\n\t\t\t\toffset += dir;\n\n\t\t\t}\n\n\t\t\t// adjust for linewidth\n\t\t\toffset *= linewidth;\n\n\t\t\t// adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...\n\t\t\toffset /= resolution.y;\n\n\t\t\t// select end\n\t\t\tvec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;\n\n\t\t\t// back to clip space\n\t\t\toffset *= clip.w;\n\n\t\t\tclip.xy += offset;\n\n\t\t\tgl_Position = clip;\n\n\t\t\tvec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation\n\n\t\t\t#include \n\t\t\t#include \n\t\t\t#include \n\n\t\t}`,\n\n\tfragmentShader: /* glsl */`\n\t\tuniform vec3 diffuse;\n\t\tuniform float opacity;\n\n\t\t#ifdef USE_DASH\n\n\t\t\tuniform float dashSize;\n\t\t\tuniform float dashOffset;\n\t\t\tuniform float gapSize;\n\n\t\t#endif\n\n\t\tvarying float vLineDistance;\n\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\t#include \n\n\t\t\t#ifdef USE_DASH\n\n\t\t\t\tif ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps\n\n\t\t\t\tif ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX\n\n\t\t\t#endif\n\n\t\t\tfloat alpha = opacity;\n\n\t\t\t#ifdef ALPHA_TO_COVERAGE\n\n\t\t\t// artifacts appear on some hardware if a derivative is taken within a conditional\n\t\t\tfloat a = vUv.x;\n\t\t\tfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\t\t\tfloat len2 = a * a + b * b;\n\t\t\tfloat dlen = fwidth( len2 );\n\n\t\t\tif ( abs( vUv.y ) > 1.0 ) {\n\n\t\t\t\talpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 );\n\n\t\t\t}\n\n\t\t\t#else\n\n\t\t\tif ( abs( vUv.y ) > 1.0 ) {\n\n\t\t\t\tfloat a = vUv.x;\n\t\t\t\tfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\t\t\t\tfloat len2 = a * a + b * b;\n\n\t\t\t\tif ( len2 > 1.0 ) discard;\n\n\t\t\t}\n\n\t\t\t#endif\n\n\t\t\tvec4 diffuseColor = vec4( diffuse, alpha );\n\n\t\t\t#include \n\t\t\t#include \n\n\t\t\tgl_FragColor = vec4( diffuseColor.rgb, alpha );\n\n\t\t\t#include \n\t\t\t#include \n\t\t\t#include \n\t\t\t#include \n\n\t\t}`\n\n};\n\nclass LineMaterial extends ShaderMaterial {\n\n\tconstructor( parameters ) {\n\n\t\tsuper( {\n\n\t\t\ttype: 'LineMaterial',\n\n\t\t\tuniforms: UniformsUtils.clone( ShaderLib[ 'line' ].uniforms ),\n\n\t\t\tvertexShader: ShaderLib[ 'line' ].vertexShader,\n\t\t\tfragmentShader: ShaderLib[ 'line' ].fragmentShader,\n\n\t\t\tclipping: true // required for clipping support\n\n\t\t} );\n\n\t\tObject.defineProperties( this, {\n\n\t\t\tcolor: {\n\n\t\t\t\tenumerable: true,\n\n\t\t\t\tget: function () {\n\n\t\t\t\t\treturn this.uniforms.diffuse.value;\n\n\t\t\t\t},\n\n\t\t\t\tset: function ( value ) {\n\n\t\t\t\t\tthis.uniforms.diffuse.value = value;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tlinewidth: {\n\n\t\t\t\tenumerable: true,\n\n\t\t\t\tget: function () {\n\n\t\t\t\t\treturn this.uniforms.linewidth.value;\n\n\t\t\t\t},\n\n\t\t\t\tset: function ( value ) {\n\n\t\t\t\t\tthis.uniforms.linewidth.value = value;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tdashed: {\n\n\t\t\t\tenumerable: true,\n\n\t\t\t\tget: function () {\n\n\t\t\t\t\treturn Boolean( 'USE_DASH' in this.defines );\n\n\t\t\t\t},\n\n\t\t\t\tset( value ) {\n\n\t\t\t\t\tif ( Boolean( value ) !== Boolean( 'USE_DASH' in this.defines ) ) {\n\n\t\t\t\t\t\tthis.needsUpdate = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( value === true ) {\n\n\t\t\t\t\t\tthis.defines.USE_DASH = '';\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tdelete this.defines.USE_DASH;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tdashScale: {\n\n\t\t\t\tenumerable: true,\n\n\t\t\t\tget: function () {\n\n\t\t\t\t\treturn this.uniforms.dashScale.value;\n\n\t\t\t\t},\n\n\t\t\t\tset: function ( value ) {\n\n\t\t\t\t\tthis.uniforms.dashScale.value = value;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tdashSize: {\n\n\t\t\t\tenumerable: true,\n\n\t\t\t\tget: function () {\n\n\t\t\t\t\treturn this.uniforms.dashSize.value;\n\n\t\t\t\t},\n\n\t\t\t\tset: function ( value ) {\n\n\t\t\t\t\tthis.uniforms.dashSize.value = value;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tdashOffset: {\n\n\t\t\t\tenumerable: true,\n\n\t\t\t\tget: function () {\n\n\t\t\t\t\treturn this.uniforms.dashOffset.value;\n\n\t\t\t\t},\n\n\t\t\t\tset: function ( value ) {\n\n\t\t\t\t\tthis.uniforms.dashOffset.value = value;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tgapSize: {\n\n\t\t\t\tenumerable: true,\n\n\t\t\t\tget: function () {\n\n\t\t\t\t\treturn this.uniforms.gapSize.value;\n\n\t\t\t\t},\n\n\t\t\t\tset: function ( value ) {\n\n\t\t\t\t\tthis.uniforms.gapSize.value = value;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\topacity: {\n\n\t\t\t\tenumerable: true,\n\n\t\t\t\tget: function () {\n\n\t\t\t\t\treturn this.uniforms.opacity.value;\n\n\t\t\t\t},\n\n\t\t\t\tset: function ( value ) {\n\n\t\t\t\t\tthis.uniforms.opacity.value = value;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tresolution: {\n\n\t\t\t\tenumerable: true,\n\n\t\t\t\tget: function () {\n\n\t\t\t\t\treturn this.uniforms.resolution.value;\n\n\t\t\t\t},\n\n\t\t\t\tset: function ( value ) {\n\n\t\t\t\t\tthis.uniforms.resolution.value.copy( value );\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\talphaToCoverage: {\n\n\t\t\t\tenumerable: true,\n\n\t\t\t\tget: function () {\n\n\t\t\t\t\treturn Boolean( 'ALPHA_TO_COVERAGE' in this.defines );\n\n\t\t\t\t},\n\n\t\t\t\tset: function ( value ) {\n\n\t\t\t\t\tif ( Boolean( value ) !== Boolean( 'ALPHA_TO_COVERAGE' in this.defines ) ) {\n\n\t\t\t\t\t\tthis.needsUpdate = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( value === true ) {\n\n\t\t\t\t\t\tthis.defines.ALPHA_TO_COVERAGE = '';\n\t\t\t\t\t\tthis.extensions.derivatives = true;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tdelete this.defines.ALPHA_TO_COVERAGE;\n\t\t\t\t\t\tthis.extensions.derivatives = false;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} );\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n}\n\nLineMaterial.prototype.isLineMaterial = true;\n\nexport { LineMaterial };\n","const THREE = require('three');\n\n/**\n * This provide a full scale minimap. It will always\n * display the whole map.\n * \n * @class\n * @author Alan Wu\n * @return {Minimap}\n */\nexports.Minimap = function (sceneIn) {\n let targetScene = sceneIn;\n this.camera = new THREE.OrthographicCamera(\n -0.5, 0.5, 0.5, -0.5, 0.01, 10);\n this.helper = undefined;\n let geometry = new THREE.BufferGeometry();\n var vertices = new Float32Array( [\n -1.0, -1.0, 1.0,\n 1.0, -1.0, 1.0,\n 1.0, 1.0, 1.0,\n 1.0, 1.0, 1.0,\n -1.0, 1.0, 1.0,\n -1.0, -1.0, 1.0\n ] );\n let positionAttributes = new THREE.BufferAttribute( vertices, 3 );\n geometry.setAttribute( 'position', positionAttributes);\n var material = new THREE.MeshBasicMaterial( { color: 0x333333, \n depthTest: false,\n depthWrite: false,\n opacity: 0.5,\n transparent: true } );\n this.mask = new THREE.Mesh( geometry, material );\n let _box = new THREE.Box3();\n let _center = new THREE.Vector3();\n\n this.getDiffFromNormalised = (x, y) => {\n _box.setFromBufferAttribute(positionAttributes).getCenter(_center);\n let coord = _center.clone().project(this.camera);\n let new_coord = new THREE.Vector3(x, y, coord.z).unproject(this.camera);\n return new_coord.sub(_center);\n }\n\n let setCurrentCameraSettings = (diameter, newViewport) => {\n if (targetScene.camera.near)\n this.camera.near = targetScene.camera.near;\n if (newViewport.farPlane)\n this.camera.far = newViewport.farPlane;\n if (newViewport.eyePosition)\n this.camera.position.set(newViewport.eyePosition[0],\n newViewport.eyePosition[1], newViewport.eyePosition[2]);\n if (newViewport.upVector)\n this.camera.up.set(newViewport.upVector[0], newViewport.upVector[1],\n newViewport.upVector[2]);\n if (newViewport.targetPosition)\n this.camera.lookAt(new THREE.Vector3(newViewport.targetPosition[0],\n newViewport.targetPosition[1], newViewport.targetPosition[2]));\n this.camera.zoom = 1 / diameter;\n this.camera.updateProjectionMatrix();\n }\n\n this.getBoundary = () => {\n let target = new THREE.Vector3().copy(\n targetScene.camera.target).project(targetScene.camera);\n let v1 = new THREE.Vector3(-1, -1, target.z).unproject(targetScene.camera);\n let v2 = new THREE.Vector3(1, -1, target.z).unproject(targetScene.camera);\n let v3 = new THREE.Vector3(1, 1, target.z).unproject(targetScene.camera);\n let v4 = new THREE.Vector3(-1, 1, target.z).unproject(targetScene.camera);\n let array = [v1, v2, v3, v3, v4, v1];\n positionAttributes.copyVector3sArray(array);\n positionAttributes.needsUpdate = true;\n }\n\n this.updateCamera = () => {\n this.getBoundary();\n let cameraControl = targetScene.getZincCameraControls();\n let boundingBox = targetScene.getBoundingBox();\n if (boundingBox) {\n // enlarge radius to keep image within edge of window\n const diameter = boundingBox.min.distanceTo(boundingBox.max);\n const radius = diameter / 2.0;\n const centreX = (boundingBox.min.x + boundingBox.max.x) / 2.0;\n const centreY = (boundingBox.min.y + boundingBox.max.y) / 2.0;\n const centreZ = (boundingBox.min.z + boundingBox.max.z) / 2.0;\n const clip_factor = 4.0;\n const viewport = cameraControl.getViewportFromCentreAndRadius(\n centreX, centreY, centreZ, radius, 40, radius * clip_factor);\n setCurrentCameraSettings(diameter, viewport);\n }\n }\n}\n","const THREE = require('three');\nconst ThreeBSP = require('./three-js-csg')(THREE);\nconst Geometry = require('./primitives/geometry').Geometry;\nconst work = require('webworkify-webpack');\nconst Promise = require('promise-polyfill').default;\n//const work = undefined;\nconst JSONLoader = THREE.BufferGeometryLoader;\n\nconst GeometryCSG = function (hostIn) {\n //ZincGeoemtry of the main geometry\n let host = undefined;\n if (hostIn && hostIn.isGeometry)\n\thost = hostIn;\n let core = undefined;\n let worker = undefined;\n let onProgress = false;\n let myResolve = undefined;\n \n var createGeometryFromJSON = json => {\n\t const material = host.getMorph().material.clone();\n\t material.morphTargets = false;\n\t const newGeometry = new Geometry();\n\t\tconst JSONParser = new JSONLoader();\n\t\tconst geometry = JSONParser.parse(json);\n const mesh = new THREE.Mesh(geometry.geometry, material);\n\t newGeometry.geometry = mesh.geometry;\n mesh.userData = newGeometry;\n\t newGeometry.setMorph(mesh);\n\t return newGeometry;\n }\n \n var workerEventHandler = ev => {\n\t switch (ev.data.action) {\n\t \tcase 'message':\n\t console.log(ev.data.message);\n\t break;\n\t \tcase 'result':\n\t \tconst csg = new GeometryCSG(createGeometryFromJSON(ev.data.object));\n\t \tif (myResolve)\n\t \t\tmyResolve(csg);\n\t \tmyResolve = undefined;\n\t \tonProgress = false;\n\t break;\n\t \tdefault:\n\t \tthrow 'Cannot handle specified action.';\n }\n }\n \n var initialise = hostIn => {\n\t if (work !== undefined) {\n\t\tworker = work(require.resolve('./workers/geometryCSG.worker.js'));\n\t }\n\t if (!worker) {\n\t core = new (require('./workers/geometryCSGInternal').GeometryCSGInternal)(hostIn);\n\t } else {\n\t\tif (hostIn && hostIn.isGeometry) {\n\t\t let mesh = hostIn.getMorph();\n\t\t let json = mesh.geometry.clone().applyMatrix(mesh.matrix).toJSON();\n\t\t worker.addEventListener('message', function (ev) {\n\t\t\t workerEventHandler(ev);\n\t\t });\n\t\t worker.postMessage({action: \"initialise\", object: json});\n\t\t}\n\t }\n }\n \n this.getHostGeometry = () => {\n\tconst tempCSG = new ThreeBSP(host.getMorph());\n return new createZincGeometry(tempCSG);\n }\n \n this.getGeometry = () => host;\n \n const createZincGeometry = csgMesh => {\n\t\tconst material = host.getMorph().material.clone();\n\t\tmaterial.morphTargets = false;\n\t\tconst newMesh = csgMesh.toMesh(material);\n\t const newGeometry = new Geometry();\n\t newGeometry.geometry = newMesh.geometry;\n\t newMesh.userData = newGeometry;\n\t newGeometry.setMorph(newMesh);\n\t return newGeometry;\n }\n \n this.setCSG = CSG => {\n\t core.setCSG(CSG);\n } \n \n const sendToWork = (guestGeometry, action, resolve, reject) => {\n\t if (!onProgress) {\n\t\t let mesh = guestGeometry.getMorph();\n\t\t const json = mesh.geometry.clone().applyMatrix(mesh.matrix).toJSON();\n\t\t myResolve = resolve;\n\t\t onProgress = true;\n\t\t worker.postMessage({action: action, object: json});\n\t } else {\n\t\t reject(\"On progress\");\n\t }\n }\n \n this.intersect = guestGeometry => {\n\t return new Promise((resolve, reject) => {\n\t\t if (worker) {\n\t\t\t sendToWork(guestGeometry, \"intersect\", resolve, reject);\n\t\t } else {\n\t\t\t const result = core.intersect(guestGeometry);\n\t\t\t const newCSG = new GeometryCSG(createZincGeometry(result));\n\t\t\t newCSG.setCSG(result);\n\t\t\t resolve(newCSG);\n\t\t }\n\t });\n\t};\n \n this.subtract = guestGeometry => {\n\t return new Promise((resolve, reject) => {\n\t\t if (worker) {\n\t\t\t sendToWork(guestGeometry, \"intersect\", resolve, reject);\n\t\t } else {\n\t\t\t const result = core.subtract(guestGeometry);\n\t\t\t const newCSG = new GeometryCSG(createZincGeometry(result));\n\t\t\t newCSG.setCSG(result);\n\t\t\t resolve(newCSG);\n\t\t }\n\t });\n }\n \n this.union = guestGeometry => {\n\t return new Promise((resolve, reject) => {\n\t\t if (worker) {\n\t\t\t sendToWork(guestGeometry, \"intersect\", resolve, reject);\n\t\t } else {\n\t\t\t const result = core.union(guestGeometry);\n\t\t\t const newCSG = new GeometryCSG(createZincGeometry(result));\n\t\t\t newCSG.setCSG(result);\n\t\t\t resolve(newCSG);\n\t\t }\n\t });\n }\n \n this.terminateWorker = () => {\n\t if (worker)\n\t\t worker.terminate();\n }\n \n initialise(hostIn);\n};\n\nexports.GeometryCSG = GeometryCSG;\n","'use strict';\n\t\n\tvar ThreeBSP,\n\t\tEPSILON = 1e-5,\n\t\tCOPLANAR = 0,\n\t\tFRONT = 1,\n\t\tBACK = 2,\n\t\tSPANNING = 3;\n\t\n module.exports = function( THREE ) {\n var ThreeBSP = function( geometry ) {\n // Convert THREE.Geometry to ThreeBSP\n var i, _length_i,\n face, vertex, faceVertexUvs, uvs,\n polygon,\n polygons = [],\n tree;\n \n if (geometry.isBufferGeometry)\n geometry = new THREE.Geometry().fromBufferGeometry(geometry);\n if ( geometry instanceof THREE.Geometry ) {\n this.matrix = new THREE.Matrix4;\n } else if ( geometry.isMesh ) {\n // #todo: add hierarchy support\n geometry.updateMatrix();\n this.matrix = geometry.matrix.clone();\n geometry = geometry.geometry;\n if (geometry.isBufferGeometry)\n geometry = new THREE.Geometry().fromBufferGeometry(geometry);\n geometry.mergeVertices();\n geometry.computeVertexNormals(false);\n } else if ( geometry instanceof ThreeBSP.Node ) {\n this.tree = geometry;\n this.matrix = new THREE.Matrix4;\n return this;\n } else {\n throw 'ThreeBSP: Given geometry is unsupported';\n }\n \n for ( i = 0, _length_i = geometry.faces.length; i < _length_i; i++ ) {\n face = geometry.faces[i];\n faceVertexUvs = geometry.faceVertexUvs[0][i];\n polygon = new ThreeBSP.Polygon;\n \n if ( face instanceof THREE.Face3 ) {\n vertex = geometry.vertices[ face.a ];\n uvs = faceVertexUvs ? new THREE.Vector2( faceVertexUvs[0].x, faceVertexUvs[0].y ) : null;\n vertex = new ThreeBSP.Vertex( vertex.x, vertex.y, vertex.z, face.vertexNormals[0], uvs );\n vertex.applyMatrix4(this.matrix);\n polygon.vertices.push( vertex );\n \n vertex = geometry.vertices[ face.b ];\n uvs = faceVertexUvs ? new THREE.Vector2( faceVertexUvs[1].x, faceVertexUvs[1].y ) : null;\n vertex = new ThreeBSP.Vertex( vertex.x, vertex.y, vertex.z, face.vertexNormals[2], uvs );\n vertex.applyMatrix4(this.matrix);\n polygon.vertices.push( vertex );\n \n vertex = geometry.vertices[ face.c ];\n uvs = faceVertexUvs ? new THREE.Vector2( faceVertexUvs[2].x, faceVertexUvs[2].y ) : null;\n vertex = new ThreeBSP.Vertex( vertex.x, vertex.y, vertex.z, face.vertexNormals[2], uvs );\n vertex.applyMatrix4(this.matrix);\n polygon.vertices.push( vertex );\n } else if ( typeof THREE.Face4 ) {\n vertex = geometry.vertices[ face.a ];\n uvs = faceVertexUvs ? new THREE.Vector2( faceVertexUvs[0].x, faceVertexUvs[0].y ) : null;\n vertex = new ThreeBSP.Vertex( vertex.x, vertex.y, vertex.z, face.vertexNormals[0], uvs );\n vertex.applyMatrix4(this.matrix);\n polygon.vertices.push( vertex );\n \n vertex = geometry.vertices[ face.b ];\n uvs = faceVertexUvs ? new THREE.Vector2( faceVertexUvs[1].x, faceVertexUvs[1].y ) : null;\n vertex = new ThreeBSP.Vertex( vertex.x, vertex.y, vertex.z, face.vertexNormals[1], uvs );\n vertex.applyMatrix4(this.matrix);\n polygon.vertices.push( vertex );\n \n vertex = geometry.vertices[ face.c ];\n uvs = faceVertexUvs ? new THREE.Vector2( faceVertexUvs[2].x, faceVertexUvs[2].y ) : null;\n vertex = new ThreeBSP.Vertex( vertex.x, vertex.y, vertex.z, face.vertexNormals[2], uvs );\n vertex.applyMatrix4(this.matrix);\n polygon.vertices.push( vertex );\n \n vertex = geometry.vertices[ face.d ];\n uvs = faceVertexUvs ? new THREE.Vector2( faceVertexUvs[3].x, faceVertexUvs[3].y ) : null;\n vertex = new ThreeBSP.Vertex( vertex.x, vertex.y, vertex.z, face.vertexNormals[3], uvs );\n vertex.applyMatrix4(this.matrix);\n polygon.vertices.push( vertex );\n } else {\n throw 'Invalid face type at index ' + i;\n }\n \n polygon.calculateProperties();\n polygons.push( polygon );\n };\n \n this.tree = new ThreeBSP.Node( polygons );\n };\n ThreeBSP.prototype.subtract = function( other_tree ) {\n var a = this.tree.clone(),\n b = other_tree.tree.clone();\n \n a.invert();\n a.clipTo( b );\n b.clipTo( a );\n b.invert();\n b.clipTo( a );\n b.invert();\n a.build( b.allPolygons() );\n a.invert();\n a = new ThreeBSP( a );\n a.matrix = this.matrix;\n return a;\n };\n ThreeBSP.prototype.union = function( other_tree ) {\n var a = this.tree.clone(),\n b = other_tree.tree.clone();\n \n a.clipTo( b );\n b.clipTo( a );\n b.invert();\n b.clipTo( a );\n b.invert();\n a.build( b.allPolygons() );\n a = new ThreeBSP( a );\n a.matrix = this.matrix;\n return a;\n };\n ThreeBSP.prototype.intersect = function( other_tree ) {\n var a = this.tree.clone(),\n b = other_tree.tree.clone();\n \n a.invert();\n b.clipTo( a );\n b.invert();\n a.clipTo( b );\n b.clipTo( a );\n a.build( b.allPolygons() );\n a.invert();\n a = new ThreeBSP( a );\n a.matrix = this.matrix;\n return a;\n };\n ThreeBSP.prototype.toGeometry = function() {\n var i, j,\n matrix = new THREE.Matrix4().getInverse( this.matrix ),\n geometry = new THREE.Geometry(),\n polygons = this.tree.allPolygons(),\n polygon_count = polygons.length,\n polygon, polygon_vertice_count,\n vertice_dict = {},\n vertex_idx_a, vertex_idx_b, vertex_idx_c,\n vertex, face,\n verticeUvs;\n \n for ( i = 0; i < polygon_count; i++ ) {\n polygon = polygons[i];\n polygon_vertice_count = polygon.vertices.length;\n \n for ( j = 2; j < polygon_vertice_count; j++ ) {\n verticeUvs = [];\n \n vertex = polygon.vertices[0];\n verticeUvs.push( new THREE.Vector2( vertex.uv.x, vertex.uv.y ) );\n vertex = new THREE.Vector3( vertex.x, vertex.y, vertex.z );\n vertex.applyMatrix4(matrix);\n \n if ( typeof vertice_dict[ vertex.x + ',' + vertex.y + ',' + vertex.z ] !== 'undefined' ) {\n vertex_idx_a = vertice_dict[ vertex.x + ',' + vertex.y + ',' + vertex.z ];\n } else {\n geometry.vertices.push( vertex );\n vertex_idx_a = vertice_dict[ vertex.x + ',' + vertex.y + ',' + vertex.z ] = geometry.vertices.length - 1;\n }\n \n vertex = polygon.vertices[j-1];\n verticeUvs.push( new THREE.Vector2( vertex.uv.x, vertex.uv.y ) );\n vertex = new THREE.Vector3( vertex.x, vertex.y, vertex.z );\n vertex.applyMatrix4(matrix);\n if ( typeof vertice_dict[ vertex.x + ',' + vertex.y + ',' + vertex.z ] !== 'undefined' ) {\n vertex_idx_b = vertice_dict[ vertex.x + ',' + vertex.y + ',' + vertex.z ];\n } else {\n geometry.vertices.push( vertex );\n vertex_idx_b = vertice_dict[ vertex.x + ',' + vertex.y + ',' + vertex.z ] = geometry.vertices.length - 1;\n }\n \n vertex = polygon.vertices[j];\n verticeUvs.push( new THREE.Vector2( vertex.uv.x, vertex.uv.y ) );\n vertex = new THREE.Vector3( vertex.x, vertex.y, vertex.z );\n vertex.applyMatrix4(matrix);\n if ( typeof vertice_dict[ vertex.x + ',' + vertex.y + ',' + vertex.z ] !== 'undefined' ) {\n vertex_idx_c = vertice_dict[ vertex.x + ',' + vertex.y + ',' + vertex.z ];\n } else {\n geometry.vertices.push( vertex );\n vertex_idx_c = vertice_dict[ vertex.x + ',' + vertex.y + ',' + vertex.z ] = geometry.vertices.length - 1;\n }\n \n face = new THREE.Face3(\n vertex_idx_a,\n vertex_idx_b,\n vertex_idx_c,\n new THREE.Vector3( polygon.normal.x, polygon.normal.y, polygon.normal.z )\n );\n \n geometry.faces.push( face );\n geometry.faceVertexUvs[0].push( verticeUvs );\n }\n \n }\n return geometry;\n };\n ThreeBSP.prototype.toBufferGeometry = function( ) {\n var geometry = this.toGeometry();\n var bufferGeometry = new THREE.BufferGeometry().fromGeometry(geometry);\n\n return bufferGeometry;\n };\n ThreeBSP.prototype.toMesh = function( material ) {\n var geometry = this.toBufferGeometry(),\n mesh = new THREE.Mesh( geometry, material );\n \n mesh.position.setFromMatrixPosition( this.matrix );\n mesh.rotation.setFromRotationMatrix( this.matrix );\n \n return mesh;\n };\n \n \n ThreeBSP.Polygon = function( vertices, normal, w ) {\n if ( !( vertices instanceof Array ) ) {\n vertices = [];\n }\n \n this.vertices = vertices;\n if ( vertices.length > 0 ) {\n this.calculateProperties();\n } else {\n this.normal = this.w = undefined;\n }\n };\n ThreeBSP.Polygon.prototype.calculateProperties = function() {\n var a = this.vertices[0],\n b = this.vertices[1],\n c = this.vertices[2];\n \n this.normal = b.clone().subtract( a ).cross(\n c.clone().subtract( a )\n ).normalize();\n \n this.w = this.normal.clone().dot( a );\n \n return this;\n };\n ThreeBSP.Polygon.prototype.clone = function() {\n var i, vertice_count,\n polygon = new ThreeBSP.Polygon;\n \n for ( i = 0, vertice_count = this.vertices.length; i < vertice_count; i++ ) {\n polygon.vertices.push( this.vertices[i].clone() );\n };\n polygon.calculateProperties();\n \n return polygon;\n };\n \n ThreeBSP.Polygon.prototype.flip = function() {\n var i, vertices = [];\n \n this.normal.multiplyScalar( -1 );\n this.w *= -1;\n \n for ( i = this.vertices.length - 1; i >= 0; i-- ) {\n vertices.push( this.vertices[i] );\n };\n this.vertices = vertices;\n \n return this;\n };\n ThreeBSP.Polygon.prototype.classifyVertex = function( vertex ) { \n var side_value = this.normal.dot( vertex ) - this.w;\n \n if ( side_value < -EPSILON ) {\n return BACK;\n } else if ( side_value > EPSILON ) {\n return FRONT;\n } else {\n return COPLANAR;\n }\n };\n ThreeBSP.Polygon.prototype.classifySide = function( polygon ) {\n var i, vertex, classification,\n num_positive = 0,\n num_negative = 0,\n vertice_count = polygon.vertices.length;\n \n for ( i = 0; i < vertice_count; i++ ) {\n vertex = polygon.vertices[i];\n classification = this.classifyVertex( vertex );\n if ( classification === FRONT ) {\n num_positive++;\n } else if ( classification === BACK ) {\n num_negative++;\n }\n }\n \n if ( num_positive > 0 && num_negative === 0 ) {\n return FRONT;\n } else if ( num_positive === 0 && num_negative > 0 ) {\n return BACK;\n } else if ( num_positive === 0 && num_negative === 0 ) {\n return COPLANAR;\n } else {\n return SPANNING;\n }\n };\n ThreeBSP.Polygon.prototype.splitPolygon = function( polygon, coplanar_front, coplanar_back, front, back ) {\n var classification = this.classifySide( polygon );\n \n if ( classification === COPLANAR ) {\n \n ( this.normal.dot( polygon.normal ) > 0 ? coplanar_front : coplanar_back ).push( polygon );\n \n } else if ( classification === FRONT ) {\n \n front.push( polygon );\n \n } else if ( classification === BACK ) {\n \n back.push( polygon );\n \n } else {\n \n var vertice_count,\n i, j, ti, tj, vi, vj,\n t, v,\n f = [],\n b = [];\n \n for ( i = 0, vertice_count = polygon.vertices.length; i < vertice_count; i++ ) {\n \n j = (i + 1) % vertice_count;\n vi = polygon.vertices[i];\n vj = polygon.vertices[j];\n ti = this.classifyVertex( vi );\n tj = this.classifyVertex( vj );\n \n if ( ti != BACK ) f.push( vi );\n if ( ti != FRONT ) b.push( vi );\n if ( (ti | tj) === SPANNING ) {\n t = ( this.w - this.normal.dot( vi ) ) / this.normal.dot( vj.clone().subtract( vi ) );\n v = vi.interpolate( vj, t );\n f.push( v );\n b.push( v );\n }\n }\n \n \n if ( f.length >= 3 ) front.push( new ThreeBSP.Polygon( f ).calculateProperties() );\n if ( b.length >= 3 ) back.push( new ThreeBSP.Polygon( b ).calculateProperties() );\n }\n };\n \n ThreeBSP.Vertex = function( x, y, z, normal, uv ) {\n this.x = x;\n this.y = y;\n this.z = z;\n this.normal = normal || new THREE.Vector3;\n this.uv = uv || new THREE.Vector2;\n };\n ThreeBSP.Vertex.prototype.clone = function() {\n return new ThreeBSP.Vertex( this.x, this.y, this.z, this.normal.clone(), this.uv.clone() );\n };\n ThreeBSP.Vertex.prototype.add = function( vertex ) {\n this.x += vertex.x;\n this.y += vertex.y;\n this.z += vertex.z;\n return this;\n };\n ThreeBSP.Vertex.prototype.subtract = function( vertex ) {\n this.x -= vertex.x;\n this.y -= vertex.y;\n this.z -= vertex.z;\n return this;\n };\n ThreeBSP.Vertex.prototype.multiplyScalar = function( scalar ) {\n this.x *= scalar;\n this.y *= scalar;\n this.z *= scalar;\n return this;\n };\n ThreeBSP.Vertex.prototype.cross = function( vertex ) {\n var x = this.x,\n y = this.y,\n z = this.z;\n\n this.x = y * vertex.z - z * vertex.y;\n this.y = z * vertex.x - x * vertex.z;\n this.z = x * vertex.y - y * vertex.x;\n \n return this;\n };\n ThreeBSP.Vertex.prototype.normalize = function() {\n var length = Math.sqrt( this.x * this.x + this.y * this.y + this.z * this.z );\n \n this.x /= length;\n this.y /= length;\n this.z /= length;\n \n return this;\n };\n ThreeBSP.Vertex.prototype.dot = function( vertex ) {\n return this.x * vertex.x + this.y * vertex.y + this.z * vertex.z;\n };\n ThreeBSP.Vertex.prototype.lerp = function( a, t ) {\n this.add(\n a.clone().subtract( this ).multiplyScalar( t )\n );\n \n this.normal.add(\n a.normal.clone().sub( this.normal ).multiplyScalar( t )\n );\n \n this.uv.add(\n a.uv.clone().sub( this.uv ).multiplyScalar( t )\n );\n \n return this;\n };\n ThreeBSP.Vertex.prototype.interpolate = function( other, t ) {\n return this.clone().lerp( other, t );\n };\n ThreeBSP.Vertex.prototype.applyMatrix4 = function ( m ) {\n\n // input: THREE.Matrix4 affine matrix\n\n var x = this.x, y = this.y, z = this.z;\n\n var e = m.elements;\n\n this.x = e[0] * x + e[4] * y + e[8] * z + e[12];\n this.y = e[1] * x + e[5] * y + e[9] * z + e[13];\n this.z = e[2] * x + e[6] * y + e[10] * z + e[14];\n\n return this;\n\n };\n \n \n ThreeBSP.Node = function( polygons ) {\n var i, polygon_count,\n front = [],\n back = [];\n\n this.polygons = [];\n this.front = this.back = undefined;\n \n if ( !(polygons instanceof Array) || polygons.length === 0 ) return;\n\n this.divider = polygons[0].clone();\n \n for ( i = 0, polygon_count = polygons.length; i < polygon_count; i++ ) {\n this.divider.splitPolygon( polygons[i], this.polygons, this.polygons, front, back );\n } \n \n if ( front.length > 0 ) {\n this.front = new ThreeBSP.Node( front );\n }\n \n if ( back.length > 0 ) {\n this.back = new ThreeBSP.Node( back );\n }\n };\n ThreeBSP.Node.isConvex = function( polygons ) {\n var i, j;\n for ( i = 0; i < polygons.length; i++ ) {\n for ( j = 0; j < polygons.length; j++ ) {\n if ( i !== j && polygons[i].classifySide( polygons[j] ) !== BACK ) {\n return false;\n }\n }\n }\n return true;\n };\n ThreeBSP.Node.prototype.build = function( polygons ) {\n var i, polygon_count,\n front = [],\n back = [];\n \n if ( !this.divider ) {\n this.divider = polygons[0].clone();\n }\n\n for ( i = 0, polygon_count = polygons.length; i < polygon_count; i++ ) {\n this.divider.splitPolygon( polygons[i], this.polygons, this.polygons, front, back );\n } \n \n if ( front.length > 0 ) {\n if ( !this.front ) this.front = new ThreeBSP.Node();\n this.front.build( front );\n }\n \n if ( back.length > 0 ) {\n if ( !this.back ) this.back = new ThreeBSP.Node();\n this.back.build( back );\n }\n };\n ThreeBSP.Node.prototype.allPolygons = function() {\n var polygons = this.polygons.slice();\n if ( this.front ) polygons = polygons.concat( this.front.allPolygons() );\n if ( this.back ) polygons = polygons.concat( this.back.allPolygons() );\n return polygons;\n };\n ThreeBSP.Node.prototype.clone = function() {\n var node = new ThreeBSP.Node();\n \n node.divider = this.divider.clone();\n node.polygons = this.polygons.map( function( polygon ) { return polygon.clone(); } );\n node.front = this.front && this.front.clone();\n node.back = this.back && this.back.clone();\n \n return node;\n };\n ThreeBSP.Node.prototype.invert = function() {\n var i, polygon_count, temp;\n \n for ( i = 0, polygon_count = this.polygons.length; i < polygon_count; i++ ) {\n this.polygons[i].flip();\n }\n \n this.divider.flip();\n if ( this.front ) this.front.invert();\n if ( this.back ) this.back.invert();\n \n temp = this.front;\n this.front = this.back;\n this.back = temp;\n \n return this;\n };\n ThreeBSP.Node.prototype.clipPolygons = function( polygons ) {\n var i, polygon_count,\n front, back;\n\n if ( !this.divider ) return polygons.slice();\n \n front = [], back = [];\n \n for ( i = 0, polygon_count = polygons.length; i < polygon_count; i++ ) {\n this.divider.splitPolygon( polygons[i], front, back, front, back );\n }\n\n if ( this.front ) front = this.front.clipPolygons( front );\n if ( this.back ) back = this.back.clipPolygons( back );\n else back = [];\n\n return front.concat( back );\n };\n \n ThreeBSP.Node.prototype.clipTo = function( node ) {\n this.polygons = node.clipPolygons( this.polygons );\n if ( this.front ) this.front.clipTo( node );\n if ( this.back ) this.back.clipTo( node );\n };\n \n \n return ThreeBSP;\n }\n","module.exports = require(\"webworkify-webpack\");","module.exports = require(\"promise-polyfill\");","const Geometry = require('../primitives/geometry').Geometry;\nconst THREE = require('three');\nconst JSONLoader = THREE.BufferGeometryLoader;\n\nmodule.exports = function (self) {\n\tlet core = undefined;\n\t\n\tvar geometryFromJSON = function(object) {\n\t\tvar JSONParser = new JSONLoader();\n\t\tvar geometry = JSONParser.parse(object);\n\t\tvar material = new THREE.MeshPhongMaterial();\n var mesh = new THREE.Mesh(geometry.geometry, material);\n var host = new Geometry();\n host.setMorph(mesh);\n return host;\n\t}\n\n\tvar initialise = function(object) {\n\t\tvar host = geometryFromJSON(object);\n\t\tcore = new (require('./geometryCSGInternal').GeometryCSGInternal)(host);\n\t\tself.postMessage({action:\"message\", message: \"Initialised\"});\n\t}\n\t\n\tvar intersect = function(object) {\n\t\tif (core) {\n\t\t\tvar guest = geometryFromJSON(object);\n\t\t\tvar result = core.intersect(guest);\n\t\t\tvar json = result.toBufferGeometry().toJSON();\n\t\t\tself.postMessage({action: \"result\", object: json});\n\t\t}\n\t}\n\t\n\tvar subtract = function(object) {\n\t\tif (core) {\n\t\t\tvar guest = geometryFromJSON(object);\n\t\t\tvar result = core.subtract(guest);\n\t\t\tvar json = result.toBufferGeometry().toJSON();\n\t\t\tself.postMessage({action: \"result\", object: json});\n\t\t}\n\t}\n\t\n\tvar union = function(object) {\n\t\tif (core) {\n\t\t\tvar guest = geometryFromJSON(object);\n\t\t\tvar result = core.union(guest);\n\t\t\tvar json = result.toBufferGeometry().toJSON();\n\t\t\tself.postMessage({action: \"result\", object: json});\n\t\t}\n\t}\n\t\n\tself.addEventListener('message',function (ev){\n\t switch (ev.data.action) {\n \tcase 'initialise':\n initialise(ev.data.object);\n break;\n \tcase 'intersect':\n \t\tintersect(ev.data.object);\n break;\n \tcase 'subtract':\n \t\tsubtract(ev.data.object);\n break;\n \tcase 'union':\n \t\tunion(ev.data.object);\n break;\n \tdefault:\n \t\tthrow 'Cannot handle specified action.';\n\t }\n\t});\n\t\t\n //var test = ev.data;\n //self.postMessage(test, [test]);\n};\n\n","const THREE = require('three');\nconst ThreeBSP = require('../three-js-csg')(THREE);\nconst Geometry = require('../primitives/geometry').Geometry;\nconst GeometryCSG = require('../geometryCSG').GeometryCSG;\n\nconst GeometryCSGInternal = function (hostIn) {\n //ZincGeoemtry of the main geometry\n let host = undefined;\n if (hostIn && hostIn.isGeometry)\n host = hostIn;\n let hostCSG = undefined;\n \n this.setGeometry = hostIn => {\n if (hostIn && hostIn.isGeometry)\n\t host = hostIn;\n hostCSG = undefined;\n }\n \n this.setCSG = csg => {\n\t hostCSG = csg;\n }\n \n const prepareCSG = guestGeometry => {\n\t if (host && host.morph && guestGeometry && guestGeometry.morph) {\n\t if (hostCSG === undefined)\n\t hostCSG = new ThreeBSP(host.morph);\n\t const guestCSG = new ThreeBSP(guestGeometry.morph);\n\t return guestCSG;\n\t }\n\t return undefined;\n };\n \n this.intersect = guestGeometry => {\n\t const guestCSG = prepareCSG(guestGeometry);\n\t if (hostCSG && guestCSG) {\n\t return hostCSG.intersect(guestCSG);\n\t }\n\t return undefined;\n }\n \n this.subtract = guestGeometry => {\n\t const guestCSG = prepareCSG(guestGeometry);\n\t if (hostCSG && guestCSG) {\n\t\t return hostCSG.subtract(guestCSG);\n\t }\n\t return undefined;\n }\n \n this.union = guestGeometry => {\n\t const guestCSG = prepareCSG(guestGeometry);\n\t if (hostCSG && guestCSG) {\n\t\t return hostCSG.union(guestCSG);\n\t }\n\t return undefined;\n }\n};\n\nexports.GeometryCSGInternal = GeometryCSGInternal;\n","const THREE = require('three');\nconst ThreeBSP = require('./three-js-csg')(THREE);\nconst Glyphset = require('./primitives/glyphset').Glyphset;\n\n/**\n * Provides an object which takes in a glyphset, convert it into a CSG and further\n * action such as intersect with another geometry may be performed.\n * \n * @class\n * @author Alan Wu\n * @return {GlyphsetCSG}\n */\nconst GlyphsetCSG = function (hostIn) {\n let host = undefined;\n if (hostIn && hostIn.isGlyphset)\n\t host = hostIn;\n const hostCSGs = new Array();\n const currentIntersect = undefined;\n \n this.setGlyphset = hostIn => {\n\t if (hostIn && hostIn.isGlyphset)\n\t\t host = hostIn;\n\t hostCSG = undefined;\n }\n \n this.getGlyphset = () => {\n\t return host;\n }\n \n const prepareCSGForGlyphs = () => {\n\t return glyph => {\n\t\t const mesh = glyph.getMesh();\n\t\t const label = glyph.getLabel();\n\t\t if (mesh) {\n\t\t\t const csg = new ThreeBSP(mesh.geometry.clone().applyMatrix(mesh.matrix));\n\t\t\t const store = [];\n\t\t\t store.csg = csg;\n\t\t\t store.label = label;\n\t\t\t if (mesh.material)\n\t\t\t\t store.material = mesh.material.clone();\n\t\t\t hostCSGs.push(store);\n\t\t }\n\t };\n };\n \n const prepareCSG = guestGeometry => {\n\t if (host && guestGeometry && guestGeometry.getMorph()) {\n\t if (hostCSGs.length == 0) {\n\t \t host.forEachGlyph(prepareCSGForGlyphs());\n\t }\n\t const guestCSG = new ThreeBSP(guestGeometry.getMorph());\n\t return guestCSG;\n\t }\n\t return undefined;\n };\n \n this.intersect = guestGeometry => {\n\t const guestCSG = prepareCSG(guestGeometry);\n\t if ((hostCSGs.length > 0) && guestCSG) {\n\t\tconst glyphset = new (require('./primitives/glyphset').Glyphset)();\n\t\tfor (let i = 0; i < hostCSGs.length; i++) {\n\t\t\tconst hostCSG = hostCSGs[i];\n\t\t const intersect = hostCSG.csg.intersect(guestCSG);\n\t\t const mesh = intersect.toMesh();\n\t\t if (mesh && mesh.geometry && (mesh.geometry.vertices.length > 0)) {\n\t\t \tif (hostCSG.material) {\n\t\t \t\tmesh.material = hostCSG.material;\n\t\t \t\tmesh.material.side = THREE.DoubleSide;\n\t\t \t\tmesh.material.clippingPlanes = null;\n\t\t \t}\n\t\t\t const glyph = glyphset.addMeshAsGlyph(mesh, i+1);\n\t\t\t glyph.setLabel(hostCSG.label);\n\t\t }\n\t\t}\n\t const newCSG = new GlyphsetCSG(glyphset);\t\n\t return newCSG;\n\t }\n\n\t return undefined;\n }\n \n};\n\nexports.GlyphsetCSG = GlyphsetCSG;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(0);\n",""],"names":["require","PACKAGE","version","Zinc","Revision","defaultMaterialColor","defaultOpacity","modelPrefix","Geometry","Glyph","Glyphset","Pointset","Label","Lines","TextureArray","TextureSlides","Renderer","Scene","GeometryCSG","GlyphsetCSG","Viewport","CameraControls","SmoothCameraTransition","RayCaster","CameraAutoTumble","StereoEffect","loadExternalFile","loadExternalFiles","THREE","module","exports","toBufferGeometry","createMeshForGeometry","geometryIn","materialIn","options","geometry","isTransparent","opacity","material","_video","morphTargets","localTimeEnabled","localMorphColour","morphNormals","BufferGeometry","attributes","color","MeshPhongMaterial","colour","transparent","side","DoubleSide","vertexColors","VertexColors","morphAttributes","onBeforeCompile","augmentMorphColor","videoTexture","createCanvasVideoTexture","MeshBasicMaterial","Color","map","videoHandler","Mesh","ZincObject","call","isGeometry","createMesh","morph","mesh","setMesh","calculateUVs","computeBoundingBox","max","boundingBox","min","offset","Vector2","x","y","range","faceVertexUvs","i","faces","length","v1","vertices","a","v2","b","v3","c","push","uvsNeedUpdate","checkTransparentMesh","_lod","setWireframe","wireframe","editVertices","coords","getMorph","attribute","getAttribute","index","forEach","coord","array","needsUpdate","computeBoundingSphere","boundingBoxUpdateRequired","prototype","Object","create","THREEGeometry","SpriteText","default","resolveURL","url","actualURL","prefix","_readOnlyError","test","createNewURL","target","reference","getNewURL","newURL","URL","href","split","paramsStrings","_unused","console","error","concat","Array","isArray","urls","getBoundingBox","cachedBox","b1","influences","morphTargetInfluences","found","position","set","setFromArray","add","multiplyScalar","setFromBufferAttribute","updateWorldMatrix","applyMatrix4","matrixWorld","data","callback","errorCallback","request","XMLHttpRequest","open","onreadystatechange","readyState","status","responseText","send","partialCallback","text","urlIndex","result","numComplete","numUrls","getColorsRGB","colors","index_in_colors","Math","floor","remainder","hex_value","r","g","mycolor","updateMorphColorAttribute","targetGeometry","morphColors","deleteAttribute","bound","morphArray","setAttribute","morphNormalsReady","computeMorphNormals","toIndexedBufferGeometry","copyMorphColorsToIndexedBufferGeometry","clone","colorsNeedUpdate","copyMorphColorsToBufferGeometry","bufferGeometry","l","morphColor","colorArray","j","face","Float32BufferAttribute","name","copyArray","mergeVertices","tolerance","arguments","Number","EPSILON","hashToIndex","indices","getIndex","positions","vertexCount","count","nextIndex","attributeNames","keys","attrArrays","morphAttrsArrays","newIndices","getters","morphAttr","fill","decimalShift","log10","shiftMultiplier","pow","getX","hash","itemSize","k","getterFunc","newarray","newMorphArrays","m","ml","oldAttribute","buffer","constructor","isInterleavedBufferAttribute","BufferAttribute","setArray","morphAttribute","cons","Uint8Array","Uint16Array","Uint32Array","newIndexBuffer","setIndex","PhongToToon","isMeshPhongMaterial","MeshToonMaterial","createBufferGeometry","Float32Array","setDrawRange","getCircularTexture","image","Image","src","texture","Texture","createNewSpriteText","height","font","pixel","weight","sprite","sizeAttenuation","alphaTest","depthWrite","depthTest","center","renderOrder","Box3","EventDispatcher","Matrix3","Matrix4","MathUtils","Object3D","Sphere","Vector3","_m1","_obj","_offset","_temp","uuid","generateUUID","type","normals","uvs","skinWeights","skinIndices","lineDistances","boundingSphere","elementsNeedUpdate","verticesNeedUpdate","normalsNeedUpdate","lineDistancesNeedUpdate","groupsNeedUpdate","assign","matrix","vertex","normalMatrix","getNormalMatrix","il","normal","applyMatrix3","normalize","jl","vertexNormals","rotateX","angle","makeRotationX","rotateY","makeRotationY","rotateZ","makeRotationZ","translate","z","makeTranslation","scale","makeScale","lookAt","vector","updateMatrix","fromBufferGeometry","addFace","materialIndex","scope","fromBufferAttribute","Face3","uv","uv2","groups","group","start","computeFaceNormals","getCenter","negate","radius","s","cb","ab","f","fl","vA","vB","vC","subVectors","cross","copy","computeVertexNormals","areaWeighted","v","vl","computeFlatVertexNormals","__originalFaceNormal","__originalVertexNormals","tmpGeo","faceNormals","dstNormalsFace","dstNormalsVertex","faceNormal","setFromPoints","mergeMorph","morphTargets1","morphTargets2","n","morphColors1","morphColors2","morphTarget1","morphTarget2","kl","vertexCopy","normals2","morphColor1","morphColor2","merge","materialIndexOffset","vertexOffset","vertices1","vertices2","faces1","faces2","colors1","colors2","faceVertexNormals","faceVertexColors","faceCopy","faceVertexUvs2","uvs2","uvsCopy","mergeMesh","isMesh","matrixAutoUpdate","precisionPoints","verticesMap","unique","changes","precision","key","round","faceIndicesToRemove","idx","splice","diff","points","point","sortFacesByMaterialIndex","_id","sort","newUvs1","newUvs2","uvs1","id","toJSON","setBit","value","enabled","getNormalIndex","toString","normalsHash","getColorIndex","colorsHash","getHex","getUvIndex","uvsHash","metadata","generator","parameters","hasMaterial","hasFaceUv","hasFaceVertexUv","hasFaceNormal","hasFaceVertexNormal","hasFaceColor","hasFaceVertexColor","faceType","source","morphTarget","morphNormal","srcVertexNormal","destVertexNormal","computeGroups","DirectGeometry","fromGeometry","buffergeometry","copyVector3sArray","copyColorsArray","copyVector2sArray","copyVector4sArray","colorsArray","normalsArray","computeTangents","computeLineDistances","applyMatrix","warn","dispose","dispatchEvent","createBufferGeometryFromObject","object","isPoints","isLine","morphTargetsPosition","hasFaceVertexUv2","morphTargetsLength","morphTargetsNormal","morphNormalsLength","hasSkinIndices","hasSkinWeights","vertexUvs","isVector3","isColor","shader","vertexShader","replace","join","uniqueiId","getUniqueId","isZincObject","Group","LOD","groupName","timeEnabled","morphColour","inbuildTime","mixer","animationGroup","duration","clipAction","userData","marker","markerNumber","markerUpdateRequired","closestVertexIndex","cachedBoundingBox","anatomicalId","region","animationClip","markerMode","_v1","_v2","_b1","visible","drawRange","setDuration","durationIn","getDuration","setRegion","getRegion","getCurrentMorph","getGroup","setMorph","distance","calculateDistance","addLevel","setMaterial","AnimationObjectGroup","AnimationMixer","AnimationClip","CreateClipsFromMorphTargetSequences","loop","loopOnce","clampWhenFinished","play","setFrustumCulled","setName","groupNameIn","getCurrentTime","ratio","time","_clip","setMorphTime","timeChanged","actualDuration","newTime","isTimeVarying","update","getVisibility","setVisibility","pickableUpdateRequired","setAlpha","alpha","_material","flag","setVertexColors","getColour","setColour","getColourHex","getHexString","setColourHex","hex","setHex","_secondaryMaterial","setEmissiveRGB","emissive","setRGB","getClosestVertexIndex","closestIndex","geoemtry","currentDistance","fromArray","distanceTo","getClosestVertex","applyMatrixWorld","markerIsRequired","displayMarkers","updateMarker","playAnimation","ndcToBeUpdated","Marker","setPosition","isEnabled","markersList","enable","setNumber","markerImgURL","loadUserSprite","setDefaultSprite","camera","markerCluster","updateNDC","cameraObject","disable","remove","processMarkerVisual","updateVisual","initiateMorphColor","setRenderOrder","getClosestVertexDOMElementCoords","scene","inView","project","getZincCameraControls","getRelativeCoordsFromNDC","setMarkerMode","mode","number","imgURL","render","delta","cameraControls","targetTime","addLOD","loader","level","preload","addLevelFromURL","addVertices","positionAttribute","setXYZ","loadAdditionalSources","primitivesLoader","load","filename","meshloader","finishCallback","onProgress","onError","setScaleAll","parent","levels","_currentLevel","_renderOrder","_loader","_parent","distanceIn","abs","loaded","loading","levelLoaded","loadLevel","lodLoader","containsLevels","FrontSide","secondaryMesh","BackSide","uncache","getCurrentLevel","isLines","LineSegments","currentOnly","updateGeometryColour","frustumCulled","order","visibleIndex","optimalIndex","toggleMarker","Line","_start","_end","isBufferGeometry","isLineSegments","LineBasicMaterial","Ray","_inverseMatrix","_ray","_sphere","_morphA","_morphB","_tempA","_tempB","updateMorphTargets","raycast","raycaster","intersects","threshold","params","morphPosition","ray","intersectsSphere","invert","localThreshold","localThresholdSq","vStart","vEnd","interSegment","interRay","step","end","calculatePosition","distSq","distanceSqToSegment","origin","near","far","faceIndex","morphTargetDictionary","morphInfluences","influence","addScaledVector","sub","markerImage","size","spriteMaterial","SpriteMaterial","zincObject","userTexture","userMaterial","userSprite","userUrl","defaultDisplay","isMarker","ndc","label","initialise","Sprite","porportion","setSpriteSize","setUserSprite","setImageForUserSprite","userImage","crossOrigin","onload","clear","numberIn","getNumber","idIn","glyphsetIn","FaceColors","labelString","isGlyph","fromMesh","meshIn","getGlyphset","setLabel","String","showLabel","getPosition","getSprite","getLabel","getMesh","setTransformation","axis1","axis2","axis3","elements","textIn","getStyle","setScale","scaling","getString","JSONLoader","glyphList","axis1s","axis2s","axis3s","scales","labels","numberOfTimeSteps","numberOfVertices","baseSize","scaleFactors","repeat_mode","ready","morphColours","morphVertices","isGlyphset","_transformMatrix","_bot_colour","_top_colour","_boundingBox1","_boundingBox2","_boundingBox3","_points","_current_positions","_current_axis1s","_current_axis2s","_current_axis3s","_current_scales","_current_colors","_glyph_axis_array","glyphsetData","glyphURL","isInline","displayLabels","MorphColours","MorphVertices","number_of_time_steps","number_of_vertices","base_size","scale_factors","instancedMesh","InstancedMesh","parse","materials","resolve_glyph_axes","return_arrays","sign","axis_scale","final_axis1","final_axis2","final_axis3","final_point","mirrored_axis1","mirrored_axis2","mirrored_axis3","mirrored_point","number_of_glyphs","glyph_repeat_mode","use_axis1","use_axis2","use_scale","final_scale1","magnitude","sqrt","updateGlyphsetTransformation","current_positions","current_axis1s","current_axis2s","current_axis3s","current_scales","numberOfGlyphs","numberOfPositions","current_glyph_index","current_index","current_position","current_axis1","current_axis2","current_axis3","current_scale","arrays","setMatrixAt","glyph","instanceMatrix","updateGlyphsetHexColors","current_colors","hex_values","numberOfColours","setColorAt","instanceColor","updateMorphGlyphsets","current_time","bottom_frame","proportion","top_frame","ceil","bottom_positions","top_positions","bottom_axis1","top_axis1","bottom_axis2","top_axis2","bottom_axis3","top_axis3","bottom_scale","top_scale","bottom_colors","top_colors","createGlyphs","addCustomGlyph","addMeshAsGlyph","forEachGlyph","callbackFunction","tempGeometry","getMatrixAt","setFromMatrixPosition","union","Loader","LoaderUtils","Vector4","FileLoader","DefaultLoadingManager","VideoHandler","manager","withCredentials","paramsString","onLoad","texturePath","extractUrlBase","setWithCredentials","json","JSON","toLowerCase","setTexturePath","parseModel","isBitSet","fi","zLength","colorIndex","normalIndex","uvIndex","isQuad","faceA","faceB","uvLayer","u","nUvLayers","parseSkin","influencesPerVertex","w","d","bones","parseMorphing","dstVertices","srcVertices","dstNormals","srcNormals","cl","dstColors","srcColors","parseAnimations","outputAnimations","animations","animation","clip","parseAnimation","morphAnimationClips","initMaterials","video","fullPath","singleSided","flipSided","specularCoef","shininess","NoBlending","NormalBlending","AdditiveBlending","SubtractiveBlending","MultiplyBlending","CustomBlending","MirroredRepeatWrapping","RepeatWrapping","MaterialLoader","TextureLoader","Handlers","handlers","regex","get","file","onLoadStart","onLoadProgress","onLoadComplete","createMaterial","BlendingMode","textureLoader","materialLoader","loadTexture","path","repeat","wrap","anisotropy","setCrossOrigin","wrapS","wrapT","textures","blending","specular","mapDiffuseRepeat","mapDiffuseOffset","mapDiffuseWrap","mapDiffuseAnisotropy","emissiveMap","mapEmissiveRepeat","mapEmissiveOffset","mapEmissiveWrap","mapEmissiveAnisotropy","lightMap","mapLightRepeat","mapLightOffset","mapLightWrap","mapLightAnisotropy","aoMap","mapAORepeat","mapAOOffset","mapAOWrap","mapAOAnisotropy","bumpMap","mapBumpRepeat","mapBumpOffset","mapBumpWrap","mapBumpAnisotropy","bumpScale","normalMap","mapNormalRepeat","mapNormalOffset","mapNormalWrap","mapNormalAnisotropy","normalScale","specularMap","mapSpecularRepeat","mapSpecularOffset","mapSpecularWrap","mapSpecularAnisotropy","metalnessMap","mapMetalnessRepeat","mapMetalnessOffset","mapMetalnessWrap","mapMetalnessAnisotropy","roughnessMap","mapRoughnessRepeat","mapRoughnessOffset","mapRoughnessWrap","mapRoughnessAnisotropy","alphaMap","mapAlphaRepeat","mapAlphaOffset","mapAlphaWrap","mapAlphaAnisotropy","setTextures","srcIn","_this","lastPlayPos","currentPlayPos","bufferingDetected","actualTime","currentTime","getVideoDuration","VideoTexture","minFilter","LinearFilter","magFilter","format","RGBFormat","isReadyToPlay","document","createElement","Points","isPointset","labelSets","addLabel","labelText","colourHex","addPoints","current","PointsMaterial","setSize","setSizeAttenuation","getVerticesByIndex","getY","getZ","maxIndex","sizePerPixel","pixelHeight","_position","testPoint","rayPointDistanceSq","distanceSqToPoint","intersectPoint","closestPointToPoint","distanceToRay","createLineSegment","line","setWidth","width","linewidth","addLines","isTextureArray","loadFromImages","_ref","_asyncToGenerator","srcArrays","h","isLoading","canvas","dataStacks","imageToUint8Array","fullArray","impl","DataTexture2DArray","depth","apply","getMaterial","vs","fs","ShaderMaterial","uniforms","fragmentShader","glslVersion","isTexture","loadImage","img","Promise","resolve","reject","onerror","instance","ctx","getContext","drawImage","getImageData","_ref2","isReady","textureIn","TexturePrimitive","isTextureSlides","textureSettings","idTextureMap","flipY","createSlides","slideSettings","slide","createSlide","setUniformSlideSettingsOfMesh","settings","rotation","direction","PI","modifySlideSettings","PlaneGeometry","getUniforms","diffuse","getTextureSettings","getTextureSettingsWithId","_objectSpread","getSlides","children","removeSlide","removeSlideWithId","getObjectById","findIndex","item","expandBoxWithSettings","box","expandByPoint","setY","setZ","setX","makeEmpty","updateMatrixWorld","applyTransformation","quaternion","Quaternion","setFromRotationMatrix","textureData","locations","orientation","slides","GLSL3","isTexturePrimitive","images","imgArray","then","ResizeSensor","containerIn","container","renderer","currentScene","clock","Clock","playRate","preRenderCallbackFunctions","preRenderCallbackFunctions_id","postRenderCallbackFunctions","postRenderCallbackFunctions_id","animated_id","cameraOrtho","sceneOrtho","logoSprite","sceneMap","additionalActiveScenes","scenesGroup","sensor","isRendering","currentSize","currentOffset","getDrawingWidth","clientWidth","getDrawingHeight","clientHeight","onWindowResize","localRect","getBoundingClientRect","left","top","getSize","initialiseVisualisation","antialias","onMobile","navigator","userAgent","err","WebGLRenderer","appendChild","domElement","setClearColor","style","autoClear","createScene","setCurrentScene","getCurrentScene","sceneIn","removeActiveScene","oldScene","setInteractiveControlEnable","setAdditionalScenesGroup","getSceneByName","new_scene","sceneName","resetView","viewAll","boundingBox2","viewAllWithBoundingBox","loadModelsURL","colours","opacities","loadViewURL","loadFromViewURL","jsonFilePrefix","updateDirectionalLight","runAnimation","requestAnimationFrame","cancelAnimationFrame","stopAnimate","stop","animate","Date","now","addPreRenderCallbackFunction","removePreRenderCallbackFunction","addPostRenderCallbackFunction","removePostRenderCallbackFunction","getPlayRate","setPlayRate","playRateIn","setMorphsTime","getZincGeometryByID","addToScene","addObject","addToOrthoScene","OrthographicCamera","createHUDSprites","imagewidth","imageheight","addLogo","ImageUtils","getDelta","renderGeometries","sceneItem","clearDepth","hasOwnProperty","getThreeJSRenderer","isSceneActive","addActiveScene","additionalScene","getThreeJSScene","clearAllActiveScene","clearAll","transitionScene","endingScene","currentCamera","centreX","centreY","centreZ","endingViewport","getViewportFromCentreAndRadius","startingViewport","getCurrentViewport","cameraTransition","enableCameraTransition","isWebGL2","capabilities","MarkerCluster","SceneLoader","SceneExporter","defaultMetadata","Duration","OriginalDuration","TimeStamps","defaultDuration","rendererIn","sceneLoader","minimap","zincObjectAddedCallbacks","zincObjectAddedCallbacks_id","zincObjectRemovedCallbacks","zincObjectRemovedCallbacks_id","rootRegion","Region","tempGroup","directionalLight","ambient","zincCameraControls","stereoEffectFlag","stereoEffect","autoClearFlag","displayMinimap","minimapScissor","x_offset","y_offset","align","updateRequired","scissor","_markerTarget","pickableObjectsList","forcePickableObjectsUpdate","getDownloadProgress","wHeight","aspect","updateProjectionMatrix","onResize","calculateHeightPerPixelAtZeroDepth","changeZoomByScrollRateUnit","unit","setupCamera","PerspectiveCamera","AmbientLight","DirectionalLight","setDirectionalLight","Minimap","loadView","viewPort","setFromObject","setCurrentCameraSettings","setupMultipleViews","defaultView","entries","viewport","addViewport","setDefaultViewport","getViewportFromBoundingBox","forEachGeometry","forEachGlyphset","forEachPointset","forEachLine","findGeometriesWithGroupName","GroupName","findPointsetsWithGroupName","findGlyphsetsWithGroupName","findLinesWithGroupName","findObjectsWithGroupName","findObjectsWithAnatomicalId","getBoundingBoxOfZincObjects","objectsArray","vectorToScreenXY","widthHalf","heightHalf","getObjectsScreenXY","zincObjects","getNamedObjectsScreenXY","addZincObject","calculateMaxAllowedDistance","loadGlyphsetURL","metaurl","glyphurl","loadPointsetURL","loadLinesURL","loadSTL","loadOBJ","loadMetadataURL","allCompletedCallback","loadGLTF","removeObject","markers","toBeDownloaded","pause","setTime","myPlayRate","setVideoHandler","videoHandlerIn","getWindowsPosition","renderer_width","renderer_height","includes","renderMinimap","setScissorTest","setScissor","setViewport","updateCamera","mask","setPathDuration","setStereoEffectEnable","stereoFlag","objectIsInScene","objectIsInRegion","alignBoundingBoxToCameraView","transitionTime","targetPosition","eyePosition","newVec1","newVec2","newVec3","crossVectors","angleTo","rotateCameraTransition","rotateAboutLookAtpoint","translateBoundingBoxToCameraView","scaleRadius","oldViewport","alignObjectToCameraView","setCameraTargetToObject","addVectors","isStereoEffectEnable","removeZincObject","updatePickableThreeJSObjects","getPickableThreeJSObjects","checkPickableUpdateRequred","getNormalisedMinimapCoordinates","event","offsetY","clientY","clientX","getMinimapDiffFromNormalised","getDiffFromNormalised","clearZincObjectAddedCallbacks","clearZincObjectRemovedCallbacks","toBeDwonloaded","addMetadataTimeStamp","convertDurationObjectTomSec","getMetadataTag","getMetadata","setMetadataTag","removeMetadataTag","resetMetadata","resetDuration","convertDurationObjectToString","years","months","weeks","days","hours","mins","secs","setDurationFromObject","string","millisec","setOriginalDurationFromObject","exportGLTF","binary","exporter","getRootRegion","createLines","regionPath","findChildFromPath","createChildFromPath","createPoints","addZincObjectAddedCallbacks","addZincObjectRemovedCallbacks","removeZincObjectAddedCallbacks","removeZincObjectRemovedCallbacks","triggerObjectAddedCallback","triggerObjectRemovedCallback","addTemporaryPoints","addTemporaryLines","removeTemporaryPrimitive","clearTemporaryPrimitives","child","addBoundingBoxPrimitive","visibility","dim","boxGeo","BoxGeometry","primitive","createGeometryFromThreeJSGeometry","addSlicesPrimitive","primitives","planeGeo","enableMarkerCluster","isMarkerCluster","sprites","_v21","_v22","createNewSprite","localGroup","clusterIndex","activateSpriteForCluster","cluster","drawClusters","clusters","currentIndex","members","getCluster","markersObj","first","newCluster","dist","prop","calculate","_this$markers$prop","zoomToCluster","clusterIsVisible","_sprites$index$group","STLLoader","OBJLoader","PrimitivesLoader","progressMap","viewLoaded","errorDownload","totalSize","totalLoaded","unknownFound","progress","xhr","total","responseURL","loadMultipleViews","referenceURL","views","Default","Inline","Entries","promises","_loop","fetch","response","catch","all","values","entry","setCurrentViewport","xmlhttp","viewData","requestURL","targetRegion","filename_prefix","numberOfResources","linesloader","lod","newLines","log","Index","loaderOptions","loadGlyphset","newGlyphset","myCallback","onLoadGlyphsetReady","pointsetloader","newPointset","loadSurfaceURL","fileFormat","objloader","metaFinishCallback","numberOfDownloaded","downloadedItem","newTexture","onLoadTextureReady","loadTextureURL","addZincGeometry","newGeometry","zincGeometry","parseDuration","durationString","match","loadSettings","readPrimitivesItem","Levels","Preload","FileFormat","AnatomicalId","compression","Type","newGeometryURL","GlyphGeometriesURL","DisplayLabels","readViewAndSettingsItem","GLTFToZincJSLoader","loadRegions","currentRegion","regions","Primitives","Order","Transformation","Children","regionName","childRegion","findOrCreateChildFromPath","getNumberOfDownloadsInArray","includeViews","getNumberOfObjectsInRegions","regionJson","counts","getNumberOfObjects","Version","Regions","readVersionOneRegionPath","RegionPath","loadVersionOne","numberOfObjects","loadVersionTwo","Settings","Views","setPath","setResponseType","setRequestHeader","requestHeader","e","itemError","matchDataViewAt","query","reader","getUint8","binData","array_buffer","charCodeAt","DataView","n_faces","getUint32","byteLength","solid","off","defaultR","defaultG","defaultB","hasColors","normalX","getFloat32","normalY","normalZ","packedColor","getUint16","vertexstart","componentIdx","patternSolid","patternFace","faceCounter","patternFloat","patternVertex","RegExp","patternNormal","groupCount","startVertex","endVertex","exec","vertexCountPerFace","normalCountPerFace","parseFloat","addGroup","decodeText","Material","_object_pattern","_material_library_pattern","_material_use_pattern","_map_use_pattern","_vA","_vB","_vC","_ab","_cb","ParserState","state","objects","materialLibraries","startObject","fromDeclaration","previousMaterial","currentMaterial","_finalize","hasUVIndices","smooth","startMaterial","libraries","previous","inherited","mtllib","groupStart","groupEnd","cloned","bind","lastMultiMaterial","mi","declared","finalize","parseVertexIndex","len","parseInt","parseNormalIndex","parseUVIndex","addVertex","dst","addVertexPoint","addVertexLine","addNormal","addFaceNormal","addColor","addUV","addDefaultUV","addUVLine","ua","ub","uc","na","nb","nc","vLen","ia","ib","ic","nLen","uvLen","addPointGeometry","vi","addLineGeometry","uvi","setMaterials","indexOf","lines","lineFirstChar","lineLength","trimLeft","trim","charAt","lineData","substr","vertexData","faceVertices","vertexParts","lineParts","substring","lineVertices","lineUVs","parts","li","llen","pointData","hasPrimitives","hasVertexColors","createdMaterials","miLen","sourceMaterial","materialHash","materialLine","materialPoints","flatShading","mergeGeometries","geometries","geometry1","geometry2","IndexedSourcesHandler","urlIn","onDownloadedCallback","jsonLoader","onDownloaded","downloading","finished","items","processItemDownloaded","modelData","obj","processItemError","downloadCompleted","args","errorHandling","progressHandling","MultiSourcesHandler","onLoadCallback","allData","totalDownloaded","itemDownloaded","concurrentDownloads","MAX_DOWNLOAD","waitingList","indexedLoaders","loadFromMultipleSources","msHandler","newOptions","loadFromSingleSource","handleIndexedSource","indexedLoader","onFinally","isHandler","onErrorCallback","loadFromWaitingList","shift","itemRemainingCheck","_len","_key","GLTFLoader","parseGLTFObjects","setCamera","lastIndexOf","gltf","GLTFExporter","getAllObjects","ClampToEdgeWrapping","InterpolateDiscrete","InterpolateLinear","LinearMipmapLinearFilter","LinearMipmapNearestFilter","NearestFilter","NearestMipmapLinearFilter","NearestMipmapNearestFilter","PropertyBinding","RGBAFormat","pluginCallbacks","register","writer","GLTFLightExtension","GLTFMaterialsUnlitExtension","GLTFMaterialsPBRSpecularGlossiness","unregister","input","onDone","GLTFWriter","plugins","setPlugins","write","WEBGL_CONSTANTS","POINTS","LINES","LINE_LOOP","LINE_STRIP","TRIANGLES","TRIANGLE_STRIP","TRIANGLE_FAN","UNSIGNED_BYTE","UNSIGNED_SHORT","FLOAT","UNSIGNED_INT","ARRAY_BUFFER","ELEMENT_ARRAY_BUFFER","NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR","CLAMP_TO_EDGE","MIRRORED_REPEAT","REPEAT","THREE_TO_WEBGL","PATH_PROPERTIES","GLB_HEADER_BYTES","GLB_HEADER_MAGIC","GLB_VERSION","GLB_CHUNK_PREFIX_BYTES","GLB_CHUNK_TYPE_JSON","GLB_CHUNK_TYPE_BIN","equalArray","array1","array2","every","element","stringToArrayBuffer","window","TextEncoder","encode","ArrayBuffer","isIdentityMatrix","getMinMax","output","POSITIVE_INFINITY","NEGATIVE_INFINITY","getW","getPaddedBufferSize","bufferSize","getPaddedArrayBuffer","arrayBuffer","paddingByte","paddedLength","cachedCanvas","pending","buffers","byteOffset","nodeMap","Map","skins","extensionsUsed","uids","uid","asset","cache","meshes","attributesNormalized","trs","onlyVisible","truncateDrawRange","embedImages","maxTextureSize","includeCustomExtensions","processInput","blob","Blob","extensionsUsedList","FileReader","readAsArrayBuffer","onloadend","binaryChunk","binaryChunkPrefix","setUint32","jsonChunk","stringify","jsonChunkPrefix","header","headerView","totalByteLength","glbBlob","glbReader","readAsDataURL","base64data","uri","serializeUserData","objectDef","gltfExtensions","extensionName","extensions","extras","message","getUID","has","isNormalizedNormalAttribute","createNormalizedNormalAttribute","applyTextureTransform","mapDef","didTransform","transformDef","toArray","KHR_texture_transform","processBuffer","processBufferView","componentType","bufferViews","componentSize","dataView","setFloat32","setUint16","setUint8","bufferViewDef","byteStride","processBufferViewImage","processAccessor","Error","end2","bufferViewTarget","minMax","bufferView","accessorDef","normalized","accessors","processImage","cachedImages","mimeType","imageDef","HTMLImageElement","HTMLCanvasElement","OffscreenCanvas","ImageBitmap","Uint8ClampedArray","putImageData","ImageData","toBlob","bufferViewIndex","toDataURL","processSampler","samplers","samplerDef","processTexture","textureDef","sampler","_invokeAll","ext","writeTexture","processMaterial","isShaderMaterial","materialDef","pbrMetallicRoughness","isMeshStandardMaterial","isMeshBasicMaterial","baseColorFactor","metallicFactor","metalness","roughnessFactor","roughness","metalRoughMapDef","metallicRoughnessTexture","baseColorMapDef","baseColorTexture","emissiveIntensity","maxEmissiveComponent","emissiveFactor","emissiveMapDef","emissiveTexture","normalMapDef","normalTexture","occlusionMapDef","texCoord","aoMapIntensity","strength","occlusionTexture","alphaMode","alphaCutoff","doubleSided","writeMaterial","processMesh","meshCacheKeyParts","meshCacheKey","isLineLoop","meshDef","targets","nameConversion","skinWeight","skinIndex","originalNormal","modifiedAttribute","attributeName","toUpperCase","validVertexAttributes","accessor","weights","targetNames","reverseDictionary","warned","gltfAttributeName","baseAttribute","relativeAttribute","morphTargetsRelative","isMultiMaterial","cacheKey","writeMesh","processCamera","cameras","isOrtho","isOrthographicCamera","cameraDef","orthographic","xmag","right","ymag","zfar","znear","perspective","aspectRatio","yfov","degToRad","fov","processAnimation","root","Utils","mergeMorphTargetTracks","tracks","channels","track","trackBinding","parseTrackName","trackNode","findNode","nodeName","trackProperty","propertyName","objectName","isSkinnedMesh","skeleton","getBoneByName","objectIndex","inputItemSize","outputItemSize","times","interpolation","createInterpolant","isInterpolantFactoryMethodGLTFCubicSpline","getInterpolation","node","processSkin","nodes","rootJoint","joints","inverseBindMatrices","temporaryBoneInverse","boneInverses","multiply","bindMatrix","skin","processNode","nodeDef","translation","meshIndex","isCamera","nodeIndex","writeNode","processScene","scenes","sceneDef","processObjects","beforeParse","objectsWithoutScene","afterParse","func","light","isLight","isDirectionalLight","isPointLight","isSpotLight","lightDef","intensity","spot","innerConeAngle","penumbra","outerConeAngle","decay","lights","isGLTFSpecularGlossinessMaterial","extensionDef","diffuseFactor","specularFactor","glossinessFactor","glossiness","diffuseTexture","specularMapDef","specularGlossinessTexture","insertKeyframe","valueSize","getValueSize","TimeBufferType","ValueBufferType","interpolant","evaluate","slice","mergedTracks","sourceTracks","sourceTrack","sourceTrackBinding","sourceTrackNode","propertyIndex","InterpolantFactoryMethodDiscrete","InterpolantFactoryMethodLinear","setInterpolation","targetCount","targetIndex","mergedTrack","sourceInterpolant","keyframeIndex","nearPlane","farPlane","upVector","MODE","NONE","DEFAULT","PATH","SMOOTH_CAMERA_TRANSITION","AUTO_TUMBLE","ROTATE_TRANSITION","MINIMAP","SYNC_CONTROL","STATE","ROTATE","ZOOM","PAN","TOUCH_ROTATE","TOUCH_ZOOM","TOUCH_PAN","SCROLL","ROTATE_DIRECTION","FREE","HORIZONTAL","VERTICAL","CLICK_ACTION","MAIN","AUXILIARY","SECONDARY","tumble_rate","pointer_x","pointer_y","pointer_x_start","pointer_y_start","previous_pointer_x","previous_pointer_y","near_plane_fly_debt","touchZoomDistanceStart","touchZoomDistanceEnd","scrollRate","cameraPath","numberOfCameraPoint","updateLightWithPathFlag","deviceOrientationControl","defaultViewport","currentMode","smoothCameraTransitionObject","rotateCameraTransitionObject","cameraAutoTumbleObject","mouseScroll","rotateMode","_state","zincRayCaster","targetTouchId","rect","_a","_b","_c","_new_b","_new_c","_axis","_v","_rel_eye","sceneSphere","_tempEye","ndcControl","maxDist","viewports","getBoundingSphere","currentDist","viewportName","defaultName","getDefaultViewport","getViewportOfName","setRotationMode","getVisibleHeightAtZDepth","cameraOffset","vFOV","tan","getNDCFromDocumentCoords","positionIn","updateRect","out_x","out_y","setMouseButtonAction","buttonName","actionName","checkTravelDistance","newDist","translateViewport","onDocumentMouseDown","minimapCoordinates","button","ctrlKey","shiftKey","preventDefault","onDocumentMouseMove","move","onDocumentMouseUp","pick","onDocumentMouseLeave","onDocumentTouchStart","touches","dx","dy","identifier","onDocumentTouchMove","stopPropagation","onDocumentTouchEnd","onDocumentEnter","forced","observer","IntersectionObserver","boundingClientRect","disconnect","observe","onDocumentWheelEvent","deltaY","stopImmediatePropagation","fact","unproject","translate_rate","getVectorsFromRotateAboutLookAtPoints","axis","dot","up","rel_eyea","rel_eyeb","rel_eyec","upa","upb","upc","cos_angle","cos","sin_angle","sin","returned_values","tumble","delta_x","delta_y","tangent_dist","phi","acos","calculateZoomDelta","changeZoomByValue","near_far_minimum_ratio","flyZoom","directionalLightIn","addEventListener","removeEventListener","loadPath","pathData","CameraPath","NumberOfPoints","loadPathURL","path_url","updateTime","getTime","timeIn","getNumberOfTimeFrame","getCurrentTimeFrame","setCurrentTimeFrame","targetTimeFrame","updatePath","time_frame","bot_pos","top_pos","calculatePathNow","handleSyncControl","triggerCallback","zoom","controlEnabled","updated","isTransitionCompleted","ROTATE_CAMERA_TRANSITION","stopOnCameraInput","playPath","stopPath","isPlayingPath","enableDirectionalLightUpdateWithPath","enableDeviceOrientation","ModifiedDeviceOrientationControls","disableDeviceOrientation","isDeviceOrientationEnabled","newViewport","view_angle","clip_distance","eyex","eyey","eyez","localTargetPosition","eye_distance","localEyePosition","localFarPlane","localNearPlane","nearClippingFactor","radiusScale","clip_factor","currentViewport","getDefaultEyePosition","getDefaultTargetPosition","RotateCameraTransition","pauseCameraTransition","stopCameraTransition","isTransitioningCamera","autoTumble","tumbleDirectionIn","tumbleRateIn","stopOnCameraInputIn","enableAutoTumble","stopAutoTumble","updateAutoTumble","requireUpdate","isAutoTumble","enableRaycaster","callbackFunctionIn","hoverCallbackFunctionIn","disableRaycaster","isSyncControl","currentMpde","enableSyncControl","NDCCameraControl","disableSyncControl","targetCameraIn","startingEyePosition","startingTargetPosition","startingUp","endingEyePosition","endingTargetPosition","endingUp","targetCamera","completed","newDuration","updateCameraSettings","axisIn","angleIn","previousTime","actualDelta","hostSceneIn","hostScene","hoverCallbackFunction","Raycaster","mouse","awaiting","lastHoveredDate","lastHoveredEmpty","timeDiff","pickedObjects","lastPosition","zincCamera","pickableObjects","getIntersectsObject","threejsScene","intersectObjects","setPickableObjects","getIntersectsObjectWithOrigin","getIntersectsObjectWithCamera","setFromCamera","hovered","setTimeout","awaitMove","tumbleAxis","tumbleDirection","computeTumbleAxisAngle","StereoCameraZoomFixed","cameraL","layers","cameraR","focus","eyeRight","eyeLeft","xmin","xmax","projectionMatrix","eyeSep","eyeSepOnProjection","ymax","DEG2RAD","_stereo","reorder","deviceOrientation","screenOrientation","onDeviceOrientationChangeEvent","onScreenOrientationChangeEvent","setObjectQuaternion","zee","euler","Euler","q0","q1","beta","gamma","orient","setFromEuler","setFromAxisAngle","applyQuaternion","connect","eventCallback","cameraIn","defaultViewportIn","getCurrentPosition","scaledDelta","zoomToBox","setCenterZoom","getPanZoom","setEventCallback","Lines2","parentIn","tMatrix","isRegion","hideAllPrimitives","showAllPrimitives","transformation","nameIn","getName","getParent","getFullSeparatedPath","paths","parentName","p","unshift","getFullPath","createChild","getChildWithName","childName","lowerChildName","findChildFromSeparatedPath","pathArray","createChildFromSeparatedPath","transverse","objectsList","boundingBox1","childObjects","lowerObjectName","lowerGroupName","primitivesArray","geometriesArray","filter","pointsetsArray","glyphsetsArray","linesArray","getChildRegions","_options$markerCluste","allObjects","isNew","pointset","LineSegments2","LineMaterial","LineSegmentsGeometry","isLines2","arrayIn","linesGeometry","setPositions","getVerticesByFaceIndex","vIndex","worldUnits","resolution","innerWidth","innerHeight","InstancedInterleavedBuffer","InterleavedBufferAttribute","Line3","_start4","_end4","_ssOrigin","_ssOrigin3","_mvMatrix","_line","_closestPoint","_box","_clipToWorldVector","random","instanceStart","instanceEnd","instanceDistanceBuffer","Line2","lineWidth","ssMaxWidth","distanceToSphere","distanceToPoint","projectionMatrixInverse","sphereMargin","distanceToBox","boxMargin","intersectsBox","at","matrixWorldInverse","multiplyMatrices","isBehindCameraNear","deltaDist","t","lerp","param","closestPointToPointParameter","zPos","isInClipSpace","isInside","pointOnLine","InstancedBufferGeometry","WireframeGeometry","_vector","lineSegments","instanceBuffer","setColors","instanceColorBuffer","fromWireframeGeometry","fromEdgesGeometry","fromLineSegments","maxRadiusSq","distanceToSquared","isNaN","isLineSegmentsGeometry","ShaderLib","UniformsLib","UniformsUtils","dashScale","dashSize","dashOffset","gapSize","common","fog","clipping","defineProperties","enumerable","dashed","defines","USE_DASH","alphaToCoverage","ALPHA_TO_COVERAGE","derivatives","setValues","isLineMaterial","targetScene","helper","positionAttributes","_center","new_coord","diameter","getBoundary","v4","cameraControl","ThreeBSP","work","BufferGeometryLoader","hostIn","host","core","worker","myResolve","createGeometryFromJSON","JSONParser","workerEventHandler","ev","action","csg","GeometryCSGInternal","postMessage","getHostGeometry","tempCSG","createZincGeometry","getGeometry","csgMesh","newMesh","toMesh","setCSG","CSG","sendToWork","guestGeometry","intersect","newCSG","subtract","terminateWorker","terminate","COPLANAR","FRONT","BACK","SPANNING","_length_i","polygon","polygons","Node","tree","Polygon","Vertex","Face4","calculateProperties","other_tree","clipTo","build","allPolygons","toGeometry","polygon_vertice_count","vertex_idx_a","vertex_idx_b","vertex_idx_c","verticeUvs","getInverse","polygon_count","vertice_dict","vertice_count","flip","classifyVertex","side_value","classifySide","classification","num_positive","num_negative","splitPolygon","coplanar_front","coplanar_back","front","back","ti","tj","vj","interpolate","scalar","other","divider","isConvex","temp","clipPolygons","self","geometryFromJSON","guest","hostCSG","setGeometry","prepareCSG","guestCSG","hostCSGs","setGlyphset","prepareCSGForGlyphs","store","glyphset","clippingPlanes"],"sourceRoot":""}