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;AACA,GAJA,CAUA;AACA;AACA;AACA;AACA;AACA,GALA,CAeA;AACA;AACA;AACA;AACA,GAJA,CAuCA;AACA;AACA;AACA;AACA,GAJA,CAWA;AACA;AACA;AACA,GAHA,CAQA;AACA;AACA;AACA;AACA,GAJA,CAaA;AACA;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,GAppBA7b,UAAU,CAAC8C,SAAS,CAACgZ,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,CAOD7a,UAAU,CAAC8C,SAAS,CAACkZ,WAAW,CAAG,UAAW,CAC5C,MAAO,KAAI,CAACnB,QACd,CAAC,CAOD7a,UAAU,CAAC8C,SAAS,CAACmZ,SAAS,CAAG,SAASX,MAAM,CAAE,CAChD,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G,IAAI,CAACJ,SAAS,CACxC,IAAI,CAACK,kBAAkB,CAAG,IAAI,CAACJ,SAAS,EACnC,IAAI,CAACsB,MAAM,GAAKpD,KAAK,CAACO,MAAM,EAAM,IAAI,CAAC6C,MAAM,GAAKpD,KAAK,CAACQ,aAAc,IACzE,IAAI,CAAC4C,MAAM,CAAGpD,KAAK,CAACR,IAAI,EAE1B0D,QAAQ,CAAG,CAAC,CACZiB,UAAU,CAACmH,eAAe,CAAC,CAAC,CAEhC,CAAC,CAED;AACF;AACA;AACA;AACA,KAJE,CAmEA;AACF;AACA,KAFE,CAOA;AACF;AACA,KAFE,CAOA;AACF;AACA;AACA;AACA,KAJE,CASA;AACF;AACA;AACA;AACA;AACA,KALE,CAUA;AACF;AACA,KAFE,CAQA;AACF;AACA,KAFE,CAUA;AACF;AACA,KAFE,CAUA;AACF;AACA,KAFE,CAiBA;AACF;AACA;AACA;AACA,KAJE,CAwBA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAXE,CAgDC;AACH;AACA;AACA;AACA;AACA,KALG,CAiBD;AACF;AACA;AACA;AACA,KAJE,CA6BA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAVE,CAiBA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAXE,CAkBA;AACF;AACA;AACA;AACA,KAJE,CAYA;AACF;AACA,KAFE,CAOA;AACF;AACA;AACA,KAHE,CAUA;AACF;AACA,KAFE,CAQA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAVE,CAeA;AACF;AACA,KAFE,CAOA;AACF;AACA,KAFE,CAQA;AACF;AACA,KAFE,CAQA;AACF;AACA;AACA;AACA,KAJE,CASA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KARE,CAcA;AACF;AACA,KAFE,CAQA;AACF;AACA;AACA;AACA,KAJE,CASA;AACF;AACA,KAFE,CAYA;AACF;AACA,KA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FE,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,CA0BA;AACF;AACA;AACA;AACA;AACA;AACA;A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,UAAU,CACrCkB,IAAI,CAAC/B,QAAQ,CAAC2kF,cAAc,CAAG,IAAI,EAEpC,GAAM,CAAArzD,KAAK,CAAGozD,QAAQ,CAACxxD,cAAc,CAACnxB,IAAI,CAAEa,CAAC,CAAC,CAAC,CAAC,CAChD0uB,KAAK,CAAClG,QAAQ,CAAC84D,QAAO,CAACn6D,KAAK,CAC7B,CACJ,CACG,GAAM,CAAA22D,MAAM,CAAG,GAAI,CAAA9hF,WAAW,CAAC8lF,QAAQ,CAAC,CACxC,MAAO,CAAAhE,MACT,CAGD,CAEF,CAAC,CA7ED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAwEAnhF,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 creating 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.fontFace = font;\n sprite.fontSize = pixel;\n sprite.fontWeight = weight;\n sprite.material.map.generateMipmaps = false;\n sprite.material.map.anisotropy = 4;\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+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sHDgwCEMBJZu0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0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UicHx8rD59+jSVy+WOAKSJhKENwFItLtoxk8mwsixzHR0dHe3t7c5PAU+n09rs7OzJkydPYqVSaQfANoDXALIk31S2smU1TWMPDg7K5XKZ7+3t9TudTut1U7+wsFCcmJiIpdPpbQBxADsAknQWymYCOukBHYCuKApisdhpMpnURFEU79y503TVyKenpzOTk5M7e3t7MQKPV0Zv1gNm+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 (userSprite) {\n this.morph.add(userSprite);\n if (defaultDisplay) {\n this.morph.remove(sprite);\n if (label) {\n this.morph.remove(label);\n }\n defaultDisplay = false;\n }\n }\n }\n\n this.setImageForUserSprite = (image, size) => {\n if (userSprite) {\n this.morph.remove(userSprite);\n userSprite = undefined;\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\", 120, 700);\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+Q3JlYXRlZCB3aXRoIEZhYnJpYy5qcyA1LjIuNDwvZGVzYz4NCjxkZWZzPg0KPC9kZWZzPg0KPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiI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2c+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.fontFace = \"Asap\";\n sprite.fontWeight = 700;\n sprite.material.map.generateMipmaps = false;\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 = undefined;\n\t\t\ttry {\n json = JSON.parse(text);\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(\"The loader has encountered an error while parsing the content of a resource.\");\n\t\t\t\tif (onError) {\n\t\t\t\t\tonError({responseURL: url});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\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\", 120, 700);\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/Pgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxp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c2V0OiAwOyBzdHJva2UtbGluZWpvaW46IG1pdGVyOyBzdHJva2UtbWl0ZXJsaW1pdDogNDsgZmlsbDogcmdiKDI1NSwyNTUsMjU1KTsgZmlsbC1ydWxlOiBub256ZXJvOyBvcGFjaXR5OiAxOyIgdmVjdG9yLWVmZmVjdD0ibm9uLXNjYWxpbmctc3Ryb2tlIiAgY3g9IjAiIGN5PSIwIiByPSIzNSIgLz4KPC9nPgo8L2c+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 external resource: ${xhr?.responseURL}.`);\n const payload = {\n type: \"Error\",\n xhr\n };\n if (finishCallback) {\n finishCallback(payload);\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 if (lod && lod.levels) {\n for (const [key, value] of Object.entries(lod.levels)) {\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 }\n if (downloadedItem == numberOfDownloaded) {\n if (viewLoaded === false)\n scene.viewAll();\n if (allCompletedCallback != undefined && (typeof allCompletedCallback == 'function')) {\n allCompletedCallback();\n let zincCameraControls = scene.getZincCameraControls();\n if (zincCameraControls) {\n zincCameraControls.calculateMaxAllowedDistance(scene);\n }\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\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, KEYBOARD_ZOOM: 7, KEYBOARD_ROTATE: 8, KEYBOARD_PAN: 9 };\n const ROTATE_DIRECTION = { NONE: -1, FREE: 1, HORIZONTAL: 2, VERTICAL: 3 };\n\tconst KEYBOARD = { ARROWLEFT: 37, ARROWUP: 38, ARROWRIGHT: 39, ARROWDOWN: 40, NUMPADADD: 107, NUMPADSUBTRACT: 109, EQUAL: 187, MINUS: 189 };\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.zoomRate = 50;\n\tthis.rotateRate = 50;\n\tthis.panRate = 100;\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 zoomSize = 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 hasUpdated = false;\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 * 1.5: 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\t/**\n\t * \n\t * @param {HTML} element \n\t * @param {Number} index \n\t */\n\tconst setCanvasTabindex = (element, index) => {\n\t\tif (element instanceof HTMLCanvasElement)\n\t\t\telement.tabIndex = index\n\t}\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.zoomRate;\n\t\telse if (event.deltaY < 0)\n\t\t\tchanges = this.zoomRate * -1;\n\t\tzoomSize = zoomSize + changes;\n\t\tevent.preventDefault(); \n\t\tevent.stopImmediatePropagation(); \n\t}\t\n\n\tconst onDocumentKeydownEvent = event => {\n\t\tupdateRect(false);\n\t\tlet changes = 0;\n\t\tif (\n\t\t\t(event.keyCode === KEYBOARD.EQUAL) ||\n\t\t\t(event.keyCode === KEYBOARD.MINUS) ||\n\t\t\t(event.keyCode === KEYBOARD.NUMPADADD) ||\n\t\t\t(event.keyCode === KEYBOARD.NUMPADSUBTRACT)\n\t\t) {\n\t\t\tthis._state = STATE.KEYBOARD_ZOOM\n\t\t\tlet unit = 1;\n\t\t\tif (event.shiftKey) {\n\t\t\t\tunit = unit * 2\n\t\t\t}\n\t\t\tif (\n\t\t\t\t(event.keyCode === KEYBOARD.EQUAL) ||\n\t\t\t\t(event.keyCode === KEYBOARD.NUMPADADD)\n\t\t\t) {\n\t\t\t\tchanges = this.zoomRate * unit * -1;\n\t\t\t} else if (\n\t\t\t\t(event.keyCode === KEYBOARD.MINUS) ||\n\t\t\t\t(event.keyCode === KEYBOARD.NUMPADSUBTRACT)\n\t\t\t) {\n\t\t\t\tchanges = this.zoomRate * unit;\n\t\t\t}\n\t\t\tzoomSize = zoomSize + changes;\n\t\t} else if (\n\t\t\t(event.keyCode === KEYBOARD.ARROWLEFT) ||\n\t\t\t(event.keyCode === KEYBOARD.ARROWUP) ||\n\t\t\t(event.keyCode === KEYBOARD.ARROWRIGHT) ||\n\t\t\t(event.keyCode === KEYBOARD.ARROWDOWN)\n\t\t) {\n\t\t\tif (event.shiftKey) {\n\t\t\t\tthis._state = STATE.KEYBOARD_ROTATE\n\t\t\t\tthis.pointer_x_start = this.pointer_x;\n\t\t\t\tthis.pointer_y_start = this.pointer_y;\n\t\t\t\tchanges = this.rotateRate\n\t\t\t} else {\n\t\t\t\tthis._state = STATE.KEYBOARD_PAN\n\t\t\t\tchanges = this.panRate\n\t\t\t}\n\t\t\tthis.previous_pointer_x = this.pointer_x;\n\t\t\tthis.previous_pointer_y = this.pointer_y;\n\t\t\tif (event.keyCode === KEYBOARD.ARROWLEFT) {\n\t\t\t\tthis.pointer_x = this.pointer_x - changes;\n\t\t\t} else if (event.keyCode === KEYBOARD.ARROWUP) {\n\t\t\t\tthis.pointer_y = this.pointer_y - changes;\n\t\t\t} else if (event.keyCode === KEYBOARD.ARROWRIGHT) {\n\t\t\t\tthis.pointer_x = this.pointer_x + changes;\n\t\t\t} else if (event.keyCode === KEYBOARD.ARROWDOWN) {\n\t\t\t\tthis.pointer_y = this.pointer_y + changes;\n\t\t\t}\n\t\t}\n\t\tevent.preventDefault();\n\t}\n\n\tconst onDocumentKeyupEvent = event => {\n\t\tthis._state = STATE.NONE;\n\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) || (this._state === STATE.KEYBOARD_ZOOM)) {\n\t\t\tdelta = zoomSize;\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.zoomRate;\n this.changeZoomByValue(delta_y);\n }\n\n this.changeZoomByValue = delta_y => {\n\t\tif (typeof this.cameraObject !== \"undefined\")\n\t\t{\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 hasUpdated = true;\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) || (this._state === STATE.KEYBOARD_ZOOM)) {\n\t\t\tzoomSize = 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\tsetCanvasTabindex(this.domElement, 0)\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( 'mouseenter', onDocumentEnter, false );\n\t\t\tthis.domElement.addEventListener( 'contextmenu', event => { event.preventDefault(); }, false );\n\t\t\tthis.domElement.addEventListener( 'keydown', onDocumentKeydownEvent, false );\n\t\t\tthis.domElement.addEventListener( 'keyup', onDocumentKeyupEvent, 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\t\t\tthis.domElement.removeEventListener( 'mouseenter', onDocumentEnter, false );\n\t\t\tthis.domElement.removeEventListener( 'contextmenu', event => { event.preventDefault(); }, false );\n\t\t\tthis.domElement.removeEventListener( 'keydown', onDocumentKeydownEvent, false );\n\t\t\tthis.domElement.removeEventListener( 'keyup', onDocumentKeyupEvent, false );\n\t\t\tsetCanvasTabindex(this.domElement, -1)\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) || (this._state === STATE.KEYBOARD_ROTATE)){\n //rotateion does not trigger callback\n tumble();\n } else if ((this._state === STATE.PAN) || (this._state === STATE.TOUCH_PAN) || (this._state === STATE.KEYBOARD_PAN)){\n translate();\n ndcControl.triggerCallback();\n } else if ((this._state === STATE.ZOOM) || (this._state === STATE.TOUCH_ZOOM) || (this._state === STATE.SCROLL) || (this._state === STATE.KEYBOARD_ZOOM)){\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) || (this._state === STATE.KEYBOARD_ZOOM)) {\n this._state = STATE.NONE;\n }\n zoomSize = 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) || (this._state === STATE.KEYBOARD_ROTATE)){\n\t\t\t\ttumble();\n\t\t\t} else if ((this._state === STATE.PAN) || (this._state === STATE.TOUCH_PAN) || (this._state === STATE.KEYBOARD_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) || (this._state === STATE.KEYBOARD_ZOOM)){\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\tupdated = updated || hasUpdated;\n\t\thasUpdated = false;\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\thasUpdated = true;\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","fontFace","fontSize","fontWeight","generateMipmaps","anisotropy","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","e","responseURL","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","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","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","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","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","log","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","KEYBOARD_ZOOM","KEYBOARD_ROTATE","KEYBOARD_PAN","ROTATE_DIRECTION","FREE","HORIZONTAL","VERTICAL","KEYBOARD","ARROWLEFT","ARROWUP","ARROWRIGHT","ARROWDOWN","NUMPADADD","NUMPADSUBTRACT","EQUAL","MINUS","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","zoomRate","rotateRate","panRate","cameraPath","numberOfCameraPoint","updateLightWithPathFlag","deviceOrientationControl","defaultViewport","currentMode","smoothCameraTransitionObject","rotateCameraTransitionObject","cameraAutoTumbleObject","zoomSize","rotateMode","_state","zincRayCaster","targetTouchId","rect","_a","_b","_c","_new_b","_new_c","_axis","_v","_rel_eye","sceneSphere","_tempEye","hasUpdated","ndcControl","maxDist","viewports","getBoundingSphere","currentDist","viewportName","defaultName","getDefaultViewport","getViewportOfName","setRotationMode","getVisibleHeightAtZDepth","cameraOffset","vFOV","tan","getNDCFromDocumentCoords","positionIn","updateRect","out_x","out_y","setMouseButtonAction","buttonName","actionName","setCanvasTabindex","tabIndex","checkTravelDistance","newDist","translateViewport","onDocumentMouseDown","minimapCoordinates","button","ctrlKey","shiftKey","preventDefault","onDocumentMouseMove","move","onDocumentMouseUp","pick","onDocumentMouseLeave","onDocumentTouchStart","touches","_rect","_rect2","dx","dy","_rect3","_rect4","identifier","onDocumentTouchMove","stopPropagation","onDocumentTouchEnd","onDocumentEnter","forced","observer","IntersectionObserver","boundingClientRect","disconnect","observe","onDocumentWheelEvent","deltaY","stopImmediatePropagation","onDocumentKeydownEvent","keyCode","onDocumentKeyupEvent","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","_rect5","_rect6","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":""}