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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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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,KAtaC,IAAI,CAAC7sD,MAAM,CAAGJ,WAAW,EAAI,IACtB,CAAAmE,KAAK,CAAGnE,WAAW,CAAG8lB,QAAQ,CAChCqnC,cAAc,CAAGt0D,OAAO,CACxBu0D,OAAO,GAAO,CAwDlB,MAvDI,CAAAhI,WAAW,GAAKzC,IAAI,CAACG,IAAI,CAC5B6J,UAAU,CAACxoD,KAAK,CAAC,CACPihD,WAAW,GAAKzC,IAAI,CAACI,wBAAwB,EAAIsC,4BAA4B,EACvFA,4BAA4B,CAACjlD,MAAM,CAAC+D,KAAK,CAAC,CACtCkhD,4BAA4B,CAACgI,qBAAqB,CAAC,CAAC,GACvD,MAAAhI,4BAAyC,CACzCD,WAAW,CAAGzC,IAAI,CAACE,OAAO,EAE3BsK,cAAc,GAAQ,EACZ/H,WAAW,GA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,CAAC,CAEXC,WAAW,CAAG,QAAAA,CAAA,CAAY,CAC9B,MAAO,IAAI,CAAGD,SAAS,EACzB,CAAC,CAUGsxB,MAAM,CAAG,QAAAA,CAAU6nC,QAAQ,CAAEptC,OAAO,CAAE,IACpC,CAAAhjB,MAAM,CAAGowD,QAAQ,CACjBliE,KAAK,CAAG,GAAI,CAAAkJ,KAAO,CACvBlJ,KAAK,CAAC4D,gBAAgB,GAAQ,CAC9B5D,KAAK,CAAC4J,QAAQ,CAAG,IAAI,IACjB,CAAAumB,QAAQ,CAAG,EAAE,CACb74B,IAAI,CAAG,EAAE,CACT2mC,WAAW,CAAG,EAAE,CAChBjuB,KAAK,CAAG8kB,OAAO,CACbqtC,OAAO,CAAG,GAAI,CAAA7lE,OAAS,CACzBoN,QAAQ,CAAG,GAAI,CAOnB;AACF;AACA,KAFE,CAQA;AACF;AACA,KAFE,CAQA;AACF;AACA;AACA;AACA;AACA,KALE,CAaA;AACF;AACA;AACA;AACA,KAJE,CASA;AACF;AACA;AACA;AACA;AACA,KALE,CAUA;AACF;AACA;AACA;AACA;AACA;AACA,KANE,CAaA;AACF;AACA;AACA;AACA;AACA,KALE,CAYA;AACF;AACA;AACA;AACA,KAJE,CASA;AACF;AACA;AACA;AACA,KAJE,CASA;AACF;AACA;AACA;AACA,KAJE,CAoBA;AACF;AACA;AACA;AACA,KAJE,CAiBA;AACF;AACA;AACA;AACA;AACA,KALE,CAcA;AACF;AACA;AACA;AACA;AACA,KALE,CAiBA;AACF;AACA;AACA;AACA;AACA;AACA,KANE,CAyBA;AACF;AACA;AACA;AACA;AACA;AACA;AACA,KAPE,CAaA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KARE,CA0BA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KARE,CAeA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KARE,CAiBA;AACF;AACA;AACA;AACA;AACA;AACA,KANE,CAoBA;AACF;AACA;AACA;AACA;AACA,KALE,CAqBA;AACF;AACA;AACA;AACA;AACA;AACA;AACA,KAPE,CAoBA;AACF;AACA,KAFE,CAwBA;AACF;AACA;AACA;AACA;AACA,KALE,CAYA;AACF;AACA;AACA,KAHE,CAQA;AACF;AACA;AACA;AACA;AACA;AACA,KANE,CAkCA;AACF;AACA;AACA;AACA;AACA,KALE,CAkBA;AACF;AACA;AACA;AACA;AACA;AACA;AACA,KAPE,CAwBA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KARE,CAmBA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KARE,CAmBA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KARE,CAmBA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IARE,CAkCA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KARE,CA0BA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KARE,CAeA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KARE,CAeA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KARE,CAeA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KARE,CAeA;AACF;AACA;AACA;AACA;AACA;AACA,KANE,CAkBA;AACF;AACA;AACA;AACA;AACA;AACA,KANE,CAkBA;AACF;AACA;AACA;AACA;AACA,KALE,CAmBA;AACF;AACA;AACA;AACA;AACA;AACA,KANE,CAkBA;AACF;AACA;AACA;AACA,KAJE,CAoBA;AACF;AACA;AACA,KAHE,CA6BA;AACF;AACA,KAFE,CAmBA;AACF;AACA,KAFE,CAmBA;AACF;AACA,KA7wBEy4D,OAAO,CAACruE,GAAG,CAAC,CAAC,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAC,CAC3D,IAAI,C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UACA","sources":["webpack://Zinc/webpack/universalModuleDefinition","webpack://Zinc/./src/zinc.js","webpack://Zinc/external commonjs \"url-polyfill\"","webpack://Zinc/./src/primitives/geometry.js","webpack://Zinc/external commonjs \"three\"","webpack://Zinc/./src/utilities.js","webpack://Zinc/./src/three/Geometry.js","webpack://Zinc/external commonjs \"three-spritetext\"","webpack://Zinc/./src/assets/disc.png","webpack://Zinc/./src/primitives/augmentShader.js","webpack://Zinc/./src/primitives/zincObject.js","webpack://Zinc/./src/primitives/lod.js","webpack://Zinc/./src/three/line/LineSegments.js","webpack://Zinc/./src/three/line/Line.js","webpack://Zinc/./src/primitives/marker.js","webpack://Zinc/./src/assets/mapMarker.svg","webpack://Zinc/./src/primitives/glyph.js","webpack://Zinc/./src/primitives/label.js","webpack://Zinc/./src/primitives/glyphset.js","webpack://Zinc/./src/loaders/JSONLoader.js","webpack://Zinc/./src/three/Loader.js","webpack://Zinc/./src/videoHandler.js","webpack://Zinc/./src/primitives/pointset.js","webpack://Zinc/./src/three/Points.js","webpack://Zinc/./src/primitives/lines.js","webpack://Zinc/./src/texture/textureArray.js","webpack://Zinc/./src/texture/texture.js","webpack://Zinc/./src/primitives/textureSlides.js","webpack://Zinc/./src/shaders/textureSlide.js","webpack://Zinc/./src/primitives/texturePrimitive.js","webpack://Zinc/./src/renderer.js","webpack://Zinc/external commonjs \"css-element-queries/src/ResizeSensor\"","webpack://Zinc/./src/scene.js","webpack://Zinc/./src/primitives/markerCluster.js","webpack://Zinc/./src/assets/mapMarkerOrange.svg","webpack://Zinc/./src/sceneLoader.js","webpack://Zinc/./src/loaders/STLLoader.js","webpack://Zinc/./src/loaders/OBJLoader.js","webpack://Zinc/./src/loaders/primitivesLoader.js","webpack://Zinc/./src/loaders/GLTFToZincJSLoader.js","webpack://Zinc/external commonjs \"three/examples/jsm/loaders/GLTFLoader\"","webpack://Zinc/./src/sceneExporter.js","webpack://Zinc/./src/three/GLTFExporter.js","webpack://Zinc/./src/controls.js","webpack://Zinc/./src/region.js","webpack://Zinc/./src/primitives/lines2.js","webpack://Zinc/./src/three/line/LineSegments2.js","webpack://Zinc/./src/three/line/LineSegmentsGeometry.js","webpack://Zinc/./src/three/line/LineMaterial.js","webpack://Zinc/./src/minimap.js","webpack://Zinc/./src/geometryCSG.js","webpack://Zinc/./src/three-js-csg.js","webpack://Zinc/external commonjs \"webworkify-webpack\"","webpack://Zinc/external commonjs \"promise-polyfill\"","webpack://Zinc/./src/workers/geometryCSG.worker.js","webpack://Zinc/./src/workers/geometryCSGInternal.js","webpack://Zinc/./src/glyphsetCSG.js","webpack://Zinc/webpack/bootstrap","webpack://Zinc/webpack/runtime/compat get default export","webpack://Zinc/webpack/runtime/define property getters","webpack://Zinc/webpack/runtime/hasOwnProperty shorthand","webpack://Zinc/webpack/runtime/make namespace object","webpack://Zinc/webpack/before-startup","webpack://Zinc/webpack/startup","webpack://Zinc/webpack/after-startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Zinc\"] = factory();\n\telse\n\t\troot[\"Zinc\"] = factory();\n})(this, () => {\nreturn ","require(\"url-polyfill\");\nconst PACKAGE = require('../package.json');\nconst version = PACKAGE.version;\n\n/**\n * Provides a global namespace for the Zinc javascript library and some default parameters for it.\n * \n * @namespace\n * @author Alan Wu\n */\n\nconst Zinc = function() {\n this.Revision = version;\n this.defaultMaterialColor = 0xFFFFFF;\n this.defaultOpacity = 1.0;\n this.modelPrefix = undefined;\n this.Geometry = require('./primitives/geometry').Geometry;\n this.Glyph = require('./primitives/glyph').Glyph;\n this.Glyphset = require('./primitives/glyphset').Glyphset;\n this.Pointset = require('./primitives/pointset').Pointset;\n this.Label = require('./primitives/label').Label;\n this.Lines = require('./primitives/lines').Lines;\n this.TextureArray = require('./texture/textureArray').TextureArray;\n this.TextureSlides = require('./primitives/textureSlides').TextureSlides;\n this.Renderer = require('./renderer').Renderer;\n this.Scene = require('./scene').Scene;\n this.GeometryCSG = require('./geometryCSG').GeometryCSG;\n this.GlyphsetCSG = require('./glyphsetCSG').GlyphsetCSG;\n this.Viewport = require('./controls').Viewport;\n this.CameraControls = require('./controls').CameraControls;\n this.SmoothCameraTransition = require('./controls').SmoothCameraTransition;\n this.RayCaster = require('./controls').RayCaster;\n this.CameraAutoTumble = require('./controls').CameraAutoTumble;\n this.StereoEffect = require('./controls').StereoEffect;\n this.loadExternalFile = require('./utilities').loadExternalFile;\n this.loadExternalFiles = require('./utilities').loadExternalFiles;\n this.THREE = require('three'); \n \n};\n\nmodule.exports = new Zinc();\n","module.exports = require(\"url-polyfill\");","const THREE = require('three');\nconst toBufferGeometry = require('../utilities').toBufferGeometry;\n\nconst createMeshForGeometry = (geometryIn, materialIn, options) => {\n // First copy the geometry\n let geometry = toBufferGeometry(geometryIn, options);\n\n let isTransparent = false;\n if (1.0 > options.opacity)\n isTransparent = true;\n\n let material = undefined;\n if (geometry._video === undefined) {\n const morphTargets = options.localTimeEnabled || options.localMorphColour;\n if (materialIn) {\n material = materialIn;\n material.morphTargets = morphTargets;\n material.morphNormals = options.localTimeEnabled;\n } else {\n if (geometry instanceof THREE.BufferGeometry && geometry.attributes.color === undefined) {\n material = new THREE.MeshPhongMaterial({\n color : options.colour,\n morphTargets : morphTargets,\n morphNormals : options.localTimeEnabled,\n transparent : isTransparent,\n opacity : options.opacity,\n side : THREE.DoubleSide\n });\n } else {\n material = new THREE.MeshPhongMaterial({\n color : options.colour,\n morphTargets : morphTargets,\n morphNormals : options.localTimeEnabled,\n vertexColors : THREE.VertexColors,\n transparent : isTransparent,\n opacity : options.opacity,\n side : THREE.DoubleSide\n });\n }\n }\n //material = PhongToToon(material);\n if (options.localMorphColour && geometry.morphAttributes[ \"color\" ]) {\n material.onBeforeCompile = (require(\"./augmentShader\").augmentMorphColor)();\n }\n } else {\n let videoTexture = geometry._video.createCanvasVideoTexture();\n material = new THREE.MeshBasicMaterial({\n morphTargets : options.localTimeEnabled,\n color : new THREE.Color(1, 1, 1),\n transparent : isTransparent,\n opacity : options.opacity,\n map : videoTexture,\n side : THREE.DoubleSide\n });\n this.videoHandler = geometry._video;\n }\n return new THREE.Mesh(geometry, material); \n}\n\n/**\n * Provides an object which stores geometry and provides method which controls its animations.\n * This is created when a valid json file containging geometry is read into a {@link Zinc.Scene}\n * object.\n * \n * @class\n * @author Alan Wu\n * @return {Geometry}\n */\nconst Geometry = function () {\n (require('./zincObject').ZincObject).call(this);\n\t// THREE.Geometry or THREE.BufferGeometry\n\tthis.videoHandler = undefined;\n this.isGeometry = true;\n\n /**\n * Create the mesh for rendering\n * \n * @param {THREE.Geomtry} geometryIn - Geometry to be rendered.\n * @param {THREE.Material} materialIn - Material to be set for the geometry.\n * @param {Object} options - Provide various options\n * @param {THREE.Color} options.colour - colour to be set for the geometry\n * @param {Boolean} options.localTimeEnabled - A flag to indicate either the geometry is\n * time dependent.\n * @param {Boolean} options.localMorphColour - A flag to indicate either the colour is\n * time dependent.\n * @param {Number} options.opacity - Opacity to be set for the geometry\n */\n\tthis.createMesh = (geometryIn, materialIn, options) => {\n //Skip if there is a morph already\n\t\tif (this.morph && this.morph.geometry && (geometryIn != undefined))\n\t\t\treturn;\n\t\tconst mesh = createMeshForGeometry(geometryIn, materialIn, options); \n\t\tthis.setMesh(mesh, options.localTimeEnabled, options.localMorphColour);\n\t}\n\n /**\n * Calculate the UV for texture rendering.\n */\n\tthis.calculateUVs = () => {\n //Multilayers\n\t\tthis.geometry.computeBoundingBox();\n\t\tconst max = this.geometry.boundingBox.max, min = this.geometry.boundingBox.min;\n\t\tconst offset = new THREE.Vector2(0 - min.x, 0 - min.y);\n\t\tconst range = new THREE.Vector2(max.x - min.x, max.y - min.y);\n\t\tthis.geometry.faceVertexUvs[0] = [];\n\t\tfor (let i = 0; i < this.geometry.faces.length ; i++) {\n\t\t const v1 = this.geometry.vertices[this.geometry.faces[i].a];\n\t\t const v2 = this.geometry.vertices[this.geometry.faces[i].b];\n\t\t const v3 = this.geometry.vertices[this.geometry.faces[i].c];\n\t\t geometry.faceVertexUvs[0].push(\n\t\t [\n\t\t new THREE.Vector2((v1.x + offset.x)/range.x ,(v1.y + offset.y)/range.y),\n\t\t new THREE.Vector2((v2.x + offset.x)/range.x ,(v2.y + offset.y)/range.y),\n\t\t new THREE.Vector2((v3.x + offset.x)/range.x ,(v3.y + offset.y)/range.y)\n\t\t ]);\n\t\t}\n\t\tgeometry.uvsNeedUpdate = true;\t\n\t}\n\n /**\n * Handle transparent mesh, create a clone for backside rendering if it is\n * transparent.\n */\n this.checkTransparentMesh = function() {\n this._lod.checkTransparentMesh();\n }\n\t\n\t/**\n\t * Set wireframe display for this geometry.\n\t * \n\t * @param {Boolean} wireframe - Flag to turn on/off wireframe display.\n\t */\n\tthis.setWireframe = wireframe => {\n\t\tthis.morph.material.wireframe = wireframe;\n\t}\n\n /**\n * Edit Vertice in index.\n */\n this.editVertices = function(coords, i) {\n if (coords && coords.length) {\n let mesh = this.getMorph();\n const attribute = mesh.geometry.getAttribute(\"position\");\n if (!mesh || 0 > i) {\n return;\n } else {\n let index = i * 3;\n coords.forEach(coord => {\n attribute.array[index++] = coord[0];\n attribute.array[index++] = coord[1];\n attribute.array[index++] = coord[2];\n });\n attribute.needsUpdate = true;\n mesh.geometry.computeBoundingBox();\n mesh.geometry.computeBoundingSphere();\n this.boundingBoxUpdateRequired = true;\n }\n }\n }\n\t\n\n}\n\nGeometry.prototype = Object.create((require('./zincObject').ZincObject).prototype);\nexports.Geometry = Geometry;\n","module.exports = require(\"three\");","const THREE = require('three');\nconst THREEGeometry = require('./three/Geometry').Geometry;\nconst SpriteText = require('three-spritetext').default;\n\nfunction resolveURL(url) {\n\tlet actualURL = url;\n\tconst prefix = (require(\"./zinc\").modelPrefix);\n\t\n\tif (prefix) {\n\t\tif (prefix[prefix.length -1] != '/')\n\t\t\tprefix = prefix + '/';\n\t\tconst r = new RegExp('^(?:[a-z]+:)?//', 'i');\n\t\tif (!r.test(url)) {\n\t\t\tactualURL = prefix + url;\n\t\t}\n\t}\n\t\n\treturn actualURL;\n}\n\nfunction createNewURL(target, reference) {\n const getNewURL = (target, reference) => {\n try {\n let newURL = (new URL(target, reference)).href;\n //Make sure the target url does not contain parameters\n if (target && target.split(\"?\").length < 2) {\n const paramsStrings = reference.split(\"?\");\n //There are parameters, add them to the target\n if (paramsStrings.length === 2) {\n newURL = newURL + \"?\" + paramsStrings[1];\n }\n }\n return newURL;\n } catch {\n console.error(`There is an issue creting the url link with: ${target}.` );\n }\n }\n if (!Array.isArray(target)) {\n return getNewURL(target, reference);\n } else {\n const urls = [];\n target.forEach((url) => {\n urls.push(getNewURL(url, reference));\n });\n return urls;\n }\n}\n\n/*\n * Calculate the bounding box of a mesh, values will be\n * set for cachedBox, b1, v1 and v2 and they need to be\n * defined. \n */\nfunction getBoundingBox(mesh, cachedBox, b1, v1, v2) {\n let influences = mesh.morphTargetInfluences;\n let attributes = undefined;\n if (mesh.geometry)\n attributes = mesh.geometry.morphAttributes;\n let found = false;\n if (influences && attributes && attributes.position) {\n v1.set(0.0, 0.0, 0.0);\n v2.set(0.0, 0.0, 0.0);\n for (let i = 0; i < influences.length; i++) {\n if (influences[i] > 0) {\n found = true;\n b1.setFromArray(attributes.position[i].array);\n v1.add(b1.min.multiplyScalar(influences[i]));\n v2.add(b1.max.multiplyScalar(influences[i]));\n }\n }\n if (found) {\n cachedBox.set(v1, v2);\n }\n }\n if (!found) {\n cachedBox.setFromBufferAttribute(\n mesh.geometry.attributes.position);\n }\n mesh.updateWorldMatrix(true, true);\n cachedBox.applyMatrix4(mesh.matrixWorld);\n}\n\n\n//Convenient function\nfunction loadExternalFile(url, data, callback, errorCallback) {\n // Set up an asynchronous request\n const request = new XMLHttpRequest();\n request.open('GET', resolveURL(url), true);\n\n // Hook the event that gets called as the request progresses\n request.onreadystatechange = () => {\n // If the request is \"DONE\" (completed or failed)\n if (request.readyState == 4) {\n // If we got HTTP status 200 (OK)\n if (request.status == 200) {\n callback(request.responseText, data)\n } else { // Failed\n errorCallback(url);\n }\n }\n };\n\n request.send(null); \n}\n\nfunction loadExternalFiles(urls, callback, errorCallback) {\n const numUrls = urls.length;\n let numComplete = 0;\n const result = [];\n\n // Callback for a single file\n function partialCallback(text, urlIndex) {\n result[urlIndex] = text;\n numComplete++;\n\n // When all files have downloaded\n if (numComplete == numUrls) {\n callback(result);\n }\n }\n\n for (let i = 0; i < numUrls; i++) {\n \tloadExternalFile(urls[i], i, partialCallback, errorCallback);\n }\n}\n\n\n//Get the colours at index\nexports.getColorsRGB = (colors, index) => {\n const index_in_colors = Math.floor(index/3);\n const remainder = index%3;\n let hex_value = 0;\n if (remainder == 0)\n {\n hex_value = colors[index_in_colors].r;\n }\n else if (remainder == 1)\n {\n hex_value = colors[index_in_colors].g;\n }\n else if (remainder == 2)\n {\n hex_value = colors[index_in_colors].b;\n }\n const mycolor = new THREE.Color(hex_value);\n return [mycolor.r, mycolor.g, mycolor.b];\n}\n\nexports.updateMorphColorAttribute = function(targetGeometry, morph) {\n if (morph && targetGeometry && targetGeometry.morphAttributes &&\n targetGeometry.morphAttributes[ \"color\" ]) {\n const morphColors = targetGeometry.morphAttributes[ \"color\" ];\n const influences = morph.morphTargetInfluences;\n const length = influences.length;\n targetGeometry.deleteAttribute( 'morphColor0' );\n targetGeometry.deleteAttribute( 'morphColor1' );\n let bound = 0;\n let morphArray = [];\n for (let i = 0; (1 > bound) || (i < length); i++) {\n if (influences[i] > 0) {\n bound++;\n morphArray.push([i, influences[i]]);\n }\n }\n if (morphArray.length == 2) {\n targetGeometry.setAttribute('morphColor0', morphColors[ morphArray[0][0] ] );\n targetGeometry.setAttribute('morphColor1', morphColors[ morphArray[1][0] ] );\n } else if (morphArray.length == 1) {\n targetGeometry.setAttribute('morphColor0', morphColors[ morphArray[0][0] ] );\n targetGeometry.setAttribute('morphColor1', morphColors[ morphArray[0][0] ] );\n }\n }\n}\n\n\nexports.toBufferGeometry = (geometryIn, options) => {\n let geometry = undefined;\n if (geometryIn instanceof THREEGeometry) {\n if (options.localTimeEnabled && !geometryIn.morphNormalsReady && \n (geometryIn.morphNormals == undefined || geometryIn.morphNormals.length == 0))\n geometryIn.computeMorphNormals();\n geometry = geometryIn.toIndexedBufferGeometry();\n if (options.localMorphColour) {\n copyMorphColorsToIndexedBufferGeometry(geometryIn, geometry);\n }\n } else if (geometryIn instanceof THREE.BufferGeometry) {\n geometry = geometryIn.clone();\n }\n geometry.colorsNeedUpdate = true;\n geometry.computeBoundingBox();\n geometry.computeBoundingSphere();\n if (geometryIn._video)\n geometry._video = geometryIn._video;\n return geometry;\n}\n\nexports.copyMorphColorsToBufferGeometry = (geometry, bufferGeometry) => {\n if (geometry && geometry.morphColors && geometry.morphColors.length > 0 ) {\n let array = [];\n let morphColors = geometry.morphColors;\n const getColorsRGB = require(\"./utilities\").getColorsRGB;\n for ( var i = 0, l = morphColors.length; i < l; i ++ ) {\n let morphColor = morphColors[ i ];\n let colorArray = [];\n for ( var j = 0; j < geometry.faces.length; j ++ ) {\n let face = geometry.faces[j];\n let color = getColorsRGB(morphColor.colors, face.a);\n colorArray.push(color[0], color[1], color[2]);\n color = getColorsRGB(morphColor.colors, face.b);\n colorArray.push(color[0], color[1], color[2]);\n color = getColorsRGB(morphColor.colors, face.c);\n colorArray.push(color[0], color[1], color[2]);\n }\n var attribute = new THREE.Float32BufferAttribute( geometry.faces.length * 3 * 3, 3 );\n attribute.name = morphColor.name;\n array.push( attribute.copyArray( colorArray ) );\n }\n bufferGeometry.morphAttributes[ \"color\" ] = array; \n }\n}\n\n\nconst copyMorphColorsToIndexedBufferGeometry = (geometry, bufferGeometry) => {\n if (geometry && geometry.morphColors && geometry.morphColors.length > 0 ) {\n let array = [];\n let morphColors = geometry.morphColors;\n const getColorsRGB = require(\"./utilities\").getColorsRGB;\n for ( let i = 0, l = morphColors.length; i < l; i ++ ) {\n const morphColor = morphColors[ i ];\n const colorArray = [];\n for ( let j = 0; j < morphColor.colors.length * 3; j ++ ) {\n let color = getColorsRGB(morphColor.colors, j);\n colorArray.push(color[0], color[1], color[2]);\n }\n const attribute = new THREE.Float32BufferAttribute( colorArray, 3 );\n attribute.name = morphColor.name;\n array.push( attribute );\n }\n bufferGeometry.morphAttributes[ \"color\" ] = array; \n }\n}\n\nexports.mergeVertices = ( geometry, tolerance = 1e-4 ) => {\n\n tolerance = Math.max( tolerance, Number.EPSILON );\n\n // Generate an index buffer if the geometry doesn't have one, or optimize it\n // if it's already available.\n var hashToIndex = {};\n var indices = geometry.getIndex();\n var positions = geometry.getAttribute( 'position' );\n var vertexCount = indices ? indices.count : positions.count;\n\n // next value for triangle indices\n var nextIndex = 0;\n\n // attributes and new attribute arrays\n var attributeNames = Object.keys( geometry.attributes );\n var attrArrays = {};\n var morphAttrsArrays = {};\n var newIndices = [];\n var getters = [ 'getX', 'getY', 'getZ', 'getW' ];\n\n // initialize the arrays\n for ( var i = 0, l = attributeNames.length; i < l; i ++ ) {\n var name = attributeNames[ i ];\n\n attrArrays[ name ] = [];\n\n var morphAttr = geometry.morphAttributes[ name ];\n if ( morphAttr ) {\n\n morphAttrsArrays[ name ] = new Array( morphAttr.length ).fill().map( () => [] );\n\n }\n\n }\n\n // convert the error tolerance to an amount of decimal places to truncate to\n var decimalShift = Math.log10( 1 / tolerance );\n var shiftMultiplier = Math.pow( 10, decimalShift );\n for ( var i = 0; i < vertexCount; i ++ ) {\n\n var index = indices ? indices.getX( i ) : i;\n\n // Generate a hash for the vertex attributes at the current index 'i'\n var hash = '';\n for ( var j = 0, l = attributeNames.length; j < l; j ++ ) {\n\n var name = attributeNames[ j ];\n var attribute = geometry.getAttribute( name );\n var itemSize = attribute.itemSize;\n\n for ( var k = 0; k < itemSize; k ++ ) {\n\n // double tilde truncates the decimal value\n hash += `${ ~ ~ ( attribute[ getters[ k ] ]( index ) * shiftMultiplier ) },`;\n\n }\n\n }\n\n // Add another reference to the vertex if it's already\n // used by another index\n if ( hash in hashToIndex ) {\n\n newIndices.push( hashToIndex[ hash ] );\n\n } else {\n\n // copy data to the new index in the attribute arrays\n for ( var j = 0, l = attributeNames.length; j < l; j ++ ) {\n\n var name = attributeNames[ j ];\n var attribute = geometry.getAttribute( name );\n var morphAttr = geometry.morphAttributes[ name ];\n var itemSize = attribute.itemSize;\n var newarray = attrArrays[ name ];\n var newMorphArrays = morphAttrsArrays[ name ];\n\n for ( var k = 0; k < itemSize; k ++ ) {\n\n var getterFunc = getters[ k ];\n newarray.push( attribute[ getterFunc ]( index ) );\n\n if ( morphAttr ) {\n\n for ( var m = 0, ml = morphAttr.length; m < ml; m ++ ) {\n\n newMorphArrays[ m ].push( morphAttr[ m ][ getterFunc ]( index ) );\n\n }\n\n }\n\n }\n\n }\n\n hashToIndex[ hash ] = nextIndex;\n newIndices.push( nextIndex );\n nextIndex ++;\n\n }\n\n }\n\n // Generate typed arrays from new attribute arrays and update\n // the attributeBuffers\n const result = geometry.clone();\n for ( var i = 0, l = attributeNames.length; i < l; i ++ ) {\n\n var name = attributeNames[ i ];\n var oldAttribute = geometry.getAttribute( name );\n var attribute;\n\n var buffer = new oldAttribute.array.constructor( attrArrays[ name ] );\n if ( oldAttribute.isInterleavedBufferAttribute ) {\n\n attribute = new THREE.BufferAttribute( buffer, oldAttribute.itemSize, oldAttribute.itemSize );\n\n } else {\n\n attribute = geometry.getAttribute( name ).clone();\n attribute.setArray( buffer );\n\n }\n\n result.setAttribute( name, attribute );\n\n // Update the attribute arrays\n if ( name in morphAttrsArrays ) {\n\n for ( var j = 0; j < morphAttrsArrays[ name ].length; j ++ ) {\n\n var morphAttribute = geometry.morphAttributes[ name ][ j ].clone();\n morphAttribute.setArray( new morphAttribute.array.constructor( morphAttrsArrays[ name ][ j ] ) );\n result.morphAttributes[ name ][ j ] = morphAttribute;\n\n }\n\n }\n\n }\n\n // Generate an index buffer typed array\n var cons = Uint8Array;\n if ( newIndices.length >= Math.pow( 2, 8 ) ) cons = Uint16Array;\n if ( newIndices.length >= Math.pow( 2, 16 ) ) cons = Uint32Array;\n\n var newIndexBuffer = new cons( newIndices );\n var newIndices = null;\n if ( indices === null ) {\n\n newIndices = new THREE.BufferAttribute( newIndexBuffer, 1 );\n\n } else {\n\n newIndices = geometry.getIndex().clone();\n newIndices.setArray( newIndexBuffer );\n\n }\n\n result.setIndex( newIndices );\n\n return result;\n}\n\nfunction PhongToToon(materialIn) {\n\tif (materialIn.isMeshPhongMaterial) {\n\t\tlet material = new THREE.MeshToonMaterial({\n\t\t\tcolor : materialIn.color.clone(),\n\t\t\tmorphTargets : materialIn.morphTargets,\n\t\t\tmorphNormals : materialIn.morphNormals,\n\t\t\tvertexColors : materialIn.vertexColors,\n\t\t\ttransparent : materialIn.transparent,\n\t\t\topacity : materialIn.opacity,\n\t\t\tside : materialIn.side\n\t\t});\n\t\tif (materialIn.map)\n\t\t\tmaterial.map = materialIn.map;\n\t\treturn material;\n\t}\n\n\treturn materialIn;\n}\n\n/**\n * Create and return a new buffer geometry with the size of length,\n * and initial coords.\n */\nfunction createBufferGeometry(length, coords) {\n if (coords && (length >= coords.length)) {\n const geometry = new THREE.BufferGeometry()\n const vertices = new Float32Array(length * 3);\n let i = 0;\n coords.forEach(coord => {\n vertices[i++] = coord[0];\n vertices[i++] = coord[1];\n vertices[i++] = coord[2];\n });\n geometry.setAttribute( 'position', new THREE.BufferAttribute( vertices, 3 ) );\n geometry.setDrawRange(0, coords.length);\n return geometry;\n }\n return undefined;\n};\n\nfunction getCircularTexture() {\n const image = new Image();\n image.src = require(\"./assets/disc.png\");\n const texture = new THREE.Texture();\n texture.image = image;\n texture.needsUpdate = true;\n return texture;\n}\n\nfunction createNewSpriteText(text, height, colour, font, pixel, weight) {\n const sprite = new SpriteText(text, height, colour, font, pixel, weight);\n sprite.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+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sHDgwCEMBJZu0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAABM5JREFUWMO1V0tPG2cUPZ4Hxh6DazIOrjFNqJs0FIMqWFgWQkatsmvVbtggKlSVRVf5AWz4AWz4AUSKEChll19QJYSXkECuhFxsHjEhxCYm+DWGMZ5HF72DJq4bAzFXurI0M/I5997v3u9cC65vTJVn2lX/xHINQOYSBLTLEuIuCWw4Z3IGAEvf6ASmVHjNzHCXBG4A0AjACsAOwEbO0nsFQBnAGYASAIl+ZRMR7SolMEdsByD09fV5R0ZGgg8ePPjW5/N1iqLYpuu6RZblciKR2I9Go69evnwZnZ+fjwI4IS8AKBIRzeQfJWCANwKwh0KhtrGxsYehUOin1tbW+zzP23ietzY2NnIAoGmaLsuyUiqVyvl8XtrY2NiamZn589mzZxsAUgCOAeQAnFI2tI+VxIjaAeDzoaGh7xYWFuZOTk6OZVk+12uYqqq6JEnn0Wg0OT4+/geAXwGEAdwDIFJQXC1wO4DWR48e/RCPxxclSSroVzRFUbSDg4P848ePFwH8DuAhkWih83TRQWxFOXgAwvDwcOfo6OhvXV1d39tsNtuVBwTDWBwOh1UUxVsMw1hXVlbSdCgNV43uYSvrHg6H24aHh38eHBz85TrgF9FYLHA4HLzH43FvbW2d7u/vG+dANp8FpqIlbd3d3V8Fg8EfBUFw4BONZVmL3+9vHhkZCQL4AoAHgJPK8G+yzC0XDofdoVAo5PP5vkadTBAEtr+/39ff3x8gAp/RPOEqx2qjx+NpvXv3bk9DQ0NDvQgwDIOWlhZrMBj8kgi0UJdxRgYMArzL5XJ7vd57qLPZ7Xamp6fnNgBXtQxcjFuHw+Hyer3t9SYgCAITCAScAJoBNNEY/08GOFVVrfVMv7kMNDntFD1vjIAPrlRN0xjckOm6biFQ3jwNPwDMZrOnqVTqfb3Bi8Wivru7W/VCYkwPlKOjo0IikXh7EwQikYgE4Nw0CfXKDCipVCoTj8df3QABbW1tLUc6oUgkFPMkVACUNjc337148eKvw8PDbJ2jP1taWkoCyNDVXDSECmNSK4qiKNLq6urW8+fPI/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/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcv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PGNpcmNsZSBzdHlsZT0ic3Ryb2tlOiByZ2IoMCwwLDApOyBzdHJva2Utd2lkdGg6IDA7IHN0cm9rZS1kYXNoYXJyYXk6IG5vbmU7IHN0cm9rZS1saW5lY2FwOiBidXR0OyBzdHJva2UtZGFzaG9mZnNldDogMDsgc3Ryb2tlLWxpbmVqb2luOiBtaXRlcjsgc3Ryb2tlLW1pdGVybGltaXQ6IDQ7IGZpbGw6IHJnYigyNTUsMjU1LDI1NSk7IGZpbGwtcnVsZTogbm9uemVybzsgb3BhY2l0eTogMTsiIHZlY3Rvci1lZmZlY3Q9Im5vbi1zY2FsaW5nLXN0cm9rZSIgIGN4PSIwIiBjeT0iMCIgcj0iMzUiIC8+DQo8L2c+DQo8L2c+DQo8L2c+DQo8L3N2Zz4=\"","const THREE = require('three');\n\n/**\n * Zinc representation of glyph graphic, it contains the colours, \n * geometry and transformation of the glyph.\n * \n * @param {THREE.Geometry} geometry - Geometry of the glyph .\n * @param {THREE.Material} materialIn - Material of the glyph.\n * @param {Number} idIn - Id of the glyph.\n * \n * @class\n * @author Alan Wu\n * @return {Glyph}\n */\nconst Glyph = function (geometry, materialIn, idIn, glyphsetIn) {\n (require('./zincObject').ZincObject).call(this);\n let material = undefined;\n if (materialIn) {\n material = materialIn.clone();\n material.vertexColors = THREE.FaceColors;\n }\n const parent = glyphsetIn;\n this.id = idIn;\n let label = undefined;\n let labelString = undefined;\n this.isGlyph = true;\n\n /**\n * Create a glyph using mesh\n * @param {THREE.Mesh} meshIn - Mesh to create the glyph from\n *\n * @returns {Boolean} true if successful\n */\n this.fromMesh = meshIn => {\n if (meshIn && meshIn.isMesh) {\n this.morph = meshIn.clone();\n this.morph.userData = this;\n this.group.add(this.morph);\n return true;\n }\n return false;\n }\n\n if (geometry && material) {\n this.fromMesh(new THREE.Mesh(geometry, material));\n }\n\n /**\n * Get the {Glyphset} containing this glyph.\n *\n * @returns {Boolean} true if successful\n */\n this.getGlyphset = function () {\n return parent;\n }\n\n /**\n * Set and update the text containing this glyph.\n * @param {String} text - Label to be set for this instance\n */\n this.setLabel = text => {\n if (text && (typeof text === 'string' || text instanceof String)) {\n labelString = text;\n if (this.morph)\n this.morph.name = text;\n }\n if (label)\n this.showLabel();\n }\n\n /**\n * Display label with the choosen colour. It will replace the current\n * label.\n * @param {THREE.Color} colour - Colour for the label.\n */\n this.showLabel = (colour) => {\n if (label) {\n position = label.getPosition();\n this.group.remove(label.getSprite());\n label.dispose();\n label = undefined;\n }\n if (labelString && (typeof labelString === 'string' || labelString instanceof String)) {\n let position = [0, 0, 0];\n label = new (require('./label').Label)(labelString, colour);\n label.setPosition(position[0], position[1], position[2]);\n this.group.add(label.getSprite());\n }\n }\n\n /**\n * Get the label of this glyph\n * @return {Label}\n */\n this.getLabel = () => {\n return labelString;\n }\n\n /**\n * Get the mesh of this glyph.\n * @return {THREE.Mesh}\n */\n this.getMesh = () => {\n return this.morph;\n }\n\n /**\n * Set the transformation of this glyph.\n * @param {Array} position - Three components vectors containing position of the\n * transformation.\n * @param {Array} axis1 - Three components vectors containing axis1 rotation of the\n * transformation.\n * @param {Array} axis2 - Three components vectors containing axis2 rotation of the\n * transformation.\n * @param {Array} position - Three components vectors containing axis3 rotation of the\n * transformation.\n */\n this.setTransformation = (position, axis1, axis2, axis3) => {\n if (this.morph) {\n this.morph.matrix.elements[0] = axis1[0];\n this.morph.matrix.elements[1] = axis1[1];\n this.morph.matrix.elements[2] = axis1[2];\n this.morph.matrix.elements[3] = 0.0;\n this.morph.matrix.elements[4] = axis2[0];\n this.morph.matrix.elements[5] = axis2[1];\n this.morph.matrix.elements[6] = axis2[2];\n this.morph.matrix.elements[7] = 0.0;\n this.morph.matrix.elements[8] = axis3[0];\n this.morph.matrix.elements[9] = axis3[1];\n this.morph.matrix.elements[10] = axis3[2];\n this.morph.matrix.elements[11] = 0.0;\n this.morph.matrix.elements[12] = position[0];\n this.morph.matrix.elements[13] = position[1];\n this.morph.matrix.elements[14] = position[2];\n this.morph.matrix.elements[15] = 1.0;\n this.morph.matrixAutoUpdate = false;\n }\n if (label)\n label.setPosition(position[0], position[1], position[2]);\n }\n\n /**\n * Set the color of the glyph and its label.\n * \n * @param {THREE.Color} color - Colour to be set.\n */\n this.setColour = (color) => {\n if (label)\n label.setColour(color);\n if (this.secondaryMesh && this.secondaryMesh.material)\n this.secondaryMesh.material.color = colour;\n this.geometry.colorsNeedUpdate = true;\n }\n\n /**\n * Clear and free its memory.\n */\n this.dispose = () => {\n if (this.material)\n this.material.dispose();\n this.morph = undefined;\n }\n}\n\nGlyph.prototype = Object.create((require('./zincObject').ZincObject).prototype);\nexports.Glyph = Glyph;\n","const SpriteText = require('three-spritetext').default;\n\n/**\n * Bitmap labels, this is used with {@link Glyph} to \n * provide labels.\n * \n * @param {String} textIn - Text to be displayed dwith the label.\n * @param {THREE.Color} colour - Colour to be set for the label.\n * \n * @class\n * @author Alan Wu\n * @return {Label}\n */\nexports.Label = function (textIn, colour) {\n let text = textIn;\n let sprite = undefined;\n if (colour)\n sprite = new SpriteText(text, 0.015, colour.getStyle());\n else\n sprite = new SpriteText(text, 0.015);\n sprite.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 = JSON.parse( text );\n\t\t\tvar metadata = json.metadata;\n\n\t\t\tif ( metadata !== undefined ) {\n\n\t\t\t\tvar type = metadata.type;\n\n\t\t\t\tif ( type !== undefined ) {\n\n\t\t\t\t\tif ( type.toLowerCase() === 'object' ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.JSONLoader: ' + url + ' should be loaded with THREE.ObjectLoader instead.' );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n if (scope && scope.parse) {\n var object = scope.parse( json, texturePath );\n onLoad( object.geometry, object.materials );\n }\n\n\t\t}, onProgress, onError );\n\n\t},\n\n\tsetTexturePath: function ( value ) {\n\n\t\tthis.texturePath = value;\n\n\t},\n\n\tparse: ( function () {\n\n\t\tfunction parseModel( json, geometry ) {\n\n\t\t\tfunction isBitSet( value, position ) {\n\n\t\t\t\treturn value & ( 1 << position );\n\n\t\t\t}\n\n\t\t\tvar i, j, fi,\n\n\t\t\t\toffset, zLength,\n\n\t\t\t\tcolorIndex, normalIndex, uvIndex, materialIndex,\n\n\t\t\t\ttype,\n\t\t\t\tisQuad,\n\t\t\t\thasMaterial,\n\t\t\t\thasFaceVertexUv,\n\t\t\t\thasFaceNormal, hasFaceVertexNormal,\n\t\t\t\thasFaceColor, hasFaceVertexColor,\n\n\t\t\t\tvertex, face, faceA, faceB, hex, normal,\n\n\t\t\t\tuvLayer, uv, u, v,\n\n\t\t\t\tfaces = json.faces,\n\t\t\t\tvertices = json.vertices,\n\t\t\t\tnormals = json.normals,\n\t\t\t\tcolors = json.colors,\n\n\t\t\t\tscale = json.scale,\n\n\t\t\t\tnUvLayers = 0;\n\n\n\t\t\tif ( json.uvs !== undefined ) {\n\n\t\t\t\t// disregard empty arrays\n\n\t\t\t\tfor ( i = 0; i < json.uvs.length; i ++ ) {\n\n\t\t\t\t\tif ( json.uvs[ i ].length ) nUvLayers ++;\n\n\t\t\t\t}\n\n\t\t\t\tfor ( i = 0; i < nUvLayers; i ++ ) {\n\n\t\t\t\t\tgeometry.faceVertexUvs[ i ] = [];\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\toffset = 0;\n\t\t\tzLength = vertices.length;\n\n\t\t\twhile ( offset < zLength ) {\n\n\t\t\t\tvertex = new Vector3();\n\n\t\t\t\tvertex.x = vertices[ offset ++ ] * scale;\n\t\t\t\tvertex.y = vertices[ offset ++ ] * scale;\n\t\t\t\tvertex.z = vertices[ offset ++ ] * scale;\n\n\t\t\t\tgeometry.vertices.push( vertex );\n\n\t\t\t}\n\n\t\t\toffset = 0;\n\t\t\tzLength = faces.length;\n\n if (json.uvs) {\n\n for ( i = 0; i < json.uvs.length; i ++ ) {\n\n geometry.uvs[i] = [];\n\n for ( let k = 0; k < json.uvs[i].length ; k++ ) {\n\n geometry.uvs[i][k] = json.uvs[i][k];\n\n }\n \n }\n \n }\n\n if (normals) {\n\n for ( i = 0; i < normals.length; i ++ ) {\n\n geometry.normals[i] = normals[i];\n\n }\n \n }\n\n if (colors) {\n\n for ( i = 0; i < colors.length; i ++ ) {\n\n geometry.colors[i] = colors[i];\n\n }\n \n }\n\n\n\t\t\twhile ( offset < zLength ) {\n\n\t\t\t\ttype = faces[ offset ++ ];\n\n\t\t\t\tisQuad = isBitSet( type, 0 );\n\t\t\t\thasMaterial = isBitSet( type, 1 );\n\t\t\t\thasFaceVertexUv = isBitSet( type, 3 );\n\t\t\t\thasFaceNormal = isBitSet( type, 4 );\n\t\t\t\thasFaceVertexNormal = isBitSet( type, 5 );\n\t\t\t\thasFaceColor = isBitSet( type, 6 );\n\t\t\t\thasFaceVertexColor = isBitSet( type, 7 );\n\n\t\t\t\t// console.log(\"type\", type, \"bits\", isQuad, hasMaterial, hasFaceVertexUv, hasFaceNormal, hasFaceVertexNormal, hasFaceColor, hasFaceVertexColor);\n\n\t\t\t\tif ( isQuad ) {\n\n\t\t\t\t\tfaceA = new Face3();\n\t\t\t\t\tfaceA.a = faces[ offset ];\n\t\t\t\t\tfaceA.b = faces[ offset + 1 ];\n\t\t\t\t\tfaceA.c = faces[ offset + 3 ];\n\n\t\t\t\t\tfaceB = new Face3();\n\t\t\t\t\tfaceB.a = faces[ offset + 1 ];\n\t\t\t\t\tfaceB.b = faces[ offset + 2 ];\n\t\t\t\t\tfaceB.c = faces[ offset + 3 ];\n\n\t\t\t\t\toffset += 4;\n\n\t\t\t\t\tif ( hasMaterial ) {\n\n\t\t\t\t\t\tmaterialIndex = faces[ offset ++ ];\n\t\t\t\t\t\tfaceA.materialIndex = materialIndex;\n\t\t\t\t\t\tfaceB.materialIndex = materialIndex;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// to get face <=> uv index correspondence\n\n\t\t\t\t\tfi = geometry.faces.length;\n\n\t\t\t\t\tif ( hasFaceVertexUv ) {\n\n\t\t\t\t\t\tfor ( i = 0; i < nUvLayers; i ++ ) {\n\n\t\t\t\t\t\t\tuvLayer = json.uvs[ i ];\n\n\t\t\t\t\t\t\tgeometry.faceVertexUvs[ i ][ fi ] = [];\n\t\t\t\t\t\t\tgeometry.faceVertexUvs[ i ][ fi + 1 ] = [];\n\n\t\t\t\t\t\t\tfor ( j = 0; j < 4; j ++ ) {\n\n\t\t\t\t\t\t\t\tuvIndex = faces[ offset ++ ];\n\n\t\t\t\t\t\t\t\tu = uvLayer[ uvIndex * 2 ];\n\t\t\t\t\t\t\t\tv = uvLayer[ uvIndex * 2 + 1 ];\n\n\t\t\t\t\t\t\t\tuv = new Vector2( u, v );\n\n\t\t\t\t\t\t\t\tif ( j !== 2 ) geometry.faceVertexUvs[ i ][ fi ].push( uv );\n\t\t\t\t\t\t\t\tif ( j !== 0 ) geometry.faceVertexUvs[ i ][ fi + 1 ].push( uv );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( hasFaceNormal ) {\n\n\t\t\t\t\t\tnormalIndex = faces[ offset ++ ] * 3;\n\n\t\t\t\t\t\tfaceA.normal.set(\n\t\t\t\t\t\t\tnormals[ normalIndex ++ ],\n\t\t\t\t\t\t\tnormals[ normalIndex ++ ],\n\t\t\t\t\t\t\tnormals[ normalIndex ]\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tfaceB.normal.copy( faceA.normal );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( hasFaceVertexNormal ) {\n\n\t\t\t\t\t\tfor ( i = 0; i < 4; i ++ ) {\n\n\t\t\t\t\t\t\tnormalIndex = faces[ offset ++ ] * 3;\n\n\t\t\t\t\t\t\tnormal = new Vector3(\n\t\t\t\t\t\t\t\tnormals[ normalIndex ++ ],\n\t\t\t\t\t\t\t\tnormals[ normalIndex ++ ],\n\t\t\t\t\t\t\t\tnormals[ normalIndex ]\n\t\t\t\t\t\t\t);\n\n\n\t\t\t\t\t\t\tif ( i !== 2 ) faceA.vertexNormals.push( normal );\n\t\t\t\t\t\t\tif ( i !== 0 ) faceB.vertexNormals.push( normal );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tif ( hasFaceColor ) {\n\n\t\t\t\t\t\tcolorIndex = faces[ offset ++ ];\n\t\t\t\t\t\thex = colors[ colorIndex ];\n\n\t\t\t\t\t\tfaceA.color.setHex( hex );\n\t\t\t\t\t\tfaceB.color.setHex( hex );\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tif ( hasFaceVertexColor ) {\n\n\t\t\t\t\t\tfor ( i = 0; i < 4; i ++ ) {\n\n\t\t\t\t\t\t\tcolorIndex = faces[ offset ++ ];\n\t\t\t\t\t\t\thex = colors[ colorIndex ];\n\n\t\t\t\t\t\t\tif ( i !== 2 ) faceA.vertexColors.push( new Color( hex ) );\n\t\t\t\t\t\t\tif ( i !== 0 ) faceB.vertexColors.push( new Color( hex ) );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tgeometry.faces.push( faceA );\n\t\t\t\t\tgeometry.faces.push( faceB );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tface = new Face3();\n\t\t\t\t\tface.a = faces[ offset ++ ];\n\t\t\t\t\tface.b = faces[ offset ++ ];\n\t\t\t\t\tface.c = faces[ offset ++ ];\n\n\t\t\t\t\tif ( hasMaterial ) {\n\n\t\t\t\t\t\tmaterialIndex = faces[ offset ++ ];\n\t\t\t\t\t\tface.materialIndex = materialIndex;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// to get face <=> uv index correspondence\n\n\t\t\t\t\tfi = geometry.faces.length;\n\n\t\t\t\t\tif ( hasFaceVertexUv ) {\n\n\t\t\t\t\t\tfor ( i = 0; i < nUvLayers; i ++ ) {\n\n\t\t\t\t\t\t\tuvLayer = json.uvs[ i ];\n\n\t\t\t\t\t\t\tgeometry.faceVertexUvs[ i ][ fi ] = [];\n\n\t\t\t\t\t\t\tfor ( j = 0; j < 3; j ++ ) {\n\n\t\t\t\t\t\t\t\tuvIndex = faces[ offset ++ ];\n\n\t\t\t\t\t\t\t\tu = uvLayer[ uvIndex * 2 ];\n\t\t\t\t\t\t\t\tv = uvLayer[ uvIndex * 2 + 1 ];\n\n\t\t\t\t\t\t\t\tuv = new Vector2( u, v );\n\n\t\t\t\t\t\t\t\tgeometry.faceVertexUvs[ i ][ fi ].push( uv );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( hasFaceNormal ) {\n\n\t\t\t\t\t\tnormalIndex = faces[ offset ++ ] * 3;\n\n\t\t\t\t\t\tface.normal.set(\n\t\t\t\t\t\t\tnormals[ normalIndex ++ ],\n\t\t\t\t\t\t\tnormals[ normalIndex ++ ],\n\t\t\t\t\t\t\tnormals[ normalIndex ]\n\t\t\t\t\t\t);\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( hasFaceVertexNormal ) {\n\n\t\t\t\t\t\tfor ( i = 0; i < 3; i ++ ) {\n\n\t\t\t\t\t\t\tnormalIndex = faces[ offset ++ ] * 3;\n\n\t\t\t\t\t\t\tnormal = new Vector3(\n\t\t\t\t\t\t\t\tnormals[ normalIndex ++ ],\n\t\t\t\t\t\t\t\tnormals[ normalIndex ++ ],\n\t\t\t\t\t\t\t\tnormals[ normalIndex ]\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tface.vertexNormals.push( normal );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tif ( hasFaceColor ) {\n\n\t\t\t\t\t\tcolorIndex = faces[ offset ++ ];\n\t\t\t\t\t\tface.color.setHex( colors[ colorIndex ] );\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tif ( hasFaceVertexColor ) {\n\n\t\t\t\t\t\tfor ( i = 0; i < 3; i ++ ) {\n\n\t\t\t\t\t\t\tcolorIndex = faces[ offset ++ ];\n\t\t\t\t\t\t\tface.vertexColors.push( new Color( colors[ colorIndex ] ) );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tgeometry.faces.push( face );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction parseSkin( json, geometry ) {\n\n\t\t\tvar influencesPerVertex = ( json.influencesPerVertex !== undefined ) ? json.influencesPerVertex : 2;\n\n\t\t\tif ( json.skinWeights ) {\n\n\t\t\t\tfor ( var i = 0, l = json.skinWeights.length; i < l; i += influencesPerVertex ) {\n\n\t\t\t\t\tvar x = json.skinWeights[ i ];\n\t\t\t\t\tvar y = ( influencesPerVertex > 1 ) ? json.skinWeights[ i + 1 ] : 0;\n\t\t\t\t\tvar z = ( influencesPerVertex > 2 ) ? json.skinWeights[ i + 2 ] : 0;\n\t\t\t\t\tvar w = ( influencesPerVertex > 3 ) ? json.skinWeights[ i + 3 ] : 0;\n\n\t\t\t\t\tgeometry.skinWeights.push( new Vector4( x, y, z, w ) );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( json.skinIndices ) {\n\n\t\t\t\tfor ( var i = 0, l = json.skinIndices.length; i < l; i += influencesPerVertex ) {\n\n\t\t\t\t\tvar a = json.skinIndices[ i ];\n\t\t\t\t\tvar b = ( influencesPerVertex > 1 ) ? json.skinIndices[ i + 1 ] : 0;\n\t\t\t\t\tvar c = ( influencesPerVertex > 2 ) ? json.skinIndices[ i + 2 ] : 0;\n\t\t\t\t\tvar d = ( influencesPerVertex > 3 ) ? json.skinIndices[ i + 3 ] : 0;\n\n\t\t\t\t\tgeometry.skinIndices.push( new Vector4( a, b, c, d ) );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tgeometry.bones = json.bones;\n\n\t\t\tif ( geometry.bones && geometry.bones.length > 0 && ( geometry.skinWeights.length !== geometry.skinIndices.length || geometry.skinIndices.length !== geometry.vertices.length ) ) {\n\n\t\t\t\tconsole.warn( 'When skinning, number of vertices (' + geometry.vertices.length + '), skinIndices (' +\n\t\t\t\t\tgeometry.skinIndices.length + '), and skinWeights (' + geometry.skinWeights.length + ') should match.' );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction parseMorphing( json, geometry ) {\n\n\t\t\tvar scale = json.scale;\n\n\t\t\tif ( json.morphTargets !== undefined ) {\n\n\t\t\t\tfor ( var i = 0, l = json.morphTargets.length; i < l; i ++ ) {\n\n\t\t\t\t\tgeometry.morphTargets[ i ] = {};\n\t\t\t\t\tgeometry.morphTargets[ i ].name = json.morphTargets[ i ].name;\n\t\t\t\t\tgeometry.morphTargets[ i ].vertices = [];\n\n\t\t\t\t\tvar dstVertices = geometry.morphTargets[ i ].vertices;\n\t\t\t\t\tvar srcVertices = json.morphTargets[ i ].vertices;\n\n\t\t\t\t\tfor ( var v = 0, vl = srcVertices.length; v < vl; v += 3 ) {\n\n\t\t\t\t\t\tvar vertex = new Vector3();\n\t\t\t\t\t\tvertex.x = srcVertices[ v ] * scale;\n\t\t\t\t\t\tvertex.y = srcVertices[ v + 1 ] * scale;\n\t\t\t\t\t\tvertex.z = srcVertices[ v + 2 ] * scale;\n\n\t\t\t\t\t\tdstVertices.push( vertex );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( json.morphNormals !== undefined ) {\n\n\t\t\t\tfor ( var i = 0, l = json.morphNormals.length; i < l; i ++ ) {\n\n if (geometry.morphTargets[ i ]) {\n\n geometry.morphTargets[ i ].normals = [];\n\n var dstNormals = geometry.morphTargets[ i ].normals;\n var srcNormals = json.morphNormals[ i ].normals;\n\n for ( var v = 0, vl = srcNormals.length; v < vl; v += 3 ) {\n\n var normals = new Vector3();\n normals.x = srcNormals[ v ];\n normals.y = srcNormals[ v + 1 ] ;\n normals.z = srcNormals[ v + 2 ] ;\n\n dstNormals.push( normals );\n\n }\n\n geometry.morphNormalsReady = true;\n\n }\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( json.morphColors !== undefined ) {\n\n\t\t\t\tvar i, l, c, cl, dstColors, srcColors, color;\n\n\t\t\t\tfor ( i = 0, l = json.morphColors.length; i < l; i ++ ) {\n\n\t\t\t\t\tgeometry.morphColors[ i ] = {};\n\t\t\t\t\tgeometry.morphColors[ i ].name = json.morphColors[ i ].name;\n\t\t\t\t\tgeometry.morphColors[ i ].colors = [];\n\n\t\t\t\t\tdstColors = geometry.morphColors[ i ].colors;\n\t\t\t\t\tsrcColors = json.morphColors[ i ].colors;\n\n\t\t\t\t\tfor ( c = 0, cl = srcColors.length; c < cl; c += 3 ) {\n\n\t\t\t\t\t\tcolor = new THREE.Color( 0xffaa00 );\n\t\t\t\t\t\tcolor.setRGB( srcColors[ c ], srcColors[ c + 1 ], srcColors[ c + 2 ] );\n\t\t\t\t\t\tdstColors.push( color );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction parseAnimations( json, geometry ) {\n\n\t\t\tvar outputAnimations = [];\n\n\t\t\t// parse old style Bone/Hierarchy animations\n\t\t\tvar animations = [];\n\n\t\t\tif ( json.animation !== undefined ) {\n\n\t\t\t\tanimations.push( json.animation );\n\n\t\t\t}\n\n\t\t\tif ( json.animations !== undefined ) {\n\n\t\t\t\tif ( json.animations.length ) {\n\n\t\t\t\t\tanimations = animations.concat( json.animations );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tanimations.push( json.animations );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tfor ( var i = 0; i < animations.length; i ++ ) {\n\n\t\t\t\tvar clip = AnimationClip.parseAnimation( animations[ i ], geometry.bones );\n\t\t\t\tif ( clip ) outputAnimations.push( clip );\n\n\t\t\t}\n\n\t\t\t// parse implicit morph animations\n\t\t\tif ( geometry.morphTargets ) {\n\n\t\t\t\t// TODO: Figure out what an appropraite FPS is for morph target animations -- defaulting to 10, but really it is completely arbitrary.\n\t\t\t\tvar morphAnimationClips = AnimationClip.CreateClipsFromMorphTargetSequences( geometry.morphTargets, 10 );\n\t\t\t\toutputAnimations = outputAnimations.concat( morphAnimationClips );\n\n\t\t\t}\n\n\t\t\tif ( outputAnimations.length > 0 ) geometry.animations = outputAnimations;\n\n\t\t}\n\n\t\treturn function parse( json, texturePath ) {\n\n\t\t\tif ( json.data !== undefined ) {\n\n\t\t\t\t// Geometry 4.0 spec\n\t\t\t\tjson = json.data;\n\n\t\t\t}\n\n\t\t\tif ( json.scale !== undefined ) {\n\n\t\t\t\tjson.scale = 1.0 / json.scale;\n\n\t\t\t} else {\n\n\t\t\t\tjson.scale = 1.0;\n\n\t\t\t}\n\n\t\t\tvar geometry = new Geometry();\n\t\t\tgeometry.morphColors = [];\n\t\t\tparseModel( json, geometry );\n\t\t\tparseSkin( json, geometry );\n\t\t\tparseMorphing( json, geometry );\n\t\t\tparseAnimations( json, geometry );\n\n\t\t\tgeometry.computeFaceNormals();\n\t\t\tgeometry.computeBoundingSphere();\n\n\t\t\tif ( json.materials === undefined || json.materials.length === 0 ) {\n\n\t\t\t\treturn { geometry: geometry };\n\n\t\t\t} else {\n\n\t\t\t\tvar materials = Loader.prototype.initMaterials( json.materials, texturePath, 'Anonymous' );\n\n\t\t\t\t\n\t\t\t\tif (json.materials[0].video) {\n\t\t\t\t\t\n\t\t\t\t\tvar fullPath = texturePath + json.materials[0].video;\n\n if (this.paramsString) {\n\n fullPath = fullPath + `?${this.paramsString}`;\n \n }\n\n\t\t\t\t\tconst videoHandler = new VideoHandler(fullPath);\n\t\t\t\t\t\n\t\t\t\t\tgeometry._video = videoHandler;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (materials && materials.length > 0) {\n\t\t\t\t\tif (json.materials[0].singleSided) {\n\t\t\t\t\t\tmaterials[0].side = THREE.FrontSide;\n\t\t\t\t\t} else if (json.materials[0].flipSided){\n\t\t\t\t\t\tmaterials[0].side = THREE.BackSide;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmaterials[0].side = THREE.DoubleSide;\n }\n if (json.materials[0].specularCoef) {\n materials[0].shininess = Math.floor(json.materials[0].specularCoef / 3);\n }\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn { geometry: geometry, materials: materials };\n\n\t\t\t}\n\n\t\t};\n\n\t} )()\n\n} );\n\n\nexport { JSONLoader };\n","var THREE = require('three');\n\nimport {\n\tNoBlending,\n\tNormalBlending,\n\tAdditiveBlending,\n\tSubtractiveBlending,\n\tMultiplyBlending,\n\tCustomBlending,\n\n\tFaceColors,\n\tVertexColors,\n\n\tDoubleSide,\n\tBackSide,\n\n\tMirroredRepeatWrapping,\n RepeatWrapping,\n MathUtils,\n MaterialLoader,\n TextureLoader,\n Color\n} from 'three';\n\n/**\n * @author alteredq / http://alteredqualia.com/\n */\n\nfunction Loader() {}\n\nLoader.Handlers = {\n\n\thandlers: [],\n\n\tadd: function ( regex, loader ) {\n\n\t\tthis.handlers.push( regex, loader );\n\n\t},\n\n\tget: function ( file ) {\n\n\t\tvar handlers = this.handlers;\n\n\t\tfor ( var i = 0, l = handlers.length; i < l; i += 2 ) {\n\n\t\t\tvar regex = handlers[ i ];\n\t\t\tvar loader = handlers[ i + 1 ];\n\n\t\t\tif ( regex.test( file ) ) {\n\n\t\t\t\treturn loader;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn null;\n\n\t}\n\n};\n\nObject.assign( Loader.prototype, {\n\n\tcrossOrigin: 'anonymous',\n\n\tonLoadStart: function () {},\n\n\tonLoadProgress: function () {},\n\n\tonLoadComplete: function () {},\n\n\tinitMaterials: function ( materials, texturePath, crossOrigin ) {\n\n\t\tvar array = [];\n\n\t\tfor ( var i = 0; i < materials.length; ++ i ) {\n\n\t\t\tarray[ i ] = this.createMaterial( materials[ i ], texturePath, crossOrigin );\n\n\t\t}\n\n\t\treturn array;\n\n\t},\n\n\tcreateMaterial: ( function () {\n\n\t\tvar BlendingMode = {\n\t\t\tNoBlending: NoBlending,\n\t\t\tNormalBlending: NormalBlending,\n\t\t\tAdditiveBlending: AdditiveBlending,\n\t\t\tSubtractiveBlending: SubtractiveBlending,\n\t\t\tMultiplyBlending: MultiplyBlending,\n\t\t\tCustomBlending: CustomBlending\n\t\t};\n\n\t\tvar color = new Color();\n\t\tvar textureLoader = new TextureLoader();\n\t\tvar materialLoader = new MaterialLoader();\n\n\t\treturn function createMaterial( m, texturePath, crossOrigin ) {\n\n\t\t\t// convert from old material format\n\n\t\t\tvar textures = {};\n\n\t\t\tfunction loadTexture( path, repeat, offset, wrap, anisotropy ) {\n\n\t\t\t\tvar fullPath = texturePath + path;\n\t\t\t\tvar loader = Loader.Handlers.get( fullPath );\n\n\t\t\t\tvar texture;\n\n\t\t\t\tif ( loader !== null ) {\n\n\t\t\t\t\ttexture = loader.load( fullPath );\n\n\t\t\t\t} else {\n\n\t\t\t\t\ttextureLoader.setCrossOrigin( crossOrigin );\n\t\t\t\t\ttexture = textureLoader.load( fullPath );\n\n\t\t\t\t}\n\n\t\t\t\tif ( repeat !== undefined ) {\n\n\t\t\t\t\ttexture.repeat.fromArray( repeat );\n\n\t\t\t\t\tif ( repeat[ 0 ] !== 1 ) texture.wrapS = RepeatWrapping;\n\t\t\t\t\tif ( repeat[ 1 ] !== 1 ) texture.wrapT = RepeatWrapping;\n\n\t\t\t\t}\n\n\t\t\t\tif ( offset !== undefined ) {\n\n\t\t\t\t\ttexture.offset.fromArray( offset );\n\n\t\t\t\t}\n\n\t\t\t\tif ( wrap !== undefined ) {\n\n\t\t\t\t\tif ( wrap[ 0 ] === 'repeat' ) texture.wrapS = RepeatWrapping;\n\t\t\t\t\tif ( wrap[ 0 ] === 'mirror' ) texture.wrapS = MirroredRepeatWrapping;\n\n\t\t\t\t\tif ( wrap[ 1 ] === 'repeat' ) texture.wrapT = RepeatWrapping;\n\t\t\t\t\tif ( wrap[ 1 ] === 'mirror' ) texture.wrapT = MirroredRepeatWrapping;\n\n\t\t\t\t}\n\n\t\t\t\tif ( anisotropy !== undefined ) {\n\n\t\t\t\t\ttexture.anisotropy = anisotropy;\n\n\t\t\t\t}\n\n\t\t\t\tvar uuid = MathUtils.generateUUID();\n\n\t\t\t\ttextures[ uuid ] = texture;\n\n\t\t\t\treturn uuid;\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tvar json = {\n\t\t\t\tuuid: MathUtils.generateUUID(),\n\t\t\t\ttype: 'MeshLambertMaterial'\n\t\t\t};\n\n\t\t\tfor ( var name in m ) {\n\n\t\t\t\tvar value = m[ name ];\n\n\t\t\t\tswitch ( name ) {\n\n\t\t\t\t\tcase 'DbgColor':\n\t\t\t\t\tcase 'DbgIndex':\n\t\t\t\t\tcase 'opticalDensity':\n\t\t\t\t\tcase 'illumination':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'DbgName':\n\t\t\t\t\t\tjson.name = value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'blending':\n\t\t\t\t\t\tjson.blending = BlendingMode[ value ];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'colorAmbient':\n\t\t\t\t\tcase 'mapAmbient':\n\t\t\t\t\t\tconsole.warn( 'THREE.Loader.createMaterial:', name, 'is no longer supported.' );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'colorDiffuse':\n\t\t\t\t\t\tjson.color = color.fromArray( value ).getHex();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'colorSpecular':\n\t\t\t\t\t\tjson.specular = color.fromArray( value ).getHex();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'colorEmissive':\n\t\t\t\t\t\tjson.emissive = color.fromArray( value ).getHex();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'specularCoef':\n\t\t\t\t\t\tjson.shininess = value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'shading':\n\t\t\t\t\t\tif ( value.toLowerCase() === 'basic' ) json.type = 'MeshBasicMaterial';\n\t\t\t\t\t\tif ( value.toLowerCase() === 'phong' ) json.type = 'MeshPhongMaterial';\n\t\t\t\t\t\tif ( value.toLowerCase() === 'standard' ) json.type = 'MeshStandardMaterial';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapDiffuse':\n\t\t\t\t\t\tjson.map = loadTexture( value, m.mapDiffuseRepeat, m.mapDiffuseOffset, m.mapDiffuseWrap, m.mapDiffuseAnisotropy );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapDiffuseRepeat':\n\t\t\t\t\tcase 'mapDiffuseOffset':\n\t\t\t\t\tcase 'mapDiffuseWrap':\n\t\t\t\t\tcase 'mapDiffuseAnisotropy':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapEmissive':\n\t\t\t\t\t\tjson.emissiveMap = loadTexture( value, m.mapEmissiveRepeat, m.mapEmissiveOffset, m.mapEmissiveWrap, m.mapEmissiveAnisotropy );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapEmissiveRepeat':\n\t\t\t\t\tcase 'mapEmissiveOffset':\n\t\t\t\t\tcase 'mapEmissiveWrap':\n\t\t\t\t\tcase 'mapEmissiveAnisotropy':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapLight':\n\t\t\t\t\t\tjson.lightMap = loadTexture( value, m.mapLightRepeat, m.mapLightOffset, m.mapLightWrap, m.mapLightAnisotropy );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapLightRepeat':\n\t\t\t\t\tcase 'mapLightOffset':\n\t\t\t\t\tcase 'mapLightWrap':\n\t\t\t\t\tcase 'mapLightAnisotropy':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapAO':\n\t\t\t\t\t\tjson.aoMap = loadTexture( value, m.mapAORepeat, m.mapAOOffset, m.mapAOWrap, m.mapAOAnisotropy );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapAORepeat':\n\t\t\t\t\tcase 'mapAOOffset':\n\t\t\t\t\tcase 'mapAOWrap':\n\t\t\t\t\tcase 'mapAOAnisotropy':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapBump':\n\t\t\t\t\t\tjson.bumpMap = loadTexture( value, m.mapBumpRepeat, m.mapBumpOffset, m.mapBumpWrap, m.mapBumpAnisotropy );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapBumpScale':\n\t\t\t\t\t\tjson.bumpScale = value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapBumpRepeat':\n\t\t\t\t\tcase 'mapBumpOffset':\n\t\t\t\t\tcase 'mapBumpWrap':\n\t\t\t\t\tcase 'mapBumpAnisotropy':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapNormal':\n\t\t\t\t\t\tjson.normalMap = loadTexture( value, m.mapNormalRepeat, m.mapNormalOffset, m.mapNormalWrap, m.mapNormalAnisotropy );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapNormalFactor':\n\t\t\t\t\t\tjson.normalScale = value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapNormalRepeat':\n\t\t\t\t\tcase 'mapNormalOffset':\n\t\t\t\t\tcase 'mapNormalWrap':\n\t\t\t\t\tcase 'mapNormalAnisotropy':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapSpecular':\n\t\t\t\t\t\tjson.specularMap = loadTexture( value, m.mapSpecularRepeat, m.mapSpecularOffset, m.mapSpecularWrap, m.mapSpecularAnisotropy );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapSpecularRepeat':\n\t\t\t\t\tcase 'mapSpecularOffset':\n\t\t\t\t\tcase 'mapSpecularWrap':\n\t\t\t\t\tcase 'mapSpecularAnisotropy':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapMetalness':\n\t\t\t\t\t\tjson.metalnessMap = loadTexture( value, m.mapMetalnessRepeat, m.mapMetalnessOffset, m.mapMetalnessWrap, m.mapMetalnessAnisotropy );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapMetalnessRepeat':\n\t\t\t\t\tcase 'mapMetalnessOffset':\n\t\t\t\t\tcase 'mapMetalnessWrap':\n\t\t\t\t\tcase 'mapMetalnessAnisotropy':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapRoughness':\n\t\t\t\t\t\tjson.roughnessMap = loadTexture( value, m.mapRoughnessRepeat, m.mapRoughnessOffset, m.mapRoughnessWrap, m.mapRoughnessAnisotropy );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapRoughnessRepeat':\n\t\t\t\t\tcase 'mapRoughnessOffset':\n\t\t\t\t\tcase 'mapRoughnessWrap':\n\t\t\t\t\tcase 'mapRoughnessAnisotropy':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapAlpha':\n\t\t\t\t\t\tjson.alphaMap = loadTexture( value, m.mapAlphaRepeat, m.mapAlphaOffset, m.mapAlphaWrap, m.mapAlphaAnisotropy );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'mapAlphaRepeat':\n\t\t\t\t\tcase 'mapAlphaOffset':\n\t\t\t\t\tcase 'mapAlphaWrap':\n\t\t\t\t\tcase 'mapAlphaAnisotropy':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'flipSided':\n\t\t\t\t\t\tjson.side = BackSide;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'doubleSided':\n\t\t\t\t\t\tjson.side = DoubleSide;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'transparency':\n\t\t\t\t\t\tconsole.warn( 'THREE.Loader.createMaterial: transparency has been renamed to opacity' );\n\t\t\t\t\t\tjson.opacity = value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'depthTest':\n\t\t\t\t\tcase 'depthWrite':\n\t\t\t\t\tcase 'colorWrite':\n\t\t\t\t\tcase 'opacity':\n\t\t\t\t\tcase 'reflectivity':\n\t\t\t\t\tcase 'transparent':\n\t\t\t\t\tcase 'visible':\n\t\t\t\t\tcase 'wireframe':\n\t\t\t\t\t\tjson[ name ] = value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'vertexColors':\n\t\t\t\t\t\tif ( value === true ) json.vertexColors = VertexColors;\n\t\t\t\t\t\tif ( value === 'face' ) json.vertexColors = FaceColors;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tconsole.error( 'THREE.Loader.createMaterial: Unsupported', name, value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( json.type === 'MeshBasicMaterial' ) delete json.emissive;\n\t\t\tif ( json.type !== 'MeshPhongMaterial' ) delete json.specular;\n\n\t\t\tif ( json.opacity < 1 ) json.transparent = true;\n\n\t\t\tmaterialLoader.setTextures( textures );\n\n\t\t\treturn materialLoader.parse( json );\n\n\t\t};\n\n\t} )()\n\n} );\n\nexport { Loader };\n","var THREE = require('three');\n\n/**\n * Provide basic functionality to display video as texture.\n * VideoTexture is used for creating and updating a video projected onto a Three.js texture\n * \n * @class\n * @param {Object} containerIn - Container to create the renderer on.\n * @author Alan Wu\n * @return {VideoHandler}\n */\nexports.VideoHandler = function(srcIn) {\n\n\tvar _this = this;\n\tthis.video = undefined;\n\tthis.videoTexture = undefined;\n\tvar src = srcIn;\n\tvar lastTime = 0;\n\tvar lastUpdate = 0;\n\tvar frameRate = 30;\n\tvar videoPlaneLoadedFlag = false;\n\tvar lastPlayPos = 0;\n\tvar currentPlayPos = 0;\n\tvar bufferingDetected = false;\n\t\n\tvar checkBuffering = function(delta, playAnimation) {\n\t currentPlayPos = _this.video.currentTime;\n\n\t // checking offset should be at most the check interval\n\t // but allow for some margin\n\t var offset = delta - 0.02;\n\n\t // if no buffering is currently detected,\n\t // and the position does not seem to increase\n\t // and the _this.video isn't manually paused...\n\t if (!bufferingDetected && (currentPlayPos < (lastPlayPos + offset)) &&\n\t \t\t!_this.video.paused) {\n\t bufferingDetected = true;\n\t }\n\n\t // if we were buffering but the _this.video has advanced,\n\t // then there is no buffering\n\t if (bufferingDetected && (currentPlayPos > (lastPlayPos + offset)) &&\n\t \t\t!_this.video.paused) {\n\t bufferingDetected = false;\n\t }\n\t lastPlayPos = currentPlayPos;\n\t}\n\n\tvar initialise = function(){\n\t\tif (document) {\n\t\t \t_this.video = document.createElement( 'video' );\n\t\t \t_this.video.crossOrigin = \"anonymous\";\n\t\t \t_this.video.src = src;\n\t\t \t_this.video.load();\n _this.video.loop = true;\n \n\t\t}\n\t}\n\n\tthis.setMorphTime = function(time, duration){\n\t\tvar actualTime = time / duration * _this.video.duration;\n\t\t_this.video.currentTime = actualTime;\n\t}\n\n\t// videoPlaneLoaded connects the video to the video texture once it has loaded\n\t this.getVideoDuration = function() {\n\t\t return _this.video.duration;\n\t}\n\n\tthis.createCanvasVideoTexture = function(){\n\t\t_this.videoTexture = new THREE.VideoTexture( _this.video );\n\t\t_this.videoTexture.minFilter = THREE.LinearFilter;\n\t\t_this.videoTexture.magFilter = THREE.LinearFilter;\n\t\t_this.videoTexture.format = THREE.RGBFormat;\n _this.video.currentTime = 0;\n\t\treturn _this.videoTexture;\n\t}\n\t\n\tthis.getCurrentTime = function(duration) {\n\t\tif (_this.video)\n\t\t\treturn duration * (_this.video.currentTime / _this.video.duration);\n\t\telse\n\t\t\treturn 0;\n\t}\n\n\tthis.isReadyToPlay = function(){\n\t\t// video.readyState 3 means we have data to load for the current time and foreseeable future\n\t\tif (_this.video && _this.video.readyState >= 3){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\t\n\t//this should be handle by scene... check the sync at \n\tinitialise();\n\n}","const THREE = require('three');\nconst Points = require('../three/Points').Points;\nconst toBufferGeometry = require('../utilities').toBufferGeometry;\nconst getCircularTexture = require('../utilities').getCircularTexture;\nconst Label = require('./label').Label;\n\n/**\n * Provides an object which stores points and provides method which controls its position.\n * This is created when a valid json file containing point is read into a {@link Zinc.Scene}\n * object.\n * \n * @class\n * @author Alan Wu\n * @return {Pointset}\n */\nconst Pointset = function () {\n (require('./zincObject').ZincObject).call(this);\n this.isPointset = true;\n const labelSets = [];\n\n /**\n * Create the pointsets using geometry and material.\n * \n * @param {THREE.Geomtry} geometryIn - Geometry of points to be rendered.\n * @param {THREE.Material} materialIn - Material to be set for the lines.\n * @param {Object} options - Provide various options\n * @param {Boolean} options.localTimeEnabled - A flag to indicate either the lines is\n * time dependent.\n * @param {Boolean} options.localMorphColour - A flag to indicate either the colour is\n * time dependent.\n */\n this.createMesh = (geometryIn, materialIn, options) => {\n if (geometryIn && materialIn) {\n let geometry = toBufferGeometry(geometryIn, options);\n const texture = getCircularTexture();\n materialIn.map = texture;\n let point = new Points(geometry, materialIn);\n this.setMesh(point, options.localTimeEnabled, \n options.localMorphColour);\n }\n }\n\n const addLabel = (index, coord, labelText, colourHex) => {\n if (labelText) {\n const colour = new THREE.Color(colourHex);\n const label = new Label(labelText, colour);\n label.setPosition(coord[0], coord[1], coord[2]);\n const sprite = label.getSprite();\n sprite.material.sizeAttenuation = false;\n sprite.material.alphaTest = 0.5;\n sprite.material.transparent = true;\n sprite.material.depthWrite = false;\n sprite.material.depthTest = false;\n this.group.add(sprite);\n labelSets[index] = label;\n }\n }\n\n /**\n * Add points to existing mesh if it exists, otherwise\n * create a new one and add to it.\n * @param {Array} coords -An array of three components coordinates.\n * @param {Array|String} labels - An array of strings, these are only added\n * if the number of coords equals to the number labels provided.\n * @param {Number} colour - A hex value of the colour for the points\n */\n this.addPoints = (coords, labels, colour) => {\n if (coords && coords.length > 0) {\n let current = this.drawRange - 1;\n const geometry = this.addVertices(coords);\n let mesh = this.getMorph();\n if (!mesh) {\n let material = new THREE.PointsMaterial({ alphaTest: 0.5, size: 10,\n color: colour, sizeAttenuation: false });\n const options = { localTimeEnabled: false, localMorphColour: false};\n geometry.colorsNeedUpdate = true;\n this.createMesh(geometry, material, options);\n }\n let end = current + coords.length;\n let index = 0;\n if ((Array.isArray(labels) && labels.length === coords.length) || \n (typeof labels === \"string\")) {\n for (current; current + index < end;) {\n const labelText = typeof labels === \"string\" ? labels : labels[index];\n addLabel(index, coords[index], labelText, colour);\n index++;\n }\n }\n if (this.region) this.region.pickableUpdateRequired = true;\n }\n }\n\n /**\n * Set the size of the points.\n * \n * @param {Number} size - size to be set.\n */\n this.setSize = size => {\n if (this.morph && this.morph.material) {\n this.morph.material.size = size;\n this.morph.material.needsUpdate = true;\n }\n }\n\n /**\n * Turn size attenuation on/off based on the flag.\n * \n * @param {Boolean} flag - Determin either size attenuation\n * should be on or off.\n */\n this.setSizeAttenuation = flag => {\n if (this.morph && this.morph.material) {\n this.morph.material.sizeAttenuation = flag;\n this.morph.material.needsUpdate = true;\n }\n }\n\n /**\n * Get vertices at index\n */\n this.getVerticesByIndex = function(index) {\n if (index >= 0 && this.drawRange > index) {\n const positionAttribute = this.getMorph().geometry.getAttribute( 'position' );\n return [ \n positionAttribute.getX(index),\n positionAttribute.getY(index),\n positionAttribute.getZ(index)\n ];\n }\n return undefined;\n }\n\n /**\n * Edit Vertice in index.\n */\n this.editVertices = function(coords, i) {\n if (coords && coords.length) {\n let mesh = this.getMorph();\n const maxIndex = i + coords.length - 1;\n if (!mesh || 0 > i || maxIndex >= this.drawRange) {\n return;\n } else {\n const positionAttribute = mesh.geometry.getAttribute( 'position' );\n let index = i;\n coords.forEach(coord => {\n const label = labelSets[index];\n if (label) {\n label.setPosition(coord[0], coord[1], coord[2]);\n }\n positionAttribute.setXYZ(index++, coord[0], coord[1], coord[2]);\n \n });\n positionAttribute.needsUpdate = true;\n this.boundingBoxUpdateRequired = true;\n }\n }\n }\n\n /**\n * Turn size attenuation on/off based on the flag.\n * \n * @param {Boolean} flag - Determin either size attenuation\n * should be on or off.\n */\n this.render = (delta, playAnimation, cameraControls, options) => {\n if (this.morph && cameraControls) {\n this.morph.sizePerPixel = cameraControls.pixelHeight;\n }\n Pointset.prototype.render.call(this, delta, playAnimation, cameraControls, options);\n }\n}\n\nPointset.prototype = Object.create((require('./zincObject').ZincObject).prototype);\nexports.Pointset = Pointset;\n","import {\n\tBufferGeometry,\n\tMatrix4,\n Object3D,\n PointsMaterial,\n Ray,\n\tSphere,\n\tVector3\n} from 'three';\n\n\nconst _inverseMatrix = /*@__PURE__*/ new Matrix4();\nconst _ray = /*@__PURE__*/ new Ray();\nconst _sphere = /*@__PURE__*/ new Sphere();\nconst _position = /*@__PURE__*/ new Vector3();\nconst _morphA = /*@__PURE__*/ new Vector3();\nconst _tempA = /*@__PURE__*/ new Vector3();\n\nclass Points extends Object3D {\n\n\tconstructor( geometry = new BufferGeometry(), material = new PointsMaterial() ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'Points';\n\n\t\tthis.geometry = geometry;\n\t\tthis.material = material;\n\t\tthis.sizePerPixel = 1;\n\n\t\tthis.updateMorphTargets();\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.material = source.material;\n\t\tthis.geometry = source.geometry;\n\n\t\treturn this;\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst geometry = this.geometry;\n\t\tconst matrixWorld = this.matrixWorld;\n\t\tconst threshold = raycaster.params.Points.threshold;\n const drawRange = geometry.drawRange;\n\n\t\t// Checking boundingSphere distance to ray\n\n\t\tif ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();\n\n\t\t_sphere.copy( geometry.boundingSphere );\n\t\t_sphere.applyMatrix4( matrixWorld );\n\t\t_sphere.radius += threshold;\n\n\t\tif ( raycaster.ray.intersectsSphere( _sphere ) === false ) return;\n\n\t\t//\n\n\t\t_inverseMatrix.copy( matrixWorld ).invert();\n\t\t_ray.copy( raycaster.ray ).applyMatrix4( _inverseMatrix );\n\n\t\tconst localThreshold = threshold / ( ( this.scale.x + this.scale.y + this.scale.z ) / 3 ) * this.material.size * this.sizePerPixel;\n\t\tconst localThresholdSq = localThreshold * localThreshold;\n\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\tconst index = geometry.index;\n\t\t\tconst attributes = geometry.attributes;\n\t\t\tconst positionAttribute = attributes.position;\n const morphPosition = geometry.morphAttributes.position;\n\n\t\t\tif ( index !== null ) {\n\n\t\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\t\tconst end = Math.min( index.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\tfor ( let i = start, il = end; i < il; i ++ ) {\n\n\t\t\t\t\tconst a = index.getX( i );\n \n calculatePosition( this, positionAttribute, morphPosition, a );\n\n\t\t\t\t\ttestPoint( _position, a, localThresholdSq, matrixWorld, raycaster, intersects, this );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\t\tconst end = Math.min( positionAttribute.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\tfor ( let i = start, l = end; i < l; i ++ ) {\n \n calculatePosition( this, positionAttribute, morphPosition, i );\n\n\t\t\t\t\ttestPoint( _position, i, localThresholdSq, matrixWorld, raycaster, intersects, this );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tconsole.error( 'THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\n\t\t}\n\n\t}\n\n\tupdateMorphTargets() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\tconst morphAttributes = geometry.morphAttributes;\n\t\t\tconst keys = Object.keys( morphAttributes );\n\n\t\t\tif ( keys.length > 0 ) {\n\n\t\t\t\tconst morphAttribute = morphAttributes[ keys[ 0 ] ];\n\n\t\t\t\tif ( morphAttribute !== undefined ) {\n\n\t\t\t\t\tthis.morphTargetInfluences = [];\n\t\t\t\t\tthis.morphTargetDictionary = {};\n\n\t\t\t\t\tfor ( let m = 0, ml = morphAttribute.length; m < ml; m ++ ) {\n\n\t\t\t\t\t\tconst name = morphAttribute[ m ].name || String( m );\n\n\t\t\t\t\t\tthis.morphTargetInfluences.push( 0 );\n\t\t\t\t\t\tthis.morphTargetDictionary[ name ] = m;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tconst morphTargets = geometry.morphTargets;\n\n\t\t\tif ( morphTargets !== undefined && morphTargets.length > 0 ) {\n\n\t\t\t\tconsole.error( 'THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n}\n\nPoints.prototype.isPoints = true;\n\nfunction testPoint( point, index, localThresholdSq, matrixWorld, raycaster, intersects, object ) {\n\n\tconst rayPointDistanceSq = _ray.distanceSqToPoint( point );\n\n\tif ( rayPointDistanceSq < localThresholdSq ) {\n\n\t\tconst intersectPoint = new Vector3();\n\n\t\t_ray.closestPointToPoint( point, intersectPoint );\n\t\tintersectPoint.applyMatrix4( matrixWorld );\n\n\t\tconst distance = raycaster.ray.origin.distanceTo( intersectPoint );\n\n\t\tif ( distance < raycaster.near || distance > raycaster.far ) return;\n\n\t\tintersects.push( {\n\n\t\t\tdistance: distance,\n\t\t\tdistanceToRay: Math.sqrt( rayPointDistanceSq ),\n\t\t\tpoint: intersectPoint,\n\t\t\tindex: index,\n\t\t\tface: null,\n\t\t\tobject: object\n\n\t\t} );\n\n\t}\n\n}\n\nfunction calculatePosition( object, position, morphPosition, a )\t{\n\n _position.fromBufferAttribute( position, a );\n\n const morphInfluences = object.morphTargetInfluences;\n\n if ( object.material.morphTargets && morphPosition && morphInfluences ) {\n\n _morphA.set( 0, 0, 0 );\n\n for ( var i = 0, il = morphPosition.length; i < il; i ++ ) {\n\n const influence = morphInfluences[ i ];\n const morphAttribute = morphPosition[ i ];\n\n if ( influence === 0 ) continue;\n\n _tempA.fromBufferAttribute( morphAttribute, a );\n\n _morphA.addScaledVector( _tempA.sub( _position ), influence );\n\n }\n\n _position.add( _morphA );\n\n }\n\n}\n\nexport { Points };","const THREE = require('three');\nconst toBufferGeometry = require('../utilities').toBufferGeometry;\n\n/**\n * Provides an object which stores lines.\n * This is created when a valid json file containing lines is read into a {@link Zinc.Scene}\n * object.\n * \n * @class\n * @author Alan Wu\n * @return {Lines}\n */\nconst Lines = function () {\n (require('./zincObject').ZincObject).call(this);\n\tthis.isLines = true;\n\n /**\n * Create the line segements using geometry and material.\n * \n * @param {THREE.Geomtry} geometryIn - Geometry of lines to be rendered.\n * @param {THREE.Material} materialIn - Material to be set for the lines.\n * @param {Object} options - Provide various options\n * @param {Boolean} options.localTimeEnabled - A flag to indicate either the lines is\n * time dependent.\n * @param {Boolean} options.localMorphColour - A flag to indicate either the colour is\n * time dependent.\n */\n\tthis.createLineSegment = (geometryIn, materialIn, options) => {\n\t\tif (geometryIn && materialIn) {\n\t\t\tlet geometry = toBufferGeometry(geometryIn, options);\n\t\t\tif (options.localMorphColour && geometry.morphAttributes[ \"color\" ])\n\t\t\t\tmaterialIn.onBeforeCompile = (require(\"./augmentShader\").augmentMorphColor)();\n let line = new (require(\"../three/line/LineSegments\").LineSegments)(geometry, materialIn);\n this.setMesh(line, options.localTimeEnabled, options.localMorphColour);\n\t\t}\n\t}\n\n /**\n * Set the width for the lines.\n * \n * @param {Number} width - Width of the lines.\n */\n\tthis.setWidth = width => {\n\t\tif (this.morph && this.morph.material) {\n\t\t\tthis.morph.material.linewidth = width;\n\t\t\tthis.morph.material.needsUpdate = true;\n\t\t}\n\t}\n\n /**\n * Add new lines to existing lines if it exists, otherwise\n * create a new one and add to it.\n * @param {Array} coords -An array of three components coordinates.\n\n * @param {Number} colour - A hex value of the colour for the points\n */\n\tthis.addLines = (coords, colour) => {\n if (coords && coords.length > 0) {\n const geometry = this.addVertices(coords);\n let mesh = this.getMorph();\n if (!mesh) {\n let material = new THREE.LineBasicMaterial({color:colour});\n const options = { localTimeEnabled: false, localMorphColour: false};\n geometry.colorsNeedUpdate = true;\n this.createLineSegment(geometry, material, options);\n }\n if (this.region) this.region.pickableUpdateRequired = true;\n }\n\t}\n}\n\nLines.prototype = Object.create((require('./zincObject').ZincObject).prototype);\nexports.Lines = Lines;\n","const THREE = require('three');\n\n/**\n * Texture array object for holding array of images into\n * texures unit that can be used by other texture primitives.\n * \n * @class\n * @author Alan Wu\n * @return {TextureArray}\n */\nconst TextureArray = function () {\n (require('./texture').Texture).call(this);\n this.isTextureArray = true;\n\n\n /**\n * Read images from an array containg src locations.\n * \n * @async\n * @param {Array} srcArrays - List of source location of the images.\n */\n this.loadFromImages = async (srcArrays) => {\n let w = 1;\n let h = 1;\n let d = 0;\n if (srcArrays && srcArrays.length) {\n this.isLoading = true;\n const image = new Image();\n image.crossOrigin = \"Anonymous\";\n const canvas = document.createElement(\"canvas\");\n let length = 0;\n const dataStacks = new Array(srcArrays.length);\n for (let i = 0; i < srcArrays.length; i++) {\n const data = await this.imageToUint8Array(this, image, srcArrays[i], canvas);\n if (data && data.array) {\n w = data.width;\n h = data.height;\n dataStacks[d] = data.array;\n length += dataStacks[d].length;\n d++;\n }\n }\n const fullArray = new Uint8Array(length);\n length = 0;\n dataStacks.forEach(data => {\n fullArray.set(data, length);\n length += data.length;\n });\n\n this.impl = new THREE.DataTexture2DArray(fullArray, w, h, d);\n this.size = {\n width: w,\n height: h,\n depth: d\n };\n this.isLoading = false;\n this.impl.needsUpdate = true;\n }\n }\n\n /**\n * Get and create the material containing shaders and the textures.\n * The texture must be read and ready before calling this function.\n * \n *\n * @param {Object} options - Customise the material with the options object.\n * @param {String} options.fs - string of the fragment shader used for \n * visualisation.\n * @param {String} options.vs - string of the vertex shader used for \n * visualisation.\n * @param {Object} options.uniforms - Containing the data to be passed into the shaders.\n * @param {String} options.glslVersion - Version of glsl used for compile this shader.\n * \n */\n this.getMaterial = (options) => {\n if (this.impl) {\n let material = undefined;\n if (options) {\n if (options.vs && options.fs) {\n let transparent = true;\n if (options.transparent)\n transparent = options.transparent;\n let side = THREE.FrontSide;\n if (options.side)\n side = options.side;\n material = new THREE.ShaderMaterial({\n transparent,\n uniforms: options.uniforms,\n vertexShader: options.vs,\n fragmentShader: options.fs,\n side\n });\n if (options.glslVersion) {\n material.glslVersion = options.glslVersion;\n }\n }\n } else {\n material = new THREE.MeshBasicMaterial({\n color: new THREE.Color(1, 1, 1),\n transparent: false,\n opacity: 1.0,\n map: this.impl,\n side: THREE.DoubleSide\n });\n }\n if (material) {\n material.needsUpdate = true;\n return material;\n }\n }\n }\n}\n\nTextureArray.prototype = Object.create((require('./texture').Texture).prototype);\nexports.TextureArray = TextureArray;\n","const THREE = require('three');\n\n/**\n * Base texture object for importing images and turning them into\n * texures unit that can be used by other texture primitives.\n * \n * @class\n * @author Alan Wu\n * @return {Texture}\n */\nconst Texture = function () {\n this.isTexture = true;\n this.impl = undefined;\n this.isLoading = false;\n this.size = {\n width: 1,\n height: 1,\n depth: 0\n };\n}\n\n/**\n * Read an image from src.\n * \n * @async\n * @param {Image} img - An image object.\n * @param {String} src - Source location of the image.\n * \n * @return {Promise} img on resolve.\n */\nTexture.prototype.loadImage = function (img, src) {\n return new Promise((resolve, reject) => {\n img.onload = () => resolve(img);\n img.onerror = reject;\n img.src = src;\n })\n}\n\n/**\n @typedef IMAGE_UINT8_RETURN\n @type {Set}\n @property {Uint8Array} array - Array containing the uint8 image value.\n @property {Number} width - Phyiscal image width.\n @property {Number} height - Phyiscal image height.\n */\n/**\n * Read an image from src and turn it into Uint8Array.\n * \n * @async\n * @param {Image} img - An image object.\n * @param {String} src - Source location of the image.\n * @param {Canvas} canvas - Canvas html element used for the conversion.\n * \n * @return {IMAGE_UNIT8_RETURN}\n */\nTexture.prototype.imageToUint8Array = async function (instance, img, src, canvas) {\n await instance.loadImage(img, src);\n canvas.width = img.width;\n canvas.height = img.height;\n const ctx = canvas.getContext(\"2d\");\n ctx.drawImage(img, 0, 0);\n return {\n array: new Uint8Array(ctx.getImageData(0, 0, canvas.width, canvas.height).data.buffer),\n width: canvas.width,\n height: canvas.height\n };\n}\n\nTexture.prototype.loadFromImages = async function (srcArrays) {\n return\n}\n\n/**\n * Return true if the texture is ready for consumption.\n * \n * @return {Boolean}\n */\nTexture.prototype.isReady = function () {\n if (this.impl && !this.isLoading)\n return true;\n return false;\n}\n\n/**\n * Return true if the texture is ready for consumption, otherwise false.\n * \n * @return {Boolean}\n */\nTexture.prototype.getMaterial = function () {\n if (this.impl) {\n return new THREE.MeshBasicMaterial({\n color: new THREE.Color(1, 1, 1),\n transparent: false,\n opacity: 1.0,\n map: this.impl,\n side: THREE.DoubleSide\n });\n }\n}\n\nexports.Texture = Texture;\n","const THREE = require('three');\nconst shader = require(\"../shaders/textureSlide.js\");\n/**\n * Provides a class which create a texture stacks in a block\n * with shaders allowing slices of texture to be displayed.\n * \n * @param {TextureArray} textureIn - An object of texture array\n * holding texture information.\n * \n * @class\n * @author Alan Wu\n * @return {TextureSlides}\n */\nconst TextureSlides = function (textureIn) {\n (require('./texturePrimitive').TexturePrimitive).call(this, textureIn);\n this.isTextureSlides = true;\n const textureSettings = [];\n const idTextureMap = {};\n this.morph = new THREE.Group();\n this.group = this.morph;\n this.morph.userData = this;\n let flipY = true;\n\n /**\n @typedef SLIDE_SETTINGS\n @type {Set}\n @property {String} direction - the value must be x, y or z, specify the\n direction the slide should be facing.\n @property {Number} value - Normalised value of the location on direction.\n @property {String} id - ID of the mesh, it is only available if the settings\n is returned from {@link TextureSlides.createSlide} or \n {@link TextureSlides.getTextureSettings}.\n */\n /**\n * Create the slides required for visualisation based on the slide settings.\n * The slides themselves are {THREE.PlanGeometry} objects.\n * \n * @param {SLIDE_SETTINGS} slideSettings - An array to each slide settings.\n */\n this.createSlides = slideSettings => {\n slideSettings.forEach(slide => this.createSlide(slide));\n }\n\n /**\n * Set the value of the uniforms for a specific mesh in this\n * texture slide object.\n *\n * @param {THREE.Mesh} mesh - Mesh to be modified\n * @param {SLIDE_SETTINGS} slideSettings - Slide settings.\n */\n const setUniformSlideSettingsOfMesh = (mesh, settings) => {\n const material = mesh.material;\n const uniforms = material.uniforms;\n mesh.rotation.x = 0;\n mesh.rotation.y = 0;\n mesh.rotation.z = 0;\n mesh.position.x = 0;\n mesh.position.y = 0;\n mesh.position.z = 0;\n switch (settings.direction) {\n case \"x\":\n const rotation = flipY ? -Math.PI / 2 : Math.PI / 2;\n mesh.rotation.y = rotation;\n uniforms.direction.value = 1;\n uniforms.slide.value.set(settings.value, 0, 0);\n mesh.position.x = settings.value;\n break;\n case \"y\":\n mesh.rotation.x = Math.PI / 2;\n uniforms.direction.value = 2;\n uniforms.slide.value.set(0, settings.value, 0);\n mesh.position.y = settings.value;\n break;\n case \"z\":\n uniforms.direction.value = 3;\n uniforms.slide.value.set(0, 0, settings.value);\n mesh.position.z = settings.value;\n break;\n default:\n break;\n }\n material.needsUpdate = true;\n this.boundingBoxUpdateRequired = true;\n }\n\n /**\n * Modify the mesh based on a setting\n *\n * @param {SLIDE_SETTINGS} settings - s.\n */\n this.modifySlideSettings = (settings) => {\n if (settings && settings.id &&\n settings.id in idTextureMap &&\n idTextureMap[settings.id]) {\n setUniformSlideSettingsOfMesh(idTextureMap[settings.id], settings);\n }\n }\n\n /**\n * Create a slide required for visualisation based on the slide settings.\n * The slide itself is an {THREE.PlanGeometry} object.\n *\n * @param {SLIDE_SETTINGS} settings -settings of the slide to be created.\n * @return {SLIDE_SETTINGS} - Returned settings, it includes the newly\n * created mesh's id.\n */\n this.createSlide = settings => {\n if (this.texture && this.texture.isTextureArray && this.texture.isReady()) {\n if (settings && settings.direction && settings.value !== undefined) {\n const geometry = new THREE.PlaneGeometry(1, 1);\n geometry.translate(0.5, 0.5, 0);\n const uniforms = shader.getUniforms();\n uniforms.diffuse.value = this.texture.impl;\n uniforms.depth.value = this.texture.size.depth;\n uniforms.flipY.value = flipY;\n \n const options = {\n fs: shader.fs,\n vs: shader.vs,\n uniforms: uniforms,\n glslVersion: shader.glslVersion,\n side: THREE.DoubleSide,\n transparent: false\n };\n const material = this.texture.getMaterial(options);\n material.needsUpdate = true;\n const mesh = new THREE.Mesh(geometry, material);\n mesh.name = this.groupName;\n mesh.userData = this;\n const slideSettings = {\n value: settings.value,\n direction: settings.direction,\n id: mesh.id,\n };\n textureSettings.push(slideSettings);\n setUniformSlideSettingsOfMesh(mesh, slideSettings);\n idTextureMap[mesh.id] = mesh;\n this.morph.add(mesh);\n this.boundingBoxUpdateRequired = true;\n return slideSettings;\n }\n }\n }\n\n /**\n * Return a copy of texture settings used by this object.\n *\n * @return {SLIDE_SETTINGS} - Returned the list of settings.\n */\n this.getTextureSettings = () => {\n return [...textureSettings];\n }\n\n /**\n * Return a copy of texture settings with corresponding id used by this object.\n *\n * @return {SLIDE_SETTINGS} - Returned a copy of settings with corresponding id.\n */\n this.getTextureSettingsWithId = (id) => {\n for (let i = 0; i < textureSettings.length; i++) {\n if (id === textureSettings[i].id) {\n return {...textureSettings[i]};\n }\n }\n }\n\n /**\n * Get the array of slides, return them in an array\n *\n * @return {Array} - Return an array of {@link THREE.Object)\n */\n this.getSlides = () => {\n if (this.morph) return [...this.morph.children];\n return [];\n }\n\n /**\n * Remove a slide, this will dispose the slide and its material.\n *\n * @param {Slide} slide - Slide to be remvoed\n */\n this.removeSlide = slide => {\n if (slide) {\n this.removeSlideWithId(slide.id);\n }\n }\n\n /**\n * Remove a slide, this will dispose the slide and its material.\n *\n * @param {Number} id - id of slide to be remvoed\n */\n this.removeSlideWithId = id => {\n if (this.morph && id in idTextureMap && idTextureMap[id]) {\n if (this.morph.getObjectById(id)) {\n const slide = idTextureMap[id];\n this.morph.remove(slide);\n slide.clear();\n if (slide.geometry)\n slide.geometry.dispose();\n if (slide.material)\n slide.material.dispose();\n this.boundingBoxUpdateRequired = true;\n }\n const index = textureSettings.findIndex(item => item.id === id);\n if (index > -1) {\n textureSettings.splice(index, 1);\n }\n }\n }\n\n /**\n * Clean up all internal objects.\n */\n this.dispose = () => {\n this.morph.children.forEach(slide => {\n if (slide.geometry)\n slide.geometry.dispose();\n if (slide.material)\n slide.material.dispose();\n });\n (require('./texturePrimitive').TexturePrimitive).prototype.dispose.call(this);\n this.boundingBoxUpdateRequired = true;\n }\n\n //Expand the boundingbox with slide settings\n const expandBoxWithSettings = (box, settings, vector) => {\n switch (settings.direction.value) {\n case 1:\n vector.copy(settings.slide.value);\n box.expandByPoint(vector);\n vector.setY(1.0);\n vector.setZ(1.0);\n box.expandByPoint(vector);\n break;\n case 2:\n vector.copy(settings.slide.value);\n box.expandByPoint(vector);\n vector.setX(1.0);\n vector.setZ(1.0);\n box.expandByPoint(vector);\n break;\n case 3:\n vector.copy(settings.slide.value);\n box.expandByPoint(vector);\n vector.setX(1.0);\n vector.setY(1.0);\n box.expandByPoint(vector);\n break;\n default:\n break;\n }\n }\n\n /**\n * Get the bounding box of this slides.\n * It uses the max and min of the slides position and the\n * transformation to calculate the position of the box.\n * \n * @return {THREE.Box3}.\n */\n this.getBoundingBox = () => {\n if (this.morph && this.morph.children && this.morph.visible &&\n this.boundingBoxUpdateRequired) {\n this.cachedBoundingBox.makeEmpty();\n const vector = new THREE.Vector3(0, 0, 0);\n this.morph.children.forEach(slide => {\n expandBoxWithSettings(this.cachedBoundingBox, slide.material.uniforms,\n vector);\n });\n this.morph.updateMatrixWorld (true, true);\n this.cachedBoundingBox.applyMatrix4(this.morph.matrixWorld);\n this.boundingBoxUpdateRequired = false;\n }\n return this.cachedBoundingBox;\n }\n\n this.applyTransformation = (rotation, position, scale) => {\n const matrix = new THREE.Matrix4();\n matrix.set(\n rotation[0],\n rotation[1],\n rotation[2],\n 0,\n rotation[3],\n rotation[4],\n rotation[5],\n 0,\n rotation[6],\n rotation[7],\n rotation[8],\n 0,\n 0,\n 0,\n 0,\n 0\n );\n const quaternion = new THREE.Quaternion().setFromRotationMatrix(matrix);\n this.morph.position.set(...position);\n this.morph.quaternion.copy( quaternion );\n this.morph.scale.set(...scale);\n this.morph.updateMatrix();\n this.boundingBoxUpdateRequired = true;\n }\n\n this.initialise = (textureData, finishCallback) => {\n if (textureData) {\n\n const locations = textureData.locations;\n if (locations && locations.length > 0) {\n this.applyTransformation(locations[0].orientation,\n locations[0].position, locations[0].scale);\n if (\"flipY\" in locations[0]) {\n flipY = locations[0].flipY;\n }\n }\n this.createSlides(textureData.settings.slides);\n if (finishCallback != undefined && (typeof finishCallback == 'function')) {\n finishCallback(this);\n }\n }\n }\n}\n\nTextureSlides.prototype = Object.create((require('./texturePrimitive').TexturePrimitive).prototype);\nTextureSlides.prototype.constructor = TextureSlides;\nexports.TextureSlides = TextureSlides;\n","const THREE = require('three');\n\nconst glslVersion = THREE.GLSL3;\n\nconst fs =\n`\nprecision highp float;\nprecision highp int;\nprecision highp sampler2DArray;\n\nuniform sampler2DArray diffuse;\nin vec3 vUw;\n\nout vec4 outColor;\n\nvoid main() {\n\n vec4 color = texture( diffuse, vUw );\n\n // lighten a bit\n outColor = vec4( color.rgb + .2, 1.0 );\n\n}\n`;\n\nconst vs = \n`\nout vec3 vUw;\nuniform float depth;\nuniform vec3 slide;\nuniform int direction;\nuniform bool flipY;\n\nvoid main() {\n\n vec3 slidePos = position.xyz;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position.xyz, 1.0 );\n\n if (direction == 1)\n slidePos = vec3(slide.x, position.y, position.x);\n if (direction == 2)\n slidePos = vec3(position.x, slide.y, position.y);\n if (direction == 3)\n slidePos = vec3(position.x, position.y, slide.z);\n\n if (flipY) \n slidePos.y = 1.0 - slidePos.y;\n\n vUw.xyz = vec3(slidePos.x, slidePos.y, slidePos.z * depth);\n\n}\n`;\n\nconst getUniforms = function() {\n return {\n diffuse: { value: undefined },\n depth: { value: 1 },\n slide: { value: new THREE.Vector3( 0, 0, 1 ) },\n direction: {value: 1},\n flipY: { value: true},\n };\n}\n\nexports.fs = fs;\nexports.vs = vs;\nexports.glslVersion = glslVersion;\nexports.getUniforms = getUniforms;\n","const THREE = require('three');\nconst resolveURL = require('../utilities').resolveURL;\n/**\n * Provides a base class object which stores textures and rendering object.\n * \n * @class\n * @author Alan Wu\n * @return {TexturePrimitive}\n */\nconst TexturePrimitive = function (textureIn) {\n (require('./zincObject').ZincObject).call(this);\n this.isTexturePrimitive = true;\n this.texture = textureIn;\n\n /**\n * Load texture data into this primitves.\n * \n * @param {Object} textureData - contains the informations about the textures.\n * @param {Function} finishCallback - User's function to be called once texture's\n * is loaded.\n */\n this.load = (textureData, finishCallback, isInline) => {\n if (textureData) {\n if (textureData.images && textureData.images.source) {\n const texture = new (require('../texture/textureArray').TextureArray)();\n const imgArray = [];\n textureData.images.source.forEach(img => {\n imgArray.push(resolveURL(img));\n });\n const _this = this;\n texture.loadFromImages(imgArray).then(() => {\n _this.texture = texture;\n _this.initialise(textureData, finishCallback);\n });\n }\n }\n }\n\n /**\n * Initialise a texture based on the provided textureData, this should be used\n * internally only.\n * \n * @param {Object} textureData - contains the informations about the textures.\n * @param {Function} finishCallback - User's function to be called once texture's\n * is loaded.\n */\n this.initialise = (textureData, finishCallback) => {\n if (finishCallback != undefined && (typeof finishCallback == 'function')) {\n finishCallback(this);\n }\n }\n\n\n}\n\nTexturePrimitive.prototype = Object.create((require('./zincObject').ZincObject).prototype);\nTexturePrimitive.prototype.constructor = TexturePrimitive;\nexports.TexturePrimitive = TexturePrimitive;\n","const THREE = require('three');\r\nconst ResizeSensor = require('css-element-queries/src/ResizeSensor');\r\n/**\r\n * Create a Zinc 3D renderer in the container provided.\r\n * The primary function of a Zinc 3D renderer is to display the current\r\n * scene (@link Scene} set to the renderer and each scene may contain as \r\n * many geometries, glyphset and other primitives as the system can support.\r\n * Zinc.Renderer also allows additional scenes to be displayed.\r\n * \r\n * @param {Object} containerIn - Container to create the renderer on.\r\n * @class\r\n * @author Alan Wu\r\n * @return {Renderer}\r\n */\r\nexports.Renderer = function (containerIn) {\r\n\r\n\tlet container = containerIn;\r\n\t\r\n\tconst stats = 0;\r\n\t\r\n\tlet renderer = undefined;\r\n\tlet currentScene = undefined;\r\n\r\n\t//myGezincGeometriestains a tuple of the threejs mesh, timeEnabled, morphColour flag, unique id and morph\r\n\tconst clock = new THREE.Clock(false);\r\n\tthis.playAnimation = true;\r\n /* default animation update rate, rate is 1000 and duration \r\n is default to 6000, 6s to finish a full animation */\r\n\tlet playRate = 1000;\r\n\tlet preRenderCallbackFunctions = [];\r\n let preRenderCallbackFunctions_id = 0;\r\n let postRenderCallbackFunctions = [];\r\n\tlet postRenderCallbackFunctions_id = 0;\r\n\tlet animated_id = undefined;\r\n\tlet cameraOrtho = undefined, sceneOrtho = undefined, logoSprite = undefined;\r\n\tlet sceneMap = [];\r\n\tlet additionalActiveScenes = [];\r\n\tlet scenesGroup = new THREE.Group();\r\n\tlet canvas = undefined;\r\n let sensor = undefined;\r\n let isRendering = false;\r\n\tconst _this = this;\r\n\tconst currentSize = [0, 0];\r\n\tconst currentOffset = [0, 0];\r\n\t\r\n\tthis.getDrawingWidth = () => {\r\n\t\tif (container) {\r\n\t\t\treturn container.clientWidth;\r\n\t\t} else if (canvas)\r\n\t\t\tif (typeof canvas.clientWidth !== 'undefined')\r\n\t\t\t\treturn Math.round(canvas.clientWidth);\r\n\t\t\telse\r\n\t\t\t\treturn Math.round(canvas.width);\r\n\t\treturn 0;\r\n\t}\r\n\t\r\n\tthis.getDrawingHeight = () => {\r\n\t\tif (container) {\r\n\t\t\treturn container.clientHeight;\r\n\t\t} else if (canvas)\r\n\t\t\tif (typeof canvas.clientHeight !== 'undefined')\r\n\t\t\t\treturn Math.round(canvas.clientHeight);\r\n\t\t\telse\r\n\t\t\t\treturn Math.round(canvas.height);\r\n\t\treturn 0;\r\n\t}\r\n\t\r\n\t/** \r\n\t * Call this to resize the renderer, this is normally call automatically.\r\n\t */\r\n\tthis.onWindowResize = () => {\r\n\t\tcurrentScene.onWindowResize();\r\n\t\tconst width = this.getDrawingWidth();\r\n\t\tconst height = this.getDrawingHeight();\r\n\t\tif (renderer != undefined) {\r\n\t\t\tlet localRect = undefined;\r\n\t\t\tif (container) {\r\n\t\t\t\tlocalRect = container.getBoundingClientRect();\r\n\t\t\t\trenderer.setSize(width, height);\r\n\t\t\t} else if (canvas) {\r\n\t\t\t\tif (typeof canvas.getBoundingClientRect !== 'undefined') {\r\n\t\t\t\t\tlocalRect = canvas.getBoundingClientRect();\r\n\t\t\t\t\tcanvas.width = width;\r\n\t\t\t\t\tcanvas.height = height;\r\n\t\t\t\t\trenderer.setSize(width, height, false);\r\n\t\t\t\t} else {\r\n\t\t\t\t\trenderer.setSize(width, height, false);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (localRect) {\r\n\t\t\t\tcurrentOffset[0] = localRect.left;\r\n\t\t\t\tcurrentOffset[1] = localRect.top;\r\n\t\t\t}\r\n\t\t\tconst target = new THREE.Vector2();\r\n\t\t\trenderer.getSize(target);\r\n\t\t\tcurrentSize[0] = target.x;\r\n\t\t\tcurrentSize[1] = target.y;\r\n\t\t}\r\n\t}\r\n\t\r\n\t/**\r\n\t * Initialise the renderer and its visualisations.\r\n\t */\r\n\tthis.initialiseVisualisation = parameters => {\r\n\t parameters = parameters || {};\r\n\t if (parameters['antialias'] === undefined) {\r\n let onMobile = false;\r\n try {\r\n if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {\r\n onMobile = true;\r\n }\r\n }\r\n catch(err) {\r\n onMobile = false;\r\n }\r\n if (onMobile)\r\n parameters['antialias'] = false;\r\n else\r\n parameters['antialias'] = true;\r\n\t }\r\n\t if (parameters[\"canvas\"]) {\r\n\t\t container = undefined;\r\n\t\t canvas = parameters[\"canvas\"];\r\n\t }\r\n renderer = new THREE.WebGLRenderer(parameters);\r\n if (container !== undefined) {\r\n\t\t container.appendChild( renderer.domElement );\r\n }\r\n\t renderer.setClearColor( 0xffffff, 1);\r\n\t if (canvas && canvas.style) {\r\n\t\t canvas.style.height = \"100%\";\r\n\t\t canvas.style.width = \"100%\";\r\n }\r\n renderer.autoClear = false;\r\n\t const scene = this.createScene(\"default\");\r\n\t this.setCurrentScene(scene);\r\n\t}\r\n\t\r\n\t/**\r\n\t * Get the current scene on display.\r\n\t * @return {Zinc.Scene};\r\n\t */\r\n\tthis.getCurrentScene = () => {\r\n\t\treturn currentScene;\r\n\t}\r\n\t\r\n\t/**\r\n\t * Set the current scene on display.\r\n\t * \r\n\t * @param {Zinc.Scene} sceneIn - The scene to be set, only scene created by this instance\r\n\t * of ZincRenderer is supported currently.\r\n\t */\r\n\tthis.setCurrentScene = sceneIn => {\r\n\t\tif (sceneIn) {\r\n\t\t\tthis.removeActiveScene(sceneIn);\r\n\t\t\tconst oldScene = currentScene;\r\n\t\t\tcurrentScene = sceneIn;\r\n\t\t\tif (oldScene) {\r\n\t\t\t\toldScene.setInteractiveControlEnable(false);\r\n\t\t\t}\r\n\t\t\tcurrentScene.setInteractiveControlEnable(true);\r\n\t\t\tcurrentScene.setAdditionalScenesGroup(scenesGroup);\r\n\t\t\tthis.onWindowResize();\r\n\t\t}\r\n\t}\r\n\t\r\n\t/**\r\n\t * Return scene with the matching name if scene with that name has been created.\r\n\t * \r\n\t * @param {String} name - Name to match\r\n\t * @return {Zinc.Scene}\r\n\t */\r\n\tthis.getSceneByName = name => {\r\n\t\treturn sceneMap[name];\r\n\t}\r\n\t\r\n\t/**\r\n\t * Create a new scene with the provided name if scene with the same name exists,\r\n\t * return undefined.\r\n\t * \r\n\t * @param {String} name - Name of the scene to be created.\r\n\t * @return {Zinc.Scene}\r\n\t */\r\n\tthis.createScene = name => {\r\n\t\tif (sceneMap[name] != undefined){\r\n\t\t\treturn undefined;\r\n\t\t} else {\r\n\t\t\tlet new_scene = undefined;\r\n\t\t\tif (canvas)\r\n\t\t\t\tnew_scene = new (require('./scene').Scene)(canvas, renderer);\r\n\t\t\telse\r\n\t\t\t\tnew_scene = new (require('./scene').Scene)(container, renderer);\r\n\t\t\tsceneMap[name] = new_scene;\r\n\t\t\tnew_scene.sceneName = name;\r\n\t\t\treturn new_scene;\r\n\t\t}\r\n\t}\r\n\t\r\n\tconst updateOrthoScene = () => {\r\n\t\tif (logoSprite != undefined) {\r\n\t\t\tconst material = logoSprite.material;\r\n\t\t\tif (material.map) {\r\n\t\t\t\tconst width = this.getDrawingWidth();\r\n\t\t\t\tconst height = this.getDrawingHeight();\r\n\t\t\t\tconst calculatedWidth = (width - material.map.image.width)/2;\r\n\t\t\t\tconst calculatedHeight = (-height + material.map.image.height)/2;\r\n\t\t\t\tlogoSprite.position.set(calculatedWidth, calculatedHeight, 1 );\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t\r\n\tconst updateOrthoCamera = () => {\r\n\t\tif (cameraOrtho != undefined) {\r\n\t\t\tconst width = this.getDrawingWidth();\r\n\t\t\tconst height = this.getDrawingHeight();\r\n\t\t\tcameraOrtho.left = -width / 2;\r\n\t\t\tcameraOrtho.right = width / 2;\r\n\t\t\tcameraOrtho.top = height / 2;\r\n\t\t\tcameraOrtho.bottom = -height / 2;\r\n\t\t\tcameraOrtho.updateProjectionMatrix();\r\n\t\t}\r\n\t};\r\n\t\r\n\t/**\r\n\t * Reset the viewport of the current scene to its original state.\r\n\t */\r\n\tthis.resetView = () => {\r\n\t\tcurrentScene.resetView();\r\n\t}\r\n\t\r\n\t/**\r\n\t * Adjust zoom distance to include all primitives in scene and also the additional scenes\r\n\t * but the lookat direction and up vectors will remain constant.\r\n\t */\r\n\tthis.viewAll = () => {\r\n\t\tif (currentScene) {\t\r\n\t\t\tconst boundingBox = currentScene.getBoundingBox();\r\n\t\t\tif (boundingBox) {\r\n\t\t\t for(let i = 0; i < additionalActiveScenes.length; i++) {\r\n\t\t\t const boundingBox2 = additionalActiveScenes[i].getBoundingBox();\r\n\t\t\t if (boundingBox2) {\r\n\t\t\t \tboundingBox.union(boundingBox2);\r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t\tcurrentScene.viewAllWithBoundingBox(boundingBox);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t/**\r\n\t * Load a legacy model(s) format with the provided URLs and parameters. This only loads the geometry\r\n\t * without any of the metadata. Therefore, extra parameters should be provided. This should be\r\n\t * called from {@link Zinc.Scene}.\r\n\t * \r\n\t * @deprecated\r\n\t */\r\n\tthis.loadModelsURL = (urls, colours, opacities, timeEnabled, morphColour, finishCallback) => {\r\n\t\tcurrentScene.loadModelsURL(urls, colours, opacities, timeEnabled, morphColour, finishCallback);\r\n\t}\r\n\t\r\n\tconst loadView = viewData => {\r\n\t\tcurrentScene.loadView(viewData);\r\n\t};\r\n\t\r\n\t/**\r\n\t * Load the viewport from an external location provided by the url. This should be\r\n\t * called from {@link Zinc.Scene};\r\n\t * @param {String} URL - address to the file containing viewport information.\r\n\t * @deprecated\r\n\t */\r\n\tthis.loadViewURL = url => {\r\n\t\tcurrentScene.loadViewURL(url);\r\n\t}\r\n\t\r\n\t/**\r\n\t * Load a legacy file format containing the viewport and its model file from an external \r\n\t * location provided by the url. Use the new metadata format with\r\n\t * {@link Zinc.Scene#loadMetadataURL} instead. This should be\r\n\t * called from {@link Zinc.Scene};\r\n\t * \r\n\t * @param {String} URL - address to the file containing viewport and model information.\r\n\t * @deprecated\r\n\t */\r\n\tthis.loadFromViewURL = (jsonFilePrefix, finishCallback) => {\r\n\t\tcurrentScene.loadFromViewURL(jsonFilePrefix, finishCallback);\r\n\t}\r\n\t\r\n\tthis.updateDirectionalLight = () => {\r\n\t\tcurrentScene.updateDirectionalLight();\r\n\t}\r\n \r\n let runAnimation = () => {\r\n if (isRendering) {\r\n animated_id = requestAnimationFrame( runAnimation );\r\n this.render();\r\n } else {\r\n cancelAnimationFrame(animated_id);\r\n animated_id = undefined;\r\n }\r\n }\r\n\r\n\t/**\r\n\t * Stop the animation and renderer to get into the render loop.\r\n\t */\r\n\tthis.stopAnimate = () => {\r\n if (isRendering) {\r\n clock.stop();\r\n isRendering = false;\r\n }\r\n\t}\r\n\r\n\t/**\r\n\t * Start the animation and begin the rendering loop.\r\n\t */\r\n\tthis.animate = () => {\r\n if (!isRendering) {\r\n clock.start();\r\n isRendering = true;\r\n runAnimation();\r\n }\r\n\t}\r\n\r\n\tconst prevTime = Date.now();\r\n\t\r\n\t/**\r\n\t * Add a callback function which will be called everytime before the renderer renders its scene.\r\n\t * @param {Function} callbackFunction - callbackFunction to be added.\r\n\t * \r\n\t * @return {Number}\r\n\t */\r\n\tthis.addPreRenderCallbackFunction = callbackFunction => {\r\n\t\tpreRenderCallbackFunctions_id = preRenderCallbackFunctions_id + 1;\r\n\t\tpreRenderCallbackFunctions[preRenderCallbackFunctions_id] = callbackFunction;\r\n\t\treturn preRenderCallbackFunctions_id;\r\n\t}\r\n\t\r\n\t/**\r\n\t * Remove a callback function that is previously added to the scene.\r\n\t * @param {Number} id - identifier of the previously added callback function.\r\n\t */\r\n\tthis.removePreRenderCallbackFunction = id => {\r\n\t\tif (id in preRenderCallbackFunctions) {\r\n \t\t\tdelete preRenderCallbackFunctions[id];\r\n\t\t}\r\n\t}\r\n \r\n\t/**\r\n\t * Add a callback function which will be called everytime after the renderer renders its scene.\r\n\t * @param {Function} callbackFunction - callbackFunction to be added.\r\n\t * \r\n\t * @return {Number}\r\n\t */\r\n\tthis.addPostRenderCallbackFunction = callbackFunction => {\r\n\t\tpostRenderCallbackFunctions_id = postRenderCallbackFunctions_id + 1;\r\n\t\tpostRenderCallbackFunctions[postRenderCallbackFunctions_id] = callbackFunction;\r\n\t\treturn postRenderCallbackFunctions_id;\r\n\t}\r\n\t\r\n\t/**\r\n\t * Remove a callback function that is previously added to the scene.\r\n\t * @param {Number} id - identifier of the previously added callback function.\r\n\t */\r\n\tthis.removePostRenderCallbackFunction = id => {\r\n\t\tif (id in postRenderCallbackFunctions) {\r\n \t\t\tdelete postRenderCallbackFunctions[id];\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Get the current play rate, playrate affects how fast an animated object animates.\r\n\t * Also see {@link Zinc.Scene#duration}.\r\n\t */\r\n\tthis.getPlayRate = () => {\r\n\t\treturn playRate;\r\n\t}\r\n\t\r\n\t/**\r\n\t * Set the current play rate, playrate affects how fast an animated object animates.\r\n\t * @param {Number} PlayRateIn - value to set the playrate to.\r\n\t * Also see {@link Zinc.Scene#duration}.\r\n\t */\r\n\tthis.setPlayRate = playRateIn => {\r\n\t\tplayRate = playRateIn;\r\n\t}\r\n\t\r\n\tthis.getCurrentTime = () => {\r\n\t\treturn currentScene.getCurrentTime();\r\n\t}\r\n\t\r\n\t\r\n\t/**\r\n\t * Get the current play rate, playrate affects how fast an animated object animates.\r\n\t * Also see {@link Zinc.Scene#duration}.\r\n\t */\r\n\tthis.setMorphsTime = time => {\r\n\t\tcurrentScene.setMorphsTime(time);\r\n\t}\r\n\t\r\n\t/**\r\n\t * Get {Zinc.Geoemtry} by its id. This should be called from {@link Zinc.Scene};\r\n\t * \r\n\t * @depreacted\r\n\t * @return {Zinc.Geometry}\r\n\t */\r\n\tthis.getZincGeometryByID = id => {\r\n\t\treturn currentScene.getZincGeometryByID(id);\r\n\t}\t\r\n\t\r\n\t/**\r\n\t * Add {Three.Object} to the current scene.\r\n\t */\r\n\tthis.addToScene = object => {\r\n\t\tcurrentScene.addObject(object)\r\n\t}\r\n\t\r\n\t/**\r\n\t * Add {Three.Object} to the ortho scene, objects added to the ortho scene are rendered in\r\n\t * normalised coordinates and overlay on top of current scene. \r\n\t * \r\n\t */\r\n\tthis.addToOrthoScene = object => {\r\n\t\tif (sceneOrtho == undefined)\r\n\t\t\tsceneOrtho = new THREE.Scene();\r\n\t\tif (cameraOrtho == undefined) {\r\n\t\t\tconst width = this.getDrawingWidth();\r\n\t\t\tconst height = this.getDrawingHeight();\r\n\t\t\tcameraOrtho = new THREE.OrthographicCamera( -width / 2,\r\n\t\t\t\t\twidth / 2, height/ 2, -height / 2, 1, 10 );\r\n\t\t\tcameraOrtho.position.z = 10;\r\n\t\t}\r\n\t\tsceneOrtho.add(object)\r\n\t}\r\n\t\r\n\tconst createHUDSprites = logoSprite => {\r\n\t\treturn texture => {\r\n\t\t\ttexture.needsUpdate = true;\r\n\t\t\tconst material = new THREE.SpriteMaterial( { map: texture } );\r\n\t\t\tconst imagewidth = material.map.image.width;\r\n\t\t\tconst imageheight = material.map.image.height;\r\n\t\t\tlogoSprite.material = material;\r\n\t\t\tlogoSprite.scale.set( imagewidth, imageheight, 1 );\r\n\t\t\tconst width = this.getDrawingWidth();\r\n\t\t\tconst height = this.getDrawingHeight();\r\n\t\t\tlogoSprite.position.set( (width - imagewidth)/2, (-height + imageheight)/2, 1 );\r\n\t\t\tthis.addToOrthoScene(logoSprite);\r\n\t\t};\r\n\t};\r\n\t\r\n\tthis.addLogo = () => {\r\n\t\tlogoSprite = new THREE.Sprite();\r\n\t\tconst logo = THREE.ImageUtils.loadTexture(\r\n\t\t\t\t\"images/abi_big_logo_transparent_small.png\", undefined, createHUDSprites(logoSprite));\r\n\t}\r\n\t\r\n\t/**\r\n\t * Render the current and all additional scenes. It will first update all geometries and glyphsets\r\n\t * in scenes, clear depth buffer and render the ortho scene, call the preRenderCallbackFunctions stack\r\n\t * , render the scenes then postRenderCallback.\r\n\t */\r\n\tthis.render = () => {\r\n\t\tif (!sensor) {\r\n\t\t\tif (container) {\r\n\t\t\t\tif (container.clientWidth > 0 && container.clientHeight > 0)\r\n\t\t\t\t\tsensor = new ResizeSensor(container, this.onWindowResize);\r\n\t\t\t} else if (canvas) {\r\n\t\t\t\tif (canvas.width > 0 && canvas.height > 0)\r\n\t\t\t\t\tsensor = new ResizeSensor(canvas, this.onWindowResize);\r\n\t\t\t}\r\n\t\t}\r\n\t\tconst delta = clock.getDelta();\r\n\t\tcurrentScene.renderGeometries(playRate, delta, this.playAnimation);\r\n\t for(let i = 0; i < additionalActiveScenes.length; i++) {\r\n\t const sceneItem = additionalActiveScenes[i];\r\n\t sceneItem.renderGeometries(playRate, delta, this.playAnimation);\r\n\t }\r\n\t\tif (cameraOrtho != undefined && sceneOrtho != undefined) {\r\n\t\t\trenderer.clearDepth();\r\n\t\t\trenderer.render( sceneOrtho, cameraOrtho );\r\n\t\t}\r\n for (let key in preRenderCallbackFunctions) {\r\n if (preRenderCallbackFunctions.hasOwnProperty(key)) {\r\n preRenderCallbackFunctions[key].call();\r\n }\r\n }\r\n currentScene.render(renderer);\r\n for (let key in postRenderCallbackFunctions) {\r\n if (postRenderCallbackFunctions.hasOwnProperty(key)) {\r\n postRenderCallbackFunctions[key].call();\r\n }\r\n }\r\n\t}\r\n\t\r\n\t/**\r\n\t * Get the internal {@link Three.Renderer}, to gain access to ThreeJS APIs.\r\n\t */\r\n\tthis.getThreeJSRenderer = () => {\r\n\t\treturn renderer;\r\n\t}\r\n\t\r\n\t/**\r\n\t * Check if a scene is currently active.\r\n\t * @param {Zinc.Scene} sceneIn - Scene to check if it is currently\r\n\t * rendered.\r\n\t */\r\n\tthis.isSceneActive = sceneIn => {\r\n\t\tif (currentScene === sceneIn) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t for(let i = 0; i < additionalActiveScenes.length; i++) {\r\n\t\t const sceneItem = additionalActiveScenes[i];\r\n\t\t if (sceneItem === sceneIn)\r\n\t\t \treturn true;\r\n\t\t }\r\n\t\t}\r\n\t return false;\r\n\t} \r\n\t\r\n\t/**\r\n\t * Add additional active scene for rendering, this scene will also be rendered but \r\n\t * viewport of the currentScene will be used. \r\n\t * @param {Zinc.Scene} additionalScene - Scene to be added to the rendering.\r\n\t */\r\n\tthis.addActiveScene = additionalScene => {\r\n\t\tif (!this.isSceneActive(additionalScene)) {\r\n\t\t\tadditionalActiveScenes.push(additionalScene);\r\n\t\t\tscenesGroup.add(additionalScene.getThreeJSScene());\r\n\t\t}\r\n\t}\r\n\t\r\n\t/**\r\n\t * Remove a currenrtly active scene from the renderer, this scene will also be rendered but \r\n\t * viewport of the currentScene will be used. \r\n\t * @param {Zinc.Scene} additionalScene - Scene to be removed from rendering.\r\n\t */\r\n\tthis.removeActiveScene = additionalScene => {\r\n\t for(let i = 0; i < additionalActiveScenes.length; i++) {\r\n\t const sceneItem = additionalActiveScenes[i];\r\n\t if (sceneItem === additionalScene) {\r\n\t \tadditionalActiveScenes.splice(i, 1);\r\n\t \tscenesGroup.remove(additionalScene.getThreeJSScene());\r\n\t \treturn;\r\n\t }\r\n\t }\r\n\t}\r\n\t\r\n\t/**\r\n\t * Clear all additional scenes from rendering except for curentScene.\r\n\t */\r\n\tthis.clearAllActiveScene = () => {\r\n\t\tfor (let i = 0; i < additionalActiveScenes.length; i++) {\r\n\t\t\tscenesGroup.remove(additionalActiveScenes[i].getThreeJSScene());\r\n\t\t}\r\n\t\tadditionalActiveScenes.splice(0,additionalActiveScenes.length);\r\n\t}\r\n\t\r\n\t/**\r\n\t * Dispose all memory allocated, this will effetively destroy all scenes.\r\n\t */\r\n\tthis.dispose = () => {\r\n if (isRendering)\r\n cancelAnimationFrame(animated_id);\r\n\t for (const key in sceneMap) {\r\n\t if (sceneMap.hasOwnProperty(key)) {\r\n\t sceneMap[key].clearAll();\r\n\t }\r\n\t }\r\n\t sceneMap = [];\r\n\t additionalActiveScenes = [];\r\n\t scenesGroup = new THREE.Group();\r\n\t this.stopAnimate();\r\n\t preRenderCallbackFunctions = [];\r\n\t preRenderCallbackFunctions_id = 0;\r\n\t cameraOrtho = undefined;\r\n\t sceneOrtho = undefined;\r\n\t logoSprite = undefined;\r\n\t const scene = this.createScene(\"default\");\r\n\t this.setCurrentScene(scene);\r\n\t sensor = undefined;\r\n\t}\r\n\t\r\n\t/**\r\n\t * Transition from the current viewport to the endingScene's viewport in the specified duration.\r\n\t * \r\n\t * @param {Zinc.Scene} endingScene - Viewport of this scene will be used as the destination.\r\n\t * @param {Number} duration - Amount of time to transition from current viewport to the \r\n\t * endingScene's viewport.\r\n\t */\r\n\tthis.transitionScene = (endingScene, duration) => {\r\n\t\tif (currentScene) {\r\n\t\t\tconst currentCamera = currentScene.getZincCameraControls();\r\n\t\t\tconst boundingBox = endingScene.getBoundingBox();\r\n\t\t\tif (boundingBox) {\r\n\t\t\t\tconst radius = boundingBox.min.distanceTo(boundingBox.max)/2.0;\r\n\t\t\t\tconst centreX = (boundingBox.min.x + boundingBox.max.x) / 2.0;\r\n\t\t\t\tconst centreY = (boundingBox.min.y + boundingBox.max.y) / 2.0;\r\n\t\t\t\tconst centreZ = (boundingBox.min.z + boundingBox.max.z) / 2.0;\r\n\t\t\t\tconst clip_factor = 4.0;\r\n\t\t\t\tconst endingViewport = currentCamera.getViewportFromCentreAndRadius(centreX, centreY, centreZ, radius, 40, radius * clip_factor );\r\n\t\t\t\tconst startingViewport = currentCamera.getCurrentViewport();\r\n\t\t\t\tcurrentCamera.cameraTransition(startingViewport, endingViewport, duration);\r\n\t\t\t\tcurrentCamera.enableCameraTransition();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n this.isWebGL2 = () => {\r\n if (renderer)\r\n return renderer.capabilities.isWebGL2;\r\n return false;\r\n }\r\n};\r\n","module.exports = require(\"css-element-queries/src/ResizeSensor\");","const THREE = require('three');\nconst MarkerCluster = require('./primitives/markerCluster').MarkerCluster;\nconst SceneLoader = require('./sceneLoader').SceneLoader;\nconst SceneExporter = require('./sceneExporter').SceneExporter;\nconst Viewport = require('./controls').Viewport;\nconst createBufferGeometry = require('./utilities').createBufferGeometry;\nconst getCircularTexture = require('./utilities').getCircularTexture;\nlet uniqueiId = 0;\n\nconst getUniqueId = function () {\n return \"sc\" + uniqueiId++;\n}\n\nconst defaultMetadata = function() {\n return { \n Duration: \"6 secs\",\n OriginalDuration: \"-\",\n TimeStamps: {}\n }\n};\n\nconst defaultDuration = 6000;\n\n/**\n * A Scene contains {@link Region},and \n * {@link CameraControls} which controls the viewport and additional features.\n * It is the main object used for controlling what is and what is not displayed\n * on the renderer.\n * \n * @class\n * @param {Object} containerIn - Container to create the renderer on.\n * @author Alan Wu\n * @return {Scene}\n */\nexports.Scene = function (containerIn, rendererIn) {\n const container = containerIn;\n let videoHandler = undefined;\n let sceneLoader = new SceneLoader(this);\n let minimap = undefined;\n let zincObjectAddedCallbacks = {};\n let zincObjectAddedCallbacks_id = 0;\n let zincObjectRemovedCallbacks = {};\n let zincObjectRemovedCallbacks_id = 0;\n const scene = new THREE.Scene();\n const rootRegion = new (require('./region').Region)(undefined, this);\n scene.add(rootRegion.getGroup());\n const tempGroup = new THREE.Group();\n scene.add(tempGroup);\n /**\n * A {@link THREE.DirectionalLight} object for controlling lighting of this scene.\n */\n this.directionalLight = undefined;\n /**\n * a {@link THREE.AmbientLight} for controlling the ambient lighting of this scene.\n */\n this.ambient = undefined;\n this.camera = undefined;\n let duration = 6000;\n let zincCameraControls = undefined;\n this.sceneName = undefined;\n let stereoEffectFlag = false;\n let stereoEffect = undefined;\n this.autoClearFlag = true;\n this.displayMarkers = false;\n this.displayMinimap = false;\n this.minimapScissor = {\n x_offset: 16,\n y_offset: 16,\n width: 128,\n height: 128,\n align: \"top-left\",\n updateRequired: true\n };\n let scissor = {x: 0, y: 0};\n let metadata = defaultMetadata();\n let _markerTarget = new THREE.Vector2();\n let pickableObjectsList = [];\n this.forcePickableObjectsUpdate = false;\n this.uuid = getUniqueId();\n let markerCluster = new MarkerCluster(this);\n markerCluster.disable();\n scene.add(markerCluster.group);\n\n const getDrawingWidth = () => {\n if (container)\n if (typeof container.clientWidth !== \"undefined\")\n return container.clientWidth;\n else\n return container.width;\n return 0;\n }\n \n const getDrawingHeight = () => {\n if (container)\n if (typeof container.clientHeight !== \"undefined\")\n return container.clientHeight;\n else\n return container.height;\n return 0;\n }\n\n /**\n * This function returns a three component array, which contains\n * [totalsize, totalLoaded and errorDownload] of all the downloads happening\n * in this scene.\n * @returns {Array} \n */\n this.getDownloadProgress = () => {\n return sceneLoader.getDownloadProgress();\n }\n\n //called from Renderer when panel has been resized\n this.onWindowResize = () => {\n const wHeight = getDrawingHeight();\n this.camera.aspect = getDrawingWidth() / wHeight;\n this.camera.updateProjectionMatrix();\n this.minimapScissor.updateRequired = true;\n zincCameraControls.onResize();\n zincCameraControls.calculateHeightPerPixelAtZeroDepth(wHeight);\n }\n\n /**\n * Reset the viewport of this scene to its original state. \n */\n this.resetView = () => {\n this.onWindowResize();\n zincCameraControls.resetView();\n }\n\n /**\n * Set the zoom level by unit scroll rate\n */\n this.changeZoomByScrollRateUnit = unit => {\n zincCameraControls.changeZoomByScrollRateUnit(unit);\n }\n\n //Setup the camera for this scene, it also initialise the lighting\n const setupCamera = () => {\n this.camera = new THREE.PerspectiveCamera(40, getDrawingWidth() / getDrawingHeight(), 0.0, 10.0);\n this.ambient = new THREE.AmbientLight(0xffffff, 0.2);\n scene.add(this.ambient);\n\n this.directionalLight = new THREE.DirectionalLight(0xffffff, 0.8);\n scene.add(this.directionalLight);\n zincCameraControls = new (require('./controls').CameraControls)(this.camera, rendererIn.domElement, rendererIn, this);\n\n zincCameraControls.setDirectionalLight(this.directionalLight);\n zincCameraControls.resetView();\n\n minimap = new (require('./minimap').Minimap)(this);\n };\n\n setupCamera();\n\n /**\n * Load the viewport Data from the argument {@link Zinc.Viewport} and set it as \n * the default viewport of this scene.\n * \n * @param {Zinc.Viewport} viewData - Viewport data to be loaded. \n */\n this.loadView = settings => {\n const viewPort = new Viewport();\n viewPort.setFromObject(settings);\n zincCameraControls.setCurrentCameraSettings(viewPort);\n return true;\n }\n\n /**\n * Set up multiple views.\n * \n * @param {Zinc.Viewport} viewData - Viewport data to be loaded. \n */\n this.setupMultipleViews = (defaultView, entries) => {\n for (const [name, settings] of Object.entries(entries)) {\n const viewport = new Viewport();\n viewport.setFromObject(settings);\n zincCameraControls.addViewport(name, viewport);\n }\n zincCameraControls.setDefaultViewport(defaultView);\n }\n\n /**\n * Get the bounding box of all the object in this scene only.\n * \n * @returns {THREE.Box3} \n */\n this.getBoundingBox = () => {\n return rootRegion.getBoundingBox(true);\n }\n\n /**\n * Adjust the viewport to display the desired volume provided by the bounding box.\n * \n * @param {THREE.Box3} boundingBox - The bounding box which describes the volume of\n * which we the viewport should be displaying.\n */\n this.viewAllWithBoundingBox = boundingBox => {\n if (boundingBox) {\n const viewport = zincCameraControls.getViewportFromBoundingBox(boundingBox, 1.0);\n zincCameraControls.setCurrentCameraSettings(viewport);\n zincCameraControls.calculateHeightPerPixelAtZeroDepth(getDrawingHeight());\n markerCluster.markerUpdateRequired = true;\n }\n }\n\n /**\n * Adjust zoom distance to include all primitives in scene only.\n */\n this.viewAll = () => {\n const boundingBox = this.getBoundingBox();\n this.viewAllWithBoundingBox(boundingBox);\n markerCluster.markerUpdateRequired = true;\n }\n\n /**\n * A function which iterates through the list of geometries and call the callback\n * function with the geometries as the argument.\n * @param {Function} callbackFunction - Callback function with the geometry\n * as an argument.\n */\n this.forEachGeometry = callbackFunction => {\n rootRegion.forEachGeometry(callbackFunction, true);\n }\n\n /**\n * A function which iterates through the list of glyphsets and call the callback\n * function with the glyphset as the argument.\n * @param {Function} callbackFunction - Callback function with the glyphset\n * as an argument.\n */\n this.forEachGlyphset = callbackFunction => {\n rootRegion.forEachGlyphset(callbackFunction, true);\n }\n\n /**\n * A function which iterates through the list of pointsets and call the callback\n * function with the pointset as the argument.\n * @param {Function} callbackFunction - Callback function with the pointset\n * as an argument.\n */\n this.forEachPointset = callbackFunction => {\n rootRegion.forEachPointset(callbackFunction, true);\n }\n\n /**\n * A function which iterates through the list of lines and call the callback\n * function with the lines as the argument.\n * @param {Function} callbackFunction - Callback function with the lines\n * as an argument.\n */\n this.forEachLine = callbackFunction => {\n rootRegion.forEachLine(callbackFunction, true);\n }\n\n /** \n * Find and return all geometries in this scene with the matching GroupName.\n * \n * @param {String} GroupName - Groupname to match with.\n * @returns {Array}\n */\n this.findGeometriesWithGroupName = GroupName => {\n return rootRegion.findGeometriesWithGroupName(GroupName, true);\n }\n\n /** \n * Find and return all pointsets in this scene with the matching GroupName.\n * \n * @param {String} GroupName - Groupname to match with.\n * @returns {Array}\n */\n this.findPointsetsWithGroupName = GroupName => {\n return rootRegion.findPointsetsWithGroupName(GroupName, true);\n }\n /** \n * Find and return all glyphsets in this scene with the matching GroupName.\n * \n * @param {String} GroupName - Groupname to match with.\n * @returns {Array}\n */\n this.findGlyphsetsWithGroupName = GroupName => {\n return rootRegion.findGlyphsetsWithGroupName(GroupName, true);\n }\n\n /** \n * Find and return all lines in this scene with the matching GroupName.\n * \n * @param {String} GroupName - Groupname to match with.\n * @returns {Array}\n */\n this.findLinesWithGroupName = GroupName => {\n return rootRegion.findLinesWithGroupName(GroupName, true);\n }\n\n /** \n * Find a list of objects with the specified name, this will\n * tranverse through the region tree to find all child objects\n * with matching name.\n * \n * @param {String} GroupName - Groupname to match with.\n * @returns {Array}\n */\n this.findObjectsWithGroupName = GroupName => {\n return rootRegion.findObjectsWithGroupName(GroupName, true);\n }\n\n this.findObjectsWithAnatomicalId = anatomicalId => {\n return rootRegion.findObjectsWithAnatomicalId(anatomicalId, true);\n }\n\n /** \n * Get the bounding box of all zinc objects in list.\n * \n * @param {Array} objectsArray - Groupname to match with.\n * @returns {THREE.Box3}\n */\n this.getBoundingBoxOfZincObjects = objectsArray => {\n let boundingBox = undefined;\n for (let i = 0; i < objectsArray.length; i++) {\n let box = objectsArray[i].getBoundingBox();\n if (box) {\n if (!boundingBox)\n boundingBox = box;\n else\n boundingBox.union(box);\n }\n }\n return boundingBox;\n }\n\n /** \n * Convert the vector3 into screen coordinates.\n * \n * @param {THREE.Vector3} point - Vector 3 containing the point to convert,\n * this vector will be overwritten with the returned value.\n * @param {Array} objectsArray - Groupname to match with.\n * @returns {THREE.Vector3}\n */\n this.vectorToScreenXY = point => {\n point.project(this.camera);\n let width = getDrawingWidth();\n let height = getDrawingHeight();\n let widthHalf = (width / 2);\n let heightHalf = (height / 2);\n point.x = (point.x * widthHalf) + widthHalf;\n point.y = - (point.y * heightHalf) + heightHalf;\n return point;\n }\n\n /** \n * Get the screen coordinate of the centroid of provided list of objects.\n * \n * @param {Array} zincObjects - List of {@link ZincObject}.\n * @returns {THREE.Vector3}\n */\n this.getObjectsScreenXY = zincObjects => {\n if (zincObjects && zincObjects.length > 0) {\n let boundingBox = this.getBoundingBoxOfZincObjects(zincObjects);\n const center = new THREE.Vector3();\n boundingBox.getCenter(center);\n return this.vectorToScreenXY(center);\n }\n return undefined;\n }\n\n /** \n * Get the screen coordinate of the centroid of all objects \n * in scene with the provided name.\n * \n * @param {String} name - List of {@link ZincObject}.\n * @returns {THREE.Vector3}\n */\n this.getNamedObjectsScreenXY = name => {\n let zincObjects = this.findObjectsWithGroupName(name);\n return this.getObjectsScreenXY(zincObjects);\n };\n\n /** \n * Add zinc object into the root {@link Region} of sfcene.\n * \n * @param {ZincObject} - zinc object ot be added.\n * @returns {THREE.Vector3}\n */\n this.addZincObject = zincObject => {\n if (zincObject) {\n rootRegion.addZincObject(zincObject);\n if (zincCameraControls)\n zincCameraControls.calculateMaxAllowedDistance(this);\n }\n }\n\n /**\n * Load a glyphset into this scene object.\n * \n * @param {String} metaurl - Provide informations such as transformations, colours \n * and others for each of the glyph in the glyphsset.\n * @param {String} glyphurl - regular json model file providing geometry of the glyph.\n * @param {String} groupName - name to assign the glyphset's groupname to.\n * @param {Function} finishCallback - Callback function which will be called\n * once the glyphset is succssfully load in.\n */\n this.loadGlyphsetURL = (metaurl, glyphurl, groupName, finishCallback) => {\n sceneLoader.loadGlyphsetURL(rootRegion, metaurl, glyphurl, groupName, finishCallback);\n }\n\n /**\n * Load a pointset into this scene object.\n * \n * @param {String} metaurl - Provide informations such as transformations, colours \n * and others for each of the glyph in the glyphsset.\n * @param {Boolean} timeEnabled - Indicate if morphing is enabled.\n * @param {Boolean} morphColour - Indicate if color morphing is enabled.\n * @param {STRING} groupName - name to assign the pointset's groupname to.\n * @param {Function} finishCallback - Callback function which will be called\n * once the glyphset is succssfully load in.\n */\n this.loadPointsetURL = (url, timeEnabled, morphColour, groupName, finishCallback) => {\n sceneLoader.loadPointsetURL(rootRegion, url, timeEnabled, morphColour, groupName, finishCallback);\n }\n\n /**\n * Load lines into this scene object.\n * \n * @param {String} metaurl - Provide informations such as transformations, colours \n * and others for each of the glyph in the glyphsset.\n * @param {Boolean} timeEnabled - Indicate if morphing is enabled.\n * @param {Boolean} morphColour - Indicate if color morphing is enabled.\n * @param {STRING} groupName - name to assign the pointset's groupname to.\n * @param {Function} finishCallback - Callback function which will be called\n * once the glyphset is succssfully load in.\n */\n this.loadLinesURL = (url, timeEnabled, morphColour, groupName, finishCallback) => {\n sceneLoader.loadLinesURL(rootRegion, url, timeEnabled, morphColour, groupName, finishCallback);\n }\n\n /**\n * Read a STL file into this scene, the geometry will be presented as\n * {@link Zinc.Geometry}. \n * \n * @param {STRING} url - location to the STL file.\n * @param {STRING} groupName - name to assign the geometry's groupname to.\n * @param {Function} finishCallback - Callback function which will be called\n * once the STL geometry is succssfully loaded.\n */\n this.loadSTL = (url, groupName, finishCallback) => {\n sceneLoader.loadSTL(rootRegion, url, groupName, finishCallback);\n }\n\n /**\n * Read a OBJ file into this scene, the geometry will be presented as\n * {@link Zinc.Geometry}. \n * \n * @param {STRING} url - location to the STL file.\n * @param {STRING} groupName - name to assign the geometry's groupname to.\n * @param {Function} finishCallback - Callback function which will be called\n * once the OBJ geometry is succssfully loaded.\n */\n this.loadOBJ = (url, groupName, finishCallback) => {\n sceneLoader.loadOBJ(rootRegion, url, groupName, finishCallback);\n }\n\n /**\n * Load a metadata file from the provided URL into this scene. Once\n * succssful scene proceeds to read each items into scene for visualisations.\n * \n * @param {String} url - Location of the metafile\n * @param {Function} finishCallback - Callback function which will be called\n * for each glyphset and geometry that has been written in.\n */\n this.loadMetadataURL = (url, finishCallback, allCompletedCallback) => {\n sceneLoader.loadMetadataURL(rootRegion, url, finishCallback, allCompletedCallback);\n }\n\n /**\n * Load a legacy model(s) format with the provided URLs and parameters. This only loads the geometry\n * without any of the metadata. Therefore, extra parameters should be provided.\n * \n * @deprecated\n */\n this.loadModelsURL = (urls, colours, opacities, timeEnabled, morphColour, finishCallback) => {\n sceneLoader.loadModelsURL(rootRegion. urls, colours, opacities, timeEnabled, morphColour, finishCallback);\n }\n\n /**\n * Load the viewport from an external location provided by the url.\n * @param {String} URL - address to the file containing viewport information.\n */\n this.loadViewURL = url => {\n sceneLoader.loadViewURL(url);\n }\n\n /**\n * Load a legacy file format containing the viewport and its meta file from an external \n * location provided by the url. Use the new metadata format with\n * {@link Zinc.Scene#loadMetadataURL} instead.\n * \n * @param {String} URL - address to the file containing viewport and model information.\n * @deprecated\n */\n this.loadFromViewURL = (jsonFilePrefix, finishCallback) => {\n sceneLoader.loadFromViewURL(jsonFilePrefix, finishCallback);\n }\n\n /**\n * Load GLTF into this scene object.\n */\n this.loadGLTF = (url, finishCallback, allCompletedCallback, options) => {\n sceneLoader.loadGLTF(rootRegion, url, finishCallback, allCompletedCallback, options);\n }\n\n //Update the directional light for this scene.\n this.updateDirectionalLight = () => {\n zincCameraControls.updateDirectionalLight();\n }\n\n /**\n * Add any {THREE.Object} into this scene.\n * @param {THREE.Object} object - to be addded into this scene.\n */\n this.addObject = object => {\n scene.add(object);\n }\n\n /**\n * Remove any {THREE.Object} from this scene.\n * @param {THREE.Object} object - to be removed from this scene.\n */\n this.removeObject = object => {\n scene.remove(object);\n }\n\n /**\n * Get the current time of the scene.\n * @return {Number}\n */\n this.getCurrentTime = () => {\n if (videoHandler != undefined) {\n return videoHandler.getCurrentTime(duration);\n }\n const time = rootRegion.getCurrentTime();\n if (time !== -1) \n return time;\n \n return 0;\n }\n\n /**\n * Set the current time of all the geometries and glyphsets of this scene.\n * @param {Number} time - Value to set the time to.\n */\n this.setMorphsTime = (time) => {\n if (videoHandler != undefined) {\n videoHandler.setMorphTime(time, duration);\n }\n rootRegion.setMorphTime(time, true);\n }\n\n /**\n * Check if any object in this scene is time varying.\n * \n * @return {Boolean}\n */\n this.isTimeVarying = () => {\n if (videoHandler && videoHandler.video && !videoHandler.video.error) {\n \treturn true;\n }\n return rootRegion.isTimeVarying();\n }\n\n /**\n * Update geometries and glyphsets based on the calculated time.\n * @private\n */\n this.renderGeometries = (playRate, delta, playAnimation) => {\n // Let video dictates the progress if one is present\n let options = {};\n options.camera = zincCameraControls;\n //Global markers flag, marker can be set at individual zinc object level\n //overriding this flag.\n options.displayMarkers = this.displayMarkers;\n options.markerCluster = markerCluster;\n options.markersList = markerCluster.markers;\n options.ndcToBeUpdated = false;\n //Always set marker cluster update required when playAnimation is true\n //to make sure it is updated when it stops\n if (playAnimation) {\n options.markerCluster.markerUpdateRequired = true;\n }\n\t if (videoHandler) {\n\t\t if (videoHandler.isReadyToPlay()) {\n\t\t\t if (playAnimation) {\n videoHandler.video.play();\n\t\t\t } else {\n\t\t\t\t videoHandler.video.pause();\n\t\t\t }\n const currentTime = videoHandler.video.currentTime /\n videoHandler.getVideoDuration() * duration;\n\t\t\t if (0 == sceneLoader.toBeDownloaded) {\n\t\t\t\t zincCameraControls.setTime(currentTime);\n\t\t\t\t options.ndcToBeUpdated = zincCameraControls.update(0);\n if (options.ndcToBeUpdated) {\n zincCameraControls.calculateHeightPerPixelAtZeroDepth(getDrawingHeight());\n }\n rootRegion.setMorphTime(currentTime, true);\n rootRegion.renderGeometries(0, 0, playAnimation, zincCameraControls, options, true);\n\t\t\t } else {\n\t\t\t\t zincCameraControls.update(0);\n\t\t\t }\n\t\t\t //console.log(videoHandler.video.currentTime / videoHandler.getVideoDuration() * 6000);\n\t\t } else {\n\t\t\t myPlayRate = 0;\n\t\t }\n\t } else {\n\t\t if (0 == sceneLoader.toBeDownloaded) {\n options.ndcToBeUpdated = zincCameraControls.update(delta);\n if (options.ndcToBeUpdated) {\n zincCameraControls.calculateHeightPerPixelAtZeroDepth(getDrawingHeight());\n }\n rootRegion.renderGeometries(playRate, delta, playAnimation, zincCameraControls, options, true);\n\t\t } else {\n\t\t\t zincCameraControls.update(0);\n\t\t }\n }\n }\n\n /**\n * Return the internal {THREE.Scene}.\n * @return {THREE.Scene}\n */\n this.getThreeJSScene = () => {\n return scene;\n }\n\n this.setVideoHandler = (videoHandlerIn) => {\n if (!videoHandler)\n videoHandler = videoHandlerIn;\n }\n\n /**\n * Set a group of scenes into this parent scene. This group of\n * scenes will also be rendered when this scene is rendered.\n * @private\n */\n this.setAdditionalScenesGroup = scenesGroup => {\n scene.add(scenesGroup);\n }\n\n let getWindowsPosition = (align, x_offset, y_offset, width, height,\n renderer_width, renderer_height) => {\n let x = 0;\n let y = 0;\n if (align.includes(\"top\")) {\n y = renderer_height - height - y_offset;\n } else if (align.includes(\"bottom\")) {\n y = y_offset;\n } else {\n y = Math.floor((renderer_height - height) / 2.0);\n }\n if (align.includes(\"left\")) {\n x = x_offset;\n } else if (align.includes(\"right\")) {\n x = renderer_width - x_offset- width;\n } else {\n x = Math.floor((renderer_width - width) / 2.0);\n }\n return {x: x, y: y};\n }\n\n const renderMinimap = renderer => {\n if (this.displayMinimap === true) {\n renderer.setScissorTest(true);\n renderer.getSize(_markerTarget);\n if (this.minimapScissor.updateRequired) {\n scissor = getWindowsPosition(this.minimapScissor.align,\n this.minimapScissor.x_offset, \n this.minimapScissor.y_offset, \n this.minimapScissor.width,\n this.minimapScissor.height,\n _markerTarget.x, _markerTarget.y);\n this.minimapScissor.updateRequired = false;\n }\n renderer.setScissor(\n scissor.x,\n scissor.y,\n this.minimapScissor.width,\n this.minimapScissor.height);\n renderer.setViewport(\n scissor.x,\n scissor.y,\n this.minimapScissor.width,\n this.minimapScissor.height); \n minimap.updateCamera();\n scene.add(minimap.mask);\n renderer.render(scene, minimap.camera);\n scene.remove(minimap.mask);\n renderer.setScissorTest(false);\n renderer.setViewport(0, 0, _markerTarget.x, _markerTarget.y);\n }\n }\n\n /**\n * Render the scene.\n * @private\n */\n this.render = renderer => {\n if (this.autoClearFlag)\n renderer.clear();\n if (stereoEffectFlag && stereoEffect) {\n stereoEffect.render(scene, this.camera);\n } else {\n renderer.render(scene, this.camera);\n renderMinimap(renderer);\n }\n }\n\n /**\n * Enable or disable interactive control, this is on by default.\n * \n * @param {Boolean} flag - Indicate either interactive control \n * should be enabled or disabled.\n */\n this.setInteractiveControlEnable = flag => {\n if (flag == true)\n zincCameraControls.enable();\n else\n zincCameraControls.disable();\n }\n\n /**\n * Get the camera control of this scene.\n * @return {Zinc.CameraControls}\n */\n this.getZincCameraControls = () => {\n return zincCameraControls;\n }\n\n /**\n * Get the internal {THREE.Scene}.\n * @return {THREE.Scene}\n */\n this.getThreeJSScene = () => {\n return scene;\n }\n\n /**\n * Set the default duration value for geometries and glyphsets\n * that are to be loaded into this scene.\n * @param {Number} durationIn - duration of the scene.\n */\n this.setDuration = durationIn => {\n rootRegion.setDuration(durationIn);\n duration = durationIn;\n zincCameraControls.setPathDuration(durationIn);\n sceneLoader.duration = durationIn;\n }\n\n /**\n * Get the default duration value.\n * @return {Number}\n */\n this.getDuration = () => {\n return duration;\n }\n\n /**\n * Enable or disable stereo effect of this scene.\n * @param {Boolean} stereoFlag - Indicate either stereo effect control \n * should be enabled or disabled.\n */\n this.setStereoEffectEnable = stereoFlag => {\n if (stereoFlag == true) {\n if (!stereoEffect) {\n stereoEffect = new require('./controls').StereoEffect(rendererIn);\n }\n }\n rendererIn.setSize(getDrawingWidth(), getDrawingHeight());\n this.camera.updateProjectionMatrix();\n stereoEffectFlag = stereoFlag;\n }\n\n\n /**\n * Check rather object is in scene.\n * \n * @return {Boolean}\n */\n this.objectIsInScene = zincObject => {\n return rootRegion.objectIsInRegion(zincObject, true);\n }\n\n /**\n * Rotate the camera view to view the entirety of the \n * bounding box with a smooth transition within the providied\n * transitionTime.\n * \n * @param {THREE.Box3} boundingBox - the bounding box to target\n * @param {Number} transitionTime - Duration to perform the transition.\n */\n this.alignBoundingBoxToCameraView = (boundingBox, transitionTime) => {\n if (boundingBox) {\n const center = new THREE.Vector3();\n boundingBox.getCenter(center);\n const viewport = this.getZincCameraControls().getCurrentViewport();\n const target = new THREE.Vector3(viewport.targetPosition[0],\n viewport.targetPosition[1], viewport.targetPosition[2]);\n const eyePosition = new THREE.Vector3(viewport.eyePosition[0],\n viewport.eyePosition[1], viewport.eyePosition[2]);\n const newVec1 = new THREE.Vector3();\n const newVec2 = new THREE.Vector3();\n newVec1.subVectors(target, eyePosition).normalize();\n newVec2.subVectors(target, center).normalize();\n const newVec3 = new THREE.Vector3();\n newVec3.crossVectors(newVec1, newVec2);\n const angle = newVec1.angleTo(newVec2);\n if (transitionTime > 0) {\n this.getZincCameraControls().rotateCameraTransition(newVec3,\n angle, transitionTime);\n this.getZincCameraControls().enableCameraTransition();\n } else {\n this.getZincCameraControls().rotateAboutLookAtpoint(newVec3, angle);\n }\n markerCluster.markerUpdateRequired = true;\n }\n }\n\n\n /**\n * Translate the camera view to the center of the \n * bounding box with a smooth transition within the providied\n * transitionTime.\n * \n * @param {THREE.Box3} boundingBox - the bounding box to target\n * @param {Number} transitionTime - Duration to perform the transition.\n */\n this.translateBoundingBoxToCameraView = (boundingBox, scaleRadius, transitionTime) => {\n if (boundingBox) {\n const oldViewport = this.getZincCameraControls().getCurrentViewport();\n const viewport = this.getZincCameraControls().getViewportFromBoundingBox(boundingBox, scaleRadius);\n if (transitionTime > 0) {\n this.getZincCameraControls().cameraTransition(oldViewport,\n viewport, transitionTime);\n this.getZincCameraControls().enableCameraTransition();\n }\n markerCluster.markerUpdateRequired = true;\n }\n }\n\n /**\n * Transition the camera into viewing the zinc object with a \n * smooth transition within the providied transitionTime.\n * \n * @param {ZincObject} zincObject - the bounding box to target\n * @param {Number} transitionTime - Duration to perform the transition.\n */\n this.alignObjectToCameraView = (zincObject, transitionTime) => {\n if (this.objectIsInScene(zincObject)) {\n const boundingBox = zincObject.getBoundingBox();\n this.alignBoundingBoxToCameraView(boundingBox, transitionTime);\n }\n }\n\n /**\n * Set the camera to point to the centroid of the zinc object.\n * \n * @param {ZincObject} zincObject - the bounding box to target\n */\n this.setCameraTargetToObject = zincObject => {\n if (this.objectIsInScene(zincObject)) {\n const center = new THREE.Vector3();\n const boundingBox = zincObject.getBoundingBox();\n const viewport = this.getZincCameraControls().getCurrentViewport();\n boundingBox.getCenter(center);\n const target = new THREE.Vector3(viewport.targetPosition[0],\n viewport.targetPosition[1], viewport.targetPosition[2]);\n const eyePosition = new THREE.Vector3(viewport.eyePosition[0],\n viewport.eyePosition[1], viewport.eyePosition[2]);\n const newVec1 = new THREE.Vector3();\n const newVec2 = new THREE.Vector3();\n newVec1.subVectors(eyePosition, target);\n newVec2.addVectors(center, newVec1);\n viewport.eyePosition[0] = newVec2.x;\n viewport.eyePosition[1] = newVec2.y;\n viewport.eyePosition[2] = newVec2.z;\n viewport.targetPosition[0] = center.x;\n viewport.targetPosition[1] = center.y;\n viewport.targetPosition[2] = center.z;\n this.getZincCameraControls().setCurrentCameraSettings(viewport);\n markerCluster.markerUpdateRequired = true;\n }\n }\n\n /**\n * Check if stereo effect is enabled.\n * @returns {Boolean}\n */\n this.isStereoEffectEnable = () => {\n return stereoEffectFlag;\n }\n\n /**\n * Remove a ZincObject from this scene if it presents. This will eventually\n * destroy the object and free up the memory.\n * @param {Zinc.Object} zincObject - object to be removed from this scene.\n */\n this.removeZincObject = zincObject => {\n rootRegion.removeZincObject(zincObject);\n if (zincCameraControls) {\n zincCameraControls.calculateMaxAllowedDistance(this);\n }\n markerCluster.markerUpdateRequired = true;\n }\n\n /**\n * Update pickable objects list\n */\n this.updatePickableThreeJSObjects = () => {\n pickableObjectsList.length = 0;\n if (markerCluster.isEnabled) {\n pickableObjectsList.push(markerCluster.group);\n }\n rootRegion.getPickableThreeJSObjects(pickableObjectsList, true);\n this.forcePickableObjectsUpdate = false;\n }\n\n /**\n * Get all pickable objects.\n */\n this.getPickableThreeJSObjects = () => {\n //The list will only be updated if changes have been made\n //in region or a flag has been raise\n if (this.forcePickableObjectsUpdate || \n rootRegion.checkPickableUpdateRequred(true)) {\n this.updatePickableThreeJSObjects();\n }\n return pickableObjectsList;\n }\n\n /**\n * Get the Normalised coordinates on minimap if mouse event is\n * inside the minimap \n */\n this.getNormalisedMinimapCoordinates = (renderer, event) => {\n if (this.displayMinimap) {\n const target = new THREE.Vector2();\n renderer.getSize(target);\n let offsetY = target.y - event.clientY;\n if (((scissor.x + this.minimapScissor.width) > event.clientX) &&\n (event.clientX > scissor.x) && \n ((scissor.y + this.minimapScissor.height) > offsetY) &&\n (offsetY > scissor.y)) {\n let x = ((event.clientX - scissor.x) /\n this.minimapScissor.width) * 2.0 - 1.0;\n let y = ((offsetY - scissor.y) /\n this.minimapScissor.height) * 2.0 - 1.0;\n return {\"x\": x, \"y\": y};\n }\n }\n return undefined;\n }\n\n /**\n * Get the coordinates difference of the current viewing\n * point and projected coordinates.\n */\n this.getMinimapDiffFromNormalised = (x, y) => {\n if (minimap)\n return minimap.getDiffFromNormalised(x, y);\n return undefined;\n }\n\n this.isWebGL2 = () => {\n return rendererIn.isWebGL2();\n }\n\n /**\n * Remove all objects that are created with ZincJS APIs and it will free the memory allocated.\n * This does not remove obejcts that are added using the addObject APIs.\n */\n this.clearAll = () => {\n markerCluster.clear();\n rootRegion.clear(true);\n this.clearZincObjectAddedCallbacks();\n this.clearZincObjectRemovedCallbacks();\n sceneLoader.toBeDwonloaded = 0;\n if (zincCameraControls) {\n zincCameraControls.calculateMaxAllowedDistance(this);\n }\n markerCluster.markerUpdateRequired = true;\n }\n\n /**\n * All time stamp to the metadata TimeStamps field.\n */\n this.addMetadataTimeStamp = (key, time) => {\n metadata[\"TimeStamps\"][key] = convertDurationObjectTomSec(time);\n }\n \n /**\n * Get a specific metadata field.\n */\n this.getMetadataTag = key => {\n return metadata[key];\n }\n\n /**\n * Get all metadata set for the scene.\n */\n this.getMetadata = () => {\n return metadata;\n }\n\n /**\n * Set a specific metadata field.\n */\n this.setMetadataTag = (key, value) => {\n metadata[key] = value;\n }\n\n /**\n * Remove a specific metadata field.\n */\n this.removeMetadataTag = key => {\n delete metadata[key];\n }\n\n /**\n * Reset all metadata fields to original value.\n */\n this.resetMetadata = () => {\n metadata = defaultMetadata();\n }\n\n /**\n * Reset duration of scene to default value.\n */\n this.resetDuration = () => {\n this.setDuration(defaultDuration);\n }\n\n // Turn the object into a readable string {years: years,months: months, \n // weeks: weeks, days: days, hours: hours, mins: mins, secs: secs } \n const convertDurationObjectToString = duration => {\n return [\n ...(duration.years ? [`${duration.years}years`] : []),\n ...(duration.months ? [`${duration.months}months`] : []),\n ...(duration.weeks ? [`${duration.weeks}weeks`] : []),\n ...(duration.days ? [`${duration.days}days`] : []),\n ...(duration.hours ? [`${duration.hours}hours`] : []),\n ...(duration.mins ? [`${duration.mins}mins`] : []),\n ...(duration.secs ? [`${duration.secs}secs`] : []),\n ].join(' ');\n }\n\n // Turn the object into a number representing milliesecond {years: years,months: months, \n // weeks: weeks, days: days, hours: hours, mins: mins, secs: secs } \n const convertDurationObjectTomSec = duration => {\n return duration.years ? duration.years * 31536000000 : 0 +\n duration.months ? duration.months * 2592000000 : 0 +\n duration.weeks ? duration.weeks * 604800000 : 0 +\n duration.days ? duration.days * 86400000 : 0 +\n duration.hours ? duration.hours * 3600000 : 0 +\n duration.mins ? duration.mins * 60000 : 0 +\n duration.secs ? duration.secs * 1000 : 0;\n }\n\n // Set the readable duration and timer using an object\n // with the following format {years: years,months: months, weeks: weeks, days: days,\n // hours: hours, mins: mins, secs: secs } \n this.setDurationFromObject = duration => {\n const string = convertDurationObjectToString(duration);\n const millisec = convertDurationObjectTomSec(duration);\n this.setMetadataTag(\"Duration\", string);\n this.setDuration(millisec);\n }\n\n // Set the readable original duration using an object\n // with the following format {years: years,months: months, weeks: weeks, days: days,\n // hours: hours, mins: mins, secs: secs } \n this.setOriginalDurationFromObject = duration => {\n const string = convertDurationObjectToString(duration);\n this.setMetadataTag(\"OriginalDuration\", string);\n }\n\n /**\n * Export the scene in GLTF format, it can either return it in\n * string or binary form.\n * \n * @param {Boolean} binary - Indicate it should be exported as binary or\n * text.\n * \n * @return {Promise} The exported data if the promise resolve successfully\n */\n this.exportGLTF = (binary) => {\n const exporter = new SceneExporter(this);\n return exporter.exportGLTF(binary);\n }\n\n /**\n * Get the root region of the scene.\n * \n * @return {Region} Return the root region of the scene\n */\n this.getRootRegion = () => {\n return rootRegion;\n }\n\n /**\n * Create points in region specified in the path \n *\n */\n this.createLines = ( regionPath, groupName, coords, colour ) => {\n let region = rootRegion.findChildFromPath(regionPath);\n if (region === undefined) {\n region = rootRegion.createChildFromPath(regionPath);\n }\n return region.createLines(groupName, coords, colour);\n }\n\n /**\n * Create points in region specified in the path \n *\n */\n this.createPoints = ( regionPath, groupName, coords, labels, colour ) => {\n let region = rootRegion.findChildFromPath(regionPath);\n if (region === undefined) {\n region = rootRegion.createChildFromPath(regionPath);\n }\n return region.createPoints(groupName, coords, labels, colour);\n }\n\n\t/**\n\t * Add a callback function which will be called everytime zinc object is added.\n\t * @param {Function} callbackFunction - callbackFunction to be added.\n\t * \n\t * @return {Number}\n\t */\n\tthis.addZincObjectAddedCallbacks = callbackFunction => {\n\t\tzincObjectAddedCallbacks_id = zincObjectAddedCallbacks_id + 1;\n\t\tzincObjectAddedCallbacks[zincObjectAddedCallbacks_id] = callbackFunction;\n\t\treturn zincObjectAddedCallbacks_id;\n\t}\n\n\t/**\n\t * Add a callback function which will be called everytime zinc object is removed.\n\t * @param {Function} callbackFunction - callbackFunction to be added.\n\t * \n\t * @return {Number}\n\t */\n\tthis.addZincObjectRemovedCallbacks = callbackFunction => {\n\t\tzincObjectRemovedCallbacks_id = zincObjectRemovedCallbacks_id + 1;\n\t\tzincObjectRemovedCallbacks[zincObjectRemovedCallbacks_id] = callbackFunction;\n\t\treturn zincObjectRemovedCallbacks_id;\n\t}\n\t\n\t/**\n\t * Remove a callback function that is previously added to the scene.\n\t * @param {Number} id - identifier of the previously added callback function.\n\t */\n\tthis.removeZincObjectAddedCallbacks = id => {\n\t\tif (id in zincObjectAddedCallbacks_id) {\n \t\t\tdelete zincObjectAddedCallbacks[id];\n\t\t}\n\t}\n\n\t/**\n\t * Remove a callback function that is previously added to the scene.\n\t * @param {Number} id - identifier of the previously added callback function.\n\t */\n\tthis.removeZincObjectRemovedCallbacks = id => {\n\t\tif (id in zincObjectRemovedCallbacks_id) {\n \t\t\tdelete zincObjectRemovedCallbacks[id];\n\t\t}\n\t}\n\n /**\n\t * Clear all zinc object callback function\n\t */\n\tthis.clearZincObjectAddedCallbacks = () => {\n\t\tzincObjectAddedCallbacks = {};\n zincObjectAddedCallbacks_id = 0;\n\t}\n\n /**\n\t * Clear all zinc object callback function\n\t */\n\tthis.clearZincObjectRemovedCallbacks = () => {\n\t\tzincObjectRemovedCallbacks = {};\n zincObjectRemovedCallbacks_id = 0;\n\t}\n\n /**\n\t * Used to trigger zinc object added callback\n\t */\n this.triggerObjectAddedCallback = (zincObject) => {\n for (let key in zincObjectAddedCallbacks) {\n if (zincObjectAddedCallbacks.hasOwnProperty(key)) {\n zincObjectAddedCallbacks[key](zincObject);\n }\n }\n }\n\n /**\n\t * Used to trigger zinc object removed callback\n\t */\n this.triggerObjectRemovedCallback= (zincObject) => {\n for (let key in zincObjectRemovedCallbacks) {\n if (zincObjectRemovedCallbacks.hasOwnProperty(key)) {\n zincObjectRemovedCallbacks[key](zincObject);\n }\n }\n }\n\n /*\n\t * Add temporary points to the scene which can be removed\n * with clearTemporaryPrimitives method.\n\t */\n this.addTemporaryPoints = (coords, colour) => {\n const geometry = createBufferGeometry(coords.length, coords);\n let material = new THREE.PointsMaterial({ alphaTest: 0.5, size: 15,\n color: colour, sizeAttenuation: false });\n const texture = getCircularTexture();\n material.map = texture;\n let point = new (require('./three/Points').Points)(geometry, material);\n tempGroup.add(point);\n return point;\n }\n\n /*\n\t * Add temporary lines to the scene which can be removed\n * with clearTemporaryPrimitives method.\n\t */\n this.addTemporaryLines = (coords, colour) => {\n const geometry = createBufferGeometry(coords.length, coords);\n const material = new THREE.LineBasicMaterial({color:colour});\n const line = new (require(\"./three/line/LineSegments\").LineSegments)(geometry, material);\n tempGroup.add(line);\n return line;\n }\n\n /*\n\t * Remove object from temporary objects list\n\t */\n this.removeTemporaryPrimitive = (object) => {\n tempGroup.remove(object);\n object.geometry.dispose();\n object.material.dispose();\n }\n\n /*\n\t * Remove all temporary primitives.\n * Return number of primitives removed;\n\t */\n this.clearTemporaryPrimitives = () => {\n let i = 0;\n const children = tempGroup.children;\n children.forEach(child => {\n child.geometry.dispose();\n child.material.dispose();\n i++;\n });\n tempGroup.clear();\n return i;\n }\n\n /*\n\t * Create primitive based on the bounding box of scene and\n * add to specify region and group name.\n\t */\n this.addBoundingBoxPrimitive = (regionPath, group, colour, opacity,\n visibility, boundingBox = undefined) => {\n let region = rootRegion.findChildFromPath(regionPath);\n if (region === undefined) {\n region = rootRegion.createChildFromPath(regionPath);\n }\n const box = boundingBox ? boundingBox : this.getBoundingBox();\n const dim = new THREE.Vector3().subVectors(box.max, box.min);\n const boxGeo = new THREE.BoxGeometry(dim.x, dim.y, dim.z);\n const primitive = region.createGeometryFromThreeJSGeometry(\n group, boxGeo, colour, opacity, visibility, 10000);\n dim.addVectors(box.min, box.max).multiplyScalar( 0.5 );\n primitive.setPosition(dim.x, dim.y, dim.z);\n return primitive;\n }\n\n /*\n\t * Create primitive based on the bounding box of scene and\n * add to specify region and group name.\n\t */\n this.addSlicesPrimitive = (regionPath, groups, colours, opacity,\n visibility, boundingBox = undefined) => {\n if (groups && groups.length >= 3 &&\n colours && colours.length >= 3) {\n let region = rootRegion.findChildFromPath(regionPath);\n if (region === undefined) {\n region = rootRegion.createChildFromPath(regionPath);\n }\n const box = boundingBox ? boundingBox : this.getBoundingBox();\n const dim = new THREE.Vector3().subVectors(box.max, box.min);\n const directions = [\"x\", \"y\", \"z\"];\n const primitives = [];\n let index = 0;\n directions.forEach((direction) => {\n let planeGeo = undefined;\n switch(direction) {\n //YZ plane\n case \"x\":\n planeGeo = new THREE.PlaneGeometry(dim.z, dim.y);\n planeGeo.rotateY(Math.PI / 2);\n // code block\n break;\n //XZ plane\n case \"y\":\n planeGeo = new THREE.PlaneGeometry(dim.x, dim.z);\n planeGeo.rotateX(Math.PI / 2);\n // code block\n break;\n //XY plane\n case \"z\":\n planeGeo = new THREE.PlaneGeometry(dim.x, dim.y);\n // code block\n break;\n default:\n break;\n }\n const primitive = region.createGeometryFromThreeJSGeometry(\n groups[index], planeGeo, colours[index], opacity, visibility, 10001);\n primitives.push(primitive);\n index++;\n });\n\n dim.addVectors(box.min, box.max).multiplyScalar( 0.5 );\n primitives.forEach((primitive) => {\n primitive.setPosition(dim.x, dim.y, dim.z);\n });\n return primitives;\n }\n }\n\n /*\n\t * Enable marker cluster to work with markers\n\t */\n this.enableMarkerCluster = (flag) => {\n if (flag) {\n markerCluster.markerUpdateRequired = true;\n markerCluster.enable();\n } else {\n markerCluster.markerUpdateRequired = false;\n markerCluster.disable();\n }\n this.forcePickableObjectsUpdate = true;\n }\n}\n\n\n","const THREE = require('three');\nconst markerImage = new Image(128, 128);\nmarkerImage.src = require(\"../assets/mapMarkerOrange.svg\");\nconst texture = new THREE.Texture();\ntexture.image = markerImage;\ntexture.needsUpdate = true;\nconst size = [0.02, 0.03, 1];\nconst spriteMaterial = new THREE.SpriteMaterial({\n map: texture,\n alphaTest: 0.5,\n transparent: true,\n depthTest: false,\n depthWrite: false,\n sizeAttenuation: false\n});\nconst createNewSpriteText = require('../utilities').createNewSpriteText;\n\n/**\n * A special graphics type with a tear drop shape.\n * It forms a cluster a marker based on distance.\n * \n * @class\n * @author Alan Wu\n * @return {Marker}\n */\nconst MarkerCluster = function(sceneIn) {\n (require('./zincObject').ZincObject).call(this);\n this.texture = texture;\n let sprite = undefined;\n let scene = sceneIn;\n this.morph = new THREE.Group();\n this.group = this.morph;\n this.isMarkerCluster = true;\n let enabled = true;\n let sprites = [];\n this.markers = {};\n let _v21 = new THREE.Vector2();\n let _v22 = new THREE.Vector2();\n let _radius = 0.1;\n let start = Date.now();\n\n /**\n * Set the size of the marker.\n * \n * @param {Number} size - size to be set.\n */ \n this.setSpriteSize = size => {\n sprite.scale.set(0.015, 0.02, 1);\n sprite.scale.multiplyScalar(size);\n }\n\n this.clear = () => {\n this.group.clear();\n this.markers = {};\n }\n\n /**\n * Clean up this object,\n */ \n this.dispose = () => {\n this.clear();\n if (this.morph) {\n this.morph.clear();\n }\n }\n\n const createNewSprite = (index) => {\n //Group is needed to set the position after scaling\n //the sprite\n const localGroup = new THREE.Group();\n const sprite = new THREE.Sprite(spriteMaterial);\n sprite.clusterIndex = index;\n sprite.center.set(0.5, 0);\n sprite.position.set(0, 0, 0);\n sprite.renderOrder = 10000;\n sprite.scale.set(size[0], size[1], size[2]);\n sprite.userData = this;\n localGroup.add(sprite);\n this.group.add(localGroup);\n return {\n \"group\": localGroup,\n \"marker\": sprite,\n \"label\": undefined,\n \"number\": 0,\n \"min\": [0, 0, 0],\n \"max\": [1, 1, 1],\n };\n }\n\n const activateSpriteForCluster = (sprite, cluster, number) => {\n sprite.group.visible = true;\n sprite.group.position.set(\n cluster.coords[0], cluster.coords[1], cluster.coords[2]\n );\n if (sprite.label === undefined || (number !== sprite.number)) {\n if (sprite.label) {\n sprite.group.remove(sprite.label);\n sprite.label.material.map.dispose();\n sprite.label.material.dispose();\n }\n sprite.label = createNewSpriteText(number, 0.012, \"black\", \"Asap\", 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,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0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5kIiAvPgo8L2c+CgkJPGcgdHJhbnNmb3JtPSJtYXRyaXgoMy44MiAwIDAgMy44MiAwIC0xMDAuNzcpIiAgPgo8Y2lyY2xlIHN0eWxlPSJzdHJva2U6IHJnYigwLDAsMCk7IHN0cm9rZS13aWR0aDogMDsgc3Ryb2tlLWRhc2hhcnJheTogbm9uZTsgc3Ryb2tlLWxpbmVjYXA6IGJ1dHQ7IHN0cm9rZS1kYXNob2Zmc2V0OiAwOyBzdHJva2UtbGluZWpvaW46IG1pdGVyOyBzdHJva2UtbWl0ZXJsaW1pdDogNDsgZmlsbDogcmdiKDI1NSwyNTUsMjU1KTsgZmlsbC1ydWxlOiBub256ZXJvOyBvcGFjaXR5OiAxOyIgdmVjdG9yLWVmZmVjdD0ibm9uLXNjYWxpbmctc3Ryb2tlIiAgY3g9IjAiIGN5PSIwIiByPSIzNSIgLz4KPC9nPgo8L2c+CjwvZz4KPC9zdmc+\"","const THREE = require('three');\nconst resolveURL = require('./utilities').resolveURL;\nconst createNewURL = require('./utilities').createNewURL;\n\nconst STLLoader = require('./loaders/STLLoader').STLLoader;\nconst OBJLoader = require('./loaders/OBJLoader').OBJLoader;\nconst PrimitivesLoader = require('./loaders/primitivesLoader').PrimitivesLoader;\n\n/**\n * A helper class to help with reading / importing primitives and\n * settings into a {@link Scene}.\n * \n * @class\n * @param {Object} containerIn - Container to create the renderer on.\n * @author Alan Wu\n * @return {SceneLoader}\n */\nexports.SceneLoader = function (sceneIn) {\n const scene = sceneIn;\n this.toBeDownloaded = 0;\n this.progressMap = {};\n let viewLoaded = false;\n let errorDownload = false;\n const primitivesLoader = new PrimitivesLoader();\n /**\n * This function returns a three component array, which contains\n * [totalsize, totalLoaded and errorDownload] of all the downloads happening\n * in this scene.\n * @returns {Array} \n */\n this.getDownloadProgress = () => {\n let totalSize = 0;\n let totalLoaded = 0;\n let unknownFound = false;\n\n for (const key in this.progressMap) {\n const progress = this.progressMap[key];\n\n totalSize += progress[1];\n totalLoaded += progress[0];\n\n if (progress[1] == 0)\n unknownFound = true;\n }\n if (unknownFound) {\n totalSize = 0;\n }\n return [ totalSize, totalLoaded, errorDownload ];\n }\n\n //Stores the current progress of downloads\n this.onProgress = id => {\n return xhr => {\n this.progressMap[id] = [ xhr.loaded, xhr.total ];\n };\n }\n\n this.onError = finishCallback => {\n return xhr => {\n this.toBeDownloaded = this.toBeDownloaded - 1;\n errorDownload = true;\n console.error(`There is an issue with one of the external resource: ${xhr?.responseURL}.`);\n if (finishCallback) {\n finishCallback();\n }\n }\n };\n\n let loadMultipleViews = (referenceURL, views) => {\n const defaultView = views.Default;\n if (views.Inline) {\n scene.setupMultipleViews(defaultView, views.Entries);\n } else {\n const promises = [];\n for (const [key, value] of Object.entries(views.Entries)) {\n if (referenceURL) {\n newURL = createNewURL(value, referenceURL);\n promises.push(new Promise((resolve, reject) => {\n // Add parameters if we are sent them\n fetch(newURL)\n .then(response => response.json())\n .then(data => resolve({key: key, data: data}))\n .catch(data => reject(data));\n }));\n }\n }\n Promise.all(promises)\n .then(values => {\n const entries = {};\n values.forEach(entry => {\n entries[entry.key] = entry.data;\n });\n scene.setupMultipleViews(defaultView, entries);\n let zincCameraControls = scene.getZincCameraControls();\n if (zincCameraControls)\n zincCameraControls.setCurrentViewport(defaultView);\n viewLoaded = true;\n });\n }\n }\n\n /**\n * Load the viewport from an external location provided by the url.\n * @param {String} URL - address to the file containing viewport information.\n */\n this.loadViewURL = (url, finishCallback) => {\n this.toBeDownloaded += 1;\n const xmlhttp = new XMLHttpRequest();\n xmlhttp.onreadystatechange = () => {\n if (xmlhttp.readyState == 4) {\n if(xmlhttp.status == 200) {\n const viewData = JSON.parse(xmlhttp.responseText);\n scene.setupMultipleViews(\"default\", { \"default\" : viewData });\n scene.resetView();\n viewLoaded = true;\n --this.toBeDownloaded;\n if (finishCallback != undefined && (typeof finishCallback == 'function'))\n finishCallback();\n } else {\n this.onError();\n }\n }\n }\n const requestURL = resolveURL(url);\n xmlhttp.open(\"GET\", requestURL, true);\n xmlhttp.send();\n }\n\n/**\n * Load a legacy model(s) format with the provided URLs and parameters. This only loads the geometry\n * without any of the metadata. Therefore, extra parameters should be provided.\n * \n * @deprecated\n */\n this.loadModelsURL = (region, urls, colours, opacities, timeEnabled, morphColour, finishCallback) => {\n const number = urls.length;\n this.toBeDownloaded += number;\n for (let i = 0; i < number; i++) {\n const filename = urls[i];\n let colour = require('./zinc').defaultMaterialColor;\n let opacity = require('./zinc').defaultOpacity;\n if (colours != undefined && colours[i] != undefined)\n colour = colours[i] ? true : false;\n if (opacities != undefined && opacities[i] != undefined)\n opacity = opacities[i];\n let localTimeEnabled = 0;\n if (timeEnabled != undefined && timeEnabled[i] != undefined)\n localTimeEnabled = timeEnabled[i] ? true : false;\n let localMorphColour = 0;\n if (morphColour != undefined && morphColour[i] != undefined)\n localMorphColour = morphColour[i] ? true : false;\n primitivesLoader.load(resolveURL(filename), meshloader(region, colour, opacity, localTimeEnabled, localMorphColour, undefined, undefined,\n undefined, undefined, finishCallback), this.onProgress(filename), this.onError(finishCallback));\n }\n }\n\n /**\n * Load a legacy file format containing the viewport and its meta file from an external \n * location provided by the url. Use the new metadata format with\n * {@link Zinc.SceneLoader.#loadMetadataURL} instead.\n * \n * @param {String} URL - address to the file containing viewport and model information.\n * @deprecated\n */\n this.loadFromViewURL = (targetRegion, jsonFilePrefix, finishCallback) => {\n const xmlhttp = new XMLHttpRequest();\n xmlhttp.onreadystatechange = () => {\n if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {\n const viewData = JSON.parse(xmlhttp.responseText);\n scene.loadView(viewData);\n const urls = [];\n const filename_prefix = jsonFilePrefix + \"_\";\n for (let i = 0; i < viewData.numberOfResources; i++) {\n const filename = filename_prefix + (i + 1) + \".json\";\n urls.push(filename);\n }\n this.loadModelsURL(targetRegion, urls, viewData.colour, viewData.opacity, viewData.timeEnabled, viewData.morphColour, finishCallback);\n }\n }\n const requestURL = resolveURL(jsonFilePrefix + \"_view.json\");\n xmlhttp.open(\"GET\", requestURL, true);\n xmlhttp.send();\n }\n\n //Internal loader for a regular zinc geometry.\n const linesloader = (region, localTimeEnabled, localMorphColour, groupName,\n anatomicalId, renderOrder, lod, finishCallback) => {\n return (geometry, materials) => {\n const newLines = new (require('./primitives/lines').Lines)();\n let material = undefined;\n if (materials && materials[0]) {\n material = new THREE.LineBasicMaterial({color:materials[0].color.clone()});\n if (1.0 > materials[0].opacity) {\n material.transparent = true;\n }\n material.opacity = materials[0].opacity;\n material.morphTargets = localTimeEnabled;\n material.vertexColors = materials[0].vertexColors;\n }\n let options = {};\n options.localTimeEnabled = localTimeEnabled;\n options.localMorphColour = localMorphColour;\n if (newLines) {\n newLines.createLineSegment(geometry, material, options);\n newLines.setName(groupName);\n newLines.anatomicalId = anatomicalId;\n newLines.setRenderOrder(renderOrder);\n region.addZincObject(newLines);\n newLines.setDuration(scene.getDuration());\n console.log(lod)\n if (lod && lod.levels) {\n for (const [key, value] of Object.entries(lod.levels)) {\n \n newLines.addLOD(primitivesLoader, key, value.URL, value.Index, lod.preload);\n }\n }\n }\n --this.toBeDownloaded;\n geometry.dispose();\n if (finishCallback != undefined && (typeof finishCallback == 'function'))\n finishCallback(newLines);\n };\n } \n\n /**\n * Load lines into this scene object.\n * \n * @param {Boolean} timeEnabled - Indicate if morphing is enabled.\n * @param {Boolean} morphColour - Indicate if color morphing is enabled.\n * @param {STRING} groupName - name to assign the pointset's groupname to.\n * @param {Function} finishCallback - Callback function which will be called\n * once the glyphset is succssfully load in.\n */\n this.loadLinesURL = (region, url, timeEnabled, morphColour, groupName, finishCallback, options) => {\n\t let localTimeEnabled = 0;\n this.toBeDownloaded += 1;\n let isInline = (options && options.isInline) ? options.isInline : false;\n let anatomicalId = (options && options.anatomicalId) ? options.anatomicalId : undefined;\n let renderOrder = (options && options.renderOrder) ? options.renderOrder : undefined;\n\t if (timeEnabled != undefined)\n\t\t localTimeEnabled = timeEnabled ? true : false;\n\t let localMorphColour = 0;\n\t if (morphColour != undefined)\n\t\t localMorphColour = morphColour ? true : false;\n if (isInline) {\n let object = primitivesLoader.parse( url );\n (linesloader(region, localTimeEnabled, localMorphColour, groupName, anatomicalId,\n renderOrder, options.lod, finishCallback))( object.geometry, object.materials );\n } else {\n primitivesLoader.load(url, linesloader(region, localTimeEnabled, localMorphColour, groupName, \n anatomicalId, renderOrder, options.lod, finishCallback), this.onProgress(url), this.onError(finishCallback),\n options.loaderOptions);\n }\n }\n\n const loadGlyphset = (region, glyphsetData, glyphurl, groupName, finishCallback, options) => {\n let isInline = (options && options.isInline) ? options.isInline : undefined;\n let anatomicalId = (options && options.anatomicalId) ? options.anatomicalId : undefined;\n let displayLabels = (options && options.displayLabels) ? options.displayLabels : undefined;\n let renderOrder = (options && options.renderOrder) ? options.renderOrder : undefined;\n const newGlyphset = new (require('./primitives/glyphset').Glyphset)();\n newGlyphset.setDuration(scene.getDuration());\n newGlyphset.groupName = groupName;\n let myCallback = () => {\n --this.toBeDownloaded;\n if (finishCallback != undefined && (typeof finishCallback == 'function'))\n finishCallback(newGlyphset);\n }\n ++this.toBeDownloaded;\n if (isInline) {\n newGlyphset.load(glyphsetData, glyphurl, myCallback, isInline, displayLabels);\n }\n else {\n newGlyphset.load(glyphsetData, resolveURL(glyphurl), myCallback, isInline, displayLabels);\n }\n newGlyphset.anatomicalId = anatomicalId;\n newGlyphset.setRenderOrder(renderOrder);\n region.addZincObject(newGlyphset);\n };\n\n //Load a glyphset into this scene.\n const onLoadGlyphsetReady = (region, xmlhttp, glyphurl, groupName, finishCallback, options) => {\n return () => {\n if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {\n const glyphsetData = JSON.parse(xmlhttp.responseText);\n loadGlyphset(region, glyphsetData, glyphurl, groupName, finishCallback, options);\n }\n };\n };\n\n //Internal loader for zinc pointset.\n const pointsetloader = (region, localTimeEnabled, localMorphColour, groupName, anatomicalId, renderOrder, finishCallback) => {\n return (geometry, materials) => {\n const newPointset = new (require('./primitives/pointset').Pointset)();\n let material = new THREE.PointsMaterial({ alphaTest: 0.5, size: 10, sizeAttenuation: false });\n if (materials && materials[0]) {\n if (1.0 > materials[0].opacity) {\n material.transparent = true;\n }\n material.opacity = materials[0].opacity;\n material.color = materials[0].color;\n material.morphTargets = localTimeEnabled;\n material.vertexColors = materials[0].vertexColors;\n }\n let options = {};\n options.localTimeEnabled = localTimeEnabled;\n options.localMorphColour = localMorphColour;\n if (newPointset) {\n newPointset.createMesh(geometry, material, options);\n newPointset.setName(groupName);\n newPointset.anatomicalId = anatomicalId;\n region.addZincObject(newPointset);\n newPointset.setDuration(scene.getDuration());\n newPointset.setRenderOrder(renderOrder);\n }\n geometry.dispose();\n --this.toBeDownloaded;\n if (finishCallback != undefined && (typeof finishCallback == 'function'))\n finishCallback(newPointset);\n };\n }\n\n /**\n * Read a STL file into this scene, the geometry will be presented as\n * {@link Zinc.Geometry}. \n * \n * @param {STRING} url - location to the STL file.\n * @param {STRING} groupName - name to assign the geometry's groupname to.\n * @param {Function} finishCallback - Callback function which will be called\n * once the STL geometry is succssfully loaded.\n */\n this.loadSTL = (region, url, groupName, finishCallback) => {\n this.toBeDownloaded += 1;\n const colour = require('./zinc').defaultMaterialColor;\n const opacity = require('./zinc').defaultOpacity;\n const loader = new STLLoader();\n loader.crossOrigin = \"Anonymous\";\n loader.load(resolveURL(url), meshloader(region, colour, opacity, false,\n false, groupName, undefined, undefined, undefined, finishCallback));\n }\n\n /**\n * Read a OBJ file into this scene, the geometry will be presented as\n * {@link Zinc.Geometry}. \n * \n * @param {STRING} url - location to the STL file.\n * @param {STRING} groupName - name to assign the geometry's groupname to.\n * @param {Function} finishCallback - Callback function which will be called\n * once the OBJ geometry is succssfully loaded.\n */\n this.loadOBJ = (region, url, groupName, finishCallback) => {\n this.toBeDownloaded += 1;\n const colour = require('./zinc').defaultMaterialColor;\n const opacity = require('./zinc').defaultOpacity;\n const loader = new OBJLoader();\n loader.crossOrigin = \"Anonymous\";\n loader.load(resolveURL(url), meshloader(region, colour, opacity, false,\n false, groupName, undefined, undefined, undefined, finishCallback));\n }\n\n /**\n * Load a geometry into this scene, this is a subsequent called from \n * {@link Zinc.Scene#loadMetadataURL}, although it can be used to read\n * in geometry into the scene externally.\n * \n * @param {String} url - regular json model file providing geometry.\n * @param {Boolean} timeEnabled - Indicate if geometry morphing is enabled.\n * @param {Boolean} morphColour - Indicate if color morphing is enabled.\n * @param {STRING} groupName - name to assign the geometry's groupname to.\n * @param {STRING} fileFormat - name supported formats are STL, OBJ and JSON.\n * @param {Function} finishCallback - Callback function which will be called\n * once the geometry is succssfully loaded in.\n */\n const loadSurfaceURL = (region ,url, timeEnabled, morphColour, groupName, finishCallback, options) => {\n this.toBeDownloaded += 1;\n const colour = require('./zinc').defaultMaterialColor;\n const opacity = require('./zinc').defaultOpacity;\n let localTimeEnabled = 0;\n let isInline = (options && options.isInline) ? options.isInline : false;\n let fileFormat = (options && options.fileFormat) ? options.fileFormat : undefined;\n let anatomicalId = (options && options.anatomicalId) ? options.anatomicalId : undefined;\n let renderOrder = (options && options.renderOrder) ? options.renderOrder : undefined;\n if (timeEnabled != undefined)\n localTimeEnabled = timeEnabled ? true : false;\n let localMorphColour = 0;\n if (morphColour != undefined)\n localMorphColour = morphColour ? true : false;\n let loader = primitivesLoader;\n if (fileFormat !== undefined) {\n if (fileFormat == \"STL\") {\n loader = new STLLoader();\n } else if (fileFormat == \"OBJ\") {\n loader = new OBJLoader();\n loader.crossOrigin = \"Anonymous\";\n loader.load(url, objloader(region, colour, opacity, localTimeEnabled,\n localMorphColour, groupName, anatomicalId, finishCallback), this.onProgress(url), this.onError,\n options.loaderOptions);\n return;\n }\n }\n if (isInline) {\n const object = primitivesLoader.parse( url );\n\t\t\t(meshloader(region, colour, opacity, localTimeEnabled,\n localMorphColour, groupName, anatomicalId, renderOrder, options, finishCallback))( object.geometry, object.materials );\n } else {\n loader.crossOrigin = \"Anonymous\";\n primitivesLoader.load(url, meshloader(region, colour, opacity, localTimeEnabled,\n localMorphColour, groupName, anatomicalId, renderOrder, options, finishCallback),\n this.onProgress(url), this.onError(finishCallback), options.loaderOptions);\n }\n };\n\n //Object to keep track of number of items downloaded and when all items are downloaded\n //allCompletedCallback is called\n const metaFinishCallback = function (numberOfDownloaded, finishCallback, allCompletedCallback) {\n let downloadedItem = 0;\n return zincObject => {\n downloadedItem = downloadedItem + 1;\n if (zincObject && (finishCallback != undefined) && (typeof finishCallback == 'function')) {\n finishCallback(zincObject);\n let zincCameraControls = scene.getZincCameraControls();\n if (zincCameraControls) {\n zincCameraControls.calculateMaxAllowedDistance(scene);\n }\n }\n if (downloadedItem == numberOfDownloaded) {\n if (viewLoaded === false)\n scene.viewAll();\n if (allCompletedCallback != undefined && (typeof allCompletedCallback == 'function'))\n allCompletedCallback();\n \n }\n };\n };\n\n /**\n * Load a pointset into this scene object.\n * \n * @param {Boolean} timeEnabled - Indicate if morphing is enabled.\n * @param {Boolean} morphColour - Indicate if color morphing is enabled.\n * @param {STRING} groupName - name to assign the pointset's groupname to.\n * @param {Function} finishCallback - Callback function which will be called\n * once the glyphset is succssfully load in.\n */\n this.loadPointsetURL = (region, url, timeEnabled, morphColour, groupName, finishCallback, options) => {\n let localTimeEnabled = 0;\n this.toBeDownloaded += 1;\n if (timeEnabled != undefined)\n localTimeEnabled = timeEnabled ? true : false;\n let localMorphColour = 0;\n if (morphColour != undefined)\n localMorphColour = morphColour ? true : false;\n let isInline = (options && options.isInline) ? options.isInline : false;\n let anatomicalId = (options && options.anatomicalId) ? options.anatomicalId : undefined;\n let renderOrder = (options && options.renderOrder) ? options.renderOrder : undefined;\n if (isInline) {\n const object = primitivesLoader.parse( url );\n (pointsetloader(region, localTimeEnabled, localMorphColour, groupName,\n anatomicalId, renderOrder, finishCallback))(object.geometry, object.materials );\n } else {\n primitivesLoader.load(url, pointsetloader(region, localTimeEnabled, localMorphColour,\n groupName, anatomicalId, renderOrder, finishCallback),\n this.onProgress(url), this.onError(finishCallback), options.loaderOptions);\n }\n }\n\n const loadTexture = (region, referenceURL, textureData, groupName, finishCallback, options) => {\n let isInline = (options && options.isInline) ? options.isInline : undefined;\n let anatomicalId = (options && options.anatomicalId) ? options.anatomicalId : undefined;\n let renderOrder = (options && options.renderOrder) ? options.renderOrder : undefined;\n let newTexture = undefined;\n if (textureData) {\n if (referenceURL && textureData.images && textureData.images.source) {\n const source = textureData.images.source;\n for (let i = 0; i < source.length; i++) {\n const newURL = createNewURL(source[i], referenceURL);\n textureData.images.source[i] = newURL;\n }\n }\n if (textureData.type === \"slides\") {\n newTexture = new (require('./primitives/textureSlides').TextureSlides)();\n }\n if (newTexture) {\n newTexture.groupName = groupName;\n let myCallback = () => {\n --this.toBeDownloaded;\n if (finishCallback != undefined && (typeof finishCallback == 'function'))\n finishCallback(newTexture);\n }\n ++this.toBeDownloaded;\n newTexture.load(textureData, myCallback, isInline);\n newTexture.anatomicalId = anatomicalId;\n newTexture.setRenderOrder(renderOrder);\n region.addZincObject(newTexture);\n }\n }\n };\n\n\n //Load a glyphset into this scene.\n const onLoadTextureReady = (region, xmlhttp, groupName, finishCallback, options) => {\n return () => {\n if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {\n const textureData = JSON.parse(xmlhttp.responseText);\n loadTexture(region, xmlhttp.responseURL, textureData, groupName, finishCallback, options);\n }\n };\n };\n\n /**\n * Load a texture into this scene object.\n * \n * @param {STRING} groupName - name to assign the pointset's groupname to.\n * @param {Function} finishCallback - Callback function which will be called\n * once the glyphset is succssfully load in.\n */\n this.loadTextureURL = (region, url, groupName, finishCallback, options) => {\n const isInline = (options && options.isInline) ? options.isInline : false;\n if (isInline) {\n loadTexture(region, undefined, url, groupName, finishCallback, options);\n } else {\n const xmlhttp = new XMLHttpRequest();\n xmlhttp.onreadystatechange = onLoadTextureReady(region, xmlhttp,\n groupName, finishCallback, options);\n xmlhttp.open(\"GET\", resolveURL(url), true);\n xmlhttp.send();\n }\n }\n\n /**\n * Load a glyphset into this scene object.\n * \n * @param {String} metaurl - Provide informations such as transformations, colours \n * and others for each of the glyph in the glyphsset.\n * @param {String} glyphurl - regular json model file providing geometry of the glyph.\n * @param {String} groupName - name to assign the glyphset's groupname to.\n * @param {Function} finishCallback - Callback function which will be called\n * once the glyphset is succssfully load in.\n */\n this.loadGlyphsetURL = (region, metaurl, glyphurl, groupName, finishCallback, options) => {\n const isInline = (options && options.isInline) ? options.isInline : false;\n if (isInline) {\n loadGlyphset(region, metaurl, glyphurl, groupName, finishCallback, options);\n } else {\n const xmlhttp = new XMLHttpRequest();\n xmlhttp.onreadystatechange = onLoadGlyphsetReady(region, xmlhttp, glyphurl,\n groupName, finishCallback, options);\n xmlhttp.open(\"GET\", resolveURL(metaurl), true);\n xmlhttp.send();\n }\n }\n\n /**\n * Add a user provided {THREE.Geometry} into the scene as zinc geometry.\n * \n * @param {Three.Geometry} geometry - The threejs geometry to be added as {@link Zinc.Geometry}.\n * @param {THREE.Color} color - Colour to be assigned to this geometry, overrided if materialIn is provided.\n * @param {Number} opacity - Opacity to be set for this geometry, overrided if materialIn is provided.\n * @param {Boolean} localTimeEnabled - Set this to true if morph geometry is present, overrided if materialIn is provided.\n * @param {Boolean} localMorphColour - Set this to true if morph colour is present, overrided if materialIn is provided.\n * @param {Boolean} external - Set this to true if morph geometry is present, overrided if materialIn is provided.\n * @param {Function} finishCallback - Callback once the geometry has been added succssfully.\n * @param {THREE.Material} materialIn - Material to be set for this geometry if it is present.\n * \n * @returns {Zinc.Geometry}\n */\n const addZincGeometry = (\n region,\n geometryIn,\n colour,\n opacity,\n localTimeEnabled,\n localMorphColour,\n finishCallback,\n materialIn,\n groupName\n ) => {\n let options = {};\n options.colour = colour;\n options.opacity = opacity;\n options.localTimeEnabled = localTimeEnabled;\n options.localMorphColour = localMorphColour\n const newGeometry = new (require('./primitives/geometry').Geometry)();\n newGeometry.createMesh(geometryIn, materialIn, options);\n if (newGeometry.getMorph()) {\n newGeometry.setName(groupName);\n if (region) region.addZincObject(newGeometry);\n newGeometry.setDuration(scene.getDuration());\n if (finishCallback != undefined && (typeof finishCallback == 'function'))\n finishCallback(newGeometry);\n if (newGeometry.videoHandler)\n scene.setVideoHandler(newGeometry.videoHandler);\n return newGeometry;\n }\n return undefined;\n }\n\n //Internal loader for a regular zinc geometry.\n const meshloader = (\n region,\n colour,\n opacity,\n localTimeEnabled,\n localMorphColour,\n groupName,\n anatomicalId,\n renderOrder,\n options,\n finishCallback\n ) => {\n return (geometry, materials) => {\n let material = undefined;\n if (materials && materials[0]) {\n material = materials[0];\n }\n const zincGeometry = addZincGeometry(region, geometry, colour, opacity, \n localTimeEnabled, localMorphColour, undefined, material, groupName, renderOrder);\n zincGeometry.anatomicalId = anatomicalId;\n zincGeometry.setRenderOrder(renderOrder);\n if (options.lod && options.lod.levels) {\n for (const [key, value] of Object.entries(options.lod.levels)) {\n zincGeometry.addLOD(primitivesLoader, key, value.URL, value.Index, options.lod.preload);\n }\n }\n --this.toBeDownloaded;\n geometry.dispose();\n if (finishCallback != undefined && (typeof finishCallback == 'function'))\n finishCallback(zincGeometry);\n };\n }\n\n //Turn ISO 8601 duration string into an array.\n const parseDuration = (durationString) => {\n const regex = /P(?:(\\d+)Y)?(?:(\\d+)M)?(?:(\\d+)W)?(?:(\\d+)D)?(?:T(?:(\\d+)H)?(?:(\\d+)M)?(?:(\\d+)S)?)?$/;\n const [, years, months, weeks, days, hours, mins, secs] = \n durationString.match(regex);\n return {years: years,months: months, weeks: weeks, days: days,\n hours: hours, mins: mins, secs: secs };\n }\n\n //Load settings from metadata item.\n this.loadSettings = (item) => {\n if (item) {\n //duration uses the ISO 8601 standard - PnYnMnDTnHnMnS\n if (item.Duration) {\n const duration = parseDuration(item.Duration);\n scene.setDurationFromObject(duration);\n }\n if (item.OriginalDuration) {\n const duration = parseDuration(item.OriginalDuration);\n scene.setOriginalDurationFromObject(duration);\n }\n if (item.TimeStamps) {\n for (const key in item.TimeStamps) {\n const time = parseDuration(item.TimeStamps[key]);\n scene.addMetadataTimeStamp(key, time);\n }\n }\n }\n }\n\n //Function to process each of the graphical metadata item except for view and\n //settings.\n const readPrimitivesItem = (region, referenceURL, item, order, finishCallback) => {\n if (item) {\n let newURL = undefined;\n let isInline = false;\n if (item.URL) {\n //Convert it into an array\n newURL = item.URL;\n if (referenceURL)\n newURL = createNewURL(newURL, referenceURL);\n } else if (item.Inline) {\n newURL = item.Inline.URL;\n isInline = true;\n }\n const lod = {};\n if (item.LOD && item.LOD.Levels) {\n lod.preload = item.LOD.Preload ? true : false;\n lod.levels = {};\n for (const [key, value] of Object.entries(item.LOD.Levels)) {\n lod.levels[key] = {};\n lod.levels[key][\"URL\"] = createNewURL(value.URL, referenceURL);\n lod.levels[key][\"Index\"] = value.Index;\n }\n }\n let groupName = item.GroupName;\n if (groupName === undefined || groupName === \"\") {\n groupName = \"_Unnamed\";\n }\n\n let options = {\n loaderOptions: {\n index: item.Index,\n },\n isInline: isInline,\n fileFormat: item.FileFormat,\n anatomicalId: item.AnatomicalId,\n compression: item.compression,\n lod: lod,\n renderOrder: order\n };\n \n switch (item.Type) {\n case \"Surfaces\":\n loadSurfaceURL(region, newURL, item.MorphVertices, item.MorphColours, groupName, finishCallback, options);\n break;\n case \"Glyph\":\n let newGeometryURL = undefined;\n if (!isInline) {\n newGeometryURL = item.GlyphGeometriesURL;\n newGeometryURL = createNewURL(item.GlyphGeometriesURL, referenceURL);\n } else {\n newGeometryURL = item.Inline.GlyphGeometriesURL;\n }\n if (item.DisplayLabels) {\n options.displayLabels = true;\n }\n this.loadGlyphsetURL(region, newURL, newGeometryURL, groupName, finishCallback, options);\n break;\n case \"Points\":\n this.loadPointsetURL(region, newURL, item.MorphVertices, item.MorphColours, groupName, finishCallback, options);\n break;\n case \"Lines\":\n this.loadLinesURL(region, newURL, item.MorphVertices, item.MorphColours, groupName, finishCallback, options);\n break;\n case \"Texture\":\n this.loadTextureURL(region, newURL, groupName, finishCallback, options);\n break;\n default:\n break;\n }\n }\n };\n\n //Function to read the view item first\n const readViewAndSettingsItem = (referenceURL, item, finishCallback) => {\n if (item) {\n let newURL = undefined;\n let isInline = false;\n if (item.URL) {\n newURL = item.URL;\n if (referenceURL)\n newURL = createNewURL(item.URL, referenceURL);\n } else if (item.Inline) {\n newURL = item.Inline.URL;\n isInline = true;\n }\n switch (item.Type) {\n case \"View\":\n if (isInline) {\n scene.setupMultipleViews(\"default\", { \"default\" : newURL});\n viewLoaded = true;\n if (finishCallback != undefined && (typeof finishCallback == 'function'))\n finishCallback();\n }\n else\n this.loadViewURL(newURL, finishCallback);\n break;\n case \"Settings\":\n this.loadSettings(item);\n break;\n default:\n break;\n }\n }\n };\n\n /**\n * Load GLTF into this scene object.\n * \n * @param {String} url - URL to the GLTF file\n * @param {Function} finishCallback - Callback function which will be called\n * once the glyphset is succssfully load in.\n */\n this.loadGLTF = (region, url, finishCallback, allCompletedCallback, options) => {\n const GLTFToZincJSLoader = new (require('./loaders/GLTFToZincJSLoader').GLTFToZincJSLoader)();\n GLTFToZincJSLoader.load(scene, region, url, finishCallback, allCompletedCallback, options);\n }\n\n let loadRegions = (currentRegion, referenceURL, regions, callback) => {\n if (regions.Primitives) {\n regions.Primitives.forEach(primitive => {\n let order = 1;\n if (primitive.Order)\n order = primitive.Order;\n readPrimitivesItem(currentRegion, referenceURL, primitive, order, callback);\n });\n }\n if (regions.Transformation) {\n currentRegion.setTransformation(regions.Transformation);\n }\n if (regions.Children) {\n for (const [regionName, value] of Object.entries(regions.Children)) {\n const childRegion = currentRegion.findOrCreateChildFromPath(regionName);\n if (childRegion) {\n loadRegions(childRegion, referenceURL, value, callback);\n }\n }\n }\n }\n\n let getNumberOfDownloadsInArray = (array, includeViews) => {\n if (Array.isArray(array)) {\n let count = 0;\n for (let i = 0; i < array.length; i++) {\n if (array[i].Type && (\n (includeViews && array[i].Type === \"View\") ||\n array[i].Type === \"Surfaces\" ||\n array[i].Type === \"Glyph\" ||\n array[i].Type === \"Points\" ||\n array[i].Type === \"Lines\" ||\n array[i].Type === \"Texture\"))\n {\n count++;\n }\n }\n return count;\n }\n return 0;\n }\n\n let getNumberOfObjectsInRegions = (regionJson) => {\n let counts = regionJson.Primitives ? \n getNumberOfDownloadsInArray(regionJson.Primitives, false) : 0;\n if (regionJson.Children) {\n Object.values(regionJson.Children).forEach(childRegion => {\n counts += getNumberOfObjectsInRegions(childRegion);\n });\n }\n return counts;\n }\n\n let getNumberOfObjects = (metadata) => {\n if (Array.isArray(metadata)) {\n return getNumberOfDownloadsInArray(metadata, true);\n } else if ((typeof metadata) === \"object\" && metadata !== null) {\n if (metadata.Version === \"2.0\") {\n return getNumberOfObjectsInRegions(metadata.Regions);\n }\n }\n }\n\n let readVersionOneRegionPath = (region, referenceURL, item, order, callback) => {\n let targetRegion = region;\n if (item.RegionPath && item.RegionPath !== \"\") {\n targetRegion = region.findOrCreateChildFromPath(item.RegionPath);\n }\n //Render order is set to i * 2 to account for front and back rendering\n readPrimitivesItem(targetRegion, referenceURL, item, order * 2, callback);\n }\n\n let loadVersionOne = (targetRegion, metadata, referenceURL, finishCallback, allCompletedCallback) => {\n let numberOfObjects = getNumberOfObjects(metadata);\n // view file does not receive callback\n let callback = new metaFinishCallback(numberOfObjects, finishCallback, allCompletedCallback);\n // Prioritise the view file and settings before loading anything else\n for (let i = 0; i < metadata.length; i++)\n readViewAndSettingsItem(referenceURL, metadata[i], callback);\n for (let i = 0; i < metadata.length; i++) {\n readVersionOneRegionPath(targetRegion, referenceURL, metadata[i], i, callback);\n }\n }\n\n let loadVersionTwo = (targetRegion, metadata, referenceURL, finishCallback, allCompletedCallback) => {\n let numberOfObjects = getNumberOfObjects(metadata);\n // view file does not receive callback\n let callback = new metaFinishCallback(numberOfObjects, finishCallback, allCompletedCallback);\n if (metadata.Settings)\n this.loadSettings(metadata.Settings);\n if (metadata.Views)\n loadMultipleViews(referenceURL, metadata.Views, referenceURL);\n if (metadata.Regions)\n loadRegions(targetRegion, referenceURL, metadata.Regions, callback);\n }\n\n /**\n * Load a metadata file from the provided URL into this scene. Once\n * succssful scene proceeds to read each items into scene for visualisations.\n * \n * @param {String} url - Location of the metafile\n * @param {Function} finishCallback - Callback function which will be called\n * for each glyphset and geometry that has been written in.\n */\n this.loadMetadataURL = (targetRegion, url, finishCallback, allCompletedCallback) => {\n const xmlhttp = new XMLHttpRequest();\n const requestURL = resolveURL(url);\n xmlhttp.onreadystatechange = () => {\n if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {\n scene.resetMetadata();\n scene.resetDuration();\n viewLoaded = false;\n let referenceURL = xmlhttp.responseURL;\n if (referenceURL === undefined)\n referenceURL = (new URL(requestURL)).href;\n const metadata = JSON.parse(xmlhttp.responseText);\n if (Array.isArray(metadata)) {\n loadVersionOne(targetRegion, metadata, referenceURL, finishCallback, allCompletedCallback);\n } else if (typeof metadata === \"object\" && metadata !== null) {\n if (metadata.Version == \"2.0\") {\n loadVersionTwo(targetRegion, metadata, referenceURL, finishCallback, allCompletedCallback);\n }\n }\n }\n }\n\n xmlhttp.open(\"GET\", requestURL, true);\n xmlhttp.send();\n }\n}\n","import {\n\tBufferAttribute,\n\tBufferGeometry,\n\tFileLoader,\n\tFloat32BufferAttribute,\n\tLoader,\n\tLoaderUtils,\n\tVector3\n} from 'three';\n\n/**\n * Description: A THREE loader for STL ASCII files, as created by Solidworks and other CAD programs.\n *\n * Supports both binary and ASCII encoded files, with automatic detection of type.\n *\n * The loader returns a non-indexed buffer geometry.\n *\n * Limitations:\n * Binary decoding supports \"Magics\" color format (http://en.wikipedia.org/wiki/STL_(file_format)#Color_in_binary_STL).\n * There is perhaps some question as to how valid it is to always assume little-endian-ness.\n * ASCII decoding assumes file is UTF-8.\n *\n * Usage:\n * const loader = new STLLoader();\n * loader.load( './models/stl/slotted_disk.stl', function ( geometry ) {\n * scene.add( new THREE.Mesh( geometry ) );\n * });\n *\n * For binary STLs geometry might contain colors for vertices. To use it:\n * // use the same code to load STL as above\n * if (geometry.hasColors) {\n * material = new THREE.MeshPhongMaterial({ opacity: geometry.alpha, vertexColors: true });\n * } else { .... }\n * const mesh = new THREE.Mesh( geometry, material );\n *\n * For ASCII STLs containing multiple solids, each solid is assigned to a different group.\n * Groups can be used to assign a different color by defining an array of materials with the same length of\n * geometry.groups and passing it to the Mesh constructor:\n *\n * const mesh = new THREE.Mesh( geometry, material );\n *\n * For example:\n *\n * const materials = [];\n * const nGeometryGroups = geometry.groups.length;\n *\n * const colorMap = ...; // Some logic to index colors.\n *\n * for (let i = 0; i < nGeometryGroups; i++) {\n *\n *\t\tconst material = new THREE.MeshPhongMaterial({\n *\t\t\tcolor: colorMap[i],\n *\t\t\twireframe: false\n *\t\t});\n *\n * }\n *\n * materials.push(material);\n * const mesh = new THREE.Mesh(geometry, materials);\n */\n\n\nclass STLLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setResponseType( 'arraybuffer' );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\n\t\tloader.load( url, function ( text ) {\n\n\t\t\ttry {\n\n\t\t\t\tonLoad( scope.parse( text ) );\n\n\t\t\t} catch ( e ) {\n\n\t\t\t\tif ( onError ) {\n\n\t\t\t\t\tonError( e );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( e );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t}\n\n\tparse( data ) {\n\n\t\tfunction isBinary( data ) {\n\n\t\t\tconst reader = new DataView( data );\n\t\t\tconst face_size = ( 32 / 8 * 3 ) + ( ( 32 / 8 * 3 ) * 3 ) + ( 16 / 8 );\n\t\t\tconst n_faces = reader.getUint32( 80, true );\n\t\t\tconst expect = 80 + ( 32 / 8 ) + ( n_faces * face_size );\n\n\t\t\tif ( expect === reader.byteLength ) {\n\n\t\t\t\treturn true;\n\n\t\t\t}\n\n\t\t\t// An ASCII STL data must begin with 'solid ' as the first six bytes.\n\t\t\t// However, ASCII STLs lacking the SPACE after the 'd' are known to be\n\t\t\t// plentiful. So, check the first 5 bytes for 'solid'.\n\n\t\t\t// Several encodings, such as UTF-8, precede the text with up to 5 bytes:\n\t\t\t// https://en.wikipedia.org/wiki/Byte_order_mark#Byte_order_marks_by_encoding\n\t\t\t// Search for \"solid\" to start anywhere after those prefixes.\n\n\t\t\t// US-ASCII ordinal values for 's', 'o', 'l', 'i', 'd'\n\n\t\t\tconst solid = [ 115, 111, 108, 105, 100 ];\n\n\t\t\tfor ( let off = 0; off < 5; off ++ ) {\n\n\t\t\t\t// If \"solid\" text is matched to the current offset, declare it to be an ASCII STL.\n\n\t\t\t\tif ( matchDataViewAt( solid, reader, off ) ) return false;\n\n\t\t\t}\n\n\t\t\t// Couldn't find \"solid\" text at the beginning; it is binary STL.\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\tfunction matchDataViewAt( query, reader, offset ) {\n\n\t\t\t// Check if each byte in query matches the corresponding byte from the current offset\n\n\t\t\tfor ( let i = 0, il = query.length; i < il; i ++ ) {\n\n\t\t\t\tif ( query[ i ] !== reader.getUint8( offset + i, false ) ) return false;\n\n\t\t\t}\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\tfunction parseBinary( data ) {\n\n\t\t\tconst reader = new DataView( data );\n\t\t\tconst faces = reader.getUint32( 80, true );\n\n\t\t\tlet r, g, b, hasColors = false, colors;\n\t\t\tlet defaultR, defaultG, defaultB, alpha;\n\n\t\t\t// process STL header\n\t\t\t// check for default color in header (\"COLOR=rgba\" sequence).\n\n\t\t\tfor ( let index = 0; index < 80 - 10; index ++ ) {\n\n\t\t\t\tif ( ( reader.getUint32( index, false ) == 0x434F4C4F /*COLO*/ ) &&\n\t\t\t\t\t( reader.getUint8( index + 4 ) == 0x52 /*'R'*/ ) &&\n\t\t\t\t\t( reader.getUint8( index + 5 ) == 0x3D /*'='*/ ) ) {\n\n\t\t\t\t\thasColors = true;\n\t\t\t\t\tcolors = new Float32Array( faces * 3 * 3 );\n\n\t\t\t\t\tdefaultR = reader.getUint8( index + 6 ) / 255;\n\t\t\t\t\tdefaultG = reader.getUint8( index + 7 ) / 255;\n\t\t\t\t\tdefaultB = reader.getUint8( index + 8 ) / 255;\n\t\t\t\t\talpha = reader.getUint8( index + 9 ) / 255;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconst dataOffset = 84;\n\t\t\tconst faceLength = 12 * 4 + 2;\n\n\t\t\tconst geometry = new BufferGeometry();\n\n\t\t\tconst vertices = new Float32Array( faces * 3 * 3 );\n\t\t\tconst normals = new Float32Array( faces * 3 * 3 );\n\n\t\t\tfor ( let face = 0; face < faces; face ++ ) {\n\n\t\t\t\tconst start = dataOffset + face * faceLength;\n\t\t\t\tconst normalX = reader.getFloat32( start, true );\n\t\t\t\tconst normalY = reader.getFloat32( start + 4, true );\n\t\t\t\tconst normalZ = reader.getFloat32( start + 8, true );\n\n\t\t\t\tif ( hasColors ) {\n\n\t\t\t\t\tconst packedColor = reader.getUint16( start + 48, true );\n\n\t\t\t\t\tif ( ( packedColor & 0x8000 ) === 0 ) {\n\n\t\t\t\t\t\t// facet has its own unique color\n\n\t\t\t\t\t\tr = ( packedColor & 0x1F ) / 31;\n\t\t\t\t\t\tg = ( ( packedColor >> 5 ) & 0x1F ) / 31;\n\t\t\t\t\t\tb = ( ( packedColor >> 10 ) & 0x1F ) / 31;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tr = defaultR;\n\t\t\t\t\t\tg = defaultG;\n\t\t\t\t\t\tb = defaultB;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tfor ( let i = 1; i <= 3; i ++ ) {\n\n\t\t\t\t\tconst vertexstart = start + i * 12;\n\t\t\t\t\tconst componentIdx = ( face * 3 * 3 ) + ( ( i - 1 ) * 3 );\n\n\t\t\t\t\tvertices[ componentIdx ] = reader.getFloat32( vertexstart, true );\n\t\t\t\t\tvertices[ componentIdx + 1 ] = reader.getFloat32( vertexstart + 4, true );\n\t\t\t\t\tvertices[ componentIdx + 2 ] = reader.getFloat32( vertexstart + 8, true );\n\n\t\t\t\t\tnormals[ componentIdx ] = normalX;\n\t\t\t\t\tnormals[ componentIdx + 1 ] = normalY;\n\t\t\t\t\tnormals[ componentIdx + 2 ] = normalZ;\n\n\t\t\t\t\tif ( hasColors ) {\n\n\t\t\t\t\t\tcolors[ componentIdx ] = r;\n\t\t\t\t\t\tcolors[ componentIdx + 1 ] = g;\n\t\t\t\t\t\tcolors[ componentIdx + 2 ] = b;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tgeometry.setAttribute( 'position', new BufferAttribute( vertices, 3 ) );\n\t\t\tgeometry.setAttribute( 'normal', new BufferAttribute( normals, 3 ) );\n\n\t\t\tif ( hasColors ) {\n\n\t\t\t\tgeometry.setAttribute( 'color', new BufferAttribute( colors, 3 ) );\n\t\t\t\tgeometry.hasColors = true;\n\t\t\t\tgeometry.alpha = alpha;\n\n\t\t\t}\n\n\t\t\treturn geometry;\n\n\t\t}\n\n\t\tfunction parseASCII( data ) {\n\n\t\t\tconst geometry = new BufferGeometry();\n\t\t\tconst patternSolid = /solid([\\s\\S]*?)endsolid/g;\n\t\t\tconst patternFace = /facet([\\s\\S]*?)endfacet/g;\n\t\t\tlet faceCounter = 0;\n\n\t\t\tconst patternFloat = /[\\s]+([+-]?(?:\\d*)(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)/.source;\n\t\t\tconst patternVertex = new RegExp( 'vertex' + patternFloat + patternFloat + patternFloat, 'g' );\n\t\t\tconst patternNormal = new RegExp( 'normal' + patternFloat + patternFloat + patternFloat, 'g' );\n\n\t\t\tconst vertices = [];\n\t\t\tconst normals = [];\n\n\t\t\tconst normal = new Vector3();\n\n\t\t\tlet result;\n\n\t\t\tlet groupCount = 0;\n\t\t\tlet startVertex = 0;\n\t\t\tlet endVertex = 0;\n\n\t\t\twhile ( ( result = patternSolid.exec( data ) ) !== null ) {\n\n\t\t\t\tstartVertex = endVertex;\n\n\t\t\t\tconst solid = result[ 0 ];\n\n\t\t\t\twhile ( ( result = patternFace.exec( solid ) ) !== null ) {\n\n\t\t\t\t\tlet vertexCountPerFace = 0;\n\t\t\t\t\tlet normalCountPerFace = 0;\n\n\t\t\t\t\tconst text = result[ 0 ];\n\n\t\t\t\t\twhile ( ( result = patternNormal.exec( text ) ) !== null ) {\n\n\t\t\t\t\t\tnormal.x = parseFloat( result[ 1 ] );\n\t\t\t\t\t\tnormal.y = parseFloat( result[ 2 ] );\n\t\t\t\t\t\tnormal.z = parseFloat( result[ 3 ] );\n\t\t\t\t\t\tnormalCountPerFace ++;\n\n\t\t\t\t\t}\n\n\t\t\t\t\twhile ( ( result = patternVertex.exec( text ) ) !== null ) {\n\n\t\t\t\t\t\tvertices.push( parseFloat( result[ 1 ] ), parseFloat( result[ 2 ] ), parseFloat( result[ 3 ] ) );\n\t\t\t\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\t\t\t\t\t\tvertexCountPerFace ++;\n\t\t\t\t\t\tendVertex ++;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// every face have to own ONE valid normal\n\n\t\t\t\t\tif ( normalCountPerFace !== 1 ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.STLLoader: Something isn\\'t right with the normal of face number ' + faceCounter );\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// each face have to own THREE valid vertices\n\n\t\t\t\t\tif ( vertexCountPerFace !== 3 ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.STLLoader: Something isn\\'t right with the vertices of face number ' + faceCounter );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfaceCounter ++;\n\n\t\t\t\t}\n\n\t\t\t\tconst start = startVertex;\n\t\t\t\tconst count = endVertex - startVertex;\n\n\t\t\t\tgeometry.addGroup( start, count, groupCount );\n\t\t\t\tgroupCount ++;\n\n\t\t\t}\n\n\t\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\t\tgeometry.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\n\t\t\treturn geometry;\n\n\t\t}\n\n\t\tfunction ensureString( buffer ) {\n\n\t\t\tif ( typeof buffer !== 'string' ) {\n\n\t\t\t\treturn LoaderUtils.decodeText( new Uint8Array( buffer ) );\n\n\t\t\t}\n\n\t\t\treturn buffer;\n\n\t\t}\n\n\t\tfunction ensureBinary( buffer ) {\n\n\t\t\tif ( typeof buffer === 'string' ) {\n\n\t\t\t\tconst array_buffer = new Uint8Array( buffer.length );\n\t\t\t\tfor ( let i = 0; i < buffer.length; i ++ ) {\n\n\t\t\t\t\tarray_buffer[ i ] = buffer.charCodeAt( i ) & 0xff; // implicitly assumes little-endian\n\n\t\t\t\t}\n\n\t\t\t\treturn array_buffer.buffer || array_buffer;\n\n\t\t\t} else {\n\n\t\t\t\treturn buffer;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// start\n\n\t\tconst binData = ensureBinary( data );\n\n\t\treturn isBinary( binData ) ? parseBinary( binData ) : parseASCII( ensureString( data ) );\n\n\t}\n\n}\n\nexport { STLLoader };\n","import {\n\tBufferGeometry,\n\tFileLoader,\n\tFloat32BufferAttribute,\n\tGroup,\n\tLineBasicMaterial,\n\tLineSegments,\n\tLoader,\n\tMaterial,\n\tMesh,\n\tMeshPhongMaterial,\n\tPoints,\n\tPointsMaterial,\n\tVector3\n} from 'three';\n\n// o object_name | g group_name\nconst _object_pattern = /^[og]\\s*(.+)?/;\n// mtllib file_reference\nconst _material_library_pattern = /^mtllib /;\n// usemtl material_name\nconst _material_use_pattern = /^usemtl /;\n// usemap map_name\nconst _map_use_pattern = /^usemap /;\n\nconst _vA = new Vector3();\nconst _vB = new Vector3();\nconst _vC = new Vector3();\n\nconst _ab = new Vector3();\nconst _cb = new Vector3();\n\nfunction ParserState() {\n\n\tconst state = {\n\t\tobjects: [],\n\t\tobject: {},\n\n\t\tvertices: [],\n\t\tnormals: [],\n\t\tcolors: [],\n\t\tuvs: [],\n\n\t\tmaterials: {},\n\t\tmaterialLibraries: [],\n\n\t\tstartObject: function ( name, fromDeclaration ) {\n\n\t\t\t// If the current object (initial from reset) is not from a g/o declaration in the parsed\n\t\t\t// file. We need to use it for the first parsed g/o to keep things in sync.\n\t\t\tif ( this.object && this.object.fromDeclaration === false ) {\n\n\t\t\t\tthis.object.name = name;\n\t\t\t\tthis.object.fromDeclaration = ( fromDeclaration !== false );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tconst previousMaterial = ( this.object && typeof this.object.currentMaterial === 'function' ? this.object.currentMaterial() : undefined );\n\n\t\t\tif ( this.object && typeof this.object._finalize === 'function' ) {\n\n\t\t\t\tthis.object._finalize( true );\n\n\t\t\t}\n\n\t\t\tthis.object = {\n\t\t\t\tname: name || '',\n\t\t\t\tfromDeclaration: ( fromDeclaration !== false ),\n\n\t\t\t\tgeometry: {\n\t\t\t\t\tvertices: [],\n\t\t\t\t\tnormals: [],\n\t\t\t\t\tcolors: [],\n\t\t\t\t\tuvs: [],\n\t\t\t\t\thasUVIndices: false\n\t\t\t\t},\n\t\t\t\tmaterials: [],\n\t\t\t\tsmooth: true,\n\n\t\t\t\tstartMaterial: function ( name, libraries ) {\n\n\t\t\t\t\tconst previous = this._finalize( false );\n\n\t\t\t\t\t// New usemtl declaration overwrites an inherited material, except if faces were declared\n\t\t\t\t\t// after the material, then it must be preserved for proper MultiMaterial continuation.\n\t\t\t\t\tif ( previous && ( previous.inherited || previous.groupCount <= 0 ) ) {\n\n\t\t\t\t\t\tthis.materials.splice( previous.index, 1 );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst material = {\n\t\t\t\t\t\tindex: this.materials.length,\n\t\t\t\t\t\tname: name || '',\n\t\t\t\t\t\tmtllib: ( Array.isArray( libraries ) && libraries.length > 0 ? libraries[ libraries.length - 1 ] : '' ),\n\t\t\t\t\t\tsmooth: ( previous !== undefined ? previous.smooth : this.smooth ),\n\t\t\t\t\t\tgroupStart: ( previous !== undefined ? previous.groupEnd : 0 ),\n\t\t\t\t\t\tgroupEnd: - 1,\n\t\t\t\t\t\tgroupCount: - 1,\n\t\t\t\t\t\tinherited: false,\n\n\t\t\t\t\t\tclone: function ( index ) {\n\n\t\t\t\t\t\t\tconst cloned = {\n\t\t\t\t\t\t\t\tindex: ( typeof index === 'number' ? index : this.index ),\n\t\t\t\t\t\t\t\tname: this.name,\n\t\t\t\t\t\t\t\tmtllib: this.mtllib,\n\t\t\t\t\t\t\t\tsmooth: this.smooth,\n\t\t\t\t\t\t\t\tgroupStart: 0,\n\t\t\t\t\t\t\t\tgroupEnd: - 1,\n\t\t\t\t\t\t\t\tgroupCount: - 1,\n\t\t\t\t\t\t\t\tinherited: false\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tcloned.clone = this.clone.bind( cloned );\n\t\t\t\t\t\t\treturn cloned;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\tthis.materials.push( material );\n\n\t\t\t\t\treturn material;\n\n\t\t\t\t},\n\n\t\t\t\tcurrentMaterial: function () {\n\n\t\t\t\t\tif ( this.materials.length > 0 ) {\n\n\t\t\t\t\t\treturn this.materials[ this.materials.length - 1 ];\n\n\t\t\t\t\t}\n\n\t\t\t\t\treturn undefined;\n\n\t\t\t\t},\n\n\t\t\t\t_finalize: function ( end ) {\n\n\t\t\t\t\tconst lastMultiMaterial = this.currentMaterial();\n\t\t\t\t\tif ( lastMultiMaterial && lastMultiMaterial.groupEnd === - 1 ) {\n\n\t\t\t\t\t\tlastMultiMaterial.groupEnd = this.geometry.vertices.length / 3;\n\t\t\t\t\t\tlastMultiMaterial.groupCount = lastMultiMaterial.groupEnd - lastMultiMaterial.groupStart;\n\t\t\t\t\t\tlastMultiMaterial.inherited = false;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// Ignore objects tail materials if no face declarations followed them before a new o/g started.\n\t\t\t\t\tif ( end && this.materials.length > 1 ) {\n\n\t\t\t\t\t\tfor ( let mi = this.materials.length - 1; mi >= 0; mi -- ) {\n\n\t\t\t\t\t\t\tif ( this.materials[ mi ].groupCount <= 0 ) {\n\n\t\t\t\t\t\t\t\tthis.materials.splice( mi, 1 );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// Guarantee at least one empty material, this makes the creation later more straight forward.\n\t\t\t\t\tif ( end && this.materials.length === 0 ) {\n\n\t\t\t\t\t\tthis.materials.push( {\n\t\t\t\t\t\t\tname: '',\n\t\t\t\t\t\t\tsmooth: this.smooth\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t}\n\n\t\t\t\t\treturn lastMultiMaterial;\n\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Inherit previous objects material.\n\t\t\t// Spec tells us that a declared material must be set to all objects until a new material is declared.\n\t\t\t// If a usemtl declaration is encountered while this new object is being parsed, it will\n\t\t\t// overwrite the inherited material. Exception being that there was already face declarations\n\t\t\t// to the inherited material, then it will be preserved for proper MultiMaterial continuation.\n\n\t\t\tif ( previousMaterial && previousMaterial.name && typeof previousMaterial.clone === 'function' ) {\n\n\t\t\t\tconst declared = previousMaterial.clone( 0 );\n\t\t\t\tdeclared.inherited = true;\n\t\t\t\tthis.object.materials.push( declared );\n\n\t\t\t}\n\n\t\t\tthis.objects.push( this.object );\n\n\t\t},\n\n\t\tfinalize: function () {\n\n\t\t\tif ( this.object && typeof this.object._finalize === 'function' ) {\n\n\t\t\t\tthis.object._finalize( true );\n\n\t\t\t}\n\n\t\t},\n\n\t\tparseVertexIndex: function ( value, len ) {\n\n\t\t\tconst index = parseInt( value, 10 );\n\t\t\treturn ( index >= 0 ? index - 1 : index + len / 3 ) * 3;\n\n\t\t},\n\n\t\tparseNormalIndex: function ( value, len ) {\n\n\t\t\tconst index = parseInt( value, 10 );\n\t\t\treturn ( index >= 0 ? index - 1 : index + len / 3 ) * 3;\n\n\t\t},\n\n\t\tparseUVIndex: function ( value, len ) {\n\n\t\t\tconst index = parseInt( value, 10 );\n\t\t\treturn ( index >= 0 ? index - 1 : index + len / 2 ) * 2;\n\n\t\t},\n\n\t\taddVertex: function ( a, b, c ) {\n\n\t\t\tconst src = this.vertices;\n\t\t\tconst dst = this.object.geometry.vertices;\n\n\t\t\tdst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] );\n\t\t\tdst.push( src[ b + 0 ], src[ b + 1 ], src[ b + 2 ] );\n\t\t\tdst.push( src[ c + 0 ], src[ c + 1 ], src[ c + 2 ] );\n\n\t\t},\n\n\t\taddVertexPoint: function ( a ) {\n\n\t\t\tconst src = this.vertices;\n\t\t\tconst dst = this.object.geometry.vertices;\n\n\t\t\tdst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] );\n\n\t\t},\n\n\t\taddVertexLine: function ( a ) {\n\n\t\t\tconst src = this.vertices;\n\t\t\tconst dst = this.object.geometry.vertices;\n\n\t\t\tdst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] );\n\n\t\t},\n\n\t\taddNormal: function ( a, b, c ) {\n\n\t\t\tconst src = this.normals;\n\t\t\tconst dst = this.object.geometry.normals;\n\n\t\t\tdst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] );\n\t\t\tdst.push( src[ b + 0 ], src[ b + 1 ], src[ b + 2 ] );\n\t\t\tdst.push( src[ c + 0 ], src[ c + 1 ], src[ c + 2 ] );\n\n\t\t},\n\n\t\taddFaceNormal: function ( a, b, c ) {\n\n\t\t\tconst src = this.vertices;\n\t\t\tconst dst = this.object.geometry.normals;\n\n\t\t\t_vA.fromArray( src, a );\n\t\t\t_vB.fromArray( src, b );\n\t\t\t_vC.fromArray( src, c );\n\n\t\t\t_cb.subVectors( _vC, _vB );\n\t\t\t_ab.subVectors( _vA, _vB );\n\t\t\t_cb.cross( _ab );\n\n\t\t\t_cb.normalize();\n\n\t\t\tdst.push( _cb.x, _cb.y, _cb.z );\n\t\t\tdst.push( _cb.x, _cb.y, _cb.z );\n\t\t\tdst.push( _cb.x, _cb.y, _cb.z );\n\n\t\t},\n\n\t\taddColor: function ( a, b, c ) {\n\n\t\t\tconst src = this.colors;\n\t\t\tconst dst = this.object.geometry.colors;\n\n\t\t\tif ( src[ a ] !== undefined ) dst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] );\n\t\t\tif ( src[ b ] !== undefined ) dst.push( src[ b + 0 ], src[ b + 1 ], src[ b + 2 ] );\n\t\t\tif ( src[ c ] !== undefined ) dst.push( src[ c + 0 ], src[ c + 1 ], src[ c + 2 ] );\n\n\t\t},\n\n\t\taddUV: function ( a, b, c ) {\n\n\t\t\tconst src = this.uvs;\n\t\t\tconst dst = this.object.geometry.uvs;\n\n\t\t\tdst.push( src[ a + 0 ], src[ a + 1 ] );\n\t\t\tdst.push( src[ b + 0 ], src[ b + 1 ] );\n\t\t\tdst.push( src[ c + 0 ], src[ c + 1 ] );\n\n\t\t},\n\n\t\taddDefaultUV: function () {\n\n\t\t\tconst dst = this.object.geometry.uvs;\n\n\t\t\tdst.push( 0, 0 );\n\t\t\tdst.push( 0, 0 );\n\t\t\tdst.push( 0, 0 );\n\n\t\t},\n\n\t\taddUVLine: function ( a ) {\n\n\t\t\tconst src = this.uvs;\n\t\t\tconst dst = this.object.geometry.uvs;\n\n\t\t\tdst.push( src[ a + 0 ], src[ a + 1 ] );\n\n\t\t},\n\n\t\taddFace: function ( a, b, c, ua, ub, uc, na, nb, nc ) {\n\n\t\t\tconst vLen = this.vertices.length;\n\n\t\t\tlet ia = this.parseVertexIndex( a, vLen );\n\t\t\tlet ib = this.parseVertexIndex( b, vLen );\n\t\t\tlet ic = this.parseVertexIndex( c, vLen );\n\n\t\t\tthis.addVertex( ia, ib, ic );\n\t\t\tthis.addColor( ia, ib, ic );\n\n\t\t\t// normals\n\n\t\t\tif ( na !== undefined && na !== '' ) {\n\n\t\t\t\tconst nLen = this.normals.length;\n\n\t\t\t\tia = this.parseNormalIndex( na, nLen );\n\t\t\t\tib = this.parseNormalIndex( nb, nLen );\n\t\t\t\tic = this.parseNormalIndex( nc, nLen );\n\n\t\t\t\tthis.addNormal( ia, ib, ic );\n\n\t\t\t} else {\n\n\t\t\t\tthis.addFaceNormal( ia, ib, ic );\n\n\t\t\t}\n\n\t\t\t// uvs\n\n\t\t\tif ( ua !== undefined && ua !== '' ) {\n\n\t\t\t\tconst uvLen = this.uvs.length;\n\n\t\t\t\tia = this.parseUVIndex( ua, uvLen );\n\t\t\t\tib = this.parseUVIndex( ub, uvLen );\n\t\t\t\tic = this.parseUVIndex( uc, uvLen );\n\n\t\t\t\tthis.addUV( ia, ib, ic );\n\n\t\t\t\tthis.object.geometry.hasUVIndices = true;\n\n\t\t\t} else {\n\n\t\t\t\t// add placeholder values (for inconsistent face definitions)\n\n\t\t\t\tthis.addDefaultUV();\n\n\t\t\t}\n\n\t\t},\n\n\t\taddPointGeometry: function ( vertices ) {\n\n\t\t\tthis.object.geometry.type = 'Points';\n\n\t\t\tconst vLen = this.vertices.length;\n\n\t\t\tfor ( let vi = 0, l = vertices.length; vi < l; vi ++ ) {\n\n\t\t\t\tconst index = this.parseVertexIndex( vertices[ vi ], vLen );\n\n\t\t\t\tthis.addVertexPoint( index );\n\t\t\t\tthis.addColor( index );\n\n\t\t\t}\n\n\t\t},\n\n\t\taddLineGeometry: function ( vertices, uvs ) {\n\n\t\t\tthis.object.geometry.type = 'Line';\n\n\t\t\tconst vLen = this.vertices.length;\n\t\t\tconst uvLen = this.uvs.length;\n\n\t\t\tfor ( let vi = 0, l = vertices.length; vi < l; vi ++ ) {\n\n\t\t\t\tthis.addVertexLine( this.parseVertexIndex( vertices[ vi ], vLen ) );\n\n\t\t\t}\n\n\t\t\tfor ( let uvi = 0, l = uvs.length; uvi < l; uvi ++ ) {\n\n\t\t\t\tthis.addUVLine( this.parseUVIndex( uvs[ uvi ], uvLen ) );\n\n\t\t\t}\n\n\t\t}\n\n\t};\n\n\tstate.startObject( '', false );\n\n\treturn state;\n\n}\n\n//\n\nclass OBJLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t\tthis.materials = null;\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\t\tloader.load( url, function ( text ) {\n\n\t\t\ttry {\n\n\t\t\t\tonLoad( scope.parse( text ) );\n\n\t\t\t} catch ( e ) {\n\n\t\t\t\tif ( onError ) {\n\n\t\t\t\t\tonError( e );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( e );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t}\n\n\tsetMaterials( materials ) {\n\n\t\tthis.materials = materials;\n\n\t\treturn this;\n\n\t}\n\n\tparse( text ) {\n\n\t\tconst state = new ParserState();\n\n\t\tif ( text.indexOf( '\\r\\n' ) !== - 1 ) {\n\n\t\t\t// This is faster than String.split with regex that splits on both\n\t\t\ttext = text.replace( /\\r\\n/g, '\\n' );\n\n\t\t}\n\n\t\tif ( text.indexOf( '\\\\\\n' ) !== - 1 ) {\n\n\t\t\t// join lines separated by a line continuation character (\\)\n\t\t\ttext = text.replace( /\\\\\\n/g, '' );\n\n\t\t}\n\n\t\tconst lines = text.split( '\\n' );\n\t\tlet line = '', lineFirstChar = '';\n\t\tlet lineLength = 0;\n\t\tlet result = [];\n\n\t\t// Faster to just trim left side of the line. Use if available.\n\t\tconst trimLeft = ( typeof ''.trimLeft === 'function' );\n\n\t\tfor ( let i = 0, l = lines.length; i < l; i ++ ) {\n\n\t\t\tline = lines[ i ];\n\n\t\t\tline = trimLeft ? line.trimLeft() : line.trim();\n\n\t\t\tlineLength = line.length;\n\n\t\t\tif ( lineLength === 0 ) continue;\n\n\t\t\tlineFirstChar = line.charAt( 0 );\n\n\t\t\t// @todo invoke passed in handler if any\n\t\t\tif ( lineFirstChar === '#' ) continue;\n\n\t\t\tif ( lineFirstChar === 'v' ) {\n\n\t\t\t\tconst data = line.split( /\\s+/ );\n\n\t\t\t\tswitch ( data[ 0 ] ) {\n\n\t\t\t\t\tcase 'v':\n\t\t\t\t\t\tstate.vertices.push(\n\t\t\t\t\t\t\tparseFloat( data[ 1 ] ),\n\t\t\t\t\t\t\tparseFloat( data[ 2 ] ),\n\t\t\t\t\t\t\tparseFloat( data[ 3 ] )\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif ( data.length >= 7 ) {\n\n\t\t\t\t\t\t\tstate.colors.push(\n\t\t\t\t\t\t\t\tparseFloat( data[ 4 ] ),\n\t\t\t\t\t\t\t\tparseFloat( data[ 5 ] ),\n\t\t\t\t\t\t\t\tparseFloat( data[ 6 ] )\n\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// if no colors are defined, add placeholders so color and vertex indices match\n\n\t\t\t\t\t\t\tstate.colors.push( undefined, undefined, undefined );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'vn':\n\t\t\t\t\t\tstate.normals.push(\n\t\t\t\t\t\t\tparseFloat( data[ 1 ] ),\n\t\t\t\t\t\t\tparseFloat( data[ 2 ] ),\n\t\t\t\t\t\t\tparseFloat( data[ 3 ] )\n\t\t\t\t\t\t);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'vt':\n\t\t\t\t\t\tstate.uvs.push(\n\t\t\t\t\t\t\tparseFloat( data[ 1 ] ),\n\t\t\t\t\t\t\tparseFloat( data[ 2 ] )\n\t\t\t\t\t\t);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t} else if ( lineFirstChar === 'f' ) {\n\n\t\t\t\tconst lineData = line.substr( 1 ).trim();\n\t\t\t\tconst vertexData = lineData.split( /\\s+/ );\n\t\t\t\tconst faceVertices = [];\n\n\t\t\t\t// Parse the face vertex data into an easy to work with format\n\n\t\t\t\tfor ( let j = 0, jl = vertexData.length; j < jl; j ++ ) {\n\n\t\t\t\t\tconst vertex = vertexData[ j ];\n\n\t\t\t\t\tif ( vertex.length > 0 ) {\n\n\t\t\t\t\t\tconst vertexParts = vertex.split( '/' );\n\t\t\t\t\t\tfaceVertices.push( vertexParts );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// Draw an edge between the first vertex and all subsequent vertices to form an n-gon\n\n\t\t\t\tconst v1 = faceVertices[ 0 ];\n\n\t\t\t\tfor ( let j = 1, jl = faceVertices.length - 1; j < jl; j ++ ) {\n\n\t\t\t\t\tconst v2 = faceVertices[ j ];\n\t\t\t\t\tconst v3 = faceVertices[ j + 1 ];\n\n\t\t\t\t\tstate.addFace(\n\t\t\t\t\t\tv1[ 0 ], v2[ 0 ], v3[ 0 ],\n\t\t\t\t\t\tv1[ 1 ], v2[ 1 ], v3[ 1 ],\n\t\t\t\t\t\tv1[ 2 ], v2[ 2 ], v3[ 2 ]\n\t\t\t\t\t);\n\n\t\t\t\t}\n\n\t\t\t} else if ( lineFirstChar === 'l' ) {\n\n\t\t\t\tconst lineParts = line.substring( 1 ).trim().split( ' ' );\n\t\t\t\tlet lineVertices = [];\n\t\t\t\tconst lineUVs = [];\n\n\t\t\t\tif ( line.indexOf( '/' ) === - 1 ) {\n\n\t\t\t\t\tlineVertices = lineParts;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tfor ( let li = 0, llen = lineParts.length; li < llen; li ++ ) {\n\n\t\t\t\t\t\tconst parts = lineParts[ li ].split( '/' );\n\n\t\t\t\t\t\tif ( parts[ 0 ] !== '' ) lineVertices.push( parts[ 0 ] );\n\t\t\t\t\t\tif ( parts[ 1 ] !== '' ) lineUVs.push( parts[ 1 ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tstate.addLineGeometry( lineVertices, lineUVs );\n\n\t\t\t} else if ( lineFirstChar === 'p' ) {\n\n\t\t\t\tconst lineData = line.substr( 1 ).trim();\n\t\t\t\tconst pointData = lineData.split( ' ' );\n\n\t\t\t\tstate.addPointGeometry( pointData );\n\n\t\t\t} else if ( ( result = _object_pattern.exec( line ) ) !== null ) {\n\n\t\t\t\t// o object_name\n\t\t\t\t// or\n\t\t\t\t// g group_name\n\n\t\t\t\t// WORKAROUND: https://bugs.chromium.org/p/v8/issues/detail?id=2869\n\t\t\t\t// let name = result[ 0 ].substr( 1 ).trim();\n\t\t\t\tconst name = ( ' ' + result[ 0 ].substr( 1 ).trim() ).substr( 1 );\n\n\t\t\t\tstate.startObject( name );\n\n\t\t\t} else if ( _material_use_pattern.test( line ) ) {\n\n\t\t\t\t// material\n\n\t\t\t\tstate.object.startMaterial( line.substring( 7 ).trim(), state.materialLibraries );\n\n\t\t\t} else if ( _material_library_pattern.test( line ) ) {\n\n\t\t\t\t// mtl file\n\n\t\t\t\tstate.materialLibraries.push( line.substring( 7 ).trim() );\n\n\t\t\t} else if ( _map_use_pattern.test( line ) ) {\n\n\t\t\t\t// the line is parsed but ignored since the loader assumes textures are defined MTL files\n\t\t\t\t// (according to https://www.okino.com/conv/imp_wave.htm, 'usemap' is the old-style Wavefront texture reference method)\n\n\t\t\t\tconsole.warn( 'THREE.OBJLoader: Rendering identifier \"usemap\" not supported. Textures must be defined in MTL files.' );\n\n\t\t\t} else if ( lineFirstChar === 's' ) {\n\n\t\t\t\tresult = line.split( ' ' );\n\n\t\t\t\t// smooth shading\n\n\t\t\t\t// @todo Handle files that have varying smooth values for a set of faces inside one geometry,\n\t\t\t\t// but does not define a usemtl for each face set.\n\t\t\t\t// This should be detected and a dummy material created (later MultiMaterial and geometry groups).\n\t\t\t\t// This requires some care to not create extra material on each smooth value for \"normal\" obj files.\n\t\t\t\t// where explicit usemtl defines geometry groups.\n\t\t\t\t// Example asset: examples/models/obj/cerberus/Cerberus.obj\n\n\t\t\t\t/*\n\t\t\t\t\t * http://paulbourke.net/dataformats/obj/\n\t\t\t\t\t * or\n\t\t\t\t\t * http://www.cs.utah.edu/~boulos/cs3505/obj_spec.pdf\n\t\t\t\t\t *\n\t\t\t\t\t * From chapter \"Grouping\" Syntax explanation \"s group_number\":\n\t\t\t\t\t * \"group_number is the smoothing group number. To turn off smoothing groups, use a value of 0 or off.\n\t\t\t\t\t * Polygonal elements use group numbers to put elements in different smoothing groups. For free-form\n\t\t\t\t\t * surfaces, smoothing groups are either turned on or off; there is no difference between values greater\n\t\t\t\t\t * than 0.\"\n\t\t\t\t\t */\n\t\t\t\tif ( result.length > 1 ) {\n\n\t\t\t\t\tconst value = result[ 1 ].trim().toLowerCase();\n\t\t\t\t\tstate.object.smooth = ( value !== '0' && value !== 'off' );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// ZBrush can produce \"s\" lines #11707\n\t\t\t\t\tstate.object.smooth = true;\n\n\t\t\t\t}\n\n\t\t\t\tconst material = state.object.currentMaterial();\n\t\t\t\tif ( material ) material.smooth = state.object.smooth;\n\n\t\t\t} else {\n\n\t\t\t\t// Handle null terminated files without exception\n\t\t\t\tif ( line === '\\0' ) continue;\n\n\t\t\t\tconsole.warn( 'THREE.OBJLoader: Unexpected line: \"' + line + '\"' );\n\n\t\t\t}\n\n\t\t}\n\n\t\tstate.finalize();\n\n\t\tconst container = new Group();\n\t\tcontainer.materialLibraries = [].concat( state.materialLibraries );\n\n\t\tconst hasPrimitives = ! ( state.objects.length === 1 && state.objects[ 0 ].geometry.vertices.length === 0 );\n\n\t\tif ( hasPrimitives === true ) {\n\n\t\t\tfor ( let i = 0, l = state.objects.length; i < l; i ++ ) {\n\n\t\t\t\tconst object = state.objects[ i ];\n\t\t\t\tconst geometry = object.geometry;\n\t\t\t\tconst materials = object.materials;\n\t\t\t\tconst isLine = ( geometry.type === 'Line' );\n\t\t\t\tconst isPoints = ( geometry.type === 'Points' );\n\t\t\t\tlet hasVertexColors = false;\n\n\t\t\t\t// Skip o/g line declarations that did not follow with any faces\n\t\t\t\tif ( geometry.vertices.length === 0 ) continue;\n\n\t\t\t\tconst buffergeometry = new BufferGeometry();\n\n\t\t\t\tbuffergeometry.setAttribute( 'position', new Float32BufferAttribute( geometry.vertices, 3 ) );\n\n\t\t\t\tif ( geometry.normals.length > 0 ) {\n\n\t\t\t\t\tbuffergeometry.setAttribute( 'normal', new Float32BufferAttribute( geometry.normals, 3 ) );\n\n\t\t\t\t}\n\n\t\t\t\tif ( geometry.colors.length > 0 ) {\n\n\t\t\t\t\thasVertexColors = true;\n\t\t\t\t\tbuffergeometry.setAttribute( 'color', new Float32BufferAttribute( geometry.colors, 3 ) );\n\n\t\t\t\t}\n\n\t\t\t\tif ( geometry.hasUVIndices === true ) {\n\n\t\t\t\t\tbuffergeometry.setAttribute( 'uv', new Float32BufferAttribute( geometry.uvs, 2 ) );\n\n\t\t\t\t}\n\n\t\t\t\t// Create materials\n\n\t\t\t\tconst createdMaterials = [];\n\n\t\t\t\tfor ( let mi = 0, miLen = materials.length; mi < miLen; mi ++ ) {\n\n\t\t\t\t\tconst sourceMaterial = materials[ mi ];\n\t\t\t\t\tconst materialHash = sourceMaterial.name + '_' + sourceMaterial.smooth + '_' + hasVertexColors;\n\t\t\t\t\tlet material = state.materials[ materialHash ];\n\n\t\t\t\t\tif ( this.materials !== null ) {\n\n\t\t\t\t\t\tmaterial = this.materials.create( sourceMaterial.name );\n\n\t\t\t\t\t\t// mtl etc. loaders probably can't create line materials correctly, copy properties to a line material.\n\t\t\t\t\t\tif ( isLine && material && ! ( material instanceof LineBasicMaterial ) ) {\n\n\t\t\t\t\t\t\tconst materialLine = new LineBasicMaterial();\n\t\t\t\t\t\t\tMaterial.prototype.copy.call( materialLine, material );\n\t\t\t\t\t\t\tmaterialLine.color.copy( material.color );\n\t\t\t\t\t\t\tmaterial = materialLine;\n\n\t\t\t\t\t\t} else if ( isPoints && material && ! ( material instanceof PointsMaterial ) ) {\n\n\t\t\t\t\t\t\tconst materialPoints = new PointsMaterial( { size: 10, sizeAttenuation: false } );\n\t\t\t\t\t\t\tMaterial.prototype.copy.call( materialPoints, material );\n\t\t\t\t\t\t\tmaterialPoints.color.copy( material.color );\n\t\t\t\t\t\t\tmaterialPoints.map = material.map;\n\t\t\t\t\t\t\tmaterial = materialPoints;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( material === undefined ) {\n\n\t\t\t\t\t\tif ( isLine ) {\n\n\t\t\t\t\t\t\tmaterial = new LineBasicMaterial();\n\n\t\t\t\t\t\t} else if ( isPoints ) {\n\n\t\t\t\t\t\t\tmaterial = new PointsMaterial( { size: 1, sizeAttenuation: false } );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tmaterial = new MeshPhongMaterial();\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmaterial.name = sourceMaterial.name;\n\t\t\t\t\t\tmaterial.flatShading = sourceMaterial.smooth ? false : true;\n\t\t\t\t\t\tmaterial.vertexColors = hasVertexColors;\n\n\t\t\t\t\t\tstate.materials[ materialHash ] = material;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tcreatedMaterials.push( material );\n\n\t\t\t\t}\n\n\t\t\t\t// Create mesh\n\n\t\t\t\tlet mesh;\n\n\t\t\t\tif ( createdMaterials.length > 1 ) {\n\n\t\t\t\t\tfor ( let mi = 0, miLen = materials.length; mi < miLen; mi ++ ) {\n\n\t\t\t\t\t\tconst sourceMaterial = materials[ mi ];\n\t\t\t\t\t\tbuffergeometry.addGroup( sourceMaterial.groupStart, sourceMaterial.groupCount, mi );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( isLine ) {\n\n\t\t\t\t\t\tmesh = new LineSegments( buffergeometry, createdMaterials );\n\n\t\t\t\t\t} else if ( isPoints ) {\n\n\t\t\t\t\t\tmesh = new Points( buffergeometry, createdMaterials );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tmesh = new Mesh( buffergeometry, createdMaterials );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( isLine ) {\n\n\t\t\t\t\t\tmesh = new LineSegments( buffergeometry, createdMaterials[ 0 ] );\n\n\t\t\t\t\t} else if ( isPoints ) {\n\n\t\t\t\t\t\tmesh = new Points( buffergeometry, createdMaterials[ 0 ] );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tmesh = new Mesh( buffergeometry, createdMaterials[ 0 ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tmesh.name = object.name;\n\n\t\t\t\tcontainer.add( mesh );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// if there is only the default parser state object with no geometry data, interpret data as point cloud\n\n\t\t\tif ( state.vertices.length > 0 ) {\n\n\t\t\t\tconst material = new PointsMaterial( { size: 1, sizeAttenuation: false } );\n\n\t\t\t\tconst buffergeometry = new BufferGeometry();\n\n\t\t\t\tbuffergeometry.setAttribute( 'position', new Float32BufferAttribute( state.vertices, 3 ) );\n\n\t\t\t\tif ( state.colors.length > 0 && state.colors[ 0 ] !== undefined ) {\n\n\t\t\t\t\tbuffergeometry.setAttribute( 'color', new Float32BufferAttribute( state.colors, 3 ) );\n\t\t\t\t\tmaterial.vertexColors = true;\n\n\t\t\t\t}\n\n\t\t\t\tconst points = new Points( buffergeometry, material );\n\t\t\t\tcontainer.add( points );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn container;\n\n\t}\n\n}\n\nexport { OBJLoader };\n","const JSONLoader = require('./JSONLoader').JSONLoader;\nconst THREE = require('three');\nconst FileLoader = THREE.FileLoader;\n\nconst mergeGeometries = (geometries) => {\n const merge = (geometry1, geometry2) => {\n geometry1.merge(geometry2);\n }\n\n if (geometries && geometries.length > 0) {\n while (geometries.length > 1) {\n const geometry2 = geometries.splice(1,1);\n merge(geometries[0], geometry2[0]);\n }\n return geometries[0];\n }\n return undefined;\n}\n\nconst IndexedSourcesHandler = function(urlIn, crossOrigin, onDownloadedCallback) {\n const loader = new FileLoader();\n const jsonLoader = new JSONLoader();\n loader.crossOrigin = crossOrigin;\n const url = urlIn;\n const onDownloaded = onDownloadedCallback;\n let data = undefined;\n let downloading = false;\n let finished = false;\n let error = undefined;\n const items = [];\n\n const processItemDownloaded = (item) => {\n const modelData = data[item.index];\n if (modelData) {\n let obj = jsonLoader.parse( modelData );\n item.onLoad(obj.geometry, obj.materials);\n } else {\n processItemError(item, {responseURL: url});\n }\n }\n\n const processItemError = (item) => {\n if (item.onError) {\n if (!error) {\n error = {responseURL: url};\n }\n item.onError(error);\n }\n }\n\n this.downloadCompleted = (args) => {\n try {\n data = JSON.parse(args[0]);\n downloading = false;\n finished = true;\n if (Array.isArray(data)) {\n items.forEach(item => processItemDownloaded(item));\n } else {\n items.forEach(item => processItemError(item));\n }\n } catch {\n items.forEach(item => processItemError(item));\n }\n }\n\n const errorHandling = () => {\n return xhr => {\n error = xhr;\n finished = true;\n downloading = false;\n items.forEach((item) => {\n processItemError(item);\n });\n }\n }\n\n const progressHandling = () => {\n return xhr => {\n items.forEach((item) => {\n if (item.onProgress) {\n item.onProgress(xhr);\n }\n });\n }\n }\n\n this.load = (index, onLoad, onProgress, onError) => {\n const item = {\n index,\n onLoad,\n onProgress,\n onError,\n };\n if (finished) {\n if (data) {\n processItemDownloaded(item);\n } else {\n processItemError(error);\n }\n } else if (downloading) {\n //quene it up\n items.push(item);\n } else {\n items.push(item);\n downloading = true;\n loader.load(url, onDownloaded, progressHandling, errorHandling);\n }\n }\n}\n\nconst MultiSourcesHandler = function(numberIn, onLoadCallback) {\n const allData = [];\n const number = numberIn;\n const onLoad = onLoadCallback;\n let totalDownloaded = 0;\n\n this.itemDownloaded = (order, args) => {\n allData[order]= args;\n totalDownloaded++;\n if (totalDownloaded == number) {\n const materials = allData[0][1];\n const geometries = allData.map((data) => data[0]);\n //All geometries will be merged into the first one\n const geometry = mergeGeometries(geometries);\n for (let i = 1; i < number; i++) {\n allData[order][0].dispose();\n allData[order][1].forEach((material) => material.dispose());\n }\n onLoad(geometry, materials);\n }\n }\n}\n\nexports.PrimitivesLoader = function () {\n let concurrentDownloads = 0;\n const MAX_DOWNLOAD = 20;\n this.crossOrigin = \"Anonymous\";\n const loader = new JSONLoader();\n const waitingList = [];\n //URL to loader pair\n const indexedLoaders = {};\n\n //Load the first file then the rest will be handled separately\n const loadFromMultipleSources = (urls, onLoad, onProgress, onError, options) => {\n const number = urls.length;\n const msHandler = new MultiSourcesHandler(number, onLoad);\n //The order here will give us hint on the sequence on merging the primitives\n let order = 0;\n urls.forEach((url) => {\n const newOptions = options ? {...options} : {};\n newOptions.msHandler = msHandler;\n newOptions.order = order;\n order++;\n loadFromSingleSource(url, onLoad, onProgress, onError, newOptions);\n });\n }\n\n const handleIndexedSource = (url, onLoad, onProgress, onError, options) => {\n const newOptions = options ? {...options} : {};\n let indexedLoader = indexedLoaders[url];\n if (!indexedLoader) {\n if (MAX_DOWNLOAD > concurrentDownloads) {\n const onLoadCallback = new onFinally(undefined, this, newOptions);\n ++concurrentDownloads;\n indexedLoader = new IndexedSourcesHandler(url, this.crossOrigin, onLoadCallback);\n indexedLoaders[url] = indexedLoader;\n } else {\n waitingList.push({\n url,\n onLoad,\n onProgress,\n onError,\n options,\n });\n }\n }\n if (indexedLoader) {\n newOptions.isHandler = indexedLoader;\n indexedLoader.load(options.index, onLoad, onProgress, onError);\n }\n }\n\n const loadFromSingleSource = (url, onLoad, onProgress, onError, options) => {\n if (options && (options.index !== undefined) ) {\n handleIndexedSource(url, onLoad, onProgress, onError, options);\n } else {\n //Standard loading\n if (MAX_DOWNLOAD > concurrentDownloads) {\n ++concurrentDownloads;\n const onLoadCallback = new onFinally(onLoad, this, options);\n const onErrorCallback = new onFinally(onError, this, options);\n loader.crossOrigin = this.crossOrigin;\n loader.load(url, onLoadCallback, onProgress, onErrorCallback);\n } else {\n waitingList.push({\n url,\n onLoad,\n onProgress,\n onError,\n options,\n });\n }\n }\n }\n\n this.load = (url, onLoad, onProgress, onError, options) => {\n if (Array.isArray(url)) {\n loadFromMultipleSources(url, onLoad, onProgress, onError, options);\n } else {\n loadFromSingleSource(url, onLoad, onProgress, onError, options);\n }\n }\n\n this.loadFromWaitingList = () => {\n while (MAX_DOWNLOAD > concurrentDownloads) {\n const item = waitingList.shift();\n if (item) {\n this.load(item.url, item.onLoad, item.onProgress, item.onError, item.options);\n } else {\n return;\n }\n }\n }\n\n this.itemRemainingCheck = () => {\n if (waitingList.length === 0 && concurrentDownloads === 0) {\n for (let key in indexedLoaders) {\n if (indexedLoaders.hasOwnProperty(key)) {\n delete indexedLoaders[key];\n }\n }\n }\n }\n\n const onFinally = function(callback, loader, options) {\n return (...args) => {\n --concurrentDownloads;\n if (options?.msHandler) {\n options.msHandler.itemDownloaded(options.order, args);\n } else if (options?.isHandler) {\n options.isHandler.downloadCompleted(args);\n } else {\n if (callback) {\n callback(...args);\n }\n }\n loader.loadFromWaitingList();\n loader.itemRemainingCheck();\n }\n }\n\n this.parse = data => {\n return loader.parse(data);\n }\n\n}\n","const THREE = require('three');\n\nconst GLTFLoader = require('three/examples/jsm/loaders/GLTFLoader').GLTFLoader;\n\nconst GLTFToZincJSLoader = function () {\n\n const _this = this;\n\n this.parseGLTFObjects = (object, region, depth, finishCallback) => {\n let childRegion = region;\n if (depth !== 0) {\n if (object.type === \"Object3D\") {\n if (object.name !== \"\") {\n if (region)\n childRegion = region.findOrCreateChildFromPath(object.name);\n if (childRegion) {\n const group = childRegion.getGroup();\n group.position.copy(object.position);\n group.rotation.copy(object.rotation);\n group.quaternion.copy(object.quaternion);\n group.matrixAutoUpdate = true;\n }\n }\n } else {\n let zincGeometry = undefined;\n if (object.type === \"Mesh\") {\n zincGeometry = new (require('../primitives/geometry').Geometry)();\n } else if (object.type === \"LineSegments\") {\n zincGeometry = new (require('../primitives/lines').Lines)();\n } else if (object.type === \"Points\") {\n zincGeometry = new (require('../primitives/pointset').Pointset)();\n }\n if (zincGeometry) {\n let localTimeEnabled = false;\n let localMorphColour = false;\n if (object.geometry && object.geometry.morphAttributes) {\n localTimeEnabled = object.geometry.morphAttributes.position ? true : false;\n localMorphColour = object.geometry.morphAttributes.color ? true : false;\n }\n zincGeometry.setMesh(object.clone(), localTimeEnabled, localMorphColour);\n const morph = zincGeometry.getMorph();\n zincGeometry.groupName = morph.name;\n morph.matrixAutoUpdate = true;\n region.addZincObject(zincGeometry);\n if (finishCallback != undefined && (typeof finishCallback == 'function'))\n finishCallback(zincGeometry);\n }\n }\n }\n depth++;\n object.children.forEach( child => {\n _this.parseGLTFObjects(child, childRegion, depth, finishCallback);\n });\n }\n\n this.setCamera = scene => {\n scene.viewAll();\n const cameraControls = scene.getZincCameraControls();\n const viewport = cameraControls.getCurrentViewport();\n cameraControls.addViewport('default', viewport);\n cameraControls.setDefaultViewport('default');\n }\n\n /**\n * Load GLTF into this scene object.\n * \n * @param {String} url - URL to the GLTF file\n * @param {Function} finishCallback - Callback function which will be called\n * once the glyphset is succssfully load in.\n */\n this.load = (scene, region, url, finishCallback, allCompletedCallback, options) => {\n const path = url.substring(0, url.lastIndexOf(\"/\") + 1);\n const filename = url.substring(url.lastIndexOf(\"/\") + 1, url.length);\n const loader = new GLTFLoader().setPath(path);\n \n loader.load( filename, function ( gltf ) {\n console.log(gltf)\n _this.parseGLTFObjects(gltf.scene, region, 0, finishCallback);\n _this.setCamera(scene);\n if (allCompletedCallback != undefined && (typeof allCompletedCallback == 'function'))\n allCompletedCallback();\n });\n }\n}\n\nexports.GLTFToZincJSLoader = GLTFToZincJSLoader;\n","module.exports = require(\"three/examples/jsm/loaders/GLTFLoader\");","const GLTFExporter = require('./three/GLTFExporter').GLTFExporter;\n\n/**\n * Provides an object which uses for exporting the scene\n * \n * @class\n * @author Alan Wu\n * @return {SceneExporter}\n */\nconst SceneExporter = function (sceneIn) {\n const scene = sceneIn;\n\n\tthis.exportGLTF = (binary) => {\n const rootRegion = scene.getRootRegion();\n const zincObjects = rootRegion.getAllObjects(true);\n const animations = [];\n zincObjects.forEach(zincObject => {\n if (zincObject.animationClip) {\n animations.push({clip: zincObject.animationClip[0], mesh: zincObject.getMorph()});\n }\n });\n const exporter = new GLTFExporter();\n const options = { binary, animations };\n return new Promise((resolve, reject) => {\n exporter.parse( scene.getThreeJSScene(), function ( gltf ) {\n resolve(gltf);\n }, options );\n });\n\t}\n}\n\nexports.SceneExporter = SceneExporter;\n","import {\n\tBufferAttribute,\n\tClampToEdgeWrapping,\n\tDoubleSide,\n\tInterpolateDiscrete,\n\tInterpolateLinear,\n\tLinearFilter,\n\tLinearMipmapLinearFilter,\n\tLinearMipmapNearestFilter,\n\tMathUtils,\n\tMatrix4,\n\tMirroredRepeatWrapping,\n\tNearestFilter,\n\tNearestMipmapLinearFilter,\n\tNearestMipmapNearestFilter,\n\tPropertyBinding,\n\tRGBAFormat,\n\tRGBFormat,\n\tRepeatWrapping,\n\tScene,\n\tVector3\n} from 'three';\n\n\nclass GLTFExporter {\n\n\tconstructor() {\n\n\t\tthis.pluginCallbacks = [];\n\n\t\tthis.register( function ( writer ) {\n\n\t\t\treturn new GLTFLightExtension( writer );\n\n\t\t} );\n\n\t\tthis.register( function ( writer ) {\n\n\t\t\treturn new GLTFMaterialsUnlitExtension( writer );\n\n\t\t} );\n\n\t\tthis.register( function ( writer ) {\n\n\t\t\treturn new GLTFMaterialsPBRSpecularGlossiness( writer );\n\n\t\t} );\n\n\t}\n\n\tregister( callback ) {\n\n\t\tif ( this.pluginCallbacks.indexOf( callback ) === - 1 ) {\n\n\t\t\tthis.pluginCallbacks.push( callback );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tunregister( callback ) {\n\n\t\tif ( this.pluginCallbacks.indexOf( callback ) !== - 1 ) {\n\n\t\t\tthis.pluginCallbacks.splice( this.pluginCallbacks.indexOf( callback ), 1 );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t/**\n\t * Parse scenes and generate GLTF output\n\t * @param {Scene or [THREE.Scenes]} input Scene or Array of THREE.Scenes\n\t * @param {Function} onDone Callback on completed\n\t * @param {Object} options options\n\t */\n\tparse( input, onDone, options ) {\n\n\t\tconst writer = new GLTFWriter();\n\t\tconst plugins = [];\n\n\t\tfor ( let i = 0, il = this.pluginCallbacks.length; i < il; i ++ ) {\n\n\t\t\tplugins.push( this.pluginCallbacks[ i ]( writer ) );\n\n\t\t}\n\n\t\twriter.setPlugins( plugins );\n\t\twriter.write( input, onDone, options );\n\n\t}\n\n}\n\n//------------------------------------------------------------------------------\n// Constants\n//------------------------------------------------------------------------------\n\nconst WEBGL_CONSTANTS = {\n\tPOINTS: 0x0000,\n\tLINES: 0x0001,\n\tLINE_LOOP: 0x0002,\n\tLINE_STRIP: 0x0003,\n\tTRIANGLES: 0x0004,\n\tTRIANGLE_STRIP: 0x0005,\n\tTRIANGLE_FAN: 0x0006,\n\n\tUNSIGNED_BYTE: 0x1401,\n\tUNSIGNED_SHORT: 0x1403,\n\tFLOAT: 0x1406,\n\tUNSIGNED_INT: 0x1405,\n\tARRAY_BUFFER: 0x8892,\n\tELEMENT_ARRAY_BUFFER: 0x8893,\n\n\tNEAREST: 0x2600,\n\tLINEAR: 0x2601,\n\tNEAREST_MIPMAP_NEAREST: 0x2700,\n\tLINEAR_MIPMAP_NEAREST: 0x2701,\n\tNEAREST_MIPMAP_LINEAR: 0x2702,\n\tLINEAR_MIPMAP_LINEAR: 0x2703,\n\n\tCLAMP_TO_EDGE: 33071,\n\tMIRRORED_REPEAT: 33648,\n\tREPEAT: 10497\n};\n\nconst THREE_TO_WEBGL = {};\n\nTHREE_TO_WEBGL[ NearestFilter ] = WEBGL_CONSTANTS.NEAREST;\nTHREE_TO_WEBGL[ NearestMipmapNearestFilter ] = WEBGL_CONSTANTS.NEAREST_MIPMAP_NEAREST;\nTHREE_TO_WEBGL[ NearestMipmapLinearFilter ] = WEBGL_CONSTANTS.NEAREST_MIPMAP_LINEAR;\nTHREE_TO_WEBGL[ LinearFilter ] = WEBGL_CONSTANTS.LINEAR;\nTHREE_TO_WEBGL[ LinearMipmapNearestFilter ] = WEBGL_CONSTANTS.LINEAR_MIPMAP_NEAREST;\nTHREE_TO_WEBGL[ LinearMipmapLinearFilter ] = WEBGL_CONSTANTS.LINEAR_MIPMAP_LINEAR;\n\nTHREE_TO_WEBGL[ ClampToEdgeWrapping ] = WEBGL_CONSTANTS.CLAMP_TO_EDGE;\nTHREE_TO_WEBGL[ RepeatWrapping ] = WEBGL_CONSTANTS.REPEAT;\nTHREE_TO_WEBGL[ MirroredRepeatWrapping ] = WEBGL_CONSTANTS.MIRRORED_REPEAT;\n\nconst PATH_PROPERTIES = {\n\tscale: 'scale',\n\tposition: 'translation',\n\tquaternion: 'rotation',\n\tmorphTargetInfluences: 'weights'\n};\n\n// GLB constants\n// https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#glb-file-format-specification\n\nconst GLB_HEADER_BYTES = 12;\nconst GLB_HEADER_MAGIC = 0x46546C67;\nconst GLB_VERSION = 2;\n\nconst GLB_CHUNK_PREFIX_BYTES = 8;\nconst GLB_CHUNK_TYPE_JSON = 0x4E4F534A;\nconst GLB_CHUNK_TYPE_BIN = 0x004E4942;\n\n//------------------------------------------------------------------------------\n// Utility functions\n//------------------------------------------------------------------------------\n\n/**\n * Compare two arrays\n * @param {Array} array1 Array 1 to compare\n * @param {Array} array2 Array 2 to compare\n * @return {Boolean} Returns true if both arrays are equal\n */\nfunction equalArray( array1, array2 ) {\n\n\treturn ( array1.length === array2.length ) && array1.every( function ( element, index ) {\n\n\t\treturn element === array2[ index ];\n\n\t} );\n\n}\n\n/**\n * Converts a string to an ArrayBuffer.\n * @param {string} text\n * @return {ArrayBuffer}\n */\nfunction stringToArrayBuffer( text ) {\n\n\tif ( window.TextEncoder !== undefined ) {\n\n\t\treturn new TextEncoder().encode( text ).buffer;\n\n\t}\n\n\tconst array = new Uint8Array( new ArrayBuffer( text.length ) );\n\n\tfor ( let i = 0, il = text.length; i < il; i ++ ) {\n\n\t\tconst value = text.charCodeAt( i );\n\n\t\t// Replacing multi-byte character with space(0x20).\n\t\tarray[ i ] = value > 0xFF ? 0x20 : value;\n\n\t}\n\n\treturn array.buffer;\n\n}\n\n/**\n * Is identity matrix\n *\n * @param {Matrix4} matrix\n * @returns {Boolean} Returns true, if parameter is identity matrix\n */\nfunction isIdentityMatrix( matrix ) {\n\n\treturn equalArray( matrix.elements, [ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ] );\n\n}\n\n/**\n * Get the min and max vectors from the given attribute\n * @param {BufferAttribute} attribute Attribute to find the min/max in range from start to start + count\n * @param {Integer} start\n * @param {Integer} count\n * @return {Object} Object containing the `min` and `max` values (As an array of attribute.itemSize components)\n */\nfunction getMinMax( attribute, start, count ) {\n\n\tconst output = {\n\n\t\tmin: new Array( attribute.itemSize ).fill( Number.POSITIVE_INFINITY ),\n\t\tmax: new Array( attribute.itemSize ).fill( Number.NEGATIVE_INFINITY )\n\n\t};\n\n\tfor ( let i = start; i < start + count; i ++ ) {\n\n\t\tfor ( let a = 0; a < attribute.itemSize; a ++ ) {\n\n\t\t\tlet value;\n\n\t\t\tif ( attribute.itemSize > 4 ) {\n\n\t\t\t\t // no support for interleaved data for itemSize > 4\n\n\t\t\t\tvalue = attribute.array[ i * attribute.itemSize + a ];\n\n\t\t\t} else {\n\n\t\t\t\tif ( a === 0 ) value = attribute.getX( i );\n\t\t\t\telse if ( a === 1 ) value = attribute.getY( i );\n\t\t\t\telse if ( a === 2 ) value = attribute.getZ( i );\n\t\t\t\telse if ( a === 3 ) value = attribute.getW( i );\n\n\t\t\t}\n\n\t\t\toutput.min[ a ] = Math.min( output.min[ a ], value );\n\t\t\toutput.max[ a ] = Math.max( output.max[ a ], value );\n\n\t\t}\n\n\t}\n\n\treturn output;\n\n}\n\n/**\n * Get the required size + padding for a buffer, rounded to the next 4-byte boundary.\n * https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#data-alignment\n *\n * @param {Integer} bufferSize The size the original buffer.\n * @returns {Integer} new buffer size with required padding.\n *\n */\nfunction getPaddedBufferSize( bufferSize ) {\n\n\treturn Math.ceil( bufferSize / 4 ) * 4;\n\n}\n\n/**\n * Returns a buffer aligned to 4-byte boundary.\n *\n * @param {ArrayBuffer} arrayBuffer Buffer to pad\n * @param {Integer} paddingByte (Optional)\n * @returns {ArrayBuffer} The same buffer if it's already aligned to 4-byte boundary or a new buffer\n */\nfunction getPaddedArrayBuffer( arrayBuffer, paddingByte = 0 ) {\n\n\tconst paddedLength = getPaddedBufferSize( arrayBuffer.byteLength );\n\n\tif ( paddedLength !== arrayBuffer.byteLength ) {\n\n\t\tconst array = new Uint8Array( paddedLength );\n\t\tarray.set( new Uint8Array( arrayBuffer ) );\n\n\t\tif ( paddingByte !== 0 ) {\n\n\t\t\tfor ( let i = arrayBuffer.byteLength; i < paddedLength; i ++ ) {\n\n\t\t\t\tarray[ i ] = paddingByte;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn array.buffer;\n\n\t}\n\n\treturn arrayBuffer;\n\n}\n\nlet cachedCanvas = null;\n\n/**\n * Writer\n */\nclass GLTFWriter {\n\n\tconstructor() {\n\n\t\tthis.plugins = [];\n\n\t\tthis.options = {};\n\t\tthis.pending = [];\n\t\tthis.buffers = [];\n\n\t\tthis.byteOffset = 0;\n\t\tthis.buffers = [];\n\t\tthis.nodeMap = new Map();\n\t\tthis.skins = [];\n\t\tthis.extensionsUsed = {};\n\n\t\tthis.uids = new Map();\n\t\tthis.uid = 0;\n\n\t\tthis.json = {\n\t\t\tasset: {\n\t\t\t\tversion: '2.0',\n\t\t\t\tgenerator: 'THREE.GLTFExporter'\n\t\t\t}\n\t\t};\n\n\t\tthis.cache = {\n\t\t\tmeshes: new Map(),\n\t\t\tattributes: new Map(),\n\t\t\tattributesNormalized: new Map(),\n\t\t\tmaterials: new Map(),\n\t\t\ttextures: new Map(),\n\t\t\timages: new Map()\n\t\t};\n\n\t}\n\n\tsetPlugins( plugins ) {\n\n\t\tthis.plugins = plugins;\n\n\t}\n\n\t/**\n\t * Parse scenes and generate GLTF output\n\t * @param {Scene or [THREE.Scenes]} input Scene or Array of THREE.Scenes\n\t * @param {Function} onDone Callback on completed\n\t * @param {Object} options options\n\t */\n\twrite( input, onDone, options ) {\n\n\t\tthis.options = Object.assign( {}, {\n\t\t\t// default options\n\t\t\tbinary: false,\n\t\t\ttrs: false,\n\t\t\tonlyVisible: true,\n\t\t\ttruncateDrawRange: true,\n\t\t\tembedImages: true,\n\t\t\tmaxTextureSize: Infinity,\n\t\t\tanimations: [],\n\t\t\tincludeCustomExtensions: false\n\t\t}, options );\n\n\t\tif ( this.options.animations.length > 0 ) {\n\n\t\t\t// Only TRS properties, and not matrices, may be targeted by animation.\n\t\t\tthis.options.trs = true;\n\n\t\t}\n\n\t\tthis.processInput( input );\n\n\t\tconst writer = this;\n\n\t\tPromise.all( this.pending ).then( function () {\n\n\t\t\tconst buffers = writer.buffers;\n\t\t\tconst json = writer.json;\n\t\t\tconst options = writer.options;\n\t\t\tconst extensionsUsed = writer.extensionsUsed;\n\n\t\t\t// Merge buffers.\n\t\t\tconst blob = new Blob( buffers, { type: 'application/octet-stream' } );\n\n\t\t\t// Declare extensions.\n\t\t\tconst extensionsUsedList = Object.keys( extensionsUsed );\n\n\t\t\tif ( extensionsUsedList.length > 0 ) json.extensionsUsed = extensionsUsedList;\n\n\t\t\t// Update bytelength of the single buffer.\n\t\t\tif ( json.buffers && json.buffers.length > 0 ) json.buffers[ 0 ].byteLength = blob.size;\n\n\t\t\tif ( options.binary === true ) {\n\n\t\t\t\t// https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#glb-file-format-specification\n\n\t\t\t\tconst reader = new window.FileReader();\n\t\t\t\treader.readAsArrayBuffer( blob );\n\t\t\t\treader.onloadend = function () {\n\n\t\t\t\t\t// Binary chunk.\n\t\t\t\t\tconst binaryChunk = getPaddedArrayBuffer( reader.result );\n\t\t\t\t\tconst binaryChunkPrefix = new DataView( new ArrayBuffer( GLB_CHUNK_PREFIX_BYTES ) );\n\t\t\t\t\tbinaryChunkPrefix.setUint32( 0, binaryChunk.byteLength, true );\n\t\t\t\t\tbinaryChunkPrefix.setUint32( 4, GLB_CHUNK_TYPE_BIN, true );\n\n\t\t\t\t\t// JSON chunk.\n\t\t\t\t\tconst jsonChunk = getPaddedArrayBuffer( stringToArrayBuffer( JSON.stringify( json ) ), 0x20 );\n\t\t\t\t\tconst jsonChunkPrefix = new DataView( new ArrayBuffer( GLB_CHUNK_PREFIX_BYTES ) );\n\t\t\t\t\tjsonChunkPrefix.setUint32( 0, jsonChunk.byteLength, true );\n\t\t\t\t\tjsonChunkPrefix.setUint32( 4, GLB_CHUNK_TYPE_JSON, true );\n\n\t\t\t\t\t// GLB header.\n\t\t\t\t\tconst header = new ArrayBuffer( GLB_HEADER_BYTES );\n\t\t\t\t\tconst headerView = new DataView( header );\n\t\t\t\t\theaderView.setUint32( 0, GLB_HEADER_MAGIC, true );\n\t\t\t\t\theaderView.setUint32( 4, GLB_VERSION, true );\n\t\t\t\t\tconst totalByteLength = GLB_HEADER_BYTES\n\t\t\t\t\t\t+ jsonChunkPrefix.byteLength + jsonChunk.byteLength\n\t\t\t\t\t\t+ binaryChunkPrefix.byteLength + binaryChunk.byteLength;\n\t\t\t\t\theaderView.setUint32( 8, totalByteLength, true );\n\n\t\t\t\t\tconst glbBlob = new Blob( [\n\t\t\t\t\t\theader,\n\t\t\t\t\t\tjsonChunkPrefix,\n\t\t\t\t\t\tjsonChunk,\n\t\t\t\t\t\tbinaryChunkPrefix,\n\t\t\t\t\t\tbinaryChunk\n\t\t\t\t\t], { type: 'application/octet-stream' } );\n\n\t\t\t\t\tconst glbReader = new window.FileReader();\n\t\t\t\t\tglbReader.readAsArrayBuffer( glbBlob );\n\t\t\t\t\tglbReader.onloadend = function () {\n\n\t\t\t\t\t\tonDone( glbReader.result );\n\n\t\t\t\t\t};\n\n\t\t\t\t};\n\n\t\t\t} else {\n\n\t\t\t\tif ( json.buffers && json.buffers.length > 0 ) {\n\n\t\t\t\t\tconst reader = new window.FileReader();\n\t\t\t\t\treader.readAsDataURL( blob );\n\t\t\t\t\treader.onloadend = function () {\n\n\t\t\t\t\t\tconst base64data = reader.result;\n\t\t\t\t\t\tjson.buffers[ 0 ].uri = base64data;\n\t\t\t\t\t\tonDone( json );\n\n\t\t\t\t\t};\n\n\t\t\t\t} else {\n\n\t\t\t\t\tonDone( json );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} );\n\n\t}\n\n\t/**\n\t * Serializes a userData.\n\t *\n\t * @param {THREE.Object3D|THREE.Material} object\n\t * @param {Object} objectDef\n\t */\n\tserializeUserData( object, objectDef ) {\n\n if (object.userData && object.userData.isZincObject) return;\n\n\t\tif ( Object.keys( object.userData ).length === 0 ) return;\n\n\t\tconst options = this.options;\n\t\tconst extensionsUsed = this.extensionsUsed;\n\n\t\ttry {\n\n\t\t\tconst json = JSON.parse( JSON.stringify( object.userData ) );\n\n\t\t\tif ( options.includeCustomExtensions && json.gltfExtensions ) {\n\n\t\t\t\tif ( objectDef.extensions === undefined ) objectDef.extensions = {};\n\n\t\t\t\tfor ( const extensionName in json.gltfExtensions ) {\n\n\t\t\t\t\tobjectDef.extensions[ extensionName ] = json.gltfExtensions[ extensionName ];\n\t\t\t\t\textensionsUsed[ extensionName ] = true;\n\n\t\t\t\t}\n\n\t\t\t\tdelete json.gltfExtensions;\n\n\t\t\t}\n\n\t\t\tif ( Object.keys( json ).length > 0 ) objectDef.extras = json;\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.warn( 'THREE.GLTFExporter: userData of \\'' + object.name + '\\' ' +\n\t\t\t\t'won\\'t be serialized because of JSON.stringify error - ' + error.message );\n\n\t\t}\n\n\t}\n\n\t/**\n\t * Assign and return a temporal unique id for an object\n\t * especially which doesn't have .uuid\n\t * @param {Object} object\n\t * @return {Integer}\n\t */\n\tgetUID( object ) {\n\n\t\tif ( ! this.uids.has( object ) ) this.uids.set( object, this.uid ++ );\n\n\t\treturn this.uids.get( object );\n\n\t}\n\n\t/**\n\t * Checks if normal attribute values are normalized.\n\t *\n\t * @param {BufferAttribute} normal\n\t * @returns {Boolean}\n\t */\n\tisNormalizedNormalAttribute( normal ) {\n\n\t\tconst cache = this.cache;\n\n\t\tif ( cache.attributesNormalized.has( normal ) ) return false;\n\n\t\tconst v = new Vector3();\n\n\t\tfor ( let i = 0, il = normal.count; i < il; i ++ ) {\n\n\t\t\t// 0.0005 is from glTF-validator\n\t\t\tif ( Math.abs( v.fromBufferAttribute( normal, i ).length() - 1.0 ) > 0.0005 ) return false;\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\t/**\n\t * Creates normalized normal buffer attribute.\n\t *\n\t * @param {BufferAttribute} normal\n\t * @returns {BufferAttribute}\n\t *\n\t */\n\tcreateNormalizedNormalAttribute( normal ) {\n\n\t\tconst cache = this.cache;\n\n\t\tif ( cache.attributesNormalized.has( normal ) )\treturn cache.attributesNormalized.get( normal );\n\n\t\tconst attribute = normal.clone();\n\t\tconst v = new Vector3();\n\n\t\tfor ( let i = 0, il = attribute.count; i < il; i ++ ) {\n\n\t\t\tv.fromBufferAttribute( attribute, i );\n\n\t\t\tif ( v.x === 0 && v.y === 0 && v.z === 0 ) {\n\n\t\t\t\t// if values can't be normalized set (1, 0, 0)\n\t\t\t\tv.setX( 1.0 );\n\n\t\t\t} else {\n\n\t\t\t\tv.normalize();\n\n\t\t\t}\n\n\t\t\tattribute.setXYZ( i, v.x, v.y, v.z );\n\n\t\t}\n\n\t\tcache.attributesNormalized.set( normal, attribute );\n\n\t\treturn attribute;\n\n\t}\n\n\t/**\n\t * Applies a texture transform, if present, to the map definition. Requires\n\t * the KHR_texture_transform extension.\n\t *\n\t * @param {Object} mapDef\n\t * @param {THREE.Texture} texture\n\t */\n\tapplyTextureTransform( mapDef, texture ) {\n\n\t\tlet didTransform = false;\n\t\tconst transformDef = {};\n\n\t\tif ( texture.offset.x !== 0 || texture.offset.y !== 0 ) {\n\n\t\t\ttransformDef.offset = texture.offset.toArray();\n\t\t\tdidTransform = true;\n\n\t\t}\n\n\t\tif ( texture.rotation !== 0 ) {\n\n\t\t\ttransformDef.rotation = texture.rotation;\n\t\t\tdidTransform = true;\n\n\t\t}\n\n\t\tif ( texture.repeat.x !== 1 || texture.repeat.y !== 1 ) {\n\n\t\t\ttransformDef.scale = texture.repeat.toArray();\n\t\t\tdidTransform = true;\n\n\t\t}\n\n\t\tif ( didTransform ) {\n\n\t\t\tmapDef.extensions = mapDef.extensions || {};\n\t\t\tmapDef.extensions[ 'KHR_texture_transform' ] = transformDef;\n\t\t\tthis.extensionsUsed[ 'KHR_texture_transform' ] = true;\n\n\t\t}\n\n\t}\n\n\t/**\n\t * Process a buffer to append to the default one.\n\t * @param {ArrayBuffer} buffer\n\t * @return {Integer}\n\t */\n\tprocessBuffer( buffer ) {\n\n\t\tconst json = this.json;\n\t\tconst buffers = this.buffers;\n\n\t\tif ( ! json.buffers ) json.buffers = [ { byteLength: 0 } ];\n\n\t\t// All buffers are merged before export.\n\t\tbuffers.push( buffer );\n\n\t\treturn 0;\n\n\t}\n\n\t/**\n\t * Process and generate a BufferView\n\t * @param {BufferAttribute} attribute\n\t * @param {number} componentType\n\t * @param {number} start\n\t * @param {number} count\n\t * @param {number} target (Optional) Target usage of the BufferView\n\t * @return {Object}\n\t */\n\tprocessBufferView( attribute, componentType, start, count, target ) {\n\n\t\tconst json = this.json;\n\n\t\tif ( ! json.bufferViews ) json.bufferViews = [];\n\n\t\t// Create a new dataview and dump the attribute's array into it\n\n\t\tlet componentSize;\n\n\t\tif ( componentType === WEBGL_CONSTANTS.UNSIGNED_BYTE ) {\n\n\t\t\tcomponentSize = 1;\n\n\t\t} else if ( componentType === WEBGL_CONSTANTS.UNSIGNED_SHORT ) {\n\n\t\t\tcomponentSize = 2;\n\n\t\t} else {\n\n\t\t\tcomponentSize = 4;\n\n\t\t}\n\n\t\tconst byteLength = getPaddedBufferSize( count * attribute.itemSize * componentSize );\n\t\tconst dataView = new DataView( new ArrayBuffer( byteLength ) );\n\t\tlet offset = 0;\n\n\t\tfor ( let i = start; i < start + count; i ++ ) {\n\n\t\t\tfor ( let a = 0; a < attribute.itemSize; a ++ ) {\n\n\t\t\t\tlet value;\n\n\t\t\t\tif ( attribute.itemSize > 4 ) {\n\n\t\t\t\t\t // no support for interleaved data for itemSize > 4\n\n\t\t\t\t\tvalue = attribute.array[ i * attribute.itemSize + a ];\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( a === 0 ) value = attribute.getX( i );\n\t\t\t\t\telse if ( a === 1 ) value = attribute.getY( i );\n\t\t\t\t\telse if ( a === 2 ) value = attribute.getZ( i );\n\t\t\t\t\telse if ( a === 3 ) value = attribute.getW( i );\n\n\t\t\t\t}\n\n\t\t\t\tif ( componentType === WEBGL_CONSTANTS.FLOAT ) {\n\n\t\t\t\t\tdataView.setFloat32( offset, value, true );\n\n\t\t\t\t} else if ( componentType === WEBGL_CONSTANTS.UNSIGNED_INT ) {\n\n\t\t\t\t\tdataView.setUint32( offset, value, true );\n\n\t\t\t\t} else if ( componentType === WEBGL_CONSTANTS.UNSIGNED_SHORT ) {\n\n\t\t\t\t\tdataView.setUint16( offset, value, true );\n\n\t\t\t\t} else if ( componentType === WEBGL_CONSTANTS.UNSIGNED_BYTE ) {\n\n\t\t\t\t\tdataView.setUint8( offset, value );\n\n\t\t\t\t}\n\n\t\t\t\toffset += componentSize;\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst bufferViewDef = {\n\n\t\t\tbuffer: this.processBuffer( dataView.buffer ),\n\t\t\tbyteOffset: this.byteOffset,\n\t\t\tbyteLength: byteLength\n\n\t\t};\n\n\t\tif ( target !== undefined ) bufferViewDef.target = target;\n\n\t\tif ( target === WEBGL_CONSTANTS.ARRAY_BUFFER ) {\n\n\t\t\t// Only define byteStride for vertex attributes.\n\t\t\tbufferViewDef.byteStride = attribute.itemSize * componentSize;\n\n\t\t}\n\n\t\tthis.byteOffset += byteLength;\n\n\t\tjson.bufferViews.push( bufferViewDef );\n\n\t\t// @TODO Merge bufferViews where possible.\n\t\tconst output = {\n\n\t\t\tid: json.bufferViews.length - 1,\n\t\t\tbyteLength: 0\n\n\t\t};\n\n\t\treturn output;\n\n\t}\n\n\t/**\n\t * Process and generate a BufferView from an image Blob.\n\t * @param {Blob} blob\n\t * @return {Promise}\n\t */\n\tprocessBufferViewImage( blob ) {\n\n\t\tconst writer = this;\n\t\tconst json = writer.json;\n\n\t\tif ( ! json.bufferViews ) json.bufferViews = [];\n\n\t\treturn new Promise( function ( resolve ) {\n\n\t\t\tconst reader = new window.FileReader();\n\t\t\treader.readAsArrayBuffer( blob );\n\t\t\treader.onloadend = function () {\n\n\t\t\t\tconst buffer = getPaddedArrayBuffer( reader.result );\n\n\t\t\t\tconst bufferViewDef = {\n\t\t\t\t\tbuffer: writer.processBuffer( buffer ),\n\t\t\t\t\tbyteOffset: writer.byteOffset,\n\t\t\t\t\tbyteLength: buffer.byteLength\n\t\t\t\t};\n\n\t\t\t\twriter.byteOffset += buffer.byteLength;\n\t\t\t\tresolve( json.bufferViews.push( bufferViewDef ) - 1 );\n\n\t\t\t};\n\n\t\t} );\n\n\t}\n\n\t/**\n\t * Process attribute to generate an accessor\n\t * @param {BufferAttribute} attribute Attribute to process\n\t * @param {THREE.BufferGeometry} geometry (Optional) Geometry used for truncated draw range\n\t * @param {Integer} start (Optional)\n\t * @param {Integer} count (Optional)\n\t * @return {Integer|null} Index of the processed accessor on the \"accessors\" array\n\t */\n\tprocessAccessor( attribute, geometry, start, count ) {\n\n\t\tconst options = this.options;\n\t\tconst json = this.json;\n\n\t\tconst types = {\n\n\t\t\t1: 'SCALAR',\n\t\t\t2: 'VEC2',\n\t\t\t3: 'VEC3',\n\t\t\t4: 'VEC4',\n\t\t\t16: 'MAT4'\n\n\t\t};\n\n\t\tlet componentType;\n\n\t\t// Detect the component type of the attribute array (float, uint or ushort)\n\t\tif ( attribute.array.constructor === Float32Array ) {\n\n\t\t\tcomponentType = WEBGL_CONSTANTS.FLOAT;\n\n\t\t} else if ( attribute.array.constructor === Uint32Array ) {\n\n\t\t\tcomponentType = WEBGL_CONSTANTS.UNSIGNED_INT;\n\n\t\t} else if ( attribute.array.constructor === Uint16Array ) {\n\n\t\t\tcomponentType = WEBGL_CONSTANTS.UNSIGNED_SHORT;\n\n\t\t} else if ( attribute.array.constructor === Uint8Array ) {\n\n\t\t\tcomponentType = WEBGL_CONSTANTS.UNSIGNED_BYTE;\n\n\t\t} else {\n\n\t\t\tthrow new Error( 'THREE.GLTFExporter: Unsupported bufferAttribute component type.' );\n\n\t\t}\n\n\t\tif ( start === undefined ) start = 0;\n\t\tif ( count === undefined ) count = attribute.count;\n\n\t\t// @TODO Indexed buffer geometry with drawRange not supported yet\n\t\tif ( options.truncateDrawRange && geometry !== undefined && geometry.index === null ) {\n\n\t\t\tconst end = start + count;\n\t\t\tconst end2 = geometry.drawRange.count === Infinity\n\t\t\t\t? attribute.count\n\t\t\t\t: geometry.drawRange.start + geometry.drawRange.count;\n\n\t\t\tstart = Math.max( start, geometry.drawRange.start );\n\t\t\tcount = Math.min( end, end2 ) - start;\n\n\t\t\tif ( count < 0 ) count = 0;\n\n\t\t}\n\n\t\t// Skip creating an accessor if the attribute doesn't have data to export\n\t\tif ( count === 0 ) return null;\n\n\t\tconst minMax = getMinMax( attribute, start, count );\n\t\tlet bufferViewTarget;\n\n\t\t// If geometry isn't provided, don't infer the target usage of the bufferView. For\n\t\t// animation samplers, target must not be set.\n\t\tif ( geometry !== undefined ) {\n\n\t\t\tbufferViewTarget = attribute === geometry.index ? WEBGL_CONSTANTS.ELEMENT_ARRAY_BUFFER : WEBGL_CONSTANTS.ARRAY_BUFFER;\n\n\t\t}\n\n\t\tconst bufferView = this.processBufferView( attribute, componentType, start, count, bufferViewTarget );\n\n\t\tconst accessorDef = {\n\n\t\t\tbufferView: bufferView.id,\n\t\t\tbyteOffset: bufferView.byteOffset,\n\t\t\tcomponentType: componentType,\n\t\t\tcount: count,\n\t\t\tmax: minMax.max,\n\t\t\tmin: minMax.min,\n\t\t\ttype: types[ attribute.itemSize ]\n\n\t\t};\n\n\t\tif ( attribute.normalized === true ) accessorDef.normalized = true;\n\t\tif ( ! json.accessors ) json.accessors = [];\n\n\t\treturn json.accessors.push( accessorDef ) - 1;\n\n\t}\n\n\t/**\n\t * Process image\n\t * @param {Image} image to process\n\t * @param {Integer} format of the image (e.g. RGBFormat, RGBAFormat etc)\n\t * @param {Boolean} flipY before writing out the image\n\t * @return {Integer} Index of the processed texture in the \"images\" array\n\t */\n\tprocessImage( image, format, flipY ) {\n\n\t\tconst writer = this;\n\t\tconst cache = writer.cache;\n\t\tconst json = writer.json;\n\t\tconst options = writer.options;\n\t\tconst pending = writer.pending;\n\n\t\tif ( ! cache.images.has( image ) ) cache.images.set( image, {} );\n\n\t\tconst cachedImages = cache.images.get( image );\n\t\tconst mimeType = format === RGBAFormat ? 'image/png' : 'image/jpeg';\n\t\tconst key = mimeType + ':flipY/' + flipY.toString();\n\n\t\tif ( cachedImages[ key ] !== undefined ) return cachedImages[ key ];\n\n\t\tif ( ! json.images ) json.images = [];\n\n\t\tconst imageDef = { mimeType: mimeType };\n\n\t\tif ( options.embedImages ) {\n\n\t\t\tconst canvas = cachedCanvas = cachedCanvas || document.createElement( 'canvas' );\n\n\t\t\tcanvas.width = Math.min( image.width, options.maxTextureSize );\n\t\t\tcanvas.height = Math.min( image.height, options.maxTextureSize );\n\n\t\t\tconst ctx = canvas.getContext( '2d' );\n\n\t\t\tif ( flipY === true ) {\n\n\t\t\t\tctx.translate( 0, canvas.height );\n\t\t\t\tctx.scale( 1, - 1 );\n\n\t\t\t}\n\n\t\t\tif ( ( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) ||\n\t\t\t\t( typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement ) ||\n\t\t\t\t( typeof OffscreenCanvas !== 'undefined' && image instanceof OffscreenCanvas ) ||\n\t\t\t\t( typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap ) ) {\n\n\t\t\t\tctx.drawImage( image, 0, 0, canvas.width, canvas.height );\n\n\t\t\t} else {\n\n\t\t\t\tif ( format !== RGBAFormat && format !== RGBFormat ) {\n\n\t\t\t\t\tconsole.error( 'GLTFExporter: Only RGB and RGBA formats are supported.' );\n\n\t\t\t\t}\n\n\t\t\t\tif ( image.width > options.maxTextureSize || image.height > options.maxTextureSize ) {\n\n\t\t\t\t\tconsole.warn( 'GLTFExporter: Image size is bigger than maxTextureSize', image );\n\n\t\t\t\t}\n\n\t\t\t\tconst data = new Uint8ClampedArray( image.height * image.width * 4 );\n\n\t\t\t\tif ( format === RGBAFormat ) {\n\n\t\t\t\t\tfor ( let i = 0; i < data.length; i += 4 ) {\n\n\t\t\t\t\t\tdata[ i + 0 ] = image.data[ i + 0 ];\n\t\t\t\t\t\tdata[ i + 1 ] = image.data[ i + 1 ];\n\t\t\t\t\t\tdata[ i + 2 ] = image.data[ i + 2 ];\n\t\t\t\t\t\tdata[ i + 3 ] = image.data[ i + 3 ];\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tfor ( let i = 0, j = 0; i < data.length; i += 4, j += 3 ) {\n\n\t\t\t\t\t\tdata[ i + 0 ] = image.data[ j + 0 ];\n\t\t\t\t\t\tdata[ i + 1 ] = image.data[ j + 1 ];\n\t\t\t\t\t\tdata[ i + 2 ] = image.data[ j + 2 ];\n\t\t\t\t\t\tdata[ i + 3 ] = 255;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tctx.putImageData( new ImageData( data, image.width, image.height ), 0, 0 );\n\n\t\t\t}\n\n\t\t\tif ( options.binary === true ) {\n\n\t\t\t\tpending.push( new Promise( function ( resolve ) {\n\n\t\t\t\t\tcanvas.toBlob( function ( blob ) {\n\n\t\t\t\t\t\twriter.processBufferViewImage( blob ).then( function ( bufferViewIndex ) {\n\n\t\t\t\t\t\t\timageDef.bufferView = bufferViewIndex;\n\t\t\t\t\t\t\tresolve();\n\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t}, mimeType );\n\n\t\t\t\t} ) );\n\n\t\t\t} else {\n\n\t\t\t\timageDef.uri = canvas.toDataURL( mimeType );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\timageDef.uri = image.src;\n\n\t\t}\n\n\t\tconst index = json.images.push( imageDef ) - 1;\n\t\tcachedImages[ key ] = index;\n\t\treturn index;\n\n\t}\n\n\t/**\n\t * Process sampler\n\t * @param {Texture} map Texture to process\n\t * @return {Integer} Index of the processed texture in the \"samplers\" array\n\t */\n\tprocessSampler( map ) {\n\n\t\tconst json = this.json;\n\n\t\tif ( ! json.samplers ) json.samplers = [];\n\n\t\tconst samplerDef = {\n\t\t\tmagFilter: THREE_TO_WEBGL[ map.magFilter ],\n\t\t\tminFilter: THREE_TO_WEBGL[ map.minFilter ],\n\t\t\twrapS: THREE_TO_WEBGL[ map.wrapS ],\n\t\t\twrapT: THREE_TO_WEBGL[ map.wrapT ]\n\t\t};\n\n\t\treturn json.samplers.push( samplerDef ) - 1;\n\n\t}\n\n\t/**\n\t * Process texture\n\t * @param {Texture} map Map to process\n\t * @return {Integer} Index of the processed texture in the \"textures\" array\n\t */\n\tprocessTexture( map ) {\n\n\t\tconst cache = this.cache;\n\t\tconst json = this.json;\n\n\t\tif ( cache.textures.has( map ) ) return cache.textures.get( map );\n\n\t\tif ( ! json.textures ) json.textures = [];\n\n\t\tconst textureDef = {\n\t\t\tsampler: this.processSampler( map ),\n\t\t\tsource: this.processImage( map.image, map.format, map.flipY )\n\t\t};\n\n\t\tif ( map.name ) textureDef.name = map.name;\n\n\t\tthis._invokeAll( function ( ext ) {\n\n\t\t\text.writeTexture && ext.writeTexture( map, textureDef );\n\n\t\t} );\n\n\t\tconst index = json.textures.push( textureDef ) - 1;\n\t\tcache.textures.set( map, index );\n\t\treturn index;\n\n\t}\n\n\t/**\n\t * Process material\n\t * @param {THREE.Material} material Material to process\n\t * @return {Integer|null} Index of the processed material in the \"materials\" array\n\t */\n\tprocessMaterial( material ) {\n\n\t\tconst cache = this.cache;\n\t\tconst json = this.json;\n\n\t\tif ( cache.materials.has( material ) ) return cache.materials.get( material );\n\n\t\tif ( material.isShaderMaterial ) {\n\n\t\t\tconsole.warn( 'GLTFExporter: THREE.ShaderMaterial not supported.' );\n\t\t\treturn null;\n\n\t\t}\n\n\t\tif ( ! json.materials ) json.materials = [];\n\n\t\t// @QUESTION Should we avoid including any attribute that has the default value?\n\t\tconst materialDef = {\tpbrMetallicRoughness: {} };\n\n\t\tif ( material.isMeshStandardMaterial !== true && material.isMeshBasicMaterial !== true ) {\n\n\t\t\tconsole.warn( 'GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.' );\n\n\t\t}\n\n\t\t// pbrMetallicRoughness.baseColorFactor\n\t\tconst color = material.color.toArray().concat( [ material.opacity ] );\n\n\t\tif ( ! equalArray( color, [ 1, 1, 1, 1 ] ) ) {\n\n\t\t\tmaterialDef.pbrMetallicRoughness.baseColorFactor = color;\n\n\t\t}\n\n\t\tif ( material.isMeshStandardMaterial ) {\n\n\t\t\tmaterialDef.pbrMetallicRoughness.metallicFactor = material.metalness;\n\t\t\tmaterialDef.pbrMetallicRoughness.roughnessFactor = material.roughness;\n\n\t\t} else {\n\n\t\t\tmaterialDef.pbrMetallicRoughness.metallicFactor = 0.5;\n\t\t\tmaterialDef.pbrMetallicRoughness.roughnessFactor = 0.5;\n\n\t\t}\n\n\t\t// pbrMetallicRoughness.metallicRoughnessTexture\n\t\tif ( material.metalnessMap || material.roughnessMap ) {\n\n\t\t\tif ( material.metalnessMap === material.roughnessMap ) {\n\n\t\t\t\tconst metalRoughMapDef = { index: this.processTexture( material.metalnessMap ) };\n\t\t\t\tthis.applyTextureTransform( metalRoughMapDef, material.metalnessMap );\n\t\t\t\tmaterialDef.pbrMetallicRoughness.metallicRoughnessTexture = metalRoughMapDef;\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'THREE.GLTFExporter: Ignoring metalnessMap and roughnessMap because they are not the same Texture.' );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// pbrMetallicRoughness.baseColorTexture or pbrSpecularGlossiness diffuseTexture\n\t\tif ( material.map ) {\n\n\t\t\tconst baseColorMapDef = { index: this.processTexture( material.map ) };\n\t\t\tthis.applyTextureTransform( baseColorMapDef, material.map );\n\t\t\tmaterialDef.pbrMetallicRoughness.baseColorTexture = baseColorMapDef;\n\n\t\t}\n\n\t\tif ( material.emissive ) {\n\n\t\t\t// note: emissive components are limited to stay within the 0 - 1 range to accommodate glTF spec. see #21849 and #22000.\n\t\t\tconst emissive = material.emissive.clone().multiplyScalar( material.emissiveIntensity );\n\t\t\tconst maxEmissiveComponent = Math.max( emissive.r, emissive.g, emissive.b );\n\n\t\t\tif ( maxEmissiveComponent > 1 ) {\n\n\t\t\t\temissive.multiplyScalar( 1 / maxEmissiveComponent );\n\n\t\t\t\tconsole.warn( 'THREE.GLTFExporter: Some emissive components exceed 1; emissive has been limited' );\n\n\t\t\t}\n\n\t\t\tif ( maxEmissiveComponent > 0 ) {\n\n\t\t\t\tmaterialDef.emissiveFactor = emissive.toArray();\n\n\t\t\t}\n\n\t\t\t// emissiveTexture\n\t\t\tif ( material.emissiveMap ) {\n\n\t\t\t\tconst emissiveMapDef = { index: this.processTexture( material.emissiveMap ) };\n\t\t\t\tthis.applyTextureTransform( emissiveMapDef, material.emissiveMap );\n\t\t\t\tmaterialDef.emissiveTexture = emissiveMapDef;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// normalTexture\n\t\tif ( material.normalMap ) {\n\n\t\t\tconst normalMapDef = { index: this.processTexture( material.normalMap ) };\n\n\t\t\tif ( material.normalScale && material.normalScale.x !== - 1 ) {\n\n\t\t\t\tif ( material.normalScale.x !== material.normalScale.y ) {\n\n\t\t\t\t\tconsole.warn( 'THREE.GLTFExporter: Normal scale components are different, ignoring Y and exporting X.' );\n\n\t\t\t\t}\n\n\t\t\t\tnormalMapDef.scale = material.normalScale.x;\n\n\t\t\t}\n\n\t\t\tthis.applyTextureTransform( normalMapDef, material.normalMap );\n\t\t\tmaterialDef.normalTexture = normalMapDef;\n\n\t\t}\n\n\t\t// occlusionTexture\n\t\tif ( material.aoMap ) {\n\n\t\t\tconst occlusionMapDef = {\n\t\t\t\tindex: this.processTexture( material.aoMap ),\n\t\t\t\ttexCoord: 1\n\t\t\t};\n\n\t\t\tif ( material.aoMapIntensity !== 1.0 ) {\n\n\t\t\t\tocclusionMapDef.strength = material.aoMapIntensity;\n\n\t\t\t}\n\n\t\t\tthis.applyTextureTransform( occlusionMapDef, material.aoMap );\n\t\t\tmaterialDef.occlusionTexture = occlusionMapDef;\n\n\t\t}\n\n\t\t// alphaMode\n\t\tif ( material.transparent ) {\n\n\t\t\tmaterialDef.alphaMode = 'BLEND';\n\n\t\t} else {\n\n\t\t\tif ( material.alphaTest > 0.0 ) {\n\n\t\t\t\tmaterialDef.alphaMode = 'MASK';\n\t\t\t\tmaterialDef.alphaCutoff = material.alphaTest;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// doubleSided\n\t\tif ( material.side === DoubleSide ) materialDef.doubleSided = true;\n\t\tif ( material.name !== '' ) materialDef.name = material.name;\n\n\t\tthis.serializeUserData( material, materialDef );\n\n\t\tthis._invokeAll( function ( ext ) {\n\n\t\t\text.writeMaterial && ext.writeMaterial( material, materialDef );\n\n\t\t} );\n\n\t\tconst index = json.materials.push( materialDef ) - 1;\n\t\tcache.materials.set( material, index );\n\t\treturn index;\n\n\t}\n\n\t/**\n\t * Process mesh\n\t * @param {THREE.Mesh} mesh Mesh to process\n\t * @return {Integer|null} Index of the processed mesh in the \"meshes\" array\n\t */\n\tprocessMesh( mesh ) {\n\n\t\tconst cache = this.cache;\n\t\tconst json = this.json;\n\n\t\tconst meshCacheKeyParts = [ mesh.geometry.uuid ];\n\n\t\tif ( Array.isArray( mesh.material ) ) {\n\n\t\t\tfor ( let i = 0, l = mesh.material.length; i < l; i ++ ) {\n\n\t\t\t\tmeshCacheKeyParts.push( mesh.material[ i ].uuid\t);\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tmeshCacheKeyParts.push( mesh.material.uuid );\n\n\t\t}\n\n\t\tconst meshCacheKey = meshCacheKeyParts.join( ':' );\n\n\t\tif ( cache.meshes.has( meshCacheKey ) ) return cache.meshes.get( meshCacheKey );\n\n\t\tconst geometry = mesh.geometry;\n\t\tlet mode;\n\n\t\t// Use the correct mode\n\t\tif ( mesh.isLineSegments ) {\n\n\t\t\tmode = WEBGL_CONSTANTS.LINES;\n\n\t\t} else if ( mesh.isLineLoop ) {\n\n\t\t\tmode = WEBGL_CONSTANTS.LINE_LOOP;\n\n\t\t} else if ( mesh.isLine ) {\n\n\t\t\tmode = WEBGL_CONSTANTS.LINE_STRIP;\n\n\t\t} else if ( mesh.isPoints ) {\n\n\t\t\tmode = WEBGL_CONSTANTS.POINTS;\n\n\t\t} else {\n\n\t\t\tmode = mesh.material.wireframe ? WEBGL_CONSTANTS.LINES : WEBGL_CONSTANTS.TRIANGLES;\n\n\t\t}\n\n\t\tif ( geometry.isBufferGeometry !== true ) {\n\n\t\t\tthrow new Error( 'THREE.GLTFExporter: Geometry is not of type THREE.BufferGeometry.' );\n\n\t\t}\n\n\t\tconst meshDef = {};\n\t\tconst attributes = {};\n\t\tconst primitives = [];\n\t\tconst targets = [];\n\n\t\t// Conversion between attributes names in threejs and gltf spec\n\t\tconst nameConversion = {\n\t\t\tuv: 'TEXCOORD_0',\n\t\t\tuv2: 'TEXCOORD_1',\n\t\t\tcolor: 'COLOR_0',\n\t\t\tskinWeight: 'WEIGHTS_0',\n\t\t\tskinIndex: 'JOINTS_0'\n\t\t};\n\n\t\tconst originalNormal = geometry.getAttribute( 'normal' );\n\n\t\tif ( originalNormal !== undefined && ! this.isNormalizedNormalAttribute( originalNormal ) ) {\n\n\t\t\tconsole.warn( 'THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one.' );\n\n\t\t\tgeometry.setAttribute( 'normal', this.createNormalizedNormalAttribute( originalNormal ) );\n\n\t\t}\n\n\t\t// @QUESTION Detect if .vertexColors = true?\n\t\t// For every attribute create an accessor\n\t\tlet modifiedAttribute = null;\n\n\t\tfor ( let attributeName in geometry.attributes ) {\n\n\t\t\t// Ignore morph target attributes, which are exported later.\n\t\t\tif ( attributeName.substr( 0, 5 ) === 'morph' ) continue;\n\n\t\t\tconst attribute = geometry.attributes[ attributeName ];\n\t\t\tattributeName = nameConversion[ attributeName ] || attributeName.toUpperCase();\n\n\t\t\t// Prefix all geometry attributes except the ones specifically\n\t\t\t// listed in the spec; non-spec attributes are considered custom.\n\t\t\tconst validVertexAttributes =\n\t\t\t\t\t/^(POSITION|NORMAL|TANGENT|TEXCOORD_\\d+|COLOR_\\d+|JOINTS_\\d+|WEIGHTS_\\d+)$/;\n\n\t\t\tif ( ! validVertexAttributes.test( attributeName ) ) attributeName = '_' + attributeName;\n\n\t\t\tif ( cache.attributes.has( this.getUID( attribute ) ) ) {\n\n\t\t\t\tattributes[ attributeName ] = cache.attributes.get( this.getUID( attribute ) );\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\t// JOINTS_0 must be UNSIGNED_BYTE or UNSIGNED_SHORT.\n\t\t\tmodifiedAttribute = null;\n\t\t\tconst array = attribute.array;\n\n\t\t\tif ( attributeName === 'JOINTS_0' &&\n\t\t\t\t! ( array instanceof Uint16Array ) &&\n\t\t\t\t! ( array instanceof Uint8Array ) ) {\n\n\t\t\t\tconsole.warn( 'GLTFExporter: Attribute \"skinIndex\" converted to type UNSIGNED_SHORT.' );\n\t\t\t\tmodifiedAttribute = new BufferAttribute( new Uint16Array( array ), attribute.itemSize, attribute.normalized );\n\n\t\t\t}\n\n\t\t\tconst accessor = this.processAccessor( modifiedAttribute || attribute, geometry );\n\n\t\t\tif ( accessor !== null ) {\n\n\t\t\t\tattributes[ attributeName ] = accessor;\n\t\t\t\tcache.attributes.set( this.getUID( attribute ), accessor );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( originalNormal !== undefined ) geometry.setAttribute( 'normal', originalNormal );\n\n\t\t// Skip if no exportable attributes found\n\t\tif ( Object.keys( attributes ).length === 0 ) return null;\n\n\t\t// Morph targets\n\t\tif ( mesh.morphTargetInfluences !== undefined && mesh.morphTargetInfluences.length > 0 ) {\n\n\t\t\tconst weights = [];\n\t\t\tconst targetNames = [];\n\t\t\tconst reverseDictionary = {};\n\n\t\t\tif ( mesh.morphTargetDictionary !== undefined ) {\n\n\t\t\t\tfor ( const key in mesh.morphTargetDictionary ) {\n\n\t\t\t\t\treverseDictionary[ mesh.morphTargetDictionary[ key ] ] = key;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tfor ( let i = 0; i < mesh.morphTargetInfluences.length; ++ i ) {\n\n\t\t\t\tconst target = {};\n\t\t\t\tlet warned = false;\n\n\t\t\t\tfor ( const attributeName in geometry.morphAttributes ) {\n \n\n\t\t\t\t\t// glTF 2.0 morph supports only POSITION/NORMAL/TANGENT.\n\t\t\t\t\t// Three.js doesn't support TANGENT yet.\n\n\t\t\t\t\tif ( attributeName !== 'position' && attributeName !== 'normal' && attributeName !== 'color' ) {\n\n\t\t\t\t\t\tif ( ! warned ) {\n\n\t\t\t\t\t\t\tconsole.warn( 'GLTFExporter: Only POSITION and NORMAL morph are supported.' );\n\t\t\t\t\t\t\twarned = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst attribute = geometry.morphAttributes[ attributeName ][ i ];\n\t\t\t\t\tlet gltfAttributeName = attributeName.toUpperCase();\n\n if ( nameConversion[ attributeName ] ) {\n\n gltfAttributeName = nameConversion[ attributeName ];\n\n }\n\n\t\t\t\t\t// Three.js morph attribute has absolute values while the one of glTF has relative values.\n\t\t\t\t\t//\n\t\t\t\t\t// glTF 2.0 Specification:\n\t\t\t\t\t// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#morph-targets\n\n\t\t\t\t\tconst baseAttribute = geometry.attributes[ attributeName ];\n\n\t\t\t\t\tif ( cache.attributes.has( this.getUID( attribute ) ) ) {\n\n\t\t\t\t\t\ttarget[ gltfAttributeName ] = cache.attributes.get( this.getUID( attribute ) );\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// Clones attribute not to override\n\t\t\t\t\tconst relativeAttribute = baseAttribute.clone();\n\n\t\t\t\t\tif ( ! geometry.morphTargetsRelative ) {\n\n if (baseAttribute) {\n \n for ( let j = 0, jl = attribute.count; j < jl; j ++ ) {\n\n if (baseAttribute.count > j) {\n\n relativeAttribute.setXYZ(\n j,\n attribute.getX( j ) - baseAttribute.getX( j ),\n attribute.getY( j ) - baseAttribute.getY( j ),\n attribute.getZ( j ) - baseAttribute.getZ( j )\n );\n\n }\n\n }\n\n } else {\n\n for ( let j = 0, jl = attribute.count; j < jl; j ++ ) {\n\n relativeAttribute.setXYZ(\n j,\n 0,\n 0,\n 0\n );\n\n }\n\n }\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttarget[ gltfAttributeName ] = this.processAccessor( relativeAttribute, geometry );\n\t\t\t\t\tcache.attributes.set( this.getUID( baseAttribute ), target[ gltfAttributeName ] );\n\n\t\t\t\t}\n\n\t\t\t\ttargets.push( target );\n\n\t\t\t\tweights.push( mesh.morphTargetInfluences[ i ] );\n\n\t\t\t\tif ( mesh.morphTargetDictionary !== undefined ) targetNames.push( reverseDictionary[ i ] );\n\n\t\t\t}\n\n\t\t\tmeshDef.weights = weights;\n\n\t\t\tif ( targetNames.length > 0 ) {\n\n\t\t\t\tmeshDef.extras = {};\n\t\t\t\tmeshDef.extras.targetNames = targetNames;\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst isMultiMaterial = Array.isArray( mesh.material );\n\n\t\tif ( isMultiMaterial && geometry.groups.length === 0 ) return null;\n\n\t\tconst materials = isMultiMaterial ? mesh.material : [ mesh.material ];\n\t\tconst groups = isMultiMaterial ? geometry.groups : [ { materialIndex: 0, start: undefined, count: undefined } ];\n\n\t\tfor ( let i = 0, il = groups.length; i < il; i ++ ) {\n\n\t\t\tconst primitive = {\n\t\t\t\tmode: mode,\n\t\t\t\tattributes: attributes,\n\t\t\t};\n\n\t\t\tthis.serializeUserData( geometry, primitive );\n\n\t\t\tif ( targets.length > 0 ) primitive.targets = targets;\n\n\t\t\tif ( geometry.index !== null ) {\n\n\t\t\t\tlet cacheKey = this.getUID( geometry.index );\n\n\t\t\t\tif ( groups[ i ].start !== undefined || groups[ i ].count !== undefined ) {\n\n\t\t\t\t\tcacheKey += ':' + groups[ i ].start + ':' + groups[ i ].count;\n\n\t\t\t\t}\n\n\t\t\t\tif ( cache.attributes.has( cacheKey ) ) {\n\n\t\t\t\t\tprimitive.indices = cache.attributes.get( cacheKey );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tprimitive.indices = this.processAccessor( geometry.index, geometry, groups[ i ].start, groups[ i ].count );\n\t\t\t\t\tcache.attributes.set( cacheKey, primitive.indices );\n\n\t\t\t\t}\n\n\t\t\t\tif ( primitive.indices === null ) delete primitive.indices;\n\n\t\t\t}\n\n\t\t\tconst material = this.processMaterial( materials[ groups[ i ].materialIndex ] );\n\n\t\t\tif ( material !== null ) primitive.material = material;\n\n\t\t\tprimitives.push( primitive );\n\n\t\t}\n\n\t\tmeshDef.primitives = primitives;\n\n\t\tif ( ! json.meshes ) json.meshes = [];\n\n\t\tthis._invokeAll( function ( ext ) {\n\n\t\t\text.writeMesh && ext.writeMesh( mesh, meshDef );\n\n\t\t} );\n\n\t\tconst index = json.meshes.push( meshDef ) - 1;\n\t\tcache.meshes.set( meshCacheKey, index );\n\t\treturn index;\n\n\t}\n\n\t/**\n\t * Process camera\n\t * @param {THREE.Camera} camera Camera to process\n\t * @return {Integer} Index of the processed mesh in the \"camera\" array\n\t */\n\tprocessCamera( camera ) {\n\n\t\tconst json = this.json;\n\n\t\tif ( ! json.cameras ) json.cameras = [];\n\n\t\tconst isOrtho = camera.isOrthographicCamera;\n\n\t\tconst cameraDef = {\n\t\t\ttype: isOrtho ? 'orthographic' : 'perspective'\n\t\t};\n\n\t\tif ( isOrtho ) {\n\n\t\t\tcameraDef.orthographic = {\n\t\t\t\txmag: camera.right * 2,\n\t\t\t\tymag: camera.top * 2,\n\t\t\t\tzfar: camera.far <= 0 ? 0.001 : camera.far,\n\t\t\t\tznear: camera.near < 0 ? 0 : camera.near\n\t\t\t};\n\n\t\t} else {\n\n\t\t\tcameraDef.perspective = {\n\t\t\t\taspectRatio: camera.aspect,\n\t\t\t\tyfov: MathUtils.degToRad( camera.fov ),\n\t\t\t\tzfar: camera.far <= 0 ? 0.001 : camera.far,\n\t\t\t\tznear: camera.near < 0 ? 0 : camera.near\n\t\t\t};\n\n\t\t}\n\n\t\t// Question: Is saving \"type\" as name intentional?\n\t\tif ( camera.name !== '' ) cameraDef.name = camera.type;\n\n\t\treturn json.cameras.push( cameraDef ) - 1;\n\n\t}\n\n\t/**\n\t * Creates glTF animation entry from AnimationClip object.\n\t *\n\t * Status:\n\t * - Only properties listed in PATH_PROPERTIES may be animated.\n\t *\n\t * @param {THREE.AnimationClip} clip\n\t * @param {THREE.Object3D} root\n\t * @return {number|null}\n\t */\n\tprocessAnimation( clip, root ) {\n\n\t\tconst json = this.json;\n\t\tconst nodeMap = this.nodeMap;\n\n\t\tif ( ! json.animations ) json.animations = [];\n\n\t\tclip = GLTFExporter.Utils.mergeMorphTargetTracks( clip.clone(), root );\n\n\t\tconst tracks = clip.tracks;\n\t\tconst channels = [];\n\t\tconst samplers = [];\n\n\t\tfor ( let i = 0; i < tracks.length; ++ i ) {\n\n\t\t\tconst track = tracks[ i ];\n\t\t\tconst trackBinding = PropertyBinding.parseTrackName( track.name );\n\t\t\tlet trackNode = PropertyBinding.findNode( root, trackBinding.nodeName );\n\t\t\tconst trackProperty = PATH_PROPERTIES[ trackBinding.propertyName ];\n\n\t\t\tif ( trackBinding.objectName === 'bones' ) {\n\n\t\t\t\tif ( trackNode.isSkinnedMesh === true ) {\n\n\t\t\t\t\ttrackNode = trackNode.skeleton.getBoneByName( trackBinding.objectIndex );\n\n\t\t\t\t} else {\n\n\t\t\t\t\ttrackNode = undefined;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( ! trackNode || ! trackProperty ) {\n\n\t\t\t\tconsole.warn( 'THREE.GLTFExporter: Could not export animation track \"%s\".', track.name );\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t\tconst inputItemSize = 1;\n\t\t\tlet outputItemSize = track.values.length / track.times.length;\n\n\t\t\tif ( trackProperty === PATH_PROPERTIES.morphTargetInfluences ) {\n\n\t\t\t\toutputItemSize /= trackNode.morphTargetInfluences.length;\n\n\t\t\t}\n\n\t\t\tlet interpolation;\n\n\t\t\t// @TODO export CubicInterpolant(InterpolateSmooth) as CUBICSPLINE\n\n\t\t\t// Detecting glTF cubic spline interpolant by checking factory method's special property\n\t\t\t// GLTFCubicSplineInterpolant is a custom interpolant and track doesn't return\n\t\t\t// valid value from .getInterpolation().\n\t\t\tif ( track.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline === true ) {\n\n\t\t\t\tinterpolation = 'CUBICSPLINE';\n\n\t\t\t\t// itemSize of CUBICSPLINE keyframe is 9\n\t\t\t\t// (VEC3 * 3: inTangent, splineVertex, and outTangent)\n\t\t\t\t// but needs to be stored as VEC3 so dividing by 3 here.\n\t\t\t\toutputItemSize /= 3;\n\n\t\t\t} else if ( track.getInterpolation() === InterpolateDiscrete ) {\n\n\t\t\t\tinterpolation = 'STEP';\n\n\t\t\t} else {\n\n\t\t\t\tinterpolation = 'LINEAR';\n\n\t\t\t}\n\n\t\t\tsamplers.push( {\n\t\t\t\tinput: this.processAccessor( new BufferAttribute( track.times, inputItemSize ) ),\n\t\t\t\toutput: this.processAccessor( new BufferAttribute( track.values, outputItemSize ) ),\n\t\t\t\tinterpolation: interpolation\n\t\t\t} );\n\n\t\t\tchannels.push( {\n\t\t\t\tsampler: samplers.length - 1,\n\t\t\t\ttarget: {\n\t\t\t\t\tnode: nodeMap.get( trackNode ),\n\t\t\t\t\tpath: trackProperty\n\t\t\t\t}\n\t\t\t} );\n\n\t\t}\n\n\t\tjson.animations.push( {\n\t\t\tname: clip.name || 'clip_' + json.animations.length,\n\t\t\tsamplers: samplers,\n\t\t\tchannels: channels\n\t\t} );\n\n\t\treturn json.animations.length - 1;\n\n\t}\n\n\t/**\n\t * @param {THREE.Object3D} object\n\t * @return {number|null}\n\t */\n\t processSkin( object ) {\n\n\t\tconst json = this.json;\n\t\tconst nodeMap = this.nodeMap;\n\n\t\tconst node = json.nodes[ nodeMap.get( object ) ];\n\n\t\tconst skeleton = object.skeleton;\n\n\t\tif ( skeleton === undefined ) return null;\n\n\t\tconst rootJoint = object.skeleton.bones[ 0 ];\n\n\t\tif ( rootJoint === undefined ) return null;\n\n\t\tconst joints = [];\n\t\tconst inverseBindMatrices = new Float32Array( skeleton.bones.length * 16 );\n\t\tconst temporaryBoneInverse = new Matrix4();\n\n\t\tfor ( let i = 0; i < skeleton.bones.length; ++ i ) {\n\n\t\t\tjoints.push( nodeMap.get( skeleton.bones[ i ] ) );\n\t\t\ttemporaryBoneInverse.copy( skeleton.boneInverses[ i ] );\n\t\t\ttemporaryBoneInverse.multiply( object.bindMatrix ).toArray( inverseBindMatrices, i * 16 );\n\n\t\t}\n\n\t\tif ( json.skins === undefined ) json.skins = [];\n\n\t\tjson.skins.push( {\n\t\t\tinverseBindMatrices: this.processAccessor( new BufferAttribute( inverseBindMatrices, 16 ) ),\n\t\t\tjoints: joints,\n\t\t\tskeleton: nodeMap.get( rootJoint )\n\t\t} );\n\n\t\tconst skinIndex = node.skin = json.skins.length - 1;\n\n\t\treturn skinIndex;\n\n\t}\n\n\t/**\n\t * Process Object3D node\n\t * @param {THREE.Object3D} node Object3D to processNode\n\t * @return {Integer} Index of the node in the nodes list\n\t */\n\tprocessNode( object ) {\n\n\t\tconst json = this.json;\n\t\tconst options = this.options;\n\t\tconst nodeMap = this.nodeMap;\n\n\t\tif ( ! json.nodes ) json.nodes = [];\n\n\t\tconst nodeDef = {};\n\n\t\tif ( options.trs ) {\n\n\t\t\tconst rotation = object.quaternion.toArray();\n\t\t\tconst position = object.position.toArray();\n\t\t\tconst scale = object.scale.toArray();\n\n\t\t\tif ( ! equalArray( rotation, [ 0, 0, 0, 1 ] ) ) {\n\n\t\t\t\tnodeDef.rotation = rotation;\n\n\t\t\t}\n\n\t\t\tif ( ! equalArray( position, [ 0, 0, 0 ] ) ) {\n\n\t\t\t\tnodeDef.translation = position;\n\n\t\t\t}\n\n\t\t\tif ( ! equalArray( scale, [ 1, 1, 1 ] ) ) {\n\n\t\t\t\tnodeDef.scale = scale;\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif ( object.matrixAutoUpdate ) {\n\n\t\t\t\tobject.updateMatrix();\n\n\t\t\t}\n\n\t\t\tif ( isIdentityMatrix( object.matrix ) === false ) {\n\n\t\t\t\tnodeDef.matrix = object.matrix.elements;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// We don't export empty strings name because it represents no-name in Three.js.\n\t\tif ( object.name !== '' ) nodeDef.name = String( object.name );\n\n\t\tthis.serializeUserData( object, nodeDef );\n\n\t\tif ( object.isMesh || object.isLine || object.isPoints ) {\n\n\t\t\tconst meshIndex = this.processMesh( object );\n\n\t\t\tif ( meshIndex !== null ) nodeDef.mesh = meshIndex;\n\n\t\t} else if ( object.isCamera ) {\n\n\t\t\tnodeDef.camera = this.processCamera( object );\n\n\t\t}\n\n\t\tif ( object.isSkinnedMesh ) this.skins.push( object );\n\n\t\tif ( object.children.length > 0 ) {\n\n\t\t\tconst children = [];\n\n\t\t\tfor ( let i = 0, l = object.children.length; i < l; i ++ ) {\n\n\t\t\t\tconst child = object.children[ i ];\n\n\t\t\t\tif ( child.visible || options.onlyVisible === false ) {\n\n\t\t\t\t\tconst nodeIndex = this.processNode( child );\n\n\t\t\t\t\tif ( nodeIndex !== null ) children.push( nodeIndex );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( children.length > 0 ) nodeDef.children = children;\n\n\t\t}\n\n\t\tthis._invokeAll( function ( ext ) {\n\n\t\t\text.writeNode && ext.writeNode( object, nodeDef );\n\n\t\t} );\n\n\t\tconst nodeIndex = json.nodes.push( nodeDef ) - 1;\n\t\tnodeMap.set( object, nodeIndex );\n\t\treturn nodeIndex;\n\n\t}\n\n\t/**\n\t * Process Scene\n\t * @param {Scene} node Scene to process\n\t */\n\tprocessScene( scene ) {\n\n\t\tconst json = this.json;\n\t\tconst options = this.options;\n\n\t\tif ( ! json.scenes ) {\n\n\t\t\tjson.scenes = [];\n\t\t\tjson.scene = 0;\n\n\t\t}\n\n\t\tconst sceneDef = {};\n\n\t\tif ( scene.name !== '' ) sceneDef.name = scene.name;\n\n\t\tjson.scenes.push( sceneDef );\n\n\t\tconst nodes = [];\n\n\t\tfor ( let i = 0, l = scene.children.length; i < l; i ++ ) {\n\n\t\t\tconst child = scene.children[ i ];\n\n\t\t\tif ( child.visible || options.onlyVisible === false ) {\n\n\t\t\t\tconst nodeIndex = this.processNode( child );\n\n\t\t\t\tif ( nodeIndex !== null ) nodes.push( nodeIndex );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( nodes.length > 0 ) sceneDef.nodes = nodes;\n\n\t\tthis.serializeUserData( scene, sceneDef );\n\n\t}\n\n\t/**\n\t * Creates a Scene to hold a list of objects and parse it\n\t * @param {Array} objects List of objects to process\n\t */\n\tprocessObjects( objects ) {\n\n\t\tconst scene = new Scene();\n\t\tscene.name = 'AuxScene';\n\n\t\tfor ( let i = 0; i < objects.length; i ++ ) {\n\n\t\t\t// We push directly to children instead of calling `add` to prevent\n\t\t\t// modify the .parent and break its original scene and hierarchy\n\t\t\tscene.children.push( objects[ i ] );\n\n\t\t}\n\n\t\tthis.processScene( scene );\n\n\t}\n\n\t/**\n\t * @param {THREE.Object3D|Array} input\n\t */\n\tprocessInput( input ) {\n\n\t\tconst options = this.options;\n\n\t\tinput = input instanceof Array ? input : [ input ];\n\n\t\tthis._invokeAll( function ( ext ) {\n\n\t\t\text.beforeParse && ext.beforeParse( input );\n\n\t\t} );\n\n\t\tconst objectsWithoutScene = [];\n\n\t\tfor ( let i = 0; i < input.length; i ++ ) {\n\n\t\t\tif ( input[ i ] instanceof Scene ) {\n\n\t\t\t\tthis.processScene( input[ i ] );\n\n\t\t\t} else {\n\n\t\t\t\tobjectsWithoutScene.push( input[ i ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( objectsWithoutScene.length > 0 ) this.processObjects( objectsWithoutScene );\n\n\t\tfor ( let i = 0; i < this.skins.length; ++ i ) {\n\n\t\t\tthis.processSkin( this.skins[ i ] );\n\n\t\t}\n\n\t\tfor ( let i = 0; i < options.animations.length; ++ i ) {\n\n\t\t\tthis.processAnimation( options.animations[ i ].clip, options.animations[i].mesh);\n\n\t\t}\n\n\t\tthis._invokeAll( function ( ext ) {\n\n\t\t\text.afterParse && ext.afterParse( input );\n\n\t\t} );\n\n\t}\n\n\t_invokeAll( func ) {\n\n\t\tfor ( let i = 0, il = this.plugins.length; i < il; i ++ ) {\n\n\t\t\tfunc( this.plugins[ i ] );\n\n\t\t}\n\n\t}\n\n}\n\n/**\n * Punctual Lights Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_lights_punctual\n */\nclass GLTFLightExtension {\n\n\tconstructor( writer ) {\n\n\t\tthis.writer = writer;\n\t\tthis.name = 'KHR_lights_punctual';\n\n\t}\n\n\twriteNode( light, nodeDef ) {\n\n\t\tif ( ! light.isLight ) return;\n\n\t\tif ( ! light.isDirectionalLight && ! light.isPointLight && ! light.isSpotLight ) {\n\n\t\t\tconsole.warn( 'THREE.GLTFExporter: Only directional, point, and spot lights are supported.', light );\n\t\t\treturn;\n\n\t\t}\n\n\t\tconst writer = this.writer;\n\t\tconst json = writer.json;\n\t\tconst extensionsUsed = writer.extensionsUsed;\n\n\t\tconst lightDef = {};\n\n\t\tif ( light.name ) lightDef.name = light.name;\n\n\t\tlightDef.color = light.color.toArray();\n\n\t\tlightDef.intensity = light.intensity;\n\n\t\tif ( light.isDirectionalLight ) {\n\n\t\t\tlightDef.type = 'directional';\n\n\t\t} else if ( light.isPointLight ) {\n\n\t\t\tlightDef.type = 'point';\n\n\t\t\tif ( light.distance > 0 ) lightDef.range = light.distance;\n\n\t\t} else if ( light.isSpotLight ) {\n\n\t\t\tlightDef.type = 'spot';\n\n\t\t\tif ( light.distance > 0 ) lightDef.range = light.distance;\n\n\t\t\tlightDef.spot = {};\n\t\t\tlightDef.spot.innerConeAngle = ( light.penumbra - 1.0 ) * light.angle * - 1.0;\n\t\t\tlightDef.spot.outerConeAngle = light.angle;\n\n\t\t}\n\n\t\tif ( light.decay !== undefined && light.decay !== 2 ) {\n\n\t\t\tconsole.warn( 'THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, '\n\t\t\t\t+ 'and expects light.decay=2.' );\n\n\t\t}\n\n\t\tif ( light.target\n\t\t\t\t&& ( light.target.parent !== light\n\t\t\t\t|| light.target.position.x !== 0\n\t\t\t\t|| light.target.position.y !== 0\n\t\t\t\t|| light.target.position.z !== - 1 ) ) {\n\n\t\t\tconsole.warn( 'THREE.GLTFExporter: Light direction may be lost. For best results, '\n\t\t\t\t+ 'make light.target a child of the light with position 0,0,-1.' );\n\n\t\t}\n\n\t\tif ( ! extensionsUsed[ this.name ] ) {\n\n\t\t\tjson.extensions = json.extensions || {};\n\t\t\tjson.extensions[ this.name ] = { lights: [] };\n\t\t\textensionsUsed[ this.name ] = true;\n\n\t\t}\n\n\t\tconst lights = json.extensions[ this.name ].lights;\n\t\tlights.push( lightDef );\n\n\t\tnodeDef.extensions = nodeDef.extensions || {};\n\t\tnodeDef.extensions[ this.name ] = { light: lights.length - 1 };\n\n\t}\n\n}\n\n/**\n * Unlit Materials Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit\n */\nclass GLTFMaterialsUnlitExtension {\n\n\tconstructor( writer ) {\n\n\t\tthis.writer = writer;\n\t\tthis.name = 'KHR_materials_unlit';\n\n\t}\n\n\twriteMaterial( material, materialDef ) {\n\n\t\tif ( ! material.isMeshBasicMaterial ) return;\n\n\t\tconst writer = this.writer;\n\t\tconst extensionsUsed = writer.extensionsUsed;\n\n\t\tmaterialDef.extensions = materialDef.extensions || {};\n\t\tmaterialDef.extensions[ this.name ] = {};\n\n\t\textensionsUsed[ this.name ] = true;\n\n\t\tmaterialDef.pbrMetallicRoughness.metallicFactor = 0.0;\n\t\tmaterialDef.pbrMetallicRoughness.roughnessFactor = 0.9;\n\n\t}\n\n}\n\n/**\n * Specular-Glossiness Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness\n */\nclass GLTFMaterialsPBRSpecularGlossiness {\n\n\tconstructor( writer ) {\n\n\t\tthis.writer = writer;\n\t\tthis.name = 'KHR_materials_pbrSpecularGlossiness';\n\n\t}\n\n\twriteMaterial( material, materialDef ) {\n\n\t\tif ( ! material.isGLTFSpecularGlossinessMaterial ) return;\n\n\t\tconst writer = this.writer;\n\t\tconst extensionsUsed = writer.extensionsUsed;\n\n\t\tconst extensionDef = {};\n\n\t\tif ( materialDef.pbrMetallicRoughness.baseColorFactor ) {\n\n\t\t\textensionDef.diffuseFactor = materialDef.pbrMetallicRoughness.baseColorFactor;\n\n\t\t}\n\n\t\tconst specularFactor = [ 1, 1, 1 ];\n\t\tmaterial.specular.toArray( specularFactor, 0 );\n\t\textensionDef.specularFactor = specularFactor;\n\t\textensionDef.glossinessFactor = material.glossiness;\n\n\t\tif ( materialDef.pbrMetallicRoughness.baseColorTexture ) {\n\n\t\t\textensionDef.diffuseTexture = materialDef.pbrMetallicRoughness.baseColorTexture;\n\n\t\t}\n\n\t\tif ( material.specularMap ) {\n\n\t\t\tconst specularMapDef = { index: writer.processTexture( material.specularMap ) };\n\t\t\twriter.applyTextureTransform( specularMapDef, material.specularMap );\n\t\t\textensionDef.specularGlossinessTexture = specularMapDef;\n\n\t\t}\n\n\t\tmaterialDef.extensions = materialDef.extensions || {};\n\t\tmaterialDef.extensions[ this.name ] = extensionDef;\n\t\textensionsUsed[ this.name ] = true;\n\n\t}\n\n}\n\n/**\n * Static utility functions\n */\nGLTFExporter.Utils = {\n\n\tinsertKeyframe: function ( track, time ) {\n\n\t\tconst tolerance = 0.001; // 1ms\n\t\tconst valueSize = track.getValueSize();\n\n\t\tconst times = new track.TimeBufferType( track.times.length + 1 );\n\t\tconst values = new track.ValueBufferType( track.values.length + valueSize );\n\t\tconst interpolant = track.createInterpolant( new track.ValueBufferType( valueSize ) );\n\n\t\tlet index;\n\n\t\tif ( track.times.length === 0 ) {\n\n\t\t\ttimes[ 0 ] = time;\n\n\t\t\tfor ( let i = 0; i < valueSize; i ++ ) {\n\n\t\t\t\tvalues[ i ] = 0;\n\n\t\t\t}\n\n\t\t\tindex = 0;\n\n\t\t} else if ( time < track.times[ 0 ] ) {\n\n\t\t\tif ( Math.abs( track.times[ 0 ] - time ) < tolerance ) return 0;\n\n\t\t\ttimes[ 0 ] = time;\n\t\t\ttimes.set( track.times, 1 );\n\n\t\t\tvalues.set( interpolant.evaluate( time ), 0 );\n\t\t\tvalues.set( track.values, valueSize );\n\n\t\t\tindex = 0;\n\n\t\t} else if ( time > track.times[ track.times.length - 1 ] ) {\n\n\t\t\tif ( Math.abs( track.times[ track.times.length - 1 ] - time ) < tolerance ) {\n\n\t\t\t\treturn track.times.length - 1;\n\n\t\t\t}\n\n\t\t\ttimes[ times.length - 1 ] = time;\n\t\t\ttimes.set( track.times, 0 );\n\n\t\t\tvalues.set( track.values, 0 );\n\t\t\tvalues.set( interpolant.evaluate( time ), track.values.length );\n\n\t\t\tindex = times.length - 1;\n\n\t\t} else {\n\n\t\t\tfor ( let i = 0; i < track.times.length; i ++ ) {\n\n\t\t\t\tif ( Math.abs( track.times[ i ] - time ) < tolerance ) return i;\n\n\t\t\t\tif ( track.times[ i ] < time && track.times[ i + 1 ] > time ) {\n\n\t\t\t\t\ttimes.set( track.times.slice( 0, i + 1 ), 0 );\n\t\t\t\t\ttimes[ i + 1 ] = time;\n\t\t\t\t\ttimes.set( track.times.slice( i + 1 ), i + 2 );\n\n\t\t\t\t\tvalues.set( track.values.slice( 0, ( i + 1 ) * valueSize ), 0 );\n\t\t\t\t\tvalues.set( interpolant.evaluate( time ), ( i + 1 ) * valueSize );\n\t\t\t\t\tvalues.set( track.values.slice( ( i + 1 ) * valueSize ), ( i + 2 ) * valueSize );\n\n\t\t\t\t\tindex = i + 1;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\ttrack.times = times;\n\t\ttrack.values = values;\n\n\t\treturn index;\n\n\t},\n\n\tmergeMorphTargetTracks: function ( clip, root ) {\n\n\t\tconst tracks = [];\n\t\tconst mergedTracks = {};\n\t\tconst sourceTracks = clip.tracks;\n\n\t\tfor ( let i = 0; i < sourceTracks.length; ++ i ) {\n\n\t\t\tlet sourceTrack = sourceTracks[ i ];\n\t\t\tconst sourceTrackBinding = PropertyBinding.parseTrackName( sourceTrack.name );\n\t\t\tconst sourceTrackNode = PropertyBinding.findNode( root, sourceTrackBinding.nodeName );\n\n\t\t\tif ( sourceTrackBinding.propertyName !== 'morphTargetInfluences' || sourceTrackBinding.propertyIndex === undefined ) {\n\n\t\t\t\t// Tracks that don't affect morph targets, or that affect all morph targets together, can be left as-is.\n\t\t\t\ttracks.push( sourceTrack );\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\tif ( sourceTrack.createInterpolant !== sourceTrack.InterpolantFactoryMethodDiscrete\n\t\t\t\t&& sourceTrack.createInterpolant !== sourceTrack.InterpolantFactoryMethodLinear ) {\n\n\t\t\t\tif ( sourceTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline ) {\n\n\t\t\t\t\t// This should never happen, because glTF morph target animations\n\t\t\t\t\t// affect all targets already.\n\t\t\t\t\tthrow new Error( 'THREE.GLTFExporter: Cannot merge tracks with glTF CUBICSPLINE interpolation.' );\n\n\t\t\t\t}\n\n\t\t\t\tconsole.warn( 'THREE.GLTFExporter: Morph target interpolation mode not yet supported. Using LINEAR instead.' );\n\n\t\t\t\tsourceTrack = sourceTrack.clone();\n\t\t\t\tsourceTrack.setInterpolation( InterpolateLinear );\n\n\t\t\t}\n\n\t\t\tconst targetCount = sourceTrackNode.morphTargetInfluences.length;\n\t\t\tconst targetIndex = sourceTrackNode.morphTargetDictionary[ sourceTrackBinding.propertyIndex ];\n\n\t\t\tif ( targetIndex === undefined ) {\n\n\t\t\t\tthrow new Error( 'THREE.GLTFExporter: Morph target name not found: ' + sourceTrackBinding.propertyIndex );\n\n\t\t\t}\n\n\t\t\tlet mergedTrack;\n\n\t\t\t// If this is the first time we've seen this object, create a new\n\t\t\t// track to store merged keyframe data for each morph target.\n\t\t\tif ( mergedTracks[ sourceTrackNode.uuid ] === undefined ) {\n\n\t\t\t\tmergedTrack = sourceTrack.clone();\n\n\t\t\t\tconst values = new mergedTrack.ValueBufferType( targetCount * mergedTrack.times.length );\n\n\t\t\t\tfor ( let j = 0; j < mergedTrack.times.length; j ++ ) {\n\n\t\t\t\t\tvalues[ j * targetCount + targetIndex ] = mergedTrack.values[ j ];\n\n\t\t\t\t}\n\n\t\t\t\t// We need to take into consideration the intended target node\n\t\t\t\t// of our original un-merged morphTarget animation.\n\t\t\t\tmergedTrack.name = ( sourceTrackBinding.nodeName || '' ) + '.morphTargetInfluences';\n\t\t\t\tmergedTrack.values = values;\n\n\t\t\t\tmergedTracks[ sourceTrackNode.uuid ] = mergedTrack;\n\t\t\t\ttracks.push( mergedTrack );\n\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\tconst sourceInterpolant = sourceTrack.createInterpolant( new sourceTrack.ValueBufferType( 1 ) );\n\n\t\t\tmergedTrack = mergedTracks[ sourceTrackNode.uuid ];\n\n\t\t\t// For every existing keyframe of the merged track, write a (possibly\n\t\t\t// interpolated) value from the source track.\n\t\t\tfor ( let j = 0; j < mergedTrack.times.length; j ++ ) {\n\n\t\t\t\tmergedTrack.values[ j * targetCount + targetIndex ] = sourceInterpolant.evaluate( mergedTrack.times[ j ] );\n\n\t\t\t}\n\n\t\t\t// For every existing keyframe of the source track, write a (possibly\n\t\t\t// new) keyframe to the merged track. Values from the previous loop may\n\t\t\t// be written again, but keyframes are de-duplicated.\n\t\t\tfor ( let j = 0; j < sourceTrack.times.length; j ++ ) {\n\n\t\t\t\tconst keyframeIndex = this.insertKeyframe( mergedTrack, sourceTrack.times[ j ] );\n\t\t\t\tmergedTrack.values[ keyframeIndex * targetCount + targetIndex ] = sourceTrack.values[ j ];\n\n\t\t\t}\n\n\t\t}\n\n\t\tclip.tracks = tracks;\n\n\t\treturn clip;\n\n\t}\n\n};\n\nexport { GLTFExporter };\n","const THREE = require('three');\nconst resolveURL = require('./utilities').resolveURL;\n\n/**\n * Object with containg viewport information used in ZincJS.\n * \n * @class\n * @author Alan Wu\n * @return {Viewport}\n */\nconst Viewport = function () {\n /** @property {Number} */\n\tthis.nearPlane = 0.168248;\n /** @property {Number} */\n\tthis.farPlane = 6.82906;\n /**@property {Array} */\n\tthis.eyePosition = [0.5, -2.86496, 0.5];\n /** @property {Array} */\n\tthis.targetPosition = [0.5, 0.5, 0.5];\n /** @property {Array} */\n\tthis.upVector = [ 0.0, 0.0, 1.0];\n\tconst _this = this;\n\n this.setFromObject = ({ nearPlane, farPlane, eyePosition, targetPosition, upVector }) => {\n _this.nearPlane = nearPlane;\n _this.farPlane = farPlane;\n _this.eyePosition = eyePosition;\n _this.targetPosition = targetPosition;\n _this.upVector = upVector;\n }\n};\n\n/**\n * Provides the basic controls for a scene.\n * \n * @class\n * @author Alan Wu\n * @return {CameraControls}\n */\nconst CameraControls = function ( object, domElement, renderer, scene ) {\n\tconst MODE = { NONE: -1, DEFAULT: 0, PATH: 1, SMOOTH_CAMERA_TRANSITION: 2, AUTO_TUMBLE: 3, ROTATE_TRANSITION: 4, MINIMAP: 5, SYNC_CONTROL: 6 };\n /** \n * Actions states.\n * Available states are NONE, ROTATE, ZOOM, PAN, TOUCH_ROTATE, TOUCH_ZOOM, TOUCH_PAN and SCROLL.\n * @property {Object} \n */\n\tconst STATE = { NONE: -1, ROTATE: 0, ZOOM: 1, PAN: 2, TOUCH_ROTATE: 3, TOUCH_ZOOM: 4, TOUCH_PAN: 5, SCROLL: 6 };\n const ROTATE_DIRECTION = { NONE: -1, FREE: 1, HORIZONTAL: 2, VERTICAL: 3 };\n /** \n * Available click actions are MAIN, AUXILIARY and SECONARY.\n * @property {Object} \n */\n\tconst CLICK_ACTION = {};\n\tCLICK_ACTION.MAIN = STATE.ROTATE;\n\tCLICK_ACTION.AUXILIARY = STATE.ZOOM;\n\tCLICK_ACTION.SECONDARY = STATE.PAN;\n\tthis.cameraObject = object;\n\tthis.domElement = ( domElement !== undefined ) ? domElement : document;\n\tthis.renderer = renderer;\n\tthis.scene = scene ;\n\tthis.tumble_rate = 1.5;\n\tthis.pointer_x = 0;\n\tthis.pointer_y = 0;\n\tthis.pointer_x_start = 0;\n\tthis.pointer_y_start = 0;\n\tthis.previous_pointer_x = 0;\n\tthis.previous_pointer_y = 0;\n\tthis.near_plane_fly_debt = 0.0;\n\tthis.touchZoomDistanceStart = 0;\n\tthis.touchZoomDistanceEnd = 0;\n\tthis.directionalLight = 0;\n\tthis.scrollRate = 50;\n\tthis.pixelHeight = 1;\n\tlet duration = 6000;\n let enabled = true;\n\tlet inbuildTime = 0;\n\tlet cameraPath = undefined;\n\tlet numberOfCameraPoint = undefined;\n\tlet updateLightWithPathFlag = false;\n\tlet playRate = 500;\n\tlet deviceOrientationControl = undefined;\n\tlet defaultViewport = \"default\";\n\tlet currentMode = MODE.DEFAULT;\n\tlet smoothCameraTransitionObject = undefined;\n\tlet rotateCameraTransitionObject = undefined;\n\tlet cameraAutoTumbleObject = undefined;\n\tlet mouseScroll = 0;\n let rotateMode = ROTATE_DIRECTION.FREE;\n\tthis._state = STATE.NONE;\n\tlet zincRayCaster = undefined;\n\tthis.targetTouchId = -1;\n let rect = undefined;\n const _a = new THREE.Vector3();\n const _b = new THREE.Vector3();\n const _c = new THREE.Vector3();\n const _new_b = new THREE.Vector3();\n const _new_c = new THREE.Vector3();\n const _axis = new THREE.Vector3();\n const _v = new THREE.Vector3();\n const _rel_eye = new THREE.Vector3();\n const sceneSphere = new THREE.Sphere();\n const _tempEye = new THREE.Vector3();\n let 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 : maxDist;\n } else {\n maxDist = 0;\n }\n }\n\n /**\n * Add a viewport to the list of available named viewports.\n * \n * @param {String} name - Name of the viewport\n * @param {Viewport} viewportName - Viewport to be added\n */\n this.addViewport = (viewportName, viewport) => {\n if (viewportName && viewport)\n viewports[viewportName] = viewport;\n }\n\n /**\n * Set the default viewport for this {@link CameraControls}.\n * \n * @param {String} defaultName - Name of the viewport\n * \n * @return {Boolean} true if set successfully, false otherwise.\n */\n this.setDefaultViewport = defaultName => {\n\t\tif (defaultName && (defaultName in viewports)) {\n defaultViewport = defaultName;\n return true;\n }\n return false\n\t}\n\n /**\n * Get the name of the default viewport.\n * \n * \n * @return {String}\n */\n this.getDefaultViewport = () => {\n\t\treturn defaultViewport;\n\t}\n\t\n /**\n * Get the viewport with the provied name stored in this object.\n * @param {String} name - Name of the viewport\n * \n * @return {Viewport}\n */\n\tthis.getViewportOfName = name => {\n\t\treturn viewports[name];\n\t}\n\n /**\n * Set the viewport with a name if it is found in the list.\n * @param {String} name - Name of the viewport\n * \n * @return {Boolean} if viewport is found and set, otherwise false.\n */\n this.setCurrentViewport = name => {\n if (name in viewports) {\n this.setCurrentCameraSettings(viewports[name])\n return true;\n }\n return false;\n\t}\n\n /**\n * Set the direction of rotation allowed with this control.\n * \n * @param {String} mode - available options are none, horizontal,\n * vertical and free.\n */\n this.setRotationMode = mode => {\n switch (mode) {\n case \"none\":\n rotateMode = ROTATE_DIRECTION.NONE;\n break;\n case \"horizontal\":\n rotateMode = ROTATE_DIRECTION.HORIZONTAL;\n break;\n case \"vertical\":\n rotateMode = ROTATE_DIRECTION.VERTICAL;\n break;\n case \"free\":\n default:\n rotateMode = ROTATE_DIRECTION.FREE;\n }\n }\n\t\n\tthis.onResize = () => {\n\t\tif (rect)\n\t\t\trect = undefined;\n if (ndcControl)\n ndcControl.setCurrentCameraSettings(this.cameraObject,\n viewports[defaultViewport]);\n\t}\n\n\tthis.getVisibleHeightAtZDepth = ( depth ) => {\n\t\t// compensate for cameras not positioned at z=0\n\t\t\n\t\tconst cameraOffset = this.cameraObject.position.distanceTo(this.cameraObject.target);\n\t\tif ( depth < cameraOffset ) depth -= cameraOffset;\n\t\telse depth += cameraOffset;\n\t\n\t\t// vertical fov in radians\n\t\tconst vFOV = this.cameraObject.fov * Math.PI / 180; \n\t\n\t\t// Math.abs to ensure the result is always positive\n\t\treturn 2 * Math.tan( vFOV / 2 ) * Math.abs( depth );\n\t};\n\n\tthis.calculateHeightPerPixelAtZeroDepth = ( wHeight ) => {\n\t\tconst height = this.getVisibleHeightAtZDepth(0);\n\t\tthis.pixelHeight = height / wHeight;\n\t\treturn this.pixelHeight;\n\t}\n\n /**\n * Get normalised coordinates from windows coordinates.\n * \n * @param {String} x\n * @param {String} y\n * @param {THREE.Vector2} positionIn - Optional, write the value into\n * this object if it is provided, otherwise a new object will \n * be created and returned.\n * \n * @return {THREE.Vector2} containing the normalised x and y coordinates.\n */\n this.getNDCFromDocumentCoords = (x, y, positionIn) => {\n updateRect(false);\n const position = positionIn ? positionIn : new THREE.Vector2();\n const out_x = ((x - rect.left) / rect.width) * 2 - 1;\n const out_y = -((y - rect.top) / rect.height) * 2 + 1;\n return position.set(out_x, out_y);\n }\n\n /**\n * Get the relative windows coordinates from normalised coordiantes.\n * \n * @param {String} x \n * @param {String} y\n * @param {THREE.Vector2} positionIn - Optional, write the value into\n * this object if it is provided, otherwise a new object will \n * be created and returned.\n * \n * @return {THREE.Vector2} containing the relative x and y coordinates.\n */\n this.getRelativeCoordsFromNDC = (x, y, positionIn) => {\n updateRect(false);\n const position = positionIn ? positionIn : new THREE.Vector2();\n position.x = (x + 1) * rect.width / 2.0;\n position.y = (1 - y) * rect.height / 2.0;\n return position;\n }\n\n /**\n * Map a mouse click to the specified action.\n * \n * @param {String} buttonName - please see {@link CLICK_ACTION}\n * @param {String} actionName - please see {@link STATE}\n */\n\tthis.setMouseButtonAction = (buttonName, actionName) => {\n\t\tCLICK_ACTION[buttonName] = STATE[actionName];\n }\n\n //Make sure the camera does not travel beyond limit\n const checkTravelDistance = () => {\n if (maxDist > 0) {\n const newDist = _tempEye.distanceTo(sceneSphere.center);\n return (maxDist > newDist || \n this.cameraObject.position.distanceTo(sceneSphere.center) > newDist );\n }\n return true;\n }\n \n const translateViewport = translation => {\n _tempEye.copy(this.cameraObject.position).add(translation);\n if (checkTravelDistance()) {\n this.cameraObject.target.add(translation);\n this.cameraObject.position.add(translation);\n this.updateDirectionalLight();\n }\n }\n\t\n\tconst onDocumentMouseDown = event => {\n updateRect(false);\n // Check if mouse event hapens inside the minimap\n let minimapCoordinates = undefined;\n if (currentMode === MODE.DEFAULT)\n minimapCoordinates = this.scene.getNormalisedMinimapCoordinates(\n this.renderer, event);\n if (!minimapCoordinates) {\n if (event.button == 0) {\n if (event.ctrlKey)\n this._state = CLICK_ACTION.AUXILIARY;\n else if (event.shiftKey)\n this._state = CLICK_ACTION.SECONDARY;\n else\n this._state = CLICK_ACTION.MAIN;\n } else if (event.button == 1) {\n event.preventDefault();\n this._state = CLICK_ACTION.AUXILIARY;\n } \n else if (event.button == 2) {\n this._state = CLICK_ACTION.SECONDARY;\n }\n this.pointer_x = event.clientX - rect.left;\n this.pointer_y = event.clientY - rect.top;\n this.pointer_x_start = this.pointer_x;\n this.pointer_y_start = this.pointer_y;\n this.previous_pointer_x = this.pointer_x;\n this.previous_pointer_y= this.pointer_y;\n } else {\n currentMode = MODE.MINIMAP;\n let translation = this.scene.getMinimapDiffFromNormalised(\n minimapCoordinates.x, minimapCoordinates.y);\n translateViewport(translation);\n }\n }\n\n\tconst onDocumentMouseMove = event => {\n updateRect(false);\n\t\tif (rect) {\n\t\t\tthis.pointer_x = event.clientX - rect.left;\n\t\t\tthis.pointer_y = event.clientY - rect.top;\n\t\t\tif (currentMode === MODE.MINIMAP) {\n\t\t\t\tlet minimapCoordinates = this.scene.getNormalisedMinimapCoordinates(this.renderer, event);\n\t\t\t\tif (minimapCoordinates) {\n\t\t\t\t\tlet translation = this.scene.getMinimapDiffFromNormalised(\n\t\t\t\t\t\tminimapCoordinates.x, minimapCoordinates.y);\n\t\t\t\t\ttranslateViewport(translation);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ((this._state === STATE.NONE) && (zincRayCaster !== undefined)) {\n\t\t\t\t\tzincRayCaster.move(this, event.clientX, event.clientY, this.renderer);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\tconst onDocumentMouseUp = event => {\n this._state = STATE.NONE;\n if (currentMode == MODE.MINIMAP)\n currentMode = MODE.DEFAULT;\n\t\tif (zincRayCaster !== undefined) {\n\t\t\tif (this.pointer_x_start==(event.clientX - rect.left) && this.pointer_y_start==(event.clientY- rect.top)) {\n\t\t\t\tzincRayCaster.pick(this, event.clientX, event.clientY, this.renderer);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tconst onDocumentMouseLeave = event => {\n\t\tthis._state = STATE.NONE;\n\t}\n\t\n\tconst onDocumentTouchStart = event => {\n updateRect(false);\n\t\tconst len = event.touches.length;\n\t\tif (len == 1) {\n\t\t\tthis._state = STATE.TOUCH_ROTATE;\n\t\t\tthis.pointer_x = event.touches[0].clientX - rect.left;\n\t\t\tthis.pointer_y = event.touches[0].clientY - rect.top;\n\t\t\tthis.pointer_x_start = this.pointer_x;\n\t\t\tthis.pointer_y_start = this.pointer_y;\n\t\t\tthis.previous_pointer_x = this.pointer_x;\n\t\t\tthis.previous_pointer_y= this.pointer_y;\n\t\t} else if (len == 2) {\n\t\t\tthis._state = STATE.TOUCH_ZOOM;\n\t\t\tconst dx = event.touches[ 0 ].clientX - event.touches[ 1 ].clientX;\n\t\t\tconst dy = event.touches[ 0 ].clientY - event.touches[ 1 ].clientY;\n\t\t\tthis.touchZoomDistanceEnd = this.touchZoomDistanceStart = Math.sqrt( dx * dx + dy * dy );\n\t\t} else if (len == 3) {\n\t\t\tthis._state = STATE.TOUCH_PAN;\n\t\t\tthis.targetTouchId = event.touches[0].identifier;\n\t\t\tthis.pointer_x = event.touches[0].clientX - rect.left;\n\t\t\tthis.pointer_y = event.touches[0].clientY - rect.top;\n\t\t\tthis.previous_pointer_x = this.pointer_x;\n\t\t\tthis.previous_pointer_y= this.pointer_y;\t\t\t\n\t\t}\n\t}\n\t\n\tconst onDocumentTouchMove = event => {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tconst len = event.touches.length;\n\t\tif (len == 1) {\n\t\t\tthis.pointer_x = event.touches[0].clientX - rect.left;\n\t\t\tthis.pointer_y = event.touches[0].clientY - rect.top;\n\t\t} else if (len == 2) {\n\t\t\tif (this._state === STATE.TOUCH_ZOOM) {\n\t\t\t\tconst dx = event.touches[ 0 ].clientX - event.touches[ 1 ].clientX;\n\t\t\t\tconst dy = event.touches[ 0 ].clientY - event.touches[ 1 ].clientY;\n\t\t\t\tthis.touchZoomDistanceEnd = Math.sqrt( dx * dx + dy * dy );\n\t\t\t}\n\t\t} else if (len == 3) {\n\t\t\tif (this._state === STATE.TOUCH_PAN) {\n\t\t\t\tfor (let i = 0; i < 3; i++) {\n\t\t\t\t\tif (event.touches[i].identifier == this.targetTouchId) {\n\t\t\t\t\t\tthis.pointer_x = event.touches[0].clientX - rect.left;\n\t\t\t\t\t\tthis.pointer_y = event.touches[0].clientY - rect.top;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\t\n\t\t}\n\t}\n\t\n\tconst onDocumentTouchEnd = event => {\n\t\tconst len = event.touches.length;\n\t\tthis.touchZoomDistanceStart = this.touchZoomDistanceEnd = 0;\n\t\tthis.targetTouchId = -1;\n\t\tthis._state = STATE.NONE;\n\t\tif (len == 1) {\n\t\t\tif (zincRayCaster !== undefined) {\n\t\t\t\tif (this.pointer_x_start==(event.touches[0].clientX- rect.left) && this.pointer_y_start==(event.touches[0].clientY- rect.top)) {\n\t\t\t\t\tzincRayCaster.pick(this.cameraObject, event.touches[0].clientX, event.touches[0].clientY, this.renderer);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n const onDocumentEnter = () => {\n\t\tupdateRect(true);\n\t}\n\n const updateRect = forced => {\n //Use intersectionObserver to reset the rect for ray tracing.\n if (forced || rect === undefined) {\n const observer = new IntersectionObserver((entries) => {\n for (const entry of entries) {\n rect = entry.boundingClientRect;\n }\n observer.disconnect();\n });\n \n observer.observe(this.domElement);\n }\n }\n\t\n\tconst onDocumentWheelEvent = event => {\n updateRect(false);\n\t\tthis._state = STATE.SCROLL;\n\t\tlet changes = 0;\n\t\tif (event.deltaY > 0)\n\t\t\tchanges = this.scrollRate;\n\t\telse if (event.deltaY < 0)\n\t\t\tchanges = this.scrollRate * -1;\n\t\tmouseScroll = mouseScroll + changes;\n\t\tevent.preventDefault(); \n\t\tevent.stopImmediatePropagation(); \n\t}\t\n\n\tconst translate = () => {\n\t\tif (typeof this.cameraObject !== \"undefined\")\n\t\t{\n\t\t\tconst height = rect.height;\n\t\t\tconst distance = this.cameraObject.position.distanceTo(this.cameraObject.target);\n\t\t\tlet fact = 0.0;\n\t\t\tif ((this.cameraObject.far > this.cameraObject.near) && (distance >= this.cameraObject.near) &&\n\t\t\t\t(distance <= this.cameraObject.far))\n\t\t\t{\n\t\t\t\t fact = (distance-this.cameraObject.near)/(this.cameraObject.far-this.cameraObject.near);\n }\n //_b == old_near, _c = old_far, _new_b = new_near, _new_c = new_far\n\t\t\t_b.set(this.previous_pointer_x,height - this.previous_pointer_y,0.0);\n\t\t\t_c.set(this.previous_pointer_x, height - this.previous_pointer_y,1.0);\n\t\t\t_new_b.set(this.pointer_x,height - this.pointer_y,0.0);\n\t\t\t_new_c.set(this.pointer_x,height - this.pointer_y,1.0);\n\t\t\t_b.unproject(this.cameraObject);\n\t\t\t_c.unproject(this.cameraObject);\n\t\t\t_new_b.unproject(this.cameraObject);\n\t\t\t_new_c.unproject( this.cameraObject);\n const translate_rate = -0.002;\n _new_b.sub(_b).multiplyScalar(1.0-fact);\n _new_c.sub(_c).multiplyScalar(fact);\n _new_b.add(_new_c).multiplyScalar(translate_rate);\n translateViewport(_new_b);\n\t\t}\n\t\tthis.previous_pointer_x = this.pointer_x;\n\t\tthis.previous_pointer_y = this.pointer_y;\n\t}\n\n\tthis.getVectorsFromRotateAboutLookAtPoints = (axis, angle) => {\n axis.normalize();\n\t _v.copy(this.cameraObject.position).sub(this.cameraObject.target);\n\t _rel_eye.copy(_v);\n\t _v.normalize()\n\t if (0.8 < Math.abs(_v.dot(axis))) {\n\t _v.copy(this.cameraObject.up);\n }\n _b.crossVectors(axis, _v).normalize();\n _c.crossVectors(axis, _b);\n\t const rel_eyea = axis.dot(_rel_eye);\n\t const rel_eyeb = _b.dot(_rel_eye);\n\t const rel_eyec = _c.dot(_rel_eye);\n\t const upa = axis.dot(this.cameraObject.up); \n\t const upb = _b.dot(this.cameraObject.up);\n\t const upc = _c.dot(this.cameraObject.up);\n\t const cos_angle = Math.cos(angle);\n\t const sin_angle = Math.sin(angle);\n _new_b.set(cos_angle*_b.x+sin_angle*_c.x,\n\t cos_angle*_b.y+sin_angle*_c.y,\n\t cos_angle*_b.z+sin_angle*_c.z);\n\t _new_c.set(cos_angle*_c.x-sin_angle*_b.x,\n\t cos_angle*_c.y-sin_angle*_b.y,\n\t cos_angle*_c.z-sin_angle*_b.z); \n _v.copy(this.cameraObject.target);\n\t _v.x = _v.x + axis.x*rel_eyea + _new_b.x*rel_eyeb+_new_c.x*rel_eyec;\n\t _v.y = _v.y + axis.y*rel_eyea + _new_b.y*rel_eyeb+_new_c.y*rel_eyec;\n\t _v.z = _v.z + axis.z*rel_eyea + _new_b.z*rel_eyeb+_new_c.z*rel_eyec;\n\t _a.set(axis.x*upa+_new_b.x*upb+_new_c.x*upc,\n axis.y*upa+_new_b.y*upb+_new_c.y*upc,\n axis.z*upa+_new_b.z*upb+_new_c.z*upc);\n\t return {position: _v, up: _a};\n\t}\n\t\n /**\n * Rotate around the axis with the amount specified by angle.\n * \n * @param {THREE.Vector3} axis - The rotational axis.\n * @param {Number} Angle - Specify how much the camera shoudl rotate by.\n */\n\tthis.rotateAboutLookAtpoint = (axis, angle) => {\n\t const returned_values = this.getVectorsFromRotateAboutLookAtPoints(axis, angle);\n\t this.cameraObject.position.copy(returned_values.position);\n\t this.updateDirectionalLight();\n\t this.cameraObject.up.copy(returned_values.up);\n\t}\n\n\tconst tumble = () => {\n\t\tif (typeof this.cameraObject !== \"undefined\")\n\t\t{\n\t\t\tconst width = rect.width;\n\t\t\tconst height = rect.height;\n\t\t\tif ((0 0)\n\t\t\t\t{\n\t\t\t\t\tconst dx=-delta_y*1.0/tangent_dist;\n\t\t\t\t\tconst dy=delta_x*1.0/tangent_dist;\n let d = 0;\n // Do not allow rotation on other direction around the origin if rotateMode is not free\n if (rotateMode === ROTATE_DIRECTION.FREE) {\n let d=dx*(this.pointer_x-0.5*(width-1))+dy*(0.5*(height-1)-this.pointer_y);\n if (d > radius)\t{\n d = radius;\n }\n else {\n if (d < -radius) {\n d = -radius;\n }\n }\n }\n\t\t\t\t\tconst phi=Math.acos(d/radius)-0.5*Math.PI;\n\t\t\t\t\tconst angle=this.tumble_rate*tangent_dist/radius;\n\t\t\t\t\t_a.copy(this.cameraObject.position).sub(this.cameraObject.target).normalize();\n\t\t\t\t\t_b.copy(this.cameraObject.up).normalize();\n _c.copy(_b).cross(_a).normalize().multiplyScalar(dx);\n _b.multiplyScalar(dy);\n _axis.addVectors(_c, _b).multiplyScalar(Math.cos(phi));\n _a.multiplyScalar(Math.sin(phi));\n _axis.add(_a);\n\t\t\t\t\tthis.rotateAboutLookAtpoint(_axis, -angle);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.previous_pointer_x = this.pointer_x;\n\t\tthis.previous_pointer_y = this.pointer_y;\n\t}\n\t\n\tconst calculateZoomDelta = () => {\n\t\tlet delta = 0;\n\t\tif (this._state === STATE.ZOOM)\n\t\t{\n\t\t\tdelta = this.previous_pointer_y-this.pointer_y;\n\t\t} else if (this._state === STATE.SCROLL) {\n\t\t\tdelta = mouseScroll;\n\t\t} else {\n\t\t\tdelta = -1.0 * (this.touchZoomDistanceEnd - this.touchZoomDistanceStart);\n\t\t\tthis.touchZoomDistanceStart = this.touchZoomDistanceEnd;\n\t\t}\n\t\treturn delta;\n }\n\n this.changeZoomByScrollRateUnit = unit => {\n const delta_y = unit * this.scrollRate;\n this.changeZoomByValue(delta_y);\n }\n\n this.changeZoomByValue = delta_y => {\n\t\tif (typeof this.cameraObject !== \"undefined\")\n\t\t{\n 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) {\n\t\t\tmouseScroll = 0;\n this._state = STATE.NONE;\n\t\t}\n\t}\n\t\n\tthis.setDirectionalLight = directionalLightIn => {\n\t\tthis.directionalLight = directionalLightIn;\n\t};\n\n /**\n * Force an update to the position of the directional light.\n */\n\tthis.updateDirectionalLight = () => {\n\t\tif (this.directionalLight != 0) {\n\t\t\tthis.directionalLight.position.set(this.cameraObject.position.x,\n\t\t\t\t\tthis.cameraObject.position.y,\n\t\t\t\t\tthis.cameraObject.position.z);\n\t\t}\n\t}\n\t\n\t/**\n * Enable the camera control.\n */\n\tthis.enable = function () {\n\t\tenabled = true;\n\t\tif (this.domElement && this.domElement.addEventListener) {\n\t\t\tthis.domElement.addEventListener( 'mousedown', onDocumentMouseDown, false );\n\t\t\tthis.domElement.addEventListener( 'mousemove', onDocumentMouseMove, false );\n\t\t\tthis.domElement.addEventListener( 'mouseup', onDocumentMouseUp, false );\n\t\t\tthis.domElement.addEventListener( 'mouseleave', onDocumentMouseLeave, false );\n\t\t\tthis.domElement.addEventListener( 'touchstart', onDocumentTouchStart, false);\n\t\t\tthis.domElement.addEventListener( 'touchmove', onDocumentTouchMove, false);\n\t\t\tthis.domElement.addEventListener( 'touchend', onDocumentTouchEnd, false);\n\t\t\tthis.domElement.addEventListener( 'wheel', onDocumentWheelEvent, false);\n\t\t\tthis.domElement.addEventListener( 'contextmenu', event => { event.preventDefault(); }, false );\n this.domElement.addEventListener( 'mouseenter', onDocumentEnter, false );\n\t }\n\t}\n\n /**\n * Disable the camera control.\n */\n\tthis.disable = function () {\n\t\tenabled = false;\n\t\tif (this.domElement && this.domElement.removeEventListener) {\n\t\t\tthis.domElement.removeEventListener( 'mousedown', onDocumentMouseDown, false );\n\t\t\tthis.domElement.removeEventListener( 'mousemove', onDocumentMouseMove, false );\n\t\t\tthis.domElement.removeEventListener( 'mouseup', onDocumentMouseUp, false );\n\t\t\tthis.domElement.removeEventListener( 'mouseleave', onDocumentMouseLeave, false );\n\t\t\tthis.domElement.removeEventListener( 'touchstart', onDocumentTouchStart, false);\n\t\t\tthis.domElement.removeEventListener( 'touchmove', onDocumentTouchMove, false);\n\t\t\tthis.domElement.removeEventListener( 'touchend', onDocumentTouchEnd, false);\n\t\t\tthis.domElement.removeEventListener( 'wheel', onDocumentWheelEvent, false);\n this.domElement.removeEventListener( 'mouseenter', onDocumentEnter, false );\n\t\t\tthis.domElement.removeEventListener( 'contextmenu', event => { event.preventDefault(); }, false );\n\t }\n\t}\n\n\tthis.loadPath = pathData => {\n\t\tcameraPath = pathData.CameraPath;\n\t\tnumberOfCameraPoint = pathData.NumberOfPoints;\n\t}\n\t\n /**\n * This is an experimental feature. It loads a path - point to point which\n * the camera will travel.\n * \n * @param {String} path_url - The path.\n * @param {requestCallback} finishCallback - The callback once the path is load.\n */\n\tthis.loadPathURL = (path_url, finishCallback) => {\n\t\tconst xmlhttp = new XMLHttpRequest();\n\t\txmlhttp.onreadystatechange = () => {\n\t\t if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {\n\t\t const pathData = JSON.parse(xmlhttp.responseText);\n\t\t this.loadPath(pathData);\n\t if (finishCallback != undefined && (typeof finishCallback == 'function'))\n\t finishCallback();\n\t\t }\n\t\t}\n\t\tconst requestURL = resolveURL(path_url);\n\t\txmlhttp.open(\"GET\", requestURL, true);\n\t\txmlhttp.send();\n\t}\n\n /**\n * Set the duration for the camera to travel along the path.\n * \n * @param {Number} durationIn - the duration for the path.\n */\n\tthis.setPathDuration = durationIn => {\n duration = durationIn;\n if (smoothCameraTransitionObject)\n smoothCameraTransitionObject.setDuration(duration);\n if (rotateCameraTransitionObject)\n rotateCameraTransitionObject.setDuration(duration);\n\t}\n\t\n /**\n * Get the playRate - this determines how fast it takes to \n * finish one duration.\n * \n * @return {Number}\n */\n\t this.getPlayRate = () => {\n\t return playRate;\n\t }\n\t\n /**\n * Set the playRate - this determines how fast it takes to \n * finish one duration.\n * \n * @param {Number} playRateIn - The play rate speed.\n */\n\tthis.setPlayRate = playRateIn => {\n\t\tplayRate = playRateIn;\n\t}\n\n /**\n * Update the internal timer by the set amount, this can\n * be used to force a time update by setting delta to zero.\n * \n * @param {Number} delta - The amount of time to increment\n * the time by.\n */\n\tconst updateTime = delta => {\n\t\tlet targetTime = inbuildTime + delta;\n\t\tif (targetTime > duration)\n\t\t\ttargetTime = targetTime - duration\n\t\tinbuildTime = targetTime;\n\t};\n\t\n /**\n * Get the current inbuild time,\n * \n * @return {Number}\n */\n\t this.getTime = () => {\n\t return inbuildTime;\n\t }\n\t\n /**\n * Set the current inbuild time,\n * \n * @param {Number} timeIn - this will be used as the current time,\n * it should be between the range of zero and the set duration.\n */\n\tthis.setTime = timeIn => {\n\t if (timeIn > duration)\n\t inbuildTime = duration;\n\t else if (timeIn < 0.0)\n\t inbuildTime = 0.0;\n\t else\n\t inbuildTime = timeIn;\n\t}\n\t\n /**\n * Get the number of frame which is determine by number of points\n * in the camera path.\n * \n * @return {Number}\n */\n\tthis.getNumberOfTimeFrame = () => {\n\t\treturn numberOfCameraPoint;\n\t}\n\n /**\n * Get the current time frame and it will return three values in\n * an array.\n * \n * @return {Array} - bottom frame, top frame and the proportion.\n */\n\tthis.getCurrentTimeFrame = () => {\n\t if (numberOfCameraPoint > 2) {\n \t\tconst current_time = inbuildTime/duration * (numberOfCameraPoint - 1);\n \t\tconst bottom_frame = Math.floor(current_time);\n \t\tconst proportion = 1 - (current_time - bottom_frame);\n \t\tconst top_frame = Math.ceil(current_time);\n \t\tif (bottom_frame == top_frame) {\n \t\t\tif (bottom_frame == numberOfCameraPoint - 1) {\n \t\t\t\treturn [bottom_frame - 1, top_frame, 0];\n \t\t\t} else {\n \t\t\t\treturn [bottom_frame, top_frame + 1, 1.0];\n \t\t\t}\n \t\t}\n \t\treturn [bottom_frame, top_frame, proportion];\n\t } else if (numberOfCameraPoint == 1) {\n\t return [0, 0, 0];\n\t }\n\t \n\t return undefined;\n\t}\n\t\n /**\n * Set the current time frame.\n * \n * @param {Number} targetTimeFrame - bottom frame, top frame and the proportion.\n */\n\tthis.setCurrentTimeFrame = targetTimeFrame => {\n\t if (numberOfCameraPoint > 2) {\n \t\tinbuildTime = duration * targetTimeFrame / (numberOfCameraPoint - 1);\n \t\tif (inbuildTime < 0.0)\n \t\t\tinbuildTime = 0.0;\n \t\tif (inbuildTime > duration)\n \t\t\tinbuildTime = duration;\n\t }\n\t}\n\n /**\n * Update the progress on the path by the specified amount - delta.\n * \n * @param {Number} delta - The amount of time to increment\n */\n\tconst updatePath = delta => {\n\t\tif (currentMode === MODE.PATH) {\n\t\t\tupdateTime(delta);\n\t\t\tif (cameraPath) {\n\t\t\t\tconst time_frame = this.getCurrentTimeFrame();\n\t\t\t\tconst bottom_frame = time_frame[0];\n\t\t\t\tconst top_frame = time_frame[1];\n\t\t\t\tconst proportion = time_frame[2];\n\t\t\t\tconst bot_pos = [cameraPath[bottom_frame*3], cameraPath[bottom_frame*3+1], cameraPath[bottom_frame*3+2]];\n\t\t\t\tconst top_pos = [cameraPath[top_frame*3], cameraPath[top_frame*3+1], cameraPath[top_frame*3+2]];\n\t\t\t\tconst current_positions = [];\n\t\t\t\tfor (let i = 0; i < bot_pos.length; i++) {\n\t\t\t\t\tcurrent_positions.push(proportion * bot_pos[i] + (1.0 - proportion) * top_pos[i]);\n\t\t\t\t}\n\t\t\t\tthis.cameraObject.position.set(current_positions[0], current_positions[1], current_positions[2]);\n\t\t\t\tthis.cameraObject.target.set(top_pos[0], top_pos[1], top_pos[2]);\n\t\t\t\tif (deviceOrientationControl)\n\t\t\t\t\tthis.cameraObject.lookAt( this.cameraObject.target );\n\t\t\t\tif (updateLightWithPathFlag) {\n\t\t\t\t\tthis.directionalLight.position.set(current_positions[0], current_positions[1], current_positions[2]);\n\t\t\t\t\tthis.directionalLight.target.position.set(top_pos[0], top_pos[1], top_pos[2]);\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t};\n\t\n /**\n * Force recalculation of the current path.\n */\n\tthis.calculatePathNow = () => {\n\t updatePath(0.0);\n\t}\n\n // handle synchronised control based on information in the idc\n const handleSyncControl = () => {\n if ((this._state === STATE.ROTATE) || (this._state === STATE.TOUCH_ROTATE)){\n //rotateion does not trigger callback\n tumble();\n } else if ((this._state === STATE.PAN) || (this._state === STATE.TOUCH_PAN)){\n translate();\n ndcControl.triggerCallback();\n } else if ((this._state === STATE.ZOOM) || (this._state === STATE.TOUCH_ZOOM) || (this._state === STATE.SCROLL)){\n ndcControl.zoom(calculateZoomDelta());\n this.previous_pointer_x = this.pointer_x;\n this.previous_pointer_y = this.pointer_y;\n if (this._state === STATE.SCROLL) {\n this._state = STATE.NONE;\n }\n mouseScroll = 0;\n ndcControl.triggerCallback();\n }\n }\n\t\n /**\n * Update all controls related changes - including calculation of the viewport.\n * \n * @param {Number} timeChanged - Time eclipse since last called.\n */\n\tthis.update = timeChanged => {\n\t\tconst delta = timeChanged * playRate;\n\t\tlet controlEnabled = enabled;\n\t\tlet updated = true;\n\t\tif (currentMode === MODE.PATH) {\n\t\t\tupdatePath(delta);\n\t\t} else if (currentMode === MODE.SMOOTH_CAMERA_TRANSITION && smoothCameraTransitionObject) {\n\t\t\tsmoothCameraTransitionObject.update(delta);\n\t\t\tif (smoothCameraTransitionObject.isTransitionCompleted()) {\n\t\t\t\tsmoothCameraTransitionObject == undefined;\n\t\t\t\tcurrentMode = MODE.DEFAULT;\n\t\t\t}\n\t\t\tcontrolEnabled = false;\n\t\t} else if (currentMode === MODE.ROTATE_CAMERA_TRANSITION && rotateCameraTransitionObject) {\n\t\t\trotateCameraTransitionObject.update(delta);\n\t\t\tif (rotateCameraTransitionObject.isTransitionCompleted()) {\n\t\t\t\trotateCameraTransitionObject == undefined;\n\t\t\t\tcurrentMode = MODE.DEFAULT;\n\t\t\t}\n\t\t\tcontrolEnabled = false;\n\t\t} else if (currentMode === MODE.AUTO_TUMBLE && cameraAutoTumbleObject) {\n\t\t\tcameraAutoTumbleObject.update(delta);\n\t\t} else if (currentMode === MODE.SYNC_CONTROL && ndcControl) {\n handleSyncControl();\n controlEnabled = false;\n } else {\n\t\t\tupdated = false;\n\t\t}\n\t\tif (controlEnabled) {\n\t\t\tif (this._state !== STATE.NONE) {\n\t\t\t\tupdated = true;\n\t\t\t}\n\t\t\tif ((this._state === STATE.ROTATE) || (this._state === STATE.TOUCH_ROTATE)){\n\t\t\t\ttumble();\n\t\t\t} else if ((this._state === STATE.PAN) || (this._state === STATE.TOUCH_PAN)){\n\t\t\t\ttranslate();\n\t\t\t} else if ((this._state === STATE.ZOOM) || (this._state === STATE.TOUCH_ZOOM) || (this._state === STATE.SCROLL)){\n\t\t\t\tflyZoom();\n\t\t\t}\n\t\t\tif (this._state !== STATE.NONE) {\n\t\t\t\tif (currentMode === MODE.AUTO_TUMBLE && cameraAutoTumbleObject &&\n\t\t\t\t\t\tcameraAutoTumbleObject.stopOnCameraInput) {\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this._state === STATE.SCROLL)\n\t\t\t\tthis._state = STATE.NONE;\n\t\t}\n\t\tif (deviceOrientationControl) {\n\t\t\tupdated = true;\n\t\t\tdeviceOrientationControl.update();\n\t\t\t//this.directionalLight.target.position.set(this.cameraObject.target.x, \n\t\t\t//\tthis.cameraObject.target.y, this.cameraObject.target.z);\n\t\t} else {\n\t\t\tthis.cameraObject.lookAt( this.cameraObject.target );\n\t\t}\n\n\t\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","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","responseURL","loadMultipleViews","referenceURL","views","Default","Inline","Entries","promises","_loop","fetch","response","catch","all","values","entry","setCurrentViewport","xmlhttp","viewData","requestURL","targetRegion","filename_prefix","numberOfResources","linesloader","lod","newLines","log","Index","loaderOptions","loadGlyphset","newGlyphset","myCallback","onLoadGlyphsetReady","pointsetloader","newPointset","loadSurfaceURL","fileFormat","objloader","metaFinishCallback","numberOfDownloaded","downloadedItem","newTexture","onLoadTextureReady","loadTextureURL","addZincGeometry","newGeometry","zincGeometry","parseDuration","durationString","match","loadSettings","readPrimitivesItem","Levels","Preload","FileFormat","AnatomicalId","compression","Type","newGeometryURL","GlyphGeometriesURL","DisplayLabels","readViewAndSettingsItem","GLTFToZincJSLoader","loadRegions","currentRegion","regions","Primitives","Order","Transformation","Children","regionName","childRegion","findOrCreateChildFromPath","getNumberOfDownloadsInArray","includeViews","getNumberOfObjectsInRegions","regionJson","counts","getNumberOfObjects","Version","Regions","readVersionOneRegionPath","RegionPath","loadVersionOne","numberOfObjects","loadVersionTwo","Settings","Views","setPath","setResponseType","setRequestHeader","requestHeader","e","itemError","matchDataViewAt","query","reader","getUint8","binData","array_buffer","charCodeAt","DataView","n_faces","getUint32","byteLength","solid","off","defaultR","defaultG","defaultB","hasColors","normalX","getFloat32","normalY","normalZ","packedColor","getUint16","vertexstart","componentIdx","patternSolid","patternFace","faceCounter","patternFloat","patternVertex","RegExp","patternNormal","groupCount","startVertex","endVertex","exec","vertexCountPerFace","normalCountPerFace","parseFloat","addGroup","decodeText","Material","_object_pattern","_material_library_pattern","_material_use_pattern","_map_use_pattern","_vA","_vB","_vC","_ab","_cb","ParserState","state","objects","materialLibraries","startObject","fromDeclaration","previousMaterial","currentMaterial","_finalize","hasUVIndices","smooth","startMaterial","libraries","previous","inherited","mtllib","groupStart","groupEnd","cloned","bind","lastMultiMaterial","mi","declared","finalize","parseVertexIndex","len","parseInt","parseNormalIndex","parseUVIndex","addVertex","dst","addVertexPoint","addVertexLine","addNormal","addFaceNormal","addColor","addUV","addDefaultUV","addUVLine","ua","ub","uc","na","nb","nc","vLen","ia","ib","ic","nLen","uvLen","addPointGeometry","vi","addLineGeometry","uvi","setMaterials","indexOf","lines","lineFirstChar","lineLength","trimLeft","trim","charAt","lineData","substr","vertexData","faceVertices","vertexParts","lineParts","substring","lineVertices","lineUVs","parts","li","llen","pointData","hasPrimitives","hasVertexColors","createdMaterials","miLen","sourceMaterial","materialHash","materialLine","materialPoints","flatShading","mergeGeometries","geometries","geometry1","geometry2","IndexedSourcesHandler","urlIn","onDownloadedCallback","jsonLoader","onDownloaded","downloading","finished","items","processItemDownloaded","modelData","obj","processItemError","downloadCompleted","args","errorHandling","progressHandling","MultiSourcesHandler","onLoadCallback","allData","totalDownloaded","itemDownloaded","concurrentDownloads","MAX_DOWNLOAD","waitingList","indexedLoaders","loadFromMultipleSources","msHandler","newOptions","loadFromSingleSource","handleIndexedSource","indexedLoader","onFinally","isHandler","onErrorCallback","loadFromWaitingList","shift","itemRemainingCheck","_len","_key","GLTFLoader","parseGLTFObjects","setCamera","lastIndexOf","gltf","GLTFExporter","getAllObjects","ClampToEdgeWrapping","InterpolateDiscrete","InterpolateLinear","LinearMipmapLinearFilter","LinearMipmapNearestFilter","NearestFilter","NearestMipmapLinearFilter","NearestMipmapNearestFilter","PropertyBinding","RGBAFormat","pluginCallbacks","register","writer","GLTFLightExtension","GLTFMaterialsUnlitExtension","GLTFMaterialsPBRSpecularGlossiness","unregister","input","onDone","GLTFWriter","plugins","setPlugins","write","WEBGL_CONSTANTS","POINTS","LINES","LINE_LOOP","LINE_STRIP","TRIANGLES","TRIANGLE_STRIP","TRIANGLE_FAN","UNSIGNED_BYTE","UNSIGNED_SHORT","FLOAT","UNSIGNED_INT","ARRAY_BUFFER","ELEMENT_ARRAY_BUFFER","NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR","CLAMP_TO_EDGE","MIRRORED_REPEAT","REPEAT","THREE_TO_WEBGL","PATH_PROPERTIES","GLB_HEADER_BYTES","GLB_HEADER_MAGIC","GLB_VERSION","GLB_CHUNK_PREFIX_BYTES","GLB_CHUNK_TYPE_JSON","GLB_CHUNK_TYPE_BIN","equalArray","array1","array2","every","element","stringToArrayBuffer","window","TextEncoder","encode","ArrayBuffer","isIdentityMatrix","getMinMax","output","POSITIVE_INFINITY","NEGATIVE_INFINITY","getW","getPaddedBufferSize","bufferSize","getPaddedArrayBuffer","arrayBuffer","paddingByte","paddedLength","cachedCanvas","pending","buffers","byteOffset","nodeMap","Map","skins","extensionsUsed","uids","uid","asset","cache","meshes","attributesNormalized","trs","onlyVisible","truncateDrawRange","embedImages","maxTextureSize","includeCustomExtensions","processInput","blob","Blob","extensionsUsedList","FileReader","readAsArrayBuffer","onloadend","binaryChunk","binaryChunkPrefix","setUint32","jsonChunk","stringify","jsonChunkPrefix","header","headerView","totalByteLength","glbBlob","glbReader","readAsDataURL","base64data","uri","serializeUserData","objectDef","gltfExtensions","extensionName","extensions","extras","message","getUID","has","isNormalizedNormalAttribute","createNormalizedNormalAttribute","applyTextureTransform","mapDef","didTransform","transformDef","toArray","KHR_texture_transform","processBuffer","processBufferView","componentType","bufferViews","componentSize","dataView","setFloat32","setUint16","setUint8","bufferViewDef","byteStride","processBufferViewImage","processAccessor","Error","end2","bufferViewTarget","minMax","bufferView","accessorDef","normalized","accessors","processImage","cachedImages","mimeType","imageDef","HTMLImageElement","HTMLCanvasElement","OffscreenCanvas","ImageBitmap","Uint8ClampedArray","putImageData","ImageData","toBlob","bufferViewIndex","toDataURL","processSampler","samplers","samplerDef","processTexture","textureDef","sampler","_invokeAll","ext","writeTexture","processMaterial","isShaderMaterial","materialDef","pbrMetallicRoughness","isMeshStandardMaterial","isMeshBasicMaterial","baseColorFactor","metallicFactor","metalness","roughnessFactor","roughness","metalRoughMapDef","metallicRoughnessTexture","baseColorMapDef","baseColorTexture","emissiveIntensity","maxEmissiveComponent","emissiveFactor","emissiveMapDef","emissiveTexture","normalMapDef","normalTexture","occlusionMapDef","texCoord","aoMapIntensity","strength","occlusionTexture","alphaMode","alphaCutoff","doubleSided","writeMaterial","processMesh","meshCacheKeyParts","meshCacheKey","isLineLoop","meshDef","targets","nameConversion","skinWeight","skinIndex","originalNormal","modifiedAttribute","attributeName","toUpperCase","validVertexAttributes","accessor","weights","targetNames","reverseDictionary","warned","gltfAttributeName","baseAttribute","relativeAttribute","morphTargetsRelative","isMultiMaterial","cacheKey","writeMesh","processCamera","cameras","isOrtho","isOrthographicCamera","cameraDef","orthographic","xmag","right","ymag","zfar","znear","perspective","aspectRatio","yfov","degToRad","fov","processAnimation","root","Utils","mergeMorphTargetTracks","tracks","channels","track","trackBinding","parseTrackName","trackNode","findNode","nodeName","trackProperty","propertyName","objectName","isSkinnedMesh","skeleton","getBoneByName","objectIndex","inputItemSize","outputItemSize","times","interpolation","createInterpolant","isInterpolantFactoryMethodGLTFCubicSpline","getInterpolation","node","processSkin","nodes","rootJoint","joints","inverseBindMatrices","temporaryBoneInverse","boneInverses","multiply","bindMatrix","skin","processNode","nodeDef","translation","meshIndex","isCamera","nodeIndex","writeNode","processScene","scenes","sceneDef","processObjects","beforeParse","objectsWithoutScene","afterParse","func","light","isLight","isDirectionalLight","isPointLight","isSpotLight","lightDef","intensity","spot","innerConeAngle","penumbra","outerConeAngle","decay","lights","isGLTFSpecularGlossinessMaterial","extensionDef","diffuseFactor","specularFactor","glossinessFactor","glossiness","diffuseTexture","specularMapDef","specularGlossinessTexture","insertKeyframe","valueSize","getValueSize","TimeBufferType","ValueBufferType","interpolant","evaluate","slice","mergedTracks","sourceTracks","sourceTrack","sourceTrackBinding","sourceTrackNode","propertyIndex","InterpolantFactoryMethodDiscrete","InterpolantFactoryMethodLinear","setInterpolation","targetCount","targetIndex","mergedTrack","sourceInterpolant","keyframeIndex","nearPlane","farPlane","upVector","MODE","NONE","DEFAULT","PATH","SMOOTH_CAMERA_TRANSITION","AUTO_TUMBLE","ROTATE_TRANSITION","MINIMAP","SYNC_CONTROL","STATE","ROTATE","ZOOM","PAN","TOUCH_ROTATE","TOUCH_ZOOM","TOUCH_PAN","SCROLL","ROTATE_DIRECTION","FREE","HORIZONTAL","VERTICAL","CLICK_ACTION","MAIN","AUXILIARY","SECONDARY","tumble_rate","pointer_x","pointer_y","pointer_x_start","pointer_y_start","previous_pointer_x","previous_pointer_y","near_plane_fly_debt","touchZoomDistanceStart","touchZoomDistanceEnd","scrollRate","cameraPath","numberOfCameraPoint","updateLightWithPathFlag","deviceOrientationControl","defaultViewport","currentMode","smoothCameraTransitionObject","rotateCameraTransitionObject","cameraAutoTumbleObject","mouseScroll","rotateMode","_state","zincRayCaster","targetTouchId","rect","_a","_b","_c","_new_b","_new_c","_axis","_v","_rel_eye","sceneSphere","_tempEye","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","checkTravelDistance","newDist","translateViewport","onDocumentMouseDown","minimapCoordinates","button","ctrlKey","shiftKey","preventDefault","onDocumentMouseMove","move","onDocumentMouseUp","pick","onDocumentMouseLeave","onDocumentTouchStart","touches","dx","dy","identifier","onDocumentTouchMove","stopPropagation","onDocumentTouchEnd","onDocumentEnter","forced","observer","IntersectionObserver","boundingClientRect","disconnect","observe","onDocumentWheelEvent","deltaY","stopImmediatePropagation","fact","unproject","translate_rate","getVectorsFromRotateAboutLookAtPoints","axis","dot","up","rel_eyea","rel_eyeb","rel_eyec","upa","upb","upc","cos_angle","cos","sin_angle","sin","returned_values","tumble","delta_x","delta_y","tangent_dist","phi","acos","calculateZoomDelta","changeZoomByValue","near_far_minimum_ratio","flyZoom","directionalLightIn","addEventListener","removeEventListener","loadPath","pathData","CameraPath","NumberOfPoints","loadPathURL","path_url","updateTime","getTime","timeIn","getNumberOfTimeFrame","getCurrentTimeFrame","setCurrentTimeFrame","targetTimeFrame","updatePath","time_frame","bot_pos","top_pos","calculatePathNow","handleSyncControl","triggerCallback","zoom","controlEnabled","updated","isTransitionCompleted","ROTATE_CAMERA_TRANSITION","stopOnCameraInput","playPath","stopPath","isPlayingPath","enableDirectionalLightUpdateWithPath","enableDeviceOrientation","ModifiedDeviceOrientationControls","disableDeviceOrientation","isDeviceOrientationEnabled","newViewport","view_angle","clip_distance","eyex","eyey","eyez","localTargetPosition","eye_distance","localEyePosition","localFarPlane","localNearPlane","nearClippingFactor","radiusScale","clip_factor","currentViewport","getDefaultEyePosition","getDefaultTargetPosition","RotateCameraTransition","pauseCameraTransition","stopCameraTransition","isTransitioningCamera","autoTumble","tumbleDirectionIn","tumbleRateIn","stopOnCameraInputIn","enableAutoTumble","stopAutoTumble","updateAutoTumble","requireUpdate","isAutoTumble","enableRaycaster","callbackFunctionIn","hoverCallbackFunctionIn","disableRaycaster","isSyncControl","currentMpde","enableSyncControl","NDCCameraControl","disableSyncControl","targetCameraIn","startingEyePosition","startingTargetPosition","startingUp","endingEyePosition","endingTargetPosition","endingUp","targetCamera","completed","newDuration","updateCameraSettings","axisIn","angleIn","previousTime","actualDelta","hostSceneIn","hostScene","hoverCallbackFunction","Raycaster","mouse","awaiting","lastHoveredDate","lastHoveredEmpty","timeDiff","pickedObjects","lastPosition","zincCamera","pickableObjects","getIntersectsObject","threejsScene","intersectObjects","setPickableObjects","getIntersectsObjectWithOrigin","getIntersectsObjectWithCamera","setFromCamera","hovered","setTimeout","awaitMove","tumbleAxis","tumbleDirection","computeTumbleAxisAngle","StereoCameraZoomFixed","cameraL","layers","cameraR","focus","eyeRight","eyeLeft","xmin","xmax","projectionMatrix","eyeSep","eyeSepOnProjection","ymax","DEG2RAD","_stereo","reorder","deviceOrientation","screenOrientation","onDeviceOrientationChangeEvent","onScreenOrientationChangeEvent","setObjectQuaternion","zee","euler","Euler","q0","q1","beta","gamma","orient","setFromEuler","setFromAxisAngle","applyQuaternion","connect","eventCallback","cameraIn","defaultViewportIn","getCurrentPosition","scaledDelta","zoomToBox","setCenterZoom","getPanZoom","setEventCallback","Lines2","parentIn","tMatrix","isRegion","hideAllPrimitives","showAllPrimitives","transformation","nameIn","getName","getParent","getFullSeparatedPath","paths","parentName","p","unshift","getFullPath","createChild","getChildWithName","childName","lowerChildName","findChildFromSeparatedPath","pathArray","createChildFromSeparatedPath","transverse","objectsList","boundingBox1","childObjects","lowerObjectName","lowerGroupName","primitivesArray","geometriesArray","filter","pointsetsArray","glyphsetsArray","linesArray","getChildRegions","_options$markerCluste","allObjects","isNew","pointset","LineSegments2","LineMaterial","LineSegmentsGeometry","isLines2","arrayIn","linesGeometry","setPositions","getVerticesByFaceIndex","vIndex","worldUnits","resolution","innerWidth","innerHeight","InstancedInterleavedBuffer","InterleavedBufferAttribute","Line3","_start4","_end4","_ssOrigin","_ssOrigin3","_mvMatrix","_line","_closestPoint","_box","_clipToWorldVector","random","instanceStart","instanceEnd","instanceDistanceBuffer","Line2","lineWidth","ssMaxWidth","distanceToSphere","distanceToPoint","projectionMatrixInverse","sphereMargin","distanceToBox","boxMargin","intersectsBox","at","matrixWorldInverse","multiplyMatrices","isBehindCameraNear","deltaDist","t","lerp","param","closestPointToPointParameter","zPos","isInClipSpace","isInside","pointOnLine","InstancedBufferGeometry","WireframeGeometry","_vector","lineSegments","instanceBuffer","setColors","instanceColorBuffer","fromWireframeGeometry","fromEdgesGeometry","fromLineSegments","maxRadiusSq","distanceToSquared","isNaN","isLineSegmentsGeometry","ShaderLib","UniformsLib","UniformsUtils","dashScale","dashSize","dashOffset","gapSize","common","fog","clipping","defineProperties","enumerable","dashed","defines","USE_DASH","alphaToCoverage","ALPHA_TO_COVERAGE","derivatives","setValues","isLineMaterial","targetScene","helper","positionAttributes","_center","new_coord","diameter","getBoundary","v4","cameraControl","ThreeBSP","work","BufferGeometryLoader","hostIn","host","core","worker","myResolve","createGeometryFromJSON","JSONParser","workerEventHandler","ev","action","csg","GeometryCSGInternal","postMessage","getHostGeometry","tempCSG","createZincGeometry","getGeometry","csgMesh","newMesh","toMesh","setCSG","CSG","sendToWork","guestGeometry","intersect","newCSG","subtract","terminateWorker","terminate","COPLANAR","FRONT","BACK","SPANNING","_length_i","polygon","polygons","Node","tree","Polygon","Vertex","Face4","calculateProperties","other_tree","clipTo","build","allPolygons","toGeometry","polygon_vertice_count","vertex_idx_a","vertex_idx_b","vertex_idx_c","verticeUvs","getInverse","polygon_count","vertice_dict","vertice_count","flip","classifyVertex","side_value","classifySide","classification","num_positive","num_negative","splitPolygon","coplanar_front","coplanar_back","front","back","ti","tj","vj","interpolate","scalar","other","divider","isConvex","temp","clipPolygons","self","geometryFromJSON","guest","hostCSG","setGeometry","prepareCSG","guestCSG","hostCSGs","setGlyphset","prepareCSGForGlyphs","store","glyphset","clippingPlanes"],"sourceRoot":""}