diff --git a/convert2xkt.conf.js b/convert2xkt.conf.js index cffe1dc..285a8be 100644 --- a/convert2xkt.conf.js +++ b/convert2xkt.conf.js @@ -96,15 +96,32 @@ module.exports = { // (i.e. more draw calls). We recommend using the default value unless you get // precision problems when rendering (i.e. jittering, or misalignment of objects). - "minTileSize": 200 + "minTileSize": 200, + + // When converting .gltf source files that are accompanied by metadata JSON + // files, this will cause the metadata JSON files to not be embedded within the XKT output + // files, and instead be output separately. When converting split glTF / GLB models + // and outputting a manifest of split XKT files, the JSON files will be listed in the + // manifest alongside the XKT files. + + "externalMetadata": true }, + "glb": { "reuseGeometries": true, "includeTextures": true, "includeNormals": false, // "includeTypes":[], "excludeTypes": [], - "minTileSize": 200 + "minTileSize": 200, + + // When converting GLB source files that are accompanied by metadata JSON + // files, this will cause the metadata JSON files to not be embedded within the XKT output + // files, and instead be output separately. When converting split glTF / GLB models + // and outputting a manifest of split XKT files, the JSON files will be listed in the + // manifest alongside the XKT files. + + "externalMetadata": true }, //---------------------------------------------------------------------------- diff --git a/convert2xkt.conf.json b/convert2xkt.conf.json index 7561716..c4fa91e 100644 --- a/convert2xkt.conf.json +++ b/convert2xkt.conf.json @@ -35,14 +35,16 @@ "includeTextures": true, "includeNormals": false, "excludeTypes": [], - "minTileSize": 200 + "minTileSize": 200, + "externalMetadata": true }, "glb": { "reuseGeometries": true, "includeTextures": true, "includeNormals": false, "excludeTypes": [], - "minTileSize": 200 + "minTileSize": 200, + "externalMetadata": true }, "json": { "center": false, diff --git a/convert2xkt.js b/convert2xkt.js index 91df07e..2338227 100755 --- a/convert2xkt.js +++ b/convert2xkt.js @@ -8,7 +8,7 @@ const defaultConfigs = require(`./convert2xkt.conf.js`); const WebIFC = require("web-ifc/web-ifc-api-node.js"); const path = require("path"); -const { createValidator } = require("@typeonly/validator"); +const {createValidator} = require("@typeonly/validator"); // const validator = createValidator({ // bundle: require("./types.to.json") @@ -44,8 +44,6 @@ const options = program.opts(); let configs = defaultConfigs; - - if (options.source === undefined && options.sourcemanifest === undefined) { console.error('[convert2xkt] [ERROR]: Please specify path to source file or manifest.'); program.help(); @@ -107,11 +105,6 @@ async function main() { process.exit(1); } - if (manifest.metadataOutFiles && numInputFiles !== manifest.metadataOutFiles.length) { - console.error(`[convert2xkt] [ERROR]: Input manifest invalid - length of gltfOutFiles and metadataOutFiles don't match`); - process.exit(1); - } - const outputDir = getBasePath(options.output).trim(); if (outputDir !== "" && !fs.existsSync(outputDir)) { fs.mkdirSync(outputDir, {recursive: true}); @@ -132,18 +125,28 @@ async function main() { converterApplication: "convert2xkt", converterApplicationVersion: `v${npmPackage.version}`, conversionDate: formatDate(new Date()), - outputDir: outputDir, + outputDir, xktFiles: [] }; + const sourceConfigs = configs.sourceConfigs || {}; + const formatConfig = sourceConfigs["gltf"] || configs["glb"] || {}; + const externalMetadata = (!!formatConfig.externalMetadata); + if (externalMetadata) { + xktManifest.metaModelFiles = []; + for (let i = 0, len = manifest.metadataOutFiles.length; i < len; i++) { + const metadataSource = manifest.metadataOutFiles[i]; + xktManifest.metaModelFiles.push(metadataSource.substring(metadataSource.lastIndexOf('/') + 1)); + } + } + let i = 0; const convertNextFile = () => { const source = manifest.gltfOutFiles[i]; - const metaModelSource = manifest.metadataOutFiles ? manifest.metadataOutFiles[i] : null; + const metaModelSource = (i < manifest.metadataOutFiles.length) ? manifest.metadataOutFiles[i] : null; const outputFileName = getFileNameWithoutExtension(source); - const outputFileNameXKT = `${outputFileName}.xkt`; convert2xkt({ @@ -151,7 +154,7 @@ async function main() { configs, source, format: "gltf", - metaModelSource, + metaModelSource: (!externalMetadata) ? metaModelSource : null, output: path.join(outputDir, outputFileNameXKT), includeTypes: options.include ? options.include.slice(",") : null, excludeTypes: options.exclude ? options.exclude.slice(",") : null, diff --git a/dist/convert2xkt.cjs.js b/dist/convert2xkt.cjs.js index 5176fd7..9f830f9 100644 --- a/dist/convert2xkt.cjs.js +++ b/dist/convert2xkt.cjs.js @@ -27457,6 +27457,8 @@ function convert2xkt({ reject(err); return; } + } else { + log(`Not embedding metadata in XKT`); } let metaModelJSON; diff --git a/dist/xeokit-convert.cjs.js b/dist/xeokit-convert.cjs.js index 0a5221e..764afab 100644 --- a/dist/xeokit-convert.cjs.js +++ b/dist/xeokit-convert.cjs.js @@ -1,3 +1,3 @@ /*! For license information please see xeokit-convert.cjs.js.LICENSE.txt */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.convert2xkt=t():e.convert2xkt=t()}(global,(()=>(()=>{"use strict";var e={231:e=>{e.exports=require("fs")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{ClampToEdgeWrapping:()=>p,GIFMediaType:()=>O,JPEGMediaType:()=>L,LinearFilter:()=>M,LinearMipMapLinearFilter:()=>A,LinearMipMapNearestFilter:()=>I,LinearMipmapLinearFilter:()=>S,LinearMipmapNearestFilter:()=>T,MirroredRepeatWrapping:()=>m,NearestFilter:()=>y,NearestMipMapLinearFilter:()=>w,NearestMipMapNearestFilter:()=>g,NearestMipmapLinearFilter:()=>b,NearestMipmapNearestFilter:()=>x,PNGMediaType:()=>P,RepeatWrapping:()=>d,XKTModel:()=>He,XKT_INFO:()=>f,buildBoxGeometry:()=>zr,buildBoxLinesGeometry:()=>Ur,buildCylinderGeometry:()=>Xr,buildGridGeometry:()=>Rr,buildPlaneGeometry:()=>Kr,buildSphereGeometry:()=>qr,buildTorusGeometry:()=>Zr,buildVectorTextGeometry:()=>Wr,convert2xkt:()=>tn,parseCityJSONIntoXKTModel:()=>Ft,parseGLTFIntoXKTModel:()=>Wt,parseGLTFJSONIntoXKTModel:()=>ar,parseIFCIntoXKTModel:()=>vr,parseLASIntoXKTModel:()=>wr,parseMetaModelIntoXKTModel:()=>Mr,parsePCDIntoXKTModel:()=>Tr,parsePLYIntoXKTModel:()=>Lr,parseSTLIntoXKTModel:()=>kr,writeXKTModelToArrayBuffer:()=>nt});const e=require("@loaders.gl/polyfills");var t,o,i,a,s,u,c,l,h,f={xktVersion:10},d=1e3,p=1001,m=1002,y=1003,g=1004,x=1004,b=1005,w=1005,M=1006,T=1007,I=1007,S=1008,A=1008,O=1e4,L=10001,P=10002,E=Float64Array,j=new E(16),G=new E(16),k=new E(4),_={MIN_DOUBLE:-Number.MAX_SAFE_INTEGER,MAX_DOUBLE:Number.MAX_SAFE_INTEGER,DEGTORAD:.0174532925,RADTODEG:57.295779513,vec2:function(e){return new E(e||2)},vec3:function(e){return new E(e||3)},vec4:function(e){return new E(e||4)},mat3:function(e){return new E(e||9)},mat3ToMat4:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new E(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=0,t[4]=e[3],t[5]=e[4],t[6]=e[5],t[7]=0,t[8]=e[6],t[9]=e[7],t[10]=e[8],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},mat4:function(e){return new E(e||16)},mat4ToMat3:function(e,t){},createUUID:function(){for(var e=[],t=0;t<256;t++)e[t]=(t<16?"0":"")+t.toString(16);return function(){var t=4294967295*Math.random()|0,r=4294967295*Math.random()|0,n=4294967295*Math.random()|0,o=4294967295*Math.random()|0;return"".concat(e[255&t]+e[t>>8&255]+e[t>>16&255]+e[t>>24&255],"-").concat(e[255&r]).concat(e[r>>8&255],"-").concat(e[r>>16&15|64]).concat(e[r>>24&255],"-").concat(e[63&n|128]).concat(e[n>>8&255],"-").concat(e[n>>16&255]).concat(e[n>>24&255]).concat(e[255&o]).concat(e[o>>8&255]).concat(e[o>>16&255]).concat(e[o>>24&255])}}(),clamp:function(e,t,r){return Math.max(t,Math.min(r,e))},fmod:function(e,t){if(e1?1:r,Math.acos(r)},vec3FromMat4Scale:(u=new E(3),function(e,t){return u[0]=e[0],u[1]=e[1],u[2]=e[2],t[0]=_.lenVec3(u),u[0]=e[4],u[1]=e[5],u[2]=e[6],t[1]=_.lenVec3(u),u[0]=e[8],u[1]=e[9],u[2]=e[10],t[2]=_.lenVec3(u),t}),vecToArray:function(){function e(e){return Math.round(1e5*e)/1e5}return function(t){for(var r=0,n=(t=Array.prototype.slice.call(t)).length;r0&&void 0!==arguments[0]?arguments[0]:new E(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},identityMat3:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new E(9);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},isIdentityMat4:function(e){return 1===e[0]&&0===e[1]&&0===e[2]&&0===e[3]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[7]&&0===e[8]&&0===e[9]&&1===e[10]&&0===e[11]&&0===e[12]&&0===e[13]&&0===e[14]&&1===e[15]},negateMat4:function(e,t){return t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t},addMat4:function(e,t,r){return r||(r=e),r[0]=e[0]+t[0],r[1]=e[1]+t[1],r[2]=e[2]+t[2],r[3]=e[3]+t[3],r[4]=e[4]+t[4],r[5]=e[5]+t[5],r[6]=e[6]+t[6],r[7]=e[7]+t[7],r[8]=e[8]+t[8],r[9]=e[9]+t[9],r[10]=e[10]+t[10],r[11]=e[11]+t[11],r[12]=e[12]+t[12],r[13]=e[13]+t[13],r[14]=e[14]+t[14],r[15]=e[15]+t[15],r},addMat4Scalar:function(e,t,r){return r||(r=e),r[0]=e[0]+t,r[1]=e[1]+t,r[2]=e[2]+t,r[3]=e[3]+t,r[4]=e[4]+t,r[5]=e[5]+t,r[6]=e[6]+t,r[7]=e[7]+t,r[8]=e[8]+t,r[9]=e[9]+t,r[10]=e[10]+t,r[11]=e[11]+t,r[12]=e[12]+t,r[13]=e[13]+t,r[14]=e[14]+t,r[15]=e[15]+t,r},addScalarMat4:function(e,t,r){return _.addMat4Scalar(t,e,r)},subMat4:function(e,t,r){return r||(r=e),r[0]=e[0]-t[0],r[1]=e[1]-t[1],r[2]=e[2]-t[2],r[3]=e[3]-t[3],r[4]=e[4]-t[4],r[5]=e[5]-t[5],r[6]=e[6]-t[6],r[7]=e[7]-t[7],r[8]=e[8]-t[8],r[9]=e[9]-t[9],r[10]=e[10]-t[10],r[11]=e[11]-t[11],r[12]=e[12]-t[12],r[13]=e[13]-t[13],r[14]=e[14]-t[14],r[15]=e[15]-t[15],r},subMat4Scalar:function(e,t,r){return r||(r=e),r[0]=e[0]-t,r[1]=e[1]-t,r[2]=e[2]-t,r[3]=e[3]-t,r[4]=e[4]-t,r[5]=e[5]-t,r[6]=e[6]-t,r[7]=e[7]-t,r[8]=e[8]-t,r[9]=e[9]-t,r[10]=e[10]-t,r[11]=e[11]-t,r[12]=e[12]-t,r[13]=e[13]-t,r[14]=e[14]-t,r[15]=e[15]-t,r},subScalarMat4:function(e,t,r){return r||(r=t),r[0]=e-t[0],r[1]=e-t[1],r[2]=e-t[2],r[3]=e-t[3],r[4]=e-t[4],r[5]=e-t[5],r[6]=e-t[6],r[7]=e-t[7],r[8]=e-t[8],r[9]=e-t[9],r[10]=e-t[10],r[11]=e-t[11],r[12]=e-t[12],r[13]=e-t[13],r[14]=e-t[14],r[15]=e-t[15],r},mulMat4:function(e,t,r){r||(r=e);var n=e[0],o=e[1],i=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],v=e[12],m=e[13],y=e[14],g=e[15],x=t[0],b=t[1],w=t[2],M=t[3],T=t[4],I=t[5],S=t[6],A=t[7],O=t[8],L=t[9],P=t[10],E=t[11],j=t[12],G=t[13],k=t[14],_=t[15];return r[0]=x*n+b*s+w*h+M*v,r[1]=x*o+b*u+w*f+M*m,r[2]=x*i+b*c+w*d+M*y,r[3]=x*a+b*l+w*p+M*g,r[4]=T*n+I*s+S*h+A*v,r[5]=T*o+I*u+S*f+A*m,r[6]=T*i+I*c+S*d+A*y,r[7]=T*a+I*l+S*p+A*g,r[8]=O*n+L*s+P*h+E*v,r[9]=O*o+L*u+P*f+E*m,r[10]=O*i+L*c+P*d+E*y,r[11]=O*a+L*l+P*p+E*g,r[12]=j*n+G*s+k*h+_*v,r[13]=j*o+G*u+k*f+_*m,r[14]=j*i+G*c+k*d+_*y,r[15]=j*a+G*l+k*p+_*g,r},mulMat3:function(e,t,r){r||(r=new E(9));var n=e[0],o=e[3],i=e[6],a=e[1],s=e[4],u=e[7],c=e[2],l=e[5],h=e[8],f=t[0],d=t[3],p=t[6],v=t[1],m=t[4],y=t[7],g=t[2],x=t[5],b=t[8];return r[0]=n*f+o*v+i*g,r[3]=n*d+o*m+i*x,r[6]=n*p+o*y+i*b,r[1]=a*f+s*v+u*g,r[4]=a*d+s*m+u*x,r[7]=a*p+s*y+u*b,r[2]=c*f+l*v+h*g,r[5]=c*d+l*m+h*x,r[8]=c*p+l*y+h*b,r},mulMat4Scalar:function(e,t,r){return r||(r=e),r[0]=e[0]*t,r[1]=e[1]*t,r[2]=e[2]*t,r[3]=e[3]*t,r[4]=e[4]*t,r[5]=e[5]*t,r[6]=e[6]*t,r[7]=e[7]*t,r[8]=e[8]*t,r[9]=e[9]*t,r[10]=e[10]*t,r[11]=e[11]*t,r[12]=e[12]*t,r[13]=e[13]*t,r[14]=e[14]*t,r[15]=e[15]*t,r},mulMat4v4:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.vec4(),n=t[0],o=t[1],i=t[2],a=t[3];return r[0]=e[0]*n+e[4]*o+e[8]*i+e[12]*a,r[1]=e[1]*n+e[5]*o+e[9]*i+e[13]*a,r[2]=e[2]*n+e[6]*o+e[10]*i+e[14]*a,r[3]=e[3]*n+e[7]*o+e[11]*i+e[15]*a,r},transposeMat4:function(e,t){var r=e[4],n=e[14],o=e[8],i=e[13],a=e[12],s=e[9];if(!t||e===t){var u=e[1],c=e[2],l=e[3],h=e[6],f=e[7],d=e[11];return e[1]=r,e[2]=o,e[3]=a,e[4]=u,e[6]=s,e[7]=i,e[8]=c,e[9]=h,e[11]=n,e[12]=l,e[13]=f,e[14]=d,e}return t[0]=e[0],t[1]=r,t[2]=o,t[3]=a,t[4]=e[1],t[5]=e[5],t[6]=s,t[7]=i,t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=n,t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t},transposeMat3:function(e,t){if(t===e){var r=e[1],n=e[2],o=e[5];t[1]=e[3],t[2]=e[6],t[3]=r,t[5]=e[7],t[6]=n,t[7]=o}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},determinantMat4:function(e){var t=e[0],r=e[1],n=e[2],o=e[3],i=e[4],a=e[5],s=e[6],u=e[7],c=e[8],l=e[9],h=e[10],f=e[11],d=e[12],p=e[13],v=e[14],m=e[15];return d*l*s*o-c*p*s*o-d*a*h*o+i*p*h*o+c*a*v*o-i*l*v*o-d*l*n*u+c*p*n*u+d*r*h*u-t*p*h*u-c*r*v*u+t*l*v*u+d*a*n*f-i*p*n*f-d*r*s*f+t*p*s*f+i*r*v*f-t*a*v*f-c*a*n*m+i*l*n*m+c*r*s*m-t*l*s*m-i*r*h*m+t*a*h*m},inverseMat4:function(e,t){t||(t=e);var r=e[0],n=e[1],o=e[2],i=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],d=e[11],p=e[12],v=e[13],m=e[14],y=e[15],g=r*s-n*a,x=r*u-o*a,b=r*c-i*a,w=n*u-o*s,M=n*c-i*s,T=o*c-i*u,I=l*v-h*p,S=l*m-f*p,A=l*y-d*p,O=h*m-f*v,L=h*y-d*v,P=f*y-d*m,E=1/(g*P-x*L+b*O+w*A-M*S+T*I);return t[0]=(s*P-u*L+c*O)*E,t[1]=(-n*P+o*L-i*O)*E,t[2]=(v*T-m*M+y*w)*E,t[3]=(-h*T+f*M-d*w)*E,t[4]=(-a*P+u*A-c*S)*E,t[5]=(r*P-o*A+i*S)*E,t[6]=(-p*T+m*b-y*x)*E,t[7]=(l*T-f*b+d*x)*E,t[8]=(a*L-s*A+c*I)*E,t[9]=(-r*L+n*A-i*I)*E,t[10]=(p*M-v*b+y*g)*E,t[11]=(-l*M+h*b-d*g)*E,t[12]=(-a*O+s*S-u*I)*E,t[13]=(r*O-n*S+o*I)*E,t[14]=(-p*w+v*x-m*g)*E,t[15]=(l*w-h*x+f*g)*E,t},traceMat4:function(e){return e[0]+e[5]+e[10]+e[15]},translationMat4v:function(e,t){var r=t||_.identityMat4();return r[12]=e[0],r[13]=e[1],r[14]=e[2],r},translationMat3v:function(e,t){var r=t||_.identityMat3();return r[6]=e[0],r[7]=e[1],r},translationMat4c:(s=new E(3),function(e,t,r,n){return s[0]=e,s[1]=t,s[2]=r,_.translationMat4v(s,n)}),translationMat4s:function(e,t){return _.translationMat4c(e,e,e,t)},translateMat4v:function(e,t){return _.translateMat4c(e[0],e[1],e[2],t)},OLDtranslateMat4c:function(e,t,r,n){var o=n[12];n[0]+=o*e,n[4]+=o*t,n[8]+=o*r;var i=n[13];n[1]+=i*e,n[5]+=i*t,n[9]+=i*r;var a=n[14];n[2]+=a*e,n[6]+=a*t,n[10]+=a*r;var s=n[15];return n[3]+=s*e,n[7]+=s*t,n[11]+=s*r,n},translateMat4c:function(e,t,r,n){var o=n[3];n[0]+=o*e,n[1]+=o*t,n[2]+=o*r;var i=n[7];n[4]+=i*e,n[5]+=i*t,n[6]+=i*r;var a=n[11];n[8]+=a*e,n[9]+=a*t,n[10]+=a*r;var s=n[15];return n[12]+=s*e,n[13]+=s*t,n[14]+=s*r,n},rotationMat4v:function(e,t,r){var n,o,i,a,s,u,c=_.normalizeVec4([t[0],t[1],t[2],0],[]),l=Math.sin(e),h=Math.cos(e),f=1-h,d=c[0],p=c[1],v=c[2];return n=d*p,o=p*v,i=v*d,a=d*l,s=p*l,u=v*l,(r=r||_.mat4())[0]=f*d*d+h,r[1]=f*n+u,r[2]=f*i-s,r[3]=0,r[4]=f*n-u,r[5]=f*p*p+h,r[6]=f*o+a,r[7]=0,r[8]=f*i+s,r[9]=f*o-a,r[10]=f*v*v+h,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r},rotationMat4c:function(e,t,r,n,o){return _.rotationMat4v(e,[t,r,n],o)},scalingMat4v:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.identityMat4();return t[0]=e[0],t[5]=e[1],t[10]=e[2],t},scalingMat3v:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.identityMat3();return t[0]=e[0],t[4]=e[1],t},scalingMat4c:function(){var e=new E(3);return function(t,r,n,o){return e[0]=t,e[1]=r,e[2]=n,_.scalingMat4v(e,o)}}(),scaleMat4c:function(e,t,r,n){return n[0]*=e,n[4]*=t,n[8]*=r,n[1]*=e,n[5]*=t,n[9]*=r,n[2]*=e,n[6]*=t,n[10]*=r,n[3]*=e,n[7]*=t,n[11]*=r,n},scaleMat4v:function(e,t){var r=e[0],n=e[1],o=e[2];return t[0]*=r,t[4]*=n,t[8]*=o,t[1]*=r,t[5]*=n,t[9]*=o,t[2]*=r,t[6]*=n,t[10]*=o,t[3]*=r,t[7]*=n,t[11]*=o,t},scalingMat4s:function(e){return _.scalingMat4c(e,e,e)},rotationTranslationMat4:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.mat4(),n=e[0],o=e[1],i=e[2],a=e[3],s=n+n,u=o+o,c=i+i,l=n*s,h=n*u,f=n*c,d=o*u,p=o*c,v=i*c,m=a*s,y=a*u,g=a*c;return r[0]=1-(d+v),r[1]=h+g,r[2]=f-y,r[3]=0,r[4]=h-g,r[5]=1-(l+v),r[6]=p+m,r[7]=0,r[8]=f+y,r[9]=p-m,r[10]=1-(l+d),r[11]=0,r[12]=t[0],r[13]=t[1],r[14]=t[2],r[15]=1,r},mat4ToEuler:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.vec4(),n=_.clamp,o=e[0],i=e[4],a=e[8],s=e[1],u=e[5],c=e[9],l=e[2],h=e[6],f=e[10];return"XYZ"===t?(r[1]=Math.asin(n(a,-1,1)),Math.abs(a)<.99999?(r[0]=Math.atan2(-c,f),r[2]=Math.atan2(-i,o)):(r[0]=Math.atan2(h,u),r[2]=0)):"YXZ"===t?(r[0]=Math.asin(-n(c,-1,1)),Math.abs(c)<.99999?(r[1]=Math.atan2(a,f),r[2]=Math.atan2(s,u)):(r[1]=Math.atan2(-l,o),r[2]=0)):"ZXY"===t?(r[0]=Math.asin(n(h,-1,1)),Math.abs(h)<.99999?(r[1]=Math.atan2(-l,f),r[2]=Math.atan2(-i,u)):(r[1]=0,r[2]=Math.atan2(s,o))):"ZYX"===t?(r[1]=Math.asin(-n(l,-1,1)),Math.abs(l)<.99999?(r[0]=Math.atan2(h,f),r[2]=Math.atan2(s,o)):(r[0]=0,r[2]=Math.atan2(-i,u))):"YZX"===t?(r[2]=Math.asin(n(s,-1,1)),Math.abs(s)<.99999?(r[0]=Math.atan2(-c,u),r[1]=Math.atan2(-l,o)):(r[0]=0,r[1]=Math.atan2(a,f))):"XZY"===t&&(r[2]=Math.asin(-n(i,-1,1)),Math.abs(i)<.99999?(r[0]=Math.atan2(h,u),r[1]=Math.atan2(a,o)):(r[0]=Math.atan2(-c,f),r[1]=0)),r},composeMat4:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_.mat4();return _.quaternionToRotationMat4(t,n),_.scaleMat4v(r,n),_.translateMat4v(e,n),n},decomposeMat4:function(){var e=new E(3),t=new E(16);return function(r,n,o,i){e[0]=r[0],e[1]=r[1],e[2]=r[2];var a=_.lenVec3(e);e[0]=r[4],e[1]=r[5],e[2]=r[6];var s=_.lenVec3(e);e[8]=r[8],e[9]=r[9],e[10]=r[10];var u=_.lenVec3(e);_.determinantMat4(r)<0&&(a=-a),n[0]=r[12],n[1]=r[13],n[2]=r[14],t.set(r);var c=1/a,l=1/s,h=1/u;return t[0]*=c,t[1]*=c,t[2]*=c,t[4]*=l,t[5]*=l,t[6]*=l,t[8]*=h,t[9]*=h,t[10]*=h,_.mat4ToQuaternion(t,o),i[0]=a,i[1]=s,i[2]=u,this}}(),lookAtMat4v:function(e,t,r,n){n||(n=_.mat4());var o,i,a,s,u,c,l,h,f,d,p=e[0],v=e[1],m=e[2],y=r[0],g=r[1],x=r[2],b=t[0],w=t[1],M=t[2];return p===b&&v===w&&m===M?_.identityMat4():(o=p-b,i=v-w,a=m-M,s=g*(a*=d=1/Math.sqrt(o*o+i*i+a*a))-x*(i*=d),u=x*(o*=d)-y*a,c=y*i-g*o,(d=Math.sqrt(s*s+u*u+c*c))?(s*=d=1/d,u*=d,c*=d):(s=0,u=0,c=0),l=i*c-a*u,h=a*s-o*c,f=o*u-i*s,(d=Math.sqrt(l*l+h*h+f*f))?(l*=d=1/d,h*=d,f*=d):(l=0,h=0,f=0),n[0]=s,n[1]=l,n[2]=o,n[3]=0,n[4]=u,n[5]=h,n[6]=i,n[7]=0,n[8]=c,n[9]=f,n[10]=a,n[11]=0,n[12]=-(s*p+u*v+c*m),n[13]=-(l*p+h*v+f*m),n[14]=-(o*p+i*v+a*m),n[15]=1,n)},lookAtMat4c:function(e,t,r,n,o,i,a,s,u){return _.lookAtMat4v([e,t,r],[n,o,i],[a,s,u],[])},orthoMat4c:function(e,t,r,n,o,i,a){a||(a=_.mat4());var s=t-e,u=n-r,c=i-o;return a[0]=2/s,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=2/u,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=-2/c,a[11]=0,a[12]=-(e+t)/s,a[13]=-(n+r)/u,a[14]=-(i+o)/c,a[15]=1,a},frustumMat4v:function(e,t,r){r||(r=_.mat4());var n=[e[0],e[1],e[2],0],o=[t[0],t[1],t[2],0];_.addVec4(o,n,j),_.subVec4(o,n,G);var i=2*n[2],a=G[0],s=G[1],u=G[2];return r[0]=i/a,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=i/s,r[6]=0,r[7]=0,r[8]=j[0]/a,r[9]=j[1]/s,r[10]=-j[2]/u,r[11]=-1,r[12]=0,r[13]=0,r[14]=-i*o[2]/u,r[15]=0,r},frustumMat4:function(e,t,r,n,o,i,a){a||(a=_.mat4());var s=t-e,u=n-r,c=i-o;return a[0]=2*o/s,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=2*o/u,a[6]=0,a[7]=0,a[8]=(t+e)/s,a[9]=(n+r)/u,a[10]=-(i+o)/c,a[11]=-1,a[12]=0,a[13]=0,a[14]=-i*o*2/c,a[15]=0,a},perspectiveMat4:function(e,t,r,n,o){var i=[],a=[];return i[2]=r,a[2]=n,a[1]=i[2]*Math.tan(e/2),i[1]=-a[1],a[0]=a[1]*t,i[0]=-a[0],_.frustumMat4v(i,a,o)},transformPoint3:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.vec3(),n=t[0],o=t[1],i=t[2];return r[0]=e[0]*n+e[4]*o+e[8]*i+e[12],r[1]=e[1]*n+e[5]*o+e[9]*i+e[13],r[2]=e[2]*n+e[6]*o+e[10]*i+e[14],r},transformPoint4:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.vec4();return r[0]=e[0]*t[0]+e[4]*t[1]+e[8]*t[2]+e[12]*t[3],r[1]=e[1]*t[0]+e[5]*t[1]+e[9]*t[2]+e[13]*t[3],r[2]=e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]*t[3],r[3]=e[3]*t[0]+e[7]*t[1]+e[11]*t[2]+e[15]*t[3],r},transformPoints3:function(e,t,r){for(var n,o,i,a,s,u=r||[],c=t.length,l=e[0],h=e[1],f=e[2],d=e[3],p=e[4],v=e[5],m=e[6],y=e[7],g=e[8],x=e[9],b=e[10],w=e[11],M=e[12],T=e[13],I=e[14],S=e[15],A=0;A2&&void 0!==arguments[2]?arguments[2]:t,s=t.length,u=e[0],c=e[1],l=e[2],h=e[3],f=e[4],d=e[5],p=e[6],v=e[7],m=e[8],y=e[9],g=e[10],x=e[11],b=e[12],w=e[13],M=e[14],T=e[15];for(r=0;r2&&void 0!==arguments[2]?arguments[2]:t,s=t.length,u=e[0],c=e[1],l=e[2],h=e[3],f=e[4],d=e[5],p=e[6],v=e[7],m=e[8],y=e[9],g=e[10],x=e[11],b=e[12],w=e[13],M=e[14],T=e[15];for(r=0;r0&&void 0!==arguments[0]?arguments[0]:_.vec4();return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},eulerToQuaternion:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.vec4(),n=e[0]*_.DEGTORAD/2,o=e[1]*_.DEGTORAD/2,i=e[2]*_.DEGTORAD/2,a=Math.cos(n),s=Math.cos(o),u=Math.cos(i),c=Math.sin(n),l=Math.sin(o),h=Math.sin(i);return"XYZ"===t?(r[0]=c*s*u+a*l*h,r[1]=a*l*u-c*s*h,r[2]=a*s*h+c*l*u,r[3]=a*s*u-c*l*h):"YXZ"===t?(r[0]=c*s*u+a*l*h,r[1]=a*l*u-c*s*h,r[2]=a*s*h-c*l*u,r[3]=a*s*u+c*l*h):"ZXY"===t?(r[0]=c*s*u-a*l*h,r[1]=a*l*u+c*s*h,r[2]=a*s*h+c*l*u,r[3]=a*s*u-c*l*h):"ZYX"===t?(r[0]=c*s*u-a*l*h,r[1]=a*l*u+c*s*h,r[2]=a*s*h-c*l*u,r[3]=a*s*u+c*l*h):"YZX"===t?(r[0]=c*s*u+a*l*h,r[1]=a*l*u+c*s*h,r[2]=a*s*h-c*l*u,r[3]=a*s*u-c*l*h):"XZY"===t&&(r[0]=c*s*u-a*l*h,r[1]=a*l*u-c*s*h,r[2]=a*s*h+c*l*u,r[3]=a*s*u+c*l*h),r},mat4ToQuaternion:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.vec4(),n=e[0],o=e[4],i=e[8],a=e[1],s=e[5],u=e[9],c=e[2],l=e[6],h=e[10],f=n+s+h;return f>0?(t=.5/Math.sqrt(f+1),r[3]=.25/t,r[0]=(l-u)*t,r[1]=(i-c)*t,r[2]=(a-o)*t):n>s&&n>h?(t=2*Math.sqrt(1+n-s-h),r[3]=(l-u)/t,r[0]=.25*t,r[1]=(o+a)/t,r[2]=(i+c)/t):s>h?(t=2*Math.sqrt(1+s-n-h),r[3]=(i-c)/t,r[0]=(o+a)/t,r[1]=.25*t,r[2]=(u+l)/t):(t=2*Math.sqrt(1+h-n-s),r[3]=(a-o)/t,r[0]=(i+c)/t,r[1]=(u+l)/t,r[2]=.25*t),r},vec3PairToQuaternion:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.vec4(),n=Math.sqrt(_.dotVec3(e,e)*_.dotVec3(t,t)),o=n+_.dotVec3(e,t);return o<1e-8*n?(o=0,Math.abs(e[0])>Math.abs(e[2])?(r[0]=-e[1],r[1]=e[0],r[2]=0):(r[0]=0,r[1]=-e[2],r[2]=e[1])):_.cross3Vec3(e,t,r),r[3]=o,_.normalizeQuaternion(r)},angleAxisToQuaternion:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.vec4(),r=e[3]/2,n=Math.sin(r);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(r),t},quaternionToEuler:function(){var e=new E(16);return function(t,r,n){return n=n||_.vec3(),_.quaternionToRotationMat4(t,e),_.mat4ToEuler(e,r,n),n}}(),mulQuaternions:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.vec4(),n=e[0],o=e[1],i=e[2],a=e[3],s=t[0],u=t[1],c=t[2],l=t[3];return r[0]=a*s+n*l+o*c-i*u,r[1]=a*u+o*l+i*s-n*c,r[2]=a*c+i*l+n*u-o*s,r[3]=a*l-n*s-o*u-i*c,r},vec3ApplyQuaternion:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.vec3(),n=t[0],o=t[1],i=t[2],a=e[0],s=e[1],u=e[2],c=e[3],l=c*n+s*i-u*o,h=c*o+u*n-a*i,f=c*i+a*o-s*n,d=-a*n-s*o-u*i;return r[0]=l*c+d*-a+h*-u-f*-s,r[1]=h*c+d*-s+f*-a-l*-u,r[2]=f*c+d*-u+l*-s-h*-a,r},quaternionToMat4:function(e,t){t=_.identityMat4(t);var r=e[0],n=e[1],o=e[2],i=e[3],a=2*r,s=2*n,u=2*o,c=a*i,l=s*i,h=u*i,f=a*r,d=s*r,p=u*r,v=s*n,m=u*n,y=u*o;return t[0]=1-(v+y),t[1]=d+h,t[2]=p-l,t[4]=d-h,t[5]=1-(f+y),t[6]=m+c,t[8]=p+l,t[9]=m-c,t[10]=1-(f+v),t},quaternionToRotationMat4:function(e,t){var r=e[0],n=e[1],o=e[2],i=e[3],a=r+r,s=n+n,u=o+o,c=r*a,l=r*s,h=r*u,f=n*s,d=n*u,p=o*u,v=i*a,m=i*s,y=i*u;return t[0]=1-(f+p),t[4]=l-y,t[8]=h+m,t[1]=l+y,t[5]=1-(c+p),t[9]=d-v,t[2]=h-m,t[6]=d+v,t[10]=1-(c+f),t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},normalizeQuaternion:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=_.lenVec4([e[0],e[1],e[2],e[3]]);return t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r,t[3]=e[3]/r,t},conjugateQuaternion:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},inverseQuaternion:function(e,t){return _.normalizeQuaternion(_.conjugateQuaternion(e,t))},quaternionToAngleAxis:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.vec4(),r=(e=_.normalizeQuaternion(e,k))[3],n=2*Math.acos(r),o=Math.sqrt(1-r*r);return o<.001?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=e[0]/o,t[1]=e[1]/o,t[2]=e[2]/o),t[3]=n,t},AABB3:function(e){return new E(e||6)},AABB2:function(e){return new E(e||4)},OBB3:function(e){return new E(e||32)},OBB2:function(e){return new E(e||16)},Sphere3:function(e,t,r,n){return new E([e,t,r,n])},transformOBB3:function(e,t){var r,n,o,i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,s=t.length,u=e[0],c=e[1],l=e[2],h=e[3],f=e[4],d=e[5],p=e[6],v=e[7],m=e[8],y=e[9],g=e[10],x=e[11],b=e[12],w=e[13],M=e[14],T=e[15];for(r=0;rs?a:s,i[1]+=u>c?u:c,i[2]+=l>h?l:h,Math.abs(_.lenVec3(i))}}(),getAABB3Center:function(e,t){var r=t||_.vec3();return r[0]=(e[0]+e[3])/2,r[1]=(e[1]+e[4])/2,r[2]=(e[2]+e[5])/2,r},getAABB2Center:function(e,t){var r=t||_.vec2();return r[0]=(e[2]+e[0])/2,r[1]=(e[3]+e[1])/2,r},collapseAABB3:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_.AABB3();return e[0]=_.MAX_DOUBLE,e[1]=_.MAX_DOUBLE,e[2]=_.MAX_DOUBLE,e[3]=-_.MAX_DOUBLE,e[4]=-_.MAX_DOUBLE,e[5]=-_.MAX_DOUBLE,e},AABB3ToOBB3:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.OBB3();return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t[4]=e[3],t[5]=e[1],t[6]=e[2],t[7]=1,t[8]=e[3],t[9]=e[4],t[10]=e[2],t[11]=1,t[12]=e[0],t[13]=e[4],t[14]=e[2],t[15]=1,t[16]=e[0],t[17]=e[1],t[18]=e[5],t[19]=1,t[20]=e[3],t[21]=e[1],t[22]=e[5],t[23]=1,t[24]=e[3],t[25]=e[4],t[26]=e[5],t[27]=1,t[28]=e[0],t[29]=e[4],t[30]=e[5],t[31]=1,t},positions3ToAABB3:(t=new E(3),function(e,r,n){r=r||_.AABB3();for(var o,i,a,s=_.MAX_DOUBLE,u=_.MAX_DOUBLE,c=_.MAX_DOUBLE,l=-_.MAX_DOUBLE,h=-_.MAX_DOUBLE,f=-_.MAX_DOUBLE,d=0,p=e.length;dl&&(l=o),i>h&&(h=i),a>f&&(f=a);return r[0]=s,r[1]=u,r[2]=c,r[3]=l,r[4]=h,r[5]=f,r}),OBB3ToAABB3:function(e){for(var t,r,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.AABB3(),i=_.MAX_DOUBLE,a=_.MAX_DOUBLE,s=_.MAX_DOUBLE,u=-_.MAX_DOUBLE,c=-_.MAX_DOUBLE,l=-_.MAX_DOUBLE,h=0,f=e.length;hu&&(u=t),r>c&&(c=r),n>l&&(l=n);return o[0]=i,o[1]=a,o[2]=s,o[3]=u,o[4]=c,o[5]=l,o},points3ToAABB3:function(e){for(var t,r,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.AABB3(),i=_.MAX_DOUBLE,a=_.MAX_DOUBLE,s=_.MAX_DOUBLE,u=-_.MAX_DOUBLE,c=-_.MAX_DOUBLE,l=-_.MAX_DOUBLE,h=0,f=e.length;hu&&(u=t),r>c&&(c=r),n>l&&(l=n);return o[0]=i,o[1]=a,o[2]=s,o[3]=u,o[4]=c,o[5]=l,o},points3ToSphere3:function(){var e=new E(3);return function(t,r){r=r||_.vec4();var n,o=0,i=0,a=0,s=t.length;for(n=0;nc&&(c=u);return r[3]=c,r}}(),positions3ToSphere3:function(){var e=new E(3),t=new E(3);return function(r,n){n=n||_.vec4();var o,i=0,a=0,s=0,u=r.length,c=0;for(o=0;oc&&(c=l);return n[3]=c,n}}(),OBB3ToSphere3:function(){var e=new E(3),t=new E(3);return function(r,n){n=n||_.vec4();var o,i=0,a=0,s=0,u=r.length,c=u/4;for(o=0;oh&&(h=l);return n[3]=h,n}}(),getSphere3Center:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.vec3();return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},expandAABB3:function(e,t){return e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]>t[2]&&(e[2]=t[2]),e[3]t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]>t[2]&&(e[2]=t[2]),e[3]3&&void 0!==arguments[3]?arguments[3]:_.vec3(),o=t[0]-e[0],i=t[1]-e[1],a=t[2]-e[2],s=r[0]-e[0],u=r[1]-e[1],c=r[2]-e[2],l=i*c-a*u,h=a*s-o*c,f=o*u-i*s,d=Math.sqrt(l*l+h*h+f*f);return 0===d?(n[0]=0,n[1]=0,n[2]=0):(n[0]=l/d,n[1]=h/d,n[2]=f/d),n}};function D(e,t,r,n){var o=e[t]/(Math.abs(e[t])+Math.abs(e[t+1])+Math.abs(e[t+2])),i=e[t+1]/(Math.abs(e[t])+Math.abs(e[t+1])+Math.abs(e[t+2]));if(e[t+2]<0){var a=(1-Math.abs(i))*(o>=0?1:-1),s=(1-Math.abs(o))*(i>=0?1:-1);o=a,i=s}return new Int8Array([Math[r](127.5*o+(o<0?-1:0)),Math[n](127.5*i+(i<0?-1:0))])}function N(e){var t=e[0],r=e[1];t/=t<0?127:128,r/=r<0?127:128;var n=1-Math.abs(t)-Math.abs(r);n<0&&(t=(1-Math.abs(r))*(t>=0?1:-1),r=(1-Math.abs(t))*(r>=0?1:-1));var o=Math.sqrt(t*t+r*r+n*n);return[t/o,r/o,n/o]}function F(e,t,r){return e[t]*r[0]+e[t+1]*r[1]+e[t+2]*r[2]}var V,C,B,z,U,X,R,K,q,Z,Y,W,Q,J,H,$,ee,te={quantizePositions:function(e,t,r,n){for(var o=r[0],i=r[1],a=r[2],s=65535,u=s/(r[3]-o),c=s/(r[4]-i),l=s/(r[5]-a),h=function(e){return e>=0?e:0},f=0;fu&&(a=i,u=s),(s=F(h,0,N(i=D(h,0,"floor","ceil"))))>u&&(a=i,u=s),(s=F(h,0,N(i=D(h,0,"ceil","ceil"))))>u&&(a=i,u=s),n[o+c+0]=a[0],n[o+c+1]=a[1],n[o+c+2]=0;return o+r},octEncodeNormals:function(e,t,r,n){for(var o,i,a,s,u=0;us&&(i=o,s=a),(a=F(e,u,N(o=D(e,u,"floor","ceil"))))>s&&(i=o,s=a),(a=F(e,u,N(o=D(e,u,"ceil","ceil"))))>s&&(i=o,s=a),r[n+u+0]=i[0],r[n+u+1]=i[1],r[n+u+2]=0;return n+t}},re=(V=[],C=[],B=[],z=[],U=[],X=0,R=new Uint16Array(3),K=new Uint16Array(3),q=new Uint16Array(3),Z=_.vec3(),Y=_.vec3(),W=_.vec3(),Q=_.vec3(),J=_.vec3(),H=_.vec3(),$=_.vec3(),ee=_.vec3(),function(e,t,r,n){!function(e,t){var r,n,o,i,a,s,u={},c=Math.pow(10,4),l=0;for(a=0,s=e.length;am&&T>m)continue}d=B[c.index1],p=B[c.index2],(!g&&d>65535||p>65535)&&(g=!0),v.push(d),v.push(p)}return g?new Uint32Array(v):new Uint16Array(v)}),ne=function(e,t,r,n){function o(e,r){for(var n,o,i=0;i<3;i++)if((n=t[3*e+i])!==(o=t[3*r+i]))return o-n;return 0}for(var i=e.slice().sort(o),a=null,s=0,u=i.length;sf&&h>d?f>d?(p=h,v=f,m=d):(p=h,v=d,m=f):f>h&&f>d?h>d?(p=f,v=h,m=d):(p=f,v=d,m=h):d>h&&d>f&&(h>f?(p=d,v=h,m=f):(p=d,v=f,m=h)),n[c+0]=[p,v],n[c+1]=[v,m],p>m){var y=m;m=p,p=y}n[c+2]=[m,p]}function g(e,t){for(var r,n,o=0;o<2;o++)if(r=e[o],(n=t[o])!==r)return n-r;return 0}(n=n.slice(0,e.length)).sort(g);for(var x=0,b=0;b0&&2!==x)};function oe(e){return oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oe(e)}function ie(e,t){for(var r=0;r1}}])&&ce(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function he(e){return he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},he(e)}function fe(e,t){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:A(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}function Re(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function Ke(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modelId=t.modelId||"default",this.projectId=t.projectId||"",this.revisionId=t.revisionId||"",this.author=t.author||"",this.createdAt=t.createdAt||"",this.creatingApplication=t.creatingApplication||"",this.schema=t.schema||"",this.xktVersion=f.xktVersion,this.edgeThreshold=t.edgeThreshold||10,this.minTileSize=t.minTileSize||500,this.propertySets={},this.propertySetsList=[],this.metaObjects={},this.metaObjectsList=[],this.reusedGeometriesDecodeMatrix=new Float32Array(16),this.geometries={},this.geometriesList=[],this.textures={},this.texturesList=[],this.textureSets={},this.textureSetsList=[],this.meshes={},this.meshesList=[],this.entities={},this.entitiesList=[],this.tilesList=[],this.aabb=_.AABB3(),this.finalized=!1}var t,r,n,o;return t=e,r=[{key:"createPropertySet",value:function(e){if(!e)throw"Parameters expected: params";if(null===e.propertySetId||void 0===e.propertySetId)throw"Parameter expected: params.propertySetId";if(null===e.properties||void 0===e.properties)throw"Parameter expected: params.properties";if(this.finalized)console.error("XKTModel has been finalized, can't add more property sets");else if(!this.propertySets[e.propertySetId]){var t=e.propertySetId,r=e.propertySetType||"Default",n=e.propertySetName||e.propertySetId,o=e.properties||[],i=new Ee(t,r,n,o);return this.propertySets[t]=i,this.propertySetsList.push(i),i}}},{key:"createMetaObject",value:function(e){if(!e)throw"Parameters expected: params";if(null===e.metaObjectId||void 0===e.metaObjectId)throw"Parameter expected: params.metaObjectId";if(this.finalized)console.error("XKTModel has been finalized, can't add more meta objects");else if(!this.metaObjects[e.metaObjectId]){var t=e.metaObjectId,r=e.propertySetIds,n=e.metaObjectType||"Default",o=e.metaObjectName||e.metaObjectId,i=e.parentMetaObjectId,a=new Ae(t,r,n,o,i);return this.metaObjects[t]=a,this.metaObjectsList.push(a),i||this._rootMetaObject||(this._rootMetaObject=a),a}}},{key:"createTexture",value:function(e){if(!e)throw"Parameters expected: params";if(null===e.textureId||void 0===e.textureId)throw"Parameter expected: params.textureId";if(!e.imageData&&!e.src)throw"Parameter expected: params.imageData or params.src";if(this.finalized)console.error("XKTModel has been finalized, can't add more textures");else{if(!this.textures[e.textureId]){if(e.src){var t=e.src.split(".").pop();if("jpg"!==t&&"jpeg"!==t&&"png"!==t)return void console.error("XKTModel does not support image files with extension '".concat(t,"' - won't create texture '").concat(e.textureId))}var r=e.textureId,n=new _e({textureId:r,imageData:e.imageData,mediaType:e.mediaType,minFilter:e.minFilter,magFilter:e.magFilter,wrapS:e.wrapS,wrapT:e.wrapT,wrapR:e.wrapR,width:e.width,height:e.height,compressed:!1!==e.compressed,src:e.src});return this.textures[r]=n,this.texturesList.push(n),n}console.error("XKTTexture already exists with this ID: "+e.textureId)}}},{key:"createTextureSet",value:function(e){if(!e)throw"Parameters expected: params";if(null===e.textureSetId||void 0===e.textureSetId)throw"Parameter expected: params.textureSetId";if(this.finalized)console.error("XKTModel has been finalized, can't add more textureSets");else{if(!this.textureSets[e.textureSetId]){var t,r,n,o,i;if(void 0!==e.colorTextureId&&null!==e.colorTextureId){if(!(t=this.textures[e.colorTextureId]))return void console.error("Texture not found: ".concat(e.colorTextureId," - ensure that you create it first with createTexture()"));t.channel=0}if(void 0!==e.metallicRoughnessTextureId&&null!==e.metallicRoughnessTextureId){if(!(r=this.textures[e.metallicRoughnessTextureId]))return void console.error("Texture not found: ".concat(e.metallicRoughnessTextureId," - ensure that you create it first with createTexture()"));r.channel=1}if(void 0!==e.normalsTextureId&&null!==e.normalsTextureId){if(!(n=this.textures[e.normalsTextureId]))return void console.error("Texture not found: ".concat(e.normalsTextureId," - ensure that you create it first with createTexture()"));n.channel=2}if(void 0!==e.emissiveTextureId&&null!==e.emissiveTextureId){if(!(o=this.textures[e.emissiveTextureId]))return void console.error("Texture not found: ".concat(e.emissiveTextureId," - ensure that you create it first with createTexture()"));o.channel=3}if(void 0!==e.occlusionTextureId&&null!==e.occlusionTextureId){if(!(i=this.textures[e.occlusionTextureId]))return void console.error("Texture not found: ".concat(e.occlusionTextureId," - ensure that you create it first with createTexture()"));i.channel=4}var a=new Ve({textureSetId:e.textureSetId,textureSetIndex:this.textureSetsList.length,colorTexture:t,metallicRoughnessTexture:r,normalsTexture:n,emissiveTexture:o,occlusionTexture:i});return this.textureSets[e.textureSetId]=a,this.textureSetsList.push(a),a}console.error("XKTTextureSet already exists with this ID: "+e.textureSetId)}}},{key:"createGeometry",value:function(e){if(!e)throw"Parameters expected: params";if(null===e.geometryId||void 0===e.geometryId)throw"Parameter expected: params.geometryId";if(!e.primitiveType)throw"Parameter expected: params.primitiveType";if(!e.positions)throw"Parameter expected: params.positions";var t="triangles"===e.primitiveType,r="points"===e.primitiveType,n="lines"===e.primitiveType,o="line-strip"===e.primitiveType;if(e.primitiveType,e.primitiveType,!(t||r||n||o))throw"Unsupported value for params.primitiveType: "+e.primitiveType+"' - supported values are 'triangles', 'points', 'lines', 'line-strip', 'triangle-strip' and 'triangle-fan";if(t&&!e.indices)throw"Parameter expected for 'triangles' primitive: params.indices";if(r&&!e.colors&&!e.colorsCompressed)throw"Parameter expected for 'points' primitive: params.colors or params.colorsCompressed";if(n&&!e.indices)throw"Parameter expected for 'lines' primitive: params.indices";if(this.finalized)console.error("XKTModel has been finalized, can't add more geometries");else{if(!this.geometries[e.geometryId]){var i=e.geometryId,a=e.primitiveType,s=new Float64Array(e.positions),u={geometryId:i,geometryIndex:this.geometriesList.length,primitiveType:a,positions:s,uvs:e.uvs||e.uv};if(t&&(e.normals&&(u.normals=new Float32Array(e.normals)),u.indices=e.indices),r)if(e.colorsCompressed)u.colorsCompressed=new Uint8Array(e.colorsCompressed);else{for(var c=e.colors,l=new Uint8Array(c.length),h=0,f=c.length;h1)te.octEncodeNormals(n.normals,n.normals.length,n.normalsOctEncoded,0);else{var o=_.inverseMat4(_.transposeMat4(r.matrix,Ye),We);te.transformAndOctEncodeNormals(o,n.normals,n.normals.length,n.normalsOctEncoded,0)}}}},{key:"_createEntityAABBs",value:function(){for(var e=0,t=this.entitiesList.length;e1)for(var l=u.positions,h=0,f=l.length;hQe[o]&&(o=1),Qe[2]>Qe[o]&&(o=2),!e.left){var i=r.slice();if(i[o+3]=(r[o]+r[o+3])/2,e.left=new Me(i),_.containsAABB3(i,n))return void this._insertEntityIntoKDTree(e.left,t)}if(!e.right){var a=r.slice();if(a[o]=(r[o]+r[o+3])/2,e.right=new Me(a),_.containsAABB3(a,n))return void this._insertEntityIntoKDTree(e.right,t)}e.entities=e.entities||[],e.entities.push(t),_.expandAABB3(r,n)}}},{key:"_createTilesFromKDTree",value:function(e){this._createTilesFromKDNode(e)}},{key:"_createTilesFromKDNode",value:function(e){e.entities&&e.entities.length>0&&this._createTileFromEntities(e.entities),e.left&&this._createTilesFromKDNode(e.left),e.right&&this._createTilesFromKDNode(e.right)}},{key:"_createTileFromEntities",value:function(e){var t=_.AABB3();_.collapseAABB3(t);for(var r=0;r0){te.createPositionsDecodeMatrix(t,this.reusedGeometriesDecodeMatrix);for(var c=0,l=this.geometriesList.length;ce&&(e=o.positionsQuantized.length),o.indices.length>t&&(t=o.indices.length))}for(var i=new Array(e/3),a=new Array(t),s=0,u=this.geometriesList.length;s1&&(S+=16);var G={metadata:{},textureData:new Uint8Array(A),eachTextureDataPortion:new Uint32Array(p),eachTextureAttributes:new Uint16Array(p*tt),positions:new Uint16Array(x),normals:new Int8Array(b),colors:new Uint8Array(w),uvs:new Float32Array(M),indices:new Uint32Array(T),edgeIndices:new Uint32Array(I),eachTextureSetTextures:new Int32Array(5*v),matrices:new Float32Array(S),reusedGeometriesDecodeMatrix:new Float32Array(e.reusedGeometriesDecodeMatrix),eachGeometryPrimitiveType:new Uint8Array(d),eachGeometryPositionsPortion:new Uint32Array(d),eachGeometryNormalsPortion:new Uint32Array(d),eachGeometryColorsPortion:new Uint32Array(d),eachGeometryUVsPortion:new Uint32Array(d),eachGeometryIndicesPortion:new Uint32Array(d),eachGeometryEdgeIndicesPortion:new Uint32Array(d),eachMeshGeometriesPortion:new Uint32Array(m),eachMeshMatricesPortion:new Uint32Array(m),eachMeshTextureSet:new Int32Array(m),eachMeshMaterialAttributes:new Uint8Array(m*rt),eachEntityId:[],eachEntityMeshesPortion:new Uint32Array(y),eachTileAABB:new Float64Array(6*g),eachTileEntitiesPortion:new Uint32Array(g)},k=0,_=0,D=0,N=0,F=0,V=0;G.metadata={id:e.modelId,projectId:e.projectId,revisionId:e.revisionId,author:e.author,createdAt:e.createdAt,creatingApplication:e.creatingApplication,schema:e.schema,propertySets:[],metaObjects:[]};for(var C=0;C0&&(R.propertySetIds=X.propertySetIds),X.external&&(R.external=X.external),G.metadata.metaObjects.push(R)}for(var K=0;K1&&(G.matrices.set(xe.matrix,se),G.eachMeshMatricesPortion[ue]=se,se+=16),G.eachMeshTextureSet[ue]=xe.textureSet?xe.textureSet.textureSetIndex:-1,G.eachMeshMaterialAttributes[ae++]=255*xe.color[0],G.eachMeshMaterialAttributes[ae++]=255*xe.color[1],G.eachMeshMaterialAttributes[ae++]=255*xe.color[2],G.eachMeshMaterialAttributes[ae++]=255*xe.opacity,G.eachMeshMaterialAttributes[ae++]=255*xe.metallic,G.eachMeshMaterialAttributes[ae++]=255*xe.roughness,ue++}G.eachEntityId[oe]=ve.entityId,G.eachEntityMeshesPortion[oe]=ie,oe++,ie+=ye}var we=6*ce;G.eachTileAABB.set(de,we)}}return G}(e,t,r),i=function(e,t,r){function n(e){return!1!==r.zip?$e.deflate(e):e}return{metadata:n(ot(t||e.metadata)),textureData:n(e.textureData.buffer),eachTextureDataPortion:n(e.eachTextureDataPortion.buffer),eachTextureAttributes:n(e.eachTextureAttributes.buffer),positions:n(e.positions.buffer),normals:n(e.normals.buffer),colors:n(e.colors.buffer),uvs:n(e.uvs.buffer),indices:n(e.indices.buffer),edgeIndices:n(e.edgeIndices.buffer),eachTextureSetTextures:n(e.eachTextureSetTextures.buffer),matrices:n(e.matrices.buffer),reusedGeometriesDecodeMatrix:n(e.reusedGeometriesDecodeMatrix.buffer),eachGeometryPrimitiveType:n(e.eachGeometryPrimitiveType.buffer),eachGeometryPositionsPortion:n(e.eachGeometryPositionsPortion.buffer),eachGeometryNormalsPortion:n(e.eachGeometryNormalsPortion.buffer),eachGeometryColorsPortion:n(e.eachGeometryColorsPortion.buffer),eachGeometryUVsPortion:n(e.eachGeometryUVsPortion.buffer),eachGeometryIndicesPortion:n(e.eachGeometryIndicesPortion.buffer),eachGeometryEdgeIndicesPortion:n(e.eachGeometryEdgeIndicesPortion.buffer),eachMeshGeometriesPortion:n(e.eachMeshGeometriesPortion.buffer),eachMeshMatricesPortion:n(e.eachMeshMatricesPortion.buffer),eachMeshTextureSet:n(e.eachMeshTextureSet.buffer),eachMeshMaterialAttributes:n(e.eachMeshMaterialAttributes.buffer),eachEntityId:n(JSON.stringify(e.eachEntityId).replace(/[\u007F-\uFFFF]/g,(function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).substr(-4)}))),eachEntityMeshesPortion:n(e.eachEntityMeshesPortion.buffer),eachTileAABB:n(e.eachTileAABB.buffer),eachTileEntitiesPortion:n(e.eachTileEntitiesPortion.buffer)}}(o,t,n);r.texturesSize+=i.textureData.byteLength;var a=function(e){return function(e){var t=new Uint32Array(e.length+2);t[0]=et,t[1]=e.length;for(var r=0,n=0,o=e.length;n80*r){n=i=e[0],o=a=e[1];for(var p=r;pi&&(i=s),u>a&&(a=u);c=0!==(c=Math.max(i-n,a-o))?1/c:0}return ut(f,d,r,n,o,c),d}function at(e,t,r,n,o){var i,a;if(o===Et(e,t,r,n)>0)for(i=t;i=t;i-=n)a=Ot(i,e[i],e[i+1],a);return a&&wt(a,a.next)&&(Lt(a),a=a.next),a}function st(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!wt(n,n.next)&&0!==bt(n.prev,n,n.next))n=n.next;else{if(Lt(n),(n=t=n.prev)===n.next)break;r=!0}}while(r||n!==t);return t}function ut(e,t,r,n,o,i,a){if(e){!a&&i&&function(e,t,r,n){var o=e;do{null===o.z&&(o.z=mt(o.x,o.y,t,r,n)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,r,n,o,i,a,s,u,c=1;do{for(r=e,e=null,i=null,a=0;r;){for(a++,n=r,s=0,t=0;t0||u>0&&n;)0!==s&&(0===u||!n||r.z<=n.z)?(o=r,r=r.nextZ,s--):(o=n,n=n.nextZ,u--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;r=n}i.nextZ=null,c*=2}while(a>1)}(o)}(e,n,o,i);for(var s,u,c=e;e.prev!==e.next;)if(s=e.prev,u=e.next,i?lt(e,n,o,i):ct(e))t.push(s.i/r),t.push(e.i/r),t.push(u.i/r),Lt(e),e=u.next,c=u.next;else if((e=u)===c){a?1===a?ut(e=ht(st(e),t,r),t,r,n,o,i,2):2===a&&ft(e,t,r,n,o,i):ut(st(e),t,r,n,o,i,1);break}}}function ct(e){var t=e.prev,r=e,n=e.next;if(bt(t,r,n)>=0)return!1;for(var o=e.next.next;o!==e.prev;){if(gt(t.x,t.y,r.x,r.y,n.x,n.y,o.x,o.y)&&bt(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function lt(e,t,r,n){var o=e.prev,i=e,a=e.next;if(bt(o,i,a)>=0)return!1;for(var s=o.xi.x?o.x>a.x?o.x:a.x:i.x>a.x?i.x:a.x,l=o.y>i.y?o.y>a.y?o.y:a.y:i.y>a.y?i.y:a.y,h=mt(s,u,t,r,n),f=mt(c,l,t,r,n),d=e.prevZ,p=e.nextZ;d&&d.z>=h&&p&&p.z<=f;){if(d!==e.prev&&d!==e.next&>(o.x,o.y,i.x,i.y,a.x,a.y,d.x,d.y)&&bt(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,p!==e.prev&&p!==e.next&>(o.x,o.y,i.x,i.y,a.x,a.y,p.x,p.y)&&bt(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;d&&d.z>=h;){if(d!==e.prev&&d!==e.next&>(o.x,o.y,i.x,i.y,a.x,a.y,d.x,d.y)&&bt(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;p&&p.z<=f;){if(p!==e.prev&&p!==e.next&>(o.x,o.y,i.x,i.y,a.x,a.y,p.x,p.y)&&bt(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function ht(e,t,r){var n=e;do{var o=n.prev,i=n.next.next;!wt(o,i)&&Mt(o,n,n.next,i)&&St(o,i)&&St(i,o)&&(t.push(o.i/r),t.push(n.i/r),t.push(i.i/r),Lt(n),Lt(n.next),n=e=i),n=n.next}while(n!==e);return st(n)}function ft(e,t,r,n,o,i){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&xt(a,s)){var u=At(a,s);return a=st(a,a.next),u=st(u,u.next),ut(a,t,r,n,o,i),void ut(u,t,r,n,o,i)}s=s.next}a=a.next}while(a!==e)}function dt(e,t){return e.x-t.x}function pt(e,t){if(t=function(e,t){var r,n=t,o=e.x,i=e.y,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=o&&s>a){if(a=s,s===o){if(i===n.y)return n;if(i===n.next.y)return n.next}r=n.x=n.x&&n.x>=l&&o!==n.x&>(ir.x||n.x===r.x&&vt(r,n)))&&(r=n,f=u)),n=n.next}while(n!==c);return r}(e,t),t){var r=At(t,e);st(t,t.next),st(r,r.next)}}function vt(e,t){return bt(e.prev,e,t.prev)<0&&bt(t.next,e,e.next)<0}function mt(e,t,r,n,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*o)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*o)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function yt(e){var t=e,r=e;do{(t.x=0&&(e-a)*(n-s)-(r-a)*(t-s)>=0&&(r-a)*(i-s)-(o-a)*(n-s)>=0}function xt(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&Mt(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(St(e,t)&&St(t,e)&&function(e,t){var r=e,n=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{r.y>i!=r.next.y>i&&r.next.y!==r.y&&o<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(bt(e.prev,e,t.prev)||bt(e,t.prev,t))||wt(e,t)&&bt(e.prev,e,e.next)>0&&bt(t.prev,t,t.next)>0)}function bt(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function wt(e,t){return e.x===t.x&&e.y===t.y}function Mt(e,t,r,n){var o=It(bt(e,t,r)),i=It(bt(e,t,n)),a=It(bt(r,n,e)),s=It(bt(r,n,t));return o!==i&&a!==s||!(0!==o||!Tt(e,r,t))||!(0!==i||!Tt(e,n,t))||!(0!==a||!Tt(r,e,n))||!(0!==s||!Tt(r,t,n))}function Tt(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function It(e){return e>0?1:e<0?-1:0}function St(e,t){return bt(e.prev,e,e.next)<0?bt(e,t,e.next)>=0&&bt(e,e.prev,t)>=0:bt(e,t,e.prev)<0||bt(e,e.next,t)<0}function At(e,t){var r=new Pt(e.i,e.x,e.y),n=new Pt(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,r.next=o,o.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function Ot(e,t,r,n){var o=new Pt(e,t,r);return n?(o.next=n.next,o.prev=n,n.next.prev=o,n.next=o):(o.prev=o,o.next=o),o}function Lt(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Pt(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Et(e,t,r,n){for(var o=0,i=t,a=r-n;ie.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(n+=e[o-1].length,r.holes.push(n))}return r};var kt=_.vec2(),_t=_.vec3(),Dt=_.vec3(),Nt=_.vec3();function Ft(e){var t=e.data,r=e.xktModel,n=e.center,o=void 0!==n&&n,i=e.transform,a=void 0===i?null:i,s=e.stats,u=void 0===s?{}:s,c=e.log;return new Promise((function(e,n){if(t)if("CityJSON"===t.type)if(r){var i;c("Using parser: parseCityJSONIntoXKTModel"),c("center: ".concat(o)),a&&c("transform: [".concat(a,"]")),t.transform||o||a?(i=function(e){for(var t=[],r=0,n=0;r0){for(var c=[],l=0,h=t.geometry.length;l0){var x=y[g[0]];if(void 0!==x.value)d=m[x.value];else{var b=x.values;if(b){p=[];for(var w=0,M=b.length;w0&&(n.createEntity({entityId:r,meshIds:c}),e.stats.numObjects++)}}function Bt(e,t,r,n){switch(t.type){case"MultiPoint":case"MultiLineString":case"GeometryInstance":break;case"MultiSurface":case"CompositeSurface":zt(e,r,t.boundaries,n);break;case"Solid":for(var o=t.boundaries,i=0;i0&&l.push(c.length);var p=Rt(e,s[d],h,f);c.push.apply(c,jt(p))}if(3===c.length)f.indices.push(c[0]),f.indices.push(c[1]),f.indices.push(c[2]);else if(c.length>3){for(var v=[],m=0;m0&&s.push(a.length);var c=Rt(e,t[i][u],r,n);a.push.apply(a,jt(c))}if(3===a.length)n.indices.push(a[0]),n.indices.push(a[1]),n.indices.push(a[2]);else if(a.length>3){for(var l=[],h=0;h0)for(var u=0;u0){null==g&&e.log("Warning: 'name' properties not found on glTF scene nodes - will randomly-generate object IDs in XKT");var x=g;for(x&&i.entities[x]&&e.log("Warning: Two or more glTF nodes found with same 'name' attribute: '".concat(g," - will randomly-generating an object ID in XKT"));!x||i.entities[x];)x="entity-"+e.nextId++;if(e.metaModelCorrections){var b=e.metaModelCorrections.eachChildRoot[x];if(b){var w=e.metaModelCorrections.eachRootStats[b.id];w.countChildren++,w.countChildren>=w.numChildren&&(i.createEntity({entityId:b.id,meshIds:tr}),e.stats.numObjects++,tr.length=0)}else e.metaModelCorrections.metaObjectsMap[x]&&(i.createEntity({entityId:x,meshIds:tr}),e.stats.numObjects++,tr.length=0)}else i.createEntity({entityId:x,meshIds:tr}),e.stats.numObjects++,tr.length=0}}var nr="undefined"!=typeof atob?atob:function(e){return Buffer.from(e,"base64").toString("binary")},or={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},ir={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16};function ar(e){var t=e.data,r=e.xktModel,n=e.metaModelData,o=e.includeNormals,i=e.reuseGeometries,a=e.getAttachment,s=e.stats,u=void 0===s?{}:s,c=e.log;return c&&c("Using parser: parseGLTFJSONIntoXKTModel"),new Promise((function(e,s){if(t)if(r){u.sourceFormat="glTF",u.schemaVersion="2.0",u.title="",u.author="",u.created="",u.numTriangles=0,u.numVertices=0,u.numNormals=0,u.numObjects=0,u.numGeometries=0;var l={gltf:t,metaModelCorrections:n?sr(n):null,getAttachment:a||function(){throw new Error("You must define getAttachment() method to convert glTF with external resources")},log:c||function(e){},xktModel:r,includeNormals:o,createXKTGeometryIds:{},nextMeshId:0,reuseGeometries:!1!==i,stats:u};l.log("Parsing normals: ".concat(l.includeNormals?"enabled":"disabled")),function(e){var t=e.gltf.buffers;return t?Promise.all(t.map((function(t){return function(e,t){return new Promise((function(r,n){if(t._arrayBuffer)return t._buffer=t._arrayBuffer,void r(t);var o=t.uri;o?function(e,t){return new Promise((function(r,n){var o=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(o){var i=!!o[2],a=o[3];a=decodeURIComponent(a),i&&(a=nr(a));for(var s=new ArrayBuffer(a.length),u=new Uint8Array(s),c=0;c0)for(var l=0;l0){null==j&&e.log("[parseGLTFJSONIntoXKTModel] Warning: 'name' properties not found on glTF scene nodes - will randomly-generate object IDs in XKT");var G=j;if(null==G)for(a.entities[G]&&e.error("Two or more glTF nodes found with same 'name' attribute: '"+j+"'");!G||a.entities[G];)G="entity-"+e.nextId++;if(e.metaModelCorrections){var k=e.metaModelCorrections.eachChildRoot[G];if(k){var D=e.metaModelCorrections.eachRootStats[k.id];D.countChildren++,D.countChildren>=D.numChildren&&(a.createEntity({entityId:k.id,meshIds:lr}),e.stats.numObjects++,lr=[])}else e.metaModelCorrections.metaObjectsMap[G]&&(a.createEntity({entityId:G,meshIds:lr}),e.stats.numObjects++,lr=[])}else a.createEntity({entityId:G,meshIds:lr}),e.stats.numObjects++,lr=[]}}function fr(e){if(!e.attributes)return"empty";var t=e.mode,r=(e.material,e.indices),n=e.attributes.POSITION,o=e.attributes.NORMAL,i=e.attributes.COLOR_0,a=e.attributes.TEXCOORD_0;return[t,null!=r?r:"-",null!=n?n:"-",null!=o?o:"-",null!=i?i:"-",null!=a?a:"-"].join(";")}function dr(e,t,r){var n=t.attributes;if(n){switch(t.mode){case 0:r.primitive="points";break;case 1:case 2:case 3:r.primitive="lines";break;case 4:default:r.primitive="triangles";break;case 5:console.log("TRIANGLE_STRIP"),r.primitive="triangles";break;case 6:console.log("TRIANGLE_FAN"),r.primitive="triangles"}var o=e.gltf.accessors,i=t.indices;if(null!=i){var a=o[i];r.indices=pr(e,a)}var s=n.POSITION;if(null!=s){var u=o[s];r.positions=pr(e,u)}var c=n.NORMAL;if(null!=c){var l=o[c];r.normals=pr(e,l)}var h=n.COLOR_0;if(null!=h){var f=o[h];r.colors=pr(e,f)}}}function pr(e,t){var r=e.gltf.bufferViews[t.bufferView],n=ir[t.type],o=or[t.componentType],i=o.BYTES_PER_ELEMENT*n;if(t.byteStride&&t.byteStride!==i)throw new Error("interleaved buffer!");return new o(r._buffer,t.byteOffset||0,t.count*n)}function vr(e){var t=e.WebIFC,r=e.data,n=e.xktModel,o=e.autoNormals,i=void 0===o||o,a=e.includeTypes,s=e.excludeTypes,u=e.wasmPath,c=e.stats,l=void 0===c?{}:c,h=e.log;return h&&h("Using parser: parseIFCIntoXKTModel"),new Promise((function(e,o){if(r)if(n)if(u){var c=new t.IfcAPI;u&&c.SetWasmPath(u),c.Init().then((function(){var o=new Uint8Array(r),u=c.OpenModel(o);l.sourceFormat="IFC",l.schemaVersion="",l.title="",l.author="",l.created="",l.numMetaObjects=0,l.numPropertySets=0,l.numObjects=0,l.numGeometries=0,l.numTriangles=0,l.numVertices=0;var f={WebIFC:t,modelID:u,ifcAPI:c,xktModel:n,autoNormals:i,log:h||function(e){},nextId:0,stats:l};if(a){f.includeTypes={};for(var d=0,p=a.length;d0){for(var d=i.Name.value,p=[],v=0,m=f.length;v0&&(e.xktModel.createEntity({entityId:i,meshIds:o}),e.stats.numObjects++)}else console.log("excluding: "+a)}const xr=require("@loaders.gl/las");var br=5e5;function wr(e){var t=e.data,r=e.xktModel,n=e.center,o=void 0!==n&&n,i=e.transform,a=void 0===i?null:i,s=e.colorDepth,u=void 0===s?"auto":s,c=e.fp64,l=void 0!==c&&c,h=e.skip,f=void 0===h?1:h,d=e.stats,p=e.log,v=void 0===p?function(){}:p;return v&&v("Using parser: parseLASIntoXKTModel"),new Promise((function(e,n){t?r?(v("Converting LAZ/LAS"),v("center: ".concat(o)),a&&v("transform: [".concat(a,"]")),v("colorDepth: ".concat(u)),v("fp64: ".concat(l)),v("skip: ".concat(f)),(0,Ce.parse)(t,xr.LASLoader,{las:{colorDepth:u,fp64:l}}).then((function(t){var n=t.attributes,i=t.loaderData,s=void 0!==i.pointsFormatId?i.pointsFormatId:-1;if(n.POSITION){var u={};switch(s){case 0:if(!n.intensity)return void v("No intensities found in file (expected for LAS point format 0)");u=y(n.POSITION,n.intensity);break;case 1:if(!n.intensity)return void v("No intensities found in file (expected for LAS point format 1)");u=y(n.POSITION,n.intensity);break;case 2:if(!n.intensity)return void v("No intensities found in file (expected for LAS point format 2)");u=m(n.POSITION,n.COLOR_0,n.intensity);break;case 3:if(!n.intensity)return void v("No intensities found in file (expected for LAS point format 3)");u=m(n.POSITION,n.COLOR_0,n.intensity)}for(var c=g(function(e){if(e){if(o){for(var t=_.vec3(),r=e.length,n=0,i=e.length;n=e.length)return[e];for(var r=[],n=0;n0?L:null}),M++}}i&&i("Converted meta objects: "+M),e()}))}function Tr(e){var t=e.data,r=e.xktModel,n=e.littleEndian,o=void 0===n||n,i=e.stats,a=e.log;return a&&a("Using parser: parsePCDIntoXKTModel"),new Promise((function(e,n){var s=function(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);for(var t="",r=0,n=e.length;r>16&255,g=m>>8&255,x=m>>0&255;l.push(y,g,x,255)}else l.push(255),l.push(255),l.push(255)}if("binary_compressed"===u.data)for(var b=new Uint32Array(t.slice(u.headerLen,u.headerLen+8)),w=b[0],M=b[1],T=function(e,t){var r,n,o,i=e.length,a=new Uint8Array(t),s=0,u=0;do{if((r=e[s++])<32){if(u+ ++r>t)throw new Error("Output buffer is not large enough");if(s+r>i)throw new Error("Invalid compressed data");do{a[u++]=e[s++]}while(--r)}else{if(n=r>>5,o=u-((31&r)<<8)-1,s>=i)throw new Error("Invalid compressed data");if(7===n&&(n+=e[s++],s>=i))throw new Error("Invalid compressed data");if(o-=e[s++],u+n+2>t)throw new Error("Output buffer is not large enough");if(o<0)throw new Error("Invalid compressed data");if(o>=u)throw new Error("Invalid compressed data");do{a[u++]=a[o++]}while(2+--n)}}while(s0?l:null}),r.createMesh({meshId:"pointsMesh",geometryId:"pointsGeometry"}),r.createEntity({entityId:"geometries",meshIds:["pointsMesh"]}),a&&(a("Converted drawable objects: 1"),a("Converted geometries: 1"),a("Converted vertices: "+c.length/3)),i&&(i.sourceFormat="PCD",i.schemaVersion="",i.title="",i.author="",i.created="",i.numObjects=1,i.numGeometries=1,i.numVertices=c.length/3),e()}))}const Ir=require("@loaders.gl/ply");function Sr(e){return Sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sr(e)}function Ar(){Ar=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function c(e,t,r,o){var i=t&&t.prototype instanceof f?t:f,a=Object.create(i.prototype),s=new S(o||[]);return n(a,"_invoke",{value:w(e,r,s)}),a}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var h={};function f(){}function d(){}function p(){}var v={};u(v,i,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(A([])));y&&y!==t&&r.call(y,i)&&(v=y);var g=p.prototype=f.prototype=Object.create(v);function x(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function o(n,i,a,s){var u=l(e[n],e,i);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==Sr(h)&&r.call(h,"__await")?t.resolve(h.__await).then((function(e){o("next",e,a,s)}),(function(e){o("throw",e,a,s)})):t.resolve(h).then((function(e){c.value=e,a(c)}),(function(e){return o("throw",e,a,s)}))}s(u.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function w(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=M(a,r);if(s){if(s===h)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function M(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,M(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=l(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function A(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:A(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}function Or(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function Lr(e){return Pr.apply(this,arguments)}function Pr(){var e;return e=Ar().mark((function e(t){var r,n,o,i,a,s,u,c,l,h,f;return Ar().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.data,n=t.xktModel,o=t.stats,(i=t.log)&&i("Using parser: parsePLYIntoXKTModel"),r){e.next=4;break}throw"Argument expected: data";case 4:if(n){e.next=6;break}throw"Argument expected: xktModel";case 6:return e.prev=6,e.next=9,(0,Ce.parse)(r,Ir.PLYLoader);case 9:a=e.sent,e.next=16;break;case 12:return e.prev=12,e.t0=e.catch(6),i&&i("Error: "+e.t0),e.abrupt("return");case 16:if(s=a.attributes,u=!!s.COLOR_0){for(c=u?s.COLOR_0.value:null,l=[],h=0,f=c.length;h=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:A(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}function Gr(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function kr(e){return _r.apply(this,arguments)}function _r(){var e;return e=jr().mark((function e(t){var r,n,o,i,a,s,u,c;return jr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.data,n=t.splitMeshes,o=t.autoNormals,i=t.smoothNormals,a=t.smoothNormalsAngleThreshold,s=t.xktModel,u=t.stats,(c=t.log)&&c("Using parser: parseSTLIntoXKTModel"),e.abrupt("return",new Promise((function(e,t){if(r)if(s){var l=_.createUUID(),h=s.createMetaObject({metaObjectId:l,metaObjectType:"Model",metaObjectName:"Model"}),f={data:r,splitMeshes:n,autoNormals:o,smoothNormals:i,smoothNormalsAngleThreshold:a,xktModel:s,rootMetaObject:h,nextId:0,log:c||function(e){},stats:{numObjects:0,numGeometries:0,numTriangles:0,numVertices:0}},d=Br(r);Dr(d)?Nr(f,d):Fr(f,"string"!=typeof(p=r)?function(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);for(var t="",r=0,n=e.length;r>5&31)/31,o=(S>>10&31)/31):(r=a,n=s,o=u),(x&&r!==f||n!==d||o!==p)&&(null!==f&&(v=!0),f=r,d=n,p=o)}for(var A=1;A<=3;A++){var O=w+12*A;y.push(c.getFloat32(O,!0)),y.push(c.getFloat32(O+4,!0)),y.push(c.getFloat32(O+8,!0)),e.autoNormals||g.push(M,T,I),h&&i.push(r,n,o,1)}x&&v&&(Cr(e,y,g,i),y=[],g=[],i=i?[]:null,v=!1)}y.length>0&&Cr(e,y,g,i)}function Fr(e,t){for(var r,n,o,i,a,s,u,c=/facet([\s\S]*?)endfacet/g,l=0,h=/[\s]+([+-]?(?:\d+.\d+|\d+.|\d+|.\d+)(?:[eE][+-]?\d+)?)/.source,f=new RegExp("vertex"+h+h+h,"g"),d=new RegExp("normal"+h+h+h,"g"),p=[],v=[];null!==(i=c.exec(t));){for(a=0,s=0,u=i[0];null!==(i=d.exec(u));)r=parseFloat(i[1]),n=parseFloat(i[2]),o=parseFloat(i[3]),s++;for(;null!==(i=f.exec(u));)p.push(parseFloat(i[1]),parseFloat(i[2]),parseFloat(i[3])),v.push(r,n,o),a++;if(1!==s)return e.log("Error in normal of face "+l),-1;if(3!==a)return e.log("Error in positions of face "+l),-1;l++}Cr(e,p,v,null)}var Vr=0;function Cr(e,t,r,n){for(var o=new Int32Array(t.length/3),i=0,a=o.length;i0?r:null,n=n&&n.length>0?n:null,!e.autoNormals&&e.smoothNormals&&function(e,t){var r,n,o,i,a,s,u,c,l,h,f,d=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).smoothNormalsAngleThreshold||20,p={},v=[],m={},y=Math.pow(10,4);for(u=0,l=e.length;u0&&void 0!==arguments[0]?arguments[0]:{},t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);var r=e.ySize||1;r<0&&(console.error("negative ySize not allowed - will invert"),r*=-1);var n=e.zSize||1;n<0&&(console.error("negative zSize not allowed - will invert"),n*=-1);var o=e.center,i=o?o[0]:0,a=o?o[1]:0,s=o?o[2]:0,u=-t+i,c=-r+a,l=-n+s,h=t+i,f=r+a,d=n+s;return{primitiveType:"triangles",positions:[h,f,d,u,f,d,u,c,d,h,c,d,h,f,d,h,c,d,h,c,l,h,f,l,h,f,d,h,f,l,u,f,l,u,f,d,u,f,d,u,f,l,u,c,l,u,c,d,u,c,l,h,c,l,h,c,d,u,c,d,h,c,l,u,c,l,u,f,l,h,f,l],normals:[0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1],uv:[1,0,0,0,0,1,1,1,0,0,0,1,1,1,1,0,1,1,1,0,0,0,0,1,1,0,0,0,0,1,1,1,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}}function Ur(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);var r=e.ySize||1;r<0&&(console.error("negative ySize not allowed - will invert"),r*=-1);var n=e.zSize||1;n<0&&(console.error("negative zSize not allowed - will invert"),n*=-1);var o=e.center,i=o?o[0]:0,a=o?o[1]:0,s=o?o[2]:0,u=-t+i,c=-r+a,l=-n+s,h=t+i,f=r+a,d=n+s;return{primitiveType:"lines",positions:[u,c,l,u,c,d,u,f,l,u,f,d,h,c,l,h,c,d,h,f,l,h,f,d],indices:[0,1,1,3,3,2,2,0,4,5,5,7,7,6,6,4,0,4,1,5,2,6,3,7]}}function Xr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.radiusTop||1;t<0&&(console.error("negative radiusTop not allowed - will invert"),t*=-1);var r=e.radiusBottom||1;r<0&&(console.error("negative radiusBottom not allowed - will invert"),r*=-1);var n=e.height||1;n<0&&(console.error("negative height not allowed - will invert"),n*=-1);var o=e.radialSegments||32;o<0&&(console.error("negative radialSegments not allowed - will invert"),o*=-1),o<3&&(o=3);var i=e.heightSegments||1;i<0&&(console.error("negative heightSegments not allowed - will invert"),i*=-1),i<1&&(i=1);var a,s,u,c,l,h,f,d,p,v,m,y=!!e.openEnded,g=e.center,x=g?g[0]:0,b=g?g[1]:0,w=g?g[2]:0,M=n/2,T=n/i,I=2*Math.PI/o,S=1/o,A=(t-r)/i,O=[],L=[],P=[],E=[],j=(90-180*Math.atan(n/(r-t))/Math.PI)/90;for(a=0;a<=i;a++)for(l=t-a*A,h=M-a*T,s=0;s<=o;s++)u=Math.sin(s*I),c=Math.cos(s*I),L.push(l*u),L.push(j),L.push(l*c),P.push(s*S),P.push(1*a/i),O.push(l*u+x),O.push(h+b),O.push(l*c+w);for(a=0;a0){for(p=O.length/3,L.push(0),L.push(1),L.push(0),P.push(.5),P.push(.5),O.push(0+x),O.push(M+b),O.push(0+w),s=0;s<=o;s++)u=Math.sin(s*I),c=Math.cos(s*I),v=.5*Math.sin(s*I)+.5,m=.5*Math.cos(s*I)+.5,L.push(t*u),L.push(1),L.push(t*c),P.push(v),P.push(m),O.push(t*u+x),O.push(M+b),O.push(t*c+w);for(s=0;s0){for(p=O.length/3,L.push(0),L.push(-1),L.push(0),P.push(.5),P.push(.5),O.push(0+x),O.push(0-M+b),O.push(0+w),s=0;s<=o;s++)u=Math.sin(s*I),c=Math.cos(s*I),v=.5*Math.sin(s*I)+.5,m=.5*Math.cos(s*I)+.5,L.push(r*u),L.push(-1),L.push(r*c),P.push(v),P.push(m),O.push(r*u+x),O.push(0-M+b),O.push(r*c+w);for(s=0;s0&&void 0!==arguments[0]?arguments[0]:{},t=e.size||1;t<0&&(console.error("negative size not allowed - will invert"),t*=-1);var r=e.divisions||1;r<0&&(console.error("negative divisions not allowed - will invert"),r*=-1),r<1&&(r=1);for(var n=(t=t||10)/(r=r||10),o=t/2,i=[],a=[],s=0,u=0,c=-o;u<=r;u++,c+=n)i.push(-o),i.push(0),i.push(c),i.push(o),i.push(0),i.push(c),i.push(c),i.push(0),i.push(-o),i.push(c),i.push(0),i.push(o),a.push(s++),a.push(s++),a.push(s++),a.push(s++);return{primitiveType:"lines",positions:i,indices:a}}function Kr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);var r=e.zSize||1;r<0&&(console.error("negative zSize not allowed - will invert"),r*=-1);var n=e.xSegments||1;n<0&&(console.error("negative xSegments not allowed - will invert"),n*=-1),n<1&&(n=1);var o=e.xSegments||1;o<0&&(console.error("negative zSegments not allowed - will invert"),o*=-1),o<1&&(o=1);var i,a,s,u,c,l,h,f=e.center,d=f?f[0]:0,p=f?f[1]:0,v=f?f[2]:0,m=t/2,y=r/2,g=Math.floor(n)||1,x=Math.floor(o)||1,b=g+1,w=x+1,M=t/g,T=r/x,I=new Float32Array(b*w*3),S=new Float32Array(b*w*3),A=new Float32Array(b*w*2),O=0,L=0;for(i=0;i65535?Uint32Array:Uint16Array)(g*x*6);for(i=0;i0&&void 0!==arguments[0]?arguments[0]:{},t=e.lod||1,r=e.center?e.center[0]:0,n=e.center?e.center[1]:0,o=e.center?e.center[2]:0,i=e.radius||1;i<0&&(console.error("negative radius not allowed - will invert"),i*=-1);var a=e.heightSegments||18;a<0&&(console.error("negative heightSegments not allowed - will invert"),a*=-1),(a=Math.floor(t*a))<18&&(a=18);var s=e.widthSegments||18;s<0&&(console.error("negative widthSegments not allowed - will invert"),s*=-1),(s=Math.floor(t*s))<18&&(s=18);var u,c,l,h,f,d,p,v,m,y,g,x,b,w,M=[],T=[],I=[],S=[];for(u=0;u<=a;u++)for(l=u*Math.PI/a,h=Math.sin(l),f=Math.cos(l),c=0;c<=s;c++)d=2*c*Math.PI/s,p=Math.sin(d),v=Math.cos(d)*h,m=f,y=p*h,g=1-c/s,x=u/a,T.push(v),T.push(m),T.push(y),I.push(g),I.push(x),M.push(r+i*v),M.push(n+i*m),M.push(o+i*y);for(u=0;u0&&void 0!==arguments[0]?arguments[0]:{},t=e.radius||1;t<0&&(console.error("negative radius not allowed - will invert"),t*=-1),t*=.5;var r=e.tube||.3;r<0&&(console.error("negative tube not allowed - will invert"),r*=-1);var n=e.radialSegments||32;n<0&&(console.error("negative radialSegments not allowed - will invert"),n*=-1),n<4&&(n=4);var o=e.tubeSegments||24;o<0&&(console.error("negative tubeSegments not allowed - will invert"),o*=-1),o<4&&(o=4);var i=e.arc||2*Math.PI;i<0&&(console.warn("negative arc not allowed - will invert"),i*=-1),i>360&&(i=360);var a,s,u,c,l,h,f,d,p,v,m,y,g=e.center,x=g?g[0]:0,b=g?g[1]:0,w=g?g[2]:0,M=[],T=[],I=[],S=[];for(d=0;d<=o;d++)for(f=0;f<=n;f++)a=f/n*i,s=.785398+d/o*Math.PI*2,x=t*Math.cos(a),b=t*Math.sin(a),u=(t+r*Math.cos(s))*Math.cos(a),c=(t+r*Math.cos(s))*Math.sin(a),l=r*Math.sin(s),M.push(u+x),M.push(c+b),M.push(l+w),I.push(1-f/n),I.push(d/o),h=_.normalizeVec3(_.subVec3([u,c,l],[x,b,w],[]),[]),T.push(h[0]),T.push(h[1]),T.push(h[2]);for(d=1;d<=o;d++)for(f=1;f<=n;f++)p=(n+1)*d+f-1,v=(n+1)*(d-1)+f-1,m=(n+1)*(d-1)+f,y=(n+1)*d+f,S.push(p),S.push(v),S.push(m),S.push(m),S.push(y),S.push(p);return{primitiveType:"triangles",positions:M,normals:T,uv:I,uvs:I,indices:S}}var Yr={" ":{width:16,points:[]},"!":{width:10,points:[[5,21],[5,7],[-1,-1],[5,2],[4,1],[5,0],[6,1],[5,2]]},'"':{width:16,points:[[4,21],[4,14],[-1,-1],[12,21],[12,14]]},"#":{width:21,points:[[11,25],[4,-7],[-1,-1],[17,25],[10,-7],[-1,-1],[4,12],[18,12],[-1,-1],[3,6],[17,6]]},$:{width:20,points:[[8,25],[8,-4],[-1,-1],[12,25],[12,-4],[-1,-1],[17,18],[15,20],[12,21],[8,21],[5,20],[3,18],[3,16],[4,14],[5,13],[7,12],[13,10],[15,9],[16,8],[17,6],[17,3],[15,1],[12,0],[8,0],[5,1],[3,3]]},"%":{width:24,points:[[21,21],[3,0],[-1,-1],[8,21],[10,19],[10,17],[9,15],[7,14],[5,14],[3,16],[3,18],[4,20],[6,21],[8,21],[10,20],[13,19],[16,19],[19,20],[21,21],[-1,-1],[17,7],[15,6],[14,4],[14,2],[16,0],[18,0],[20,1],[21,3],[21,5],[19,7],[17,7]]},"&":{width:26,points:[[23,12],[23,13],[22,14],[21,14],[20,13],[19,11],[17,6],[15,3],[13,1],[11,0],[7,0],[5,1],[4,2],[3,4],[3,6],[4,8],[5,9],[12,13],[13,14],[14,16],[14,18],[13,20],[11,21],[9,20],[8,18],[8,16],[9,13],[11,10],[16,3],[18,1],[20,0],[22,0],[23,1],[23,2]]},"'":{width:10,points:[[5,19],[4,20],[5,21],[6,20],[6,18],[5,16],[4,15]]},"(":{width:14,points:[[11,25],[9,23],[7,20],[5,16],[4,11],[4,7],[5,2],[7,-2],[9,-5],[11,-7]]},")":{width:14,points:[[3,25],[5,23],[7,20],[9,16],[10,11],[10,7],[9,2],[7,-2],[5,-5],[3,-7]]},"*":{width:16,points:[[8,21],[8,9],[-1,-1],[3,18],[13,12],[-1,-1],[13,18],[3,12]]},"+":{width:26,points:[[13,18],[13,0],[-1,-1],[4,9],[22,9]]},",":{width:10,points:[[6,1],[5,0],[4,1],[5,2],[6,1],[6,-1],[5,-3],[4,-4]]},"-":{width:26,points:[[4,9],[22,9]]},".":{width:10,points:[[5,2],[4,1],[5,0],[6,1],[5,2]]},"/":{width:22,points:[[20,25],[2,-7]]},0:{width:20,points:[[9,21],[6,20],[4,17],[3,12],[3,9],[4,4],[6,1],[9,0],[11,0],[14,1],[16,4],[17,9],[17,12],[16,17],[14,20],[11,21],[9,21]]},1:{width:20,points:[[6,17],[8,18],[11,21],[11,0]]},2:{width:20,points:[[4,16],[4,17],[5,19],[6,20],[8,21],[12,21],[14,20],[15,19],[16,17],[16,15],[15,13],[13,10],[3,0],[17,0]]},3:{width:20,points:[[5,21],[16,21],[10,13],[13,13],[15,12],[16,11],[17,8],[17,6],[16,3],[14,1],[11,0],[8,0],[5,1],[4,2],[3,4]]},4:{width:20,points:[[13,21],[3,7],[18,7],[-1,-1],[13,21],[13,0]]},5:{width:20,points:[[15,21],[5,21],[4,12],[5,13],[8,14],[11,14],[14,13],[16,11],[17,8],[17,6],[16,3],[14,1],[11,0],[8,0],[5,1],[4,2],[3,4]]},6:{width:20,points:[[16,18],[15,20],[12,21],[10,21],[7,20],[5,17],[4,12],[4,7],[5,3],[7,1],[10,0],[11,0],[14,1],[16,3],[17,6],[17,7],[16,10],[14,12],[11,13],[10,13],[7,12],[5,10],[4,7]]},7:{width:20,points:[[17,21],[7,0],[-1,-1],[3,21],[17,21]]},8:{width:20,points:[[8,21],[5,20],[4,18],[4,16],[5,14],[7,13],[11,12],[14,11],[16,9],[17,7],[17,4],[16,2],[15,1],[12,0],[8,0],[5,1],[4,2],[3,4],[3,7],[4,9],[6,11],[9,12],[13,13],[15,14],[16,16],[16,18],[15,20],[12,21],[8,21]]},9:{width:20,points:[[16,14],[15,11],[13,9],[10,8],[9,8],[6,9],[4,11],[3,14],[3,15],[4,18],[6,20],[9,21],[10,21],[13,20],[15,18],[16,14],[16,9],[15,4],[13,1],[10,0],[8,0],[5,1],[4,3]]},":":{width:10,points:[[5,14],[4,13],[5,12],[6,13],[5,14],[-1,-1],[5,2],[4,1],[5,0],[6,1],[5,2]]},";":{width:10,points:[[5,14],[4,13],[5,12],[6,13],[5,14],[-1,-1],[6,1],[5,0],[4,1],[5,2],[6,1],[6,-1],[5,-3],[4,-4]]},"<":{width:24,points:[[20,18],[4,9],[20,0]]},"=":{width:26,points:[[4,12],[22,12],[-1,-1],[4,6],[22,6]]},">":{width:24,points:[[4,18],[20,9],[4,0]]},"?":{width:18,points:[[3,16],[3,17],[4,19],[5,20],[7,21],[11,21],[13,20],[14,19],[15,17],[15,15],[14,13],[13,12],[9,10],[9,7],[-1,-1],[9,2],[8,1],[9,0],[10,1],[9,2]]},"@":{width:27,points:[[18,13],[17,15],[15,16],[12,16],[10,15],[9,14],[8,11],[8,8],[9,6],[11,5],[14,5],[16,6],[17,8],[-1,-1],[12,16],[10,14],[9,11],[9,8],[10,6],[11,5],[-1,-1],[18,16],[17,8],[17,6],[19,5],[21,5],[23,7],[24,10],[24,12],[23,15],[22,17],[20,19],[18,20],[15,21],[12,21],[9,20],[7,19],[5,17],[4,15],[3,12],[3,9],[4,6],[5,4],[7,2],[9,1],[12,0],[15,0],[18,1],[20,2],[21,3],[-1,-1],[19,16],[18,8],[18,6],[19,5]]},A:{width:18,points:[[9,21],[1,0],[-1,-1],[9,21],[17,0],[-1,-1],[4,7],[14,7]]},B:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[-1,-1],[4,11],[13,11],[16,10],[17,9],[18,7],[18,4],[17,2],[16,1],[13,0],[4,0]]},C:{width:21,points:[[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5]]},D:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[11,21],[14,20],[16,18],[17,16],[18,13],[18,8],[17,5],[16,3],[14,1],[11,0],[4,0]]},E:{width:19,points:[[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11],[-1,-1],[4,0],[17,0]]},F:{width:18,points:[[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11]]},G:{width:21,points:[[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[18,8],[-1,-1],[13,8],[18,8]]},H:{width:22,points:[[4,21],[4,0],[-1,-1],[18,21],[18,0],[-1,-1],[4,11],[18,11]]},I:{width:8,points:[[4,21],[4,0]]},J:{width:16,points:[[12,21],[12,5],[11,2],[10,1],[8,0],[6,0],[4,1],[3,2],[2,5],[2,7]]},K:{width:21,points:[[4,21],[4,0],[-1,-1],[18,21],[4,7],[-1,-1],[9,12],[18,0]]},L:{width:17,points:[[4,21],[4,0],[-1,-1],[4,0],[16,0]]},M:{width:24,points:[[4,21],[4,0],[-1,-1],[4,21],[12,0],[-1,-1],[20,21],[12,0],[-1,-1],[20,21],[20,0]]},N:{width:22,points:[[4,21],[4,0],[-1,-1],[4,21],[18,0],[-1,-1],[18,21],[18,0]]},O:{width:22,points:[[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21]]},P:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,14],[17,12],[16,11],[13,10],[4,10]]},Q:{width:22,points:[[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21],[-1,-1],[12,4],[18,-2]]},R:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[4,11],[-1,-1],[11,11],[18,0]]},S:{width:20,points:[[17,18],[15,20],[12,21],[8,21],[5,20],[3,18],[3,16],[4,14],[5,13],[7,12],[13,10],[15,9],[16,8],[17,6],[17,3],[15,1],[12,0],[8,0],[5,1],[3,3]]},T:{width:16,points:[[8,21],[8,0],[-1,-1],[1,21],[15,21]]},U:{width:22,points:[[4,21],[4,6],[5,3],[7,1],[10,0],[12,0],[15,1],[17,3],[18,6],[18,21]]},V:{width:18,points:[[1,21],[9,0],[-1,-1],[17,21],[9,0]]},W:{width:24,points:[[2,21],[7,0],[-1,-1],[12,21],[7,0],[-1,-1],[12,21],[17,0],[-1,-1],[22,21],[17,0]]},X:{width:20,points:[[3,21],[17,0],[-1,-1],[17,21],[3,0]]},Y:{width:18,points:[[1,21],[9,11],[9,0],[-1,-1],[17,21],[9,11]]},Z:{width:20,points:[[17,21],[3,0],[-1,-1],[3,21],[17,21],[-1,-1],[3,0],[17,0]]},"[":{width:14,points:[[4,25],[4,-7],[-1,-1],[5,25],[5,-7],[-1,-1],[4,25],[11,25],[-1,-1],[4,-7],[11,-7]]},"\\":{width:14,points:[[0,21],[14,-3]]},"]":{width:14,points:[[9,25],[9,-7],[-1,-1],[10,25],[10,-7],[-1,-1],[3,25],[10,25],[-1,-1],[3,-7],[10,-7]]},"^":{width:16,points:[[6,15],[8,18],[10,15],[-1,-1],[3,12],[8,17],[13,12],[-1,-1],[8,17],[8,0]]},_:{width:16,points:[[0,-2],[16,-2]]},"`":{width:10,points:[[6,21],[5,20],[4,18],[4,16],[5,15],[6,16],[5,17]]},a:{width:19,points:[[15,14],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},b:{width:19,points:[[4,21],[4,0],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]]},c:{width:18,points:[[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},d:{width:19,points:[[15,21],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},e:{width:18,points:[[3,8],[15,8],[15,10],[14,12],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},f:{width:12,points:[[10,21],[8,21],[6,20],[5,17],[5,0],[-1,-1],[2,14],[9,14]]},g:{width:19,points:[[15,14],[15,-2],[14,-5],[13,-6],[11,-7],[8,-7],[6,-6],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},h:{width:19,points:[[4,21],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]]},i:{width:8,points:[[3,21],[4,20],[5,21],[4,22],[3,21],[-1,-1],[4,14],[4,0]]},j:{width:10,points:[[5,21],[6,20],[7,21],[6,22],[5,21],[-1,-1],[6,14],[6,-3],[5,-6],[3,-7],[1,-7]]},k:{width:17,points:[[4,21],[4,0],[-1,-1],[14,14],[4,4],[-1,-1],[8,8],[15,0]]},l:{width:8,points:[[4,21],[4,0]]},m:{width:30,points:[[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0],[-1,-1],[15,10],[18,13],[20,14],[23,14],[25,13],[26,10],[26,0]]},n:{width:19,points:[[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]]},o:{width:19,points:[[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3],[16,6],[16,8],[15,11],[13,13],[11,14],[8,14]]},p:{width:19,points:[[4,14],[4,-7],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]]},q:{width:19,points:[[15,14],[15,-7],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},r:{width:13,points:[[4,14],[4,0],[-1,-1],[4,8],[5,11],[7,13],[9,14],[12,14]]},s:{width:17,points:[[14,11],[13,13],[10,14],[7,14],[4,13],[3,11],[4,9],[6,8],[11,7],[13,6],[14,4],[14,3],[13,1],[10,0],[7,0],[4,1],[3,3]]},t:{width:12,points:[[5,21],[5,4],[6,1],[8,0],[10,0],[-1,-1],[2,14],[9,14]]},u:{width:19,points:[[4,14],[4,4],[5,1],[7,0],[10,0],[12,1],[15,4],[-1,-1],[15,14],[15,0]]},v:{width:16,points:[[2,14],[8,0],[-1,-1],[14,14],[8,0]]},w:{width:22,points:[[3,14],[7,0],[-1,-1],[11,14],[7,0],[-1,-1],[11,14],[15,0],[-1,-1],[19,14],[15,0]]},x:{width:17,points:[[3,14],[14,0],[-1,-1],[14,14],[3,0]]},y:{width:16,points:[[2,14],[8,0],[-1,-1],[14,14],[8,0],[6,-4],[4,-6],[2,-7],[1,-7]]},z:{width:17,points:[[14,14],[3,0],[-1,-1],[3,14],[14,14],[-1,-1],[3,0],[14,0]]},"{":{width:14,points:[[9,25],[7,24],[6,23],[5,21],[5,19],[6,17],[7,16],[8,14],[8,12],[6,10],[-1,-1],[7,24],[6,22],[6,20],[7,18],[8,17],[9,15],[9,13],[8,11],[4,9],[8,7],[9,5],[9,3],[8,1],[7,0],[6,-2],[6,-4],[7,-6],[-1,-1],[6,8],[8,6],[8,4],[7,2],[6,1],[5,-1],[5,-3],[6,-5],[7,-6],[9,-7]]},"|":{width:8,points:[[4,25],[4,-7]]},"}":{width:14,points:[[5,25],[7,24],[8,23],[9,21],[9,19],[8,17],[7,16],[6,14],[6,12],[8,10],[-1,-1],[7,24],[8,22],[8,20],[7,18],[6,17],[5,15],[5,13],[6,11],[10,9],[6,7],[5,5],[5,3],[6,1],[7,0],[8,-2],[8,-4],[7,-6],[-1,-1],[8,8],[6,6],[6,4],[7,2],[8,1],[9,-1],[9,-3],[8,-5],[7,-6],[5,-7]]},"~":{width:24,points:[[3,6],[3,8],[4,11],[6,12],[8,12],[10,11],[14,8],[16,7],[18,7],[20,8],[21,10],[-1,-1],[3,8],[4,10],[6,11],[8,11],[10,10],[14,7],[16,6],[18,6],[20,7],[21,10],[21,12]]}};function Wr(){for(var e,t,r,n,o,i,a,s,u,c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l=c.origin||[0,0,0],h=l[0],f=l[1],d=l[2],p=c.size||1,v=[],m=[],y=((""+c.text).trim()||"").split("\n"),g=0,x=0,b=.04,w=0;w=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:A(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}function $r(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}var en=r(231);function tn(e){var t=e.WebIFC,r=e.configs,n=e.source,o=e.sourceData,i=e.sourceFormat,a=e.metaModelSource,s=e.metaModelDataStr,u=e.output,c=e.outputXKTModel,l=e.outputXKT,h=e.includeTypes,d=e.excludeTypes,p=e.reuseGeometries,v=void 0===p||p,m=e.minTileSize,y=void 0===m?200:m,g=e.stats,x=void 0===g?{}:g,b=e.outputStats,w=e.rotateX,M=void 0!==w&&w,T=e.includeTextures,I=void 0===T||T,S=e.includeNormals,A=void 0===S||S,O=e.log,L=void 0===O?function(e){}:O;return x.sourceFormat="",x.schemaVersion="",x.title="",x.author="",x.created="",x.numMetaObjects=0,x.numPropertySets=0,x.numTriangles=0,x.numVertices=0,x.numNormals=0,x.numUVs=0,x.numTextures=0,x.numTextureSets=0,x.numObjects=0,x.numGeometries=0,x.sourceSize=0,x.xktSize=0,x.texturesSize=0,x.xktVersion="",x.compressionRatio=0,x.conversionTime=0,x.aabb=null,new Promise((function(e,p){var m=L;if(L=function(e){m("[convert2xkt] ".concat(e))},n||o)if(i||!o)if(u||c||l){n&&L("Reading input file: "+n);var g=new Date,w=r.sourceConfigs||{},T=i||n.split(".").pop(),S=w[T];if(S||(L('[WARNING] Could not find configs sourceConfigs entry for source format "'.concat(T,'". This is derived from the source file name extension. Will use internal default configs.')),S={}),!o)try{o=en.readFileSync(n)}catch(e){return void p(e)}var O,P=o.byteLength;if(L("Input file size: "+(P/1e3).toFixed(2)+" kB"),!s&&a){L("Reading input metadata file: "+a);try{s=en.readFileSync(a)}catch(e){return void p(e)}}if(s)try{O=JSON.parse(s)}catch(e){L("Error parsing metadata JSON: ".concat(e))}y=D(S.minTileSize,y),M=D(S.rotateX,M),v=D(S.reuseGeometries,v),I=D(S.includeTextures,I),A=D(S.includeNormals,A),h=D(S.includeTypes,h),d=D(S.excludeTypes,d),!1===v&&L("Geometry reuse is disabled");var E,j,G=new He({minTileSize:y});switch(T){case"json":N(Ft,{data:JSON.parse(o),xktModel:G,stats:x,rotateX:M,center:S.center,transform:S.transform,log:L});break;case"glb":N(Wt,{data:o=Qr(o),reuseGeometries:v,includeTextures:I,includeNormals:A,metaModelData:O,xktModel:G,stats:x,log:L});break;case"gltf":var k=JSON.parse(o),_=n?rn(n):"";N(ar,{baseUri:_,data:k,reuseGeometries:v,includeTextures:I,includeNormals:A,metaModelData:O,xktModel:G,getAttachment:(E=Hr().mark((function e(t){var r,n,o;return Hr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return L("Reading attachment file: ".concat(r=_+t)),n=en.readFileSync(r),o=Qr(n),e.abrupt("return",o);case 5:case"end":return e.stop()}}),e)})),j=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=E.apply(e,t);function i(e){$r(o,r,n,i,a,"next",e)}function a(e){$r(o,r,n,i,a,"throw",e)}i(void 0)}))},function(e){return j.apply(this,arguments)}),stats:x,log:L});break;case"ifc":N(vr,{WebIFC:t,data:o,xktModel:G,wasmPath:"./",includeTypes:h,excludeTypes:d,stats:x,log:L});break;case"laz":case"las":N(wr,{data:o,xktModel:G,stats:x,fp64:S.fp64,colorDepth:S.colorDepth,center:S.center,transform:S.transform,skip:D(S.skip,1),log:L});break;case"pcd":N(Tr,{data:o,xktModel:G,stats:x,log:L});break;case"ply":N(Lr,{data:o,xktModel:G,stats:x,log:L});break;case"stl":N(kr,{data:o,xktModel:G,stats:x,log:L});break;default:return void p('Error: unsupported source format: "'.concat(T,'".'))}}else p("Argument expected: output, outputXKTModel or outputXKT");else p("Argument expected: sourceFormat is required with sourceData");else p("Argument expected: source or sourceData");function D(e,t){return void 0!==e?e:t}function N(t,r){t(r).then((function(){O||G.createDefaultMetaObjects(),L("Input file parsed OK. Building XKT document..."),G.finalize().then((function(){L("XKT document built OK. Writing to XKT file...");var t=nt(G,O,x,{zip:!0}),r=Buffer.from(t),n=t.byteLength;if(x.minTileSize=y||200,x.sourceSize=(P/1e3).toFixed(2),x.xktSize=(n/1e3).toFixed(2),x.xktVersion=f.xktVersion,x.compressionRatio=(P/n).toFixed(2),x.conversionTime=((new Date-g)/1e3).toFixed(2),x.aabb=G.aabb,L("Converted to: XKT v".concat(x.xktVersion)),h&&L("Include types: "+(h||"(include all)")),d&&L("Exclude types: "+(d||"(exclude none)")),L("XKT size: "+x.xktSize+" kB"),L("XKT textures size: "+(x.texturesSize/1e3).toFixed(2)+"kB"),L("Compression ratio: "+x.compressionRatio),L("Conversion time: "+x.conversionTime+" s"),L("Converted metaobjects: "+x.numMetaObjects),L("Converted property sets: "+x.numPropertySets),L("Converted drawable objects: "+x.numObjects),L("Converted geometries: "+x.numGeometries),L("Converted textures: "+x.numTextures),L("Converted textureSets: "+x.numTextureSets),L("Converted triangles: "+x.numTriangles),L("Converted vertices: "+x.numVertices),L("Converted UVs: "+x.numUVs),L("Converted normals: "+x.numNormals),L("minTileSize: "+x.minTileSize),u){var o=rn(u).trim();""===o||en.existsSync(o)||en.mkdirSync(o,{recursive:!0}),L("Writing XKT file: "+u),en.writeFileSync(u,r)}c&&c(G),l&&l(r),b&&b(x),e()}))}),(function(e){p(e)}))}}))}function rn(e){var t=e.lastIndexOf("/");return 0!==t?e.substring(0,t+1):""}(0,e.installFilePolyfills)()})(),n})())); +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.convert2xkt=t():e.convert2xkt=t()}(global,(()=>(()=>{"use strict";var e={231:e=>{e.exports=require("fs")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{r.r(n),r.d(n,{ClampToEdgeWrapping:()=>p,GIFMediaType:()=>O,JPEGMediaType:()=>L,LinearFilter:()=>M,LinearMipMapLinearFilter:()=>A,LinearMipMapNearestFilter:()=>I,LinearMipmapLinearFilter:()=>S,LinearMipmapNearestFilter:()=>T,MirroredRepeatWrapping:()=>m,NearestFilter:()=>y,NearestMipMapLinearFilter:()=>w,NearestMipMapNearestFilter:()=>g,NearestMipmapLinearFilter:()=>b,NearestMipmapNearestFilter:()=>x,PNGMediaType:()=>P,RepeatWrapping:()=>d,XKTModel:()=>He,XKT_INFO:()=>f,buildBoxGeometry:()=>zr,buildBoxLinesGeometry:()=>Ur,buildCylinderGeometry:()=>Xr,buildGridGeometry:()=>Rr,buildPlaneGeometry:()=>Kr,buildSphereGeometry:()=>qr,buildTorusGeometry:()=>Zr,buildVectorTextGeometry:()=>Wr,convert2xkt:()=>tn,parseCityJSONIntoXKTModel:()=>Ft,parseGLTFIntoXKTModel:()=>Wt,parseGLTFJSONIntoXKTModel:()=>ar,parseIFCIntoXKTModel:()=>vr,parseLASIntoXKTModel:()=>wr,parseMetaModelIntoXKTModel:()=>Mr,parsePCDIntoXKTModel:()=>Tr,parsePLYIntoXKTModel:()=>Lr,parseSTLIntoXKTModel:()=>kr,writeXKTModelToArrayBuffer:()=>nt});const e=require("@loaders.gl/polyfills");var t,o,i,a,s,u,c,l,h,f={xktVersion:10},d=1e3,p=1001,m=1002,y=1003,g=1004,x=1004,b=1005,w=1005,M=1006,T=1007,I=1007,S=1008,A=1008,O=1e4,L=10001,P=10002,E=Float64Array,j=new E(16),G=new E(16),k=new E(4),_={MIN_DOUBLE:-Number.MAX_SAFE_INTEGER,MAX_DOUBLE:Number.MAX_SAFE_INTEGER,DEGTORAD:.0174532925,RADTODEG:57.295779513,vec2:function(e){return new E(e||2)},vec3:function(e){return new E(e||3)},vec4:function(e){return new E(e||4)},mat3:function(e){return new E(e||9)},mat3ToMat4:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new E(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=0,t[4]=e[3],t[5]=e[4],t[6]=e[5],t[7]=0,t[8]=e[6],t[9]=e[7],t[10]=e[8],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},mat4:function(e){return new E(e||16)},mat4ToMat3:function(e,t){},createUUID:function(){for(var e=[],t=0;t<256;t++)e[t]=(t<16?"0":"")+t.toString(16);return function(){var t=4294967295*Math.random()|0,r=4294967295*Math.random()|0,n=4294967295*Math.random()|0,o=4294967295*Math.random()|0;return"".concat(e[255&t]+e[t>>8&255]+e[t>>16&255]+e[t>>24&255],"-").concat(e[255&r]).concat(e[r>>8&255],"-").concat(e[r>>16&15|64]).concat(e[r>>24&255],"-").concat(e[63&n|128]).concat(e[n>>8&255],"-").concat(e[n>>16&255]).concat(e[n>>24&255]).concat(e[255&o]).concat(e[o>>8&255]).concat(e[o>>16&255]).concat(e[o>>24&255])}}(),clamp:function(e,t,r){return Math.max(t,Math.min(r,e))},fmod:function(e,t){if(e1?1:r,Math.acos(r)},vec3FromMat4Scale:(u=new E(3),function(e,t){return u[0]=e[0],u[1]=e[1],u[2]=e[2],t[0]=_.lenVec3(u),u[0]=e[4],u[1]=e[5],u[2]=e[6],t[1]=_.lenVec3(u),u[0]=e[8],u[1]=e[9],u[2]=e[10],t[2]=_.lenVec3(u),t}),vecToArray:function(){function e(e){return Math.round(1e5*e)/1e5}return function(t){for(var r=0,n=(t=Array.prototype.slice.call(t)).length;r0&&void 0!==arguments[0]?arguments[0]:new E(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},identityMat3:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new E(9);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},isIdentityMat4:function(e){return 1===e[0]&&0===e[1]&&0===e[2]&&0===e[3]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[7]&&0===e[8]&&0===e[9]&&1===e[10]&&0===e[11]&&0===e[12]&&0===e[13]&&0===e[14]&&1===e[15]},negateMat4:function(e,t){return t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t},addMat4:function(e,t,r){return r||(r=e),r[0]=e[0]+t[0],r[1]=e[1]+t[1],r[2]=e[2]+t[2],r[3]=e[3]+t[3],r[4]=e[4]+t[4],r[5]=e[5]+t[5],r[6]=e[6]+t[6],r[7]=e[7]+t[7],r[8]=e[8]+t[8],r[9]=e[9]+t[9],r[10]=e[10]+t[10],r[11]=e[11]+t[11],r[12]=e[12]+t[12],r[13]=e[13]+t[13],r[14]=e[14]+t[14],r[15]=e[15]+t[15],r},addMat4Scalar:function(e,t,r){return r||(r=e),r[0]=e[0]+t,r[1]=e[1]+t,r[2]=e[2]+t,r[3]=e[3]+t,r[4]=e[4]+t,r[5]=e[5]+t,r[6]=e[6]+t,r[7]=e[7]+t,r[8]=e[8]+t,r[9]=e[9]+t,r[10]=e[10]+t,r[11]=e[11]+t,r[12]=e[12]+t,r[13]=e[13]+t,r[14]=e[14]+t,r[15]=e[15]+t,r},addScalarMat4:function(e,t,r){return _.addMat4Scalar(t,e,r)},subMat4:function(e,t,r){return r||(r=e),r[0]=e[0]-t[0],r[1]=e[1]-t[1],r[2]=e[2]-t[2],r[3]=e[3]-t[3],r[4]=e[4]-t[4],r[5]=e[5]-t[5],r[6]=e[6]-t[6],r[7]=e[7]-t[7],r[8]=e[8]-t[8],r[9]=e[9]-t[9],r[10]=e[10]-t[10],r[11]=e[11]-t[11],r[12]=e[12]-t[12],r[13]=e[13]-t[13],r[14]=e[14]-t[14],r[15]=e[15]-t[15],r},subMat4Scalar:function(e,t,r){return r||(r=e),r[0]=e[0]-t,r[1]=e[1]-t,r[2]=e[2]-t,r[3]=e[3]-t,r[4]=e[4]-t,r[5]=e[5]-t,r[6]=e[6]-t,r[7]=e[7]-t,r[8]=e[8]-t,r[9]=e[9]-t,r[10]=e[10]-t,r[11]=e[11]-t,r[12]=e[12]-t,r[13]=e[13]-t,r[14]=e[14]-t,r[15]=e[15]-t,r},subScalarMat4:function(e,t,r){return r||(r=t),r[0]=e-t[0],r[1]=e-t[1],r[2]=e-t[2],r[3]=e-t[3],r[4]=e-t[4],r[5]=e-t[5],r[6]=e-t[6],r[7]=e-t[7],r[8]=e-t[8],r[9]=e-t[9],r[10]=e-t[10],r[11]=e-t[11],r[12]=e-t[12],r[13]=e-t[13],r[14]=e-t[14],r[15]=e-t[15],r},mulMat4:function(e,t,r){r||(r=e);var n=e[0],o=e[1],i=e[2],a=e[3],s=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],v=e[12],m=e[13],y=e[14],g=e[15],x=t[0],b=t[1],w=t[2],M=t[3],T=t[4],I=t[5],S=t[6],A=t[7],O=t[8],L=t[9],P=t[10],E=t[11],j=t[12],G=t[13],k=t[14],_=t[15];return r[0]=x*n+b*s+w*h+M*v,r[1]=x*o+b*u+w*f+M*m,r[2]=x*i+b*c+w*d+M*y,r[3]=x*a+b*l+w*p+M*g,r[4]=T*n+I*s+S*h+A*v,r[5]=T*o+I*u+S*f+A*m,r[6]=T*i+I*c+S*d+A*y,r[7]=T*a+I*l+S*p+A*g,r[8]=O*n+L*s+P*h+E*v,r[9]=O*o+L*u+P*f+E*m,r[10]=O*i+L*c+P*d+E*y,r[11]=O*a+L*l+P*p+E*g,r[12]=j*n+G*s+k*h+_*v,r[13]=j*o+G*u+k*f+_*m,r[14]=j*i+G*c+k*d+_*y,r[15]=j*a+G*l+k*p+_*g,r},mulMat3:function(e,t,r){r||(r=new E(9));var n=e[0],o=e[3],i=e[6],a=e[1],s=e[4],u=e[7],c=e[2],l=e[5],h=e[8],f=t[0],d=t[3],p=t[6],v=t[1],m=t[4],y=t[7],g=t[2],x=t[5],b=t[8];return r[0]=n*f+o*v+i*g,r[3]=n*d+o*m+i*x,r[6]=n*p+o*y+i*b,r[1]=a*f+s*v+u*g,r[4]=a*d+s*m+u*x,r[7]=a*p+s*y+u*b,r[2]=c*f+l*v+h*g,r[5]=c*d+l*m+h*x,r[8]=c*p+l*y+h*b,r},mulMat4Scalar:function(e,t,r){return r||(r=e),r[0]=e[0]*t,r[1]=e[1]*t,r[2]=e[2]*t,r[3]=e[3]*t,r[4]=e[4]*t,r[5]=e[5]*t,r[6]=e[6]*t,r[7]=e[7]*t,r[8]=e[8]*t,r[9]=e[9]*t,r[10]=e[10]*t,r[11]=e[11]*t,r[12]=e[12]*t,r[13]=e[13]*t,r[14]=e[14]*t,r[15]=e[15]*t,r},mulMat4v4:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.vec4(),n=t[0],o=t[1],i=t[2],a=t[3];return r[0]=e[0]*n+e[4]*o+e[8]*i+e[12]*a,r[1]=e[1]*n+e[5]*o+e[9]*i+e[13]*a,r[2]=e[2]*n+e[6]*o+e[10]*i+e[14]*a,r[3]=e[3]*n+e[7]*o+e[11]*i+e[15]*a,r},transposeMat4:function(e,t){var r=e[4],n=e[14],o=e[8],i=e[13],a=e[12],s=e[9];if(!t||e===t){var u=e[1],c=e[2],l=e[3],h=e[6],f=e[7],d=e[11];return e[1]=r,e[2]=o,e[3]=a,e[4]=u,e[6]=s,e[7]=i,e[8]=c,e[9]=h,e[11]=n,e[12]=l,e[13]=f,e[14]=d,e}return t[0]=e[0],t[1]=r,t[2]=o,t[3]=a,t[4]=e[1],t[5]=e[5],t[6]=s,t[7]=i,t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=n,t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t},transposeMat3:function(e,t){if(t===e){var r=e[1],n=e[2],o=e[5];t[1]=e[3],t[2]=e[6],t[3]=r,t[5]=e[7],t[6]=n,t[7]=o}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},determinantMat4:function(e){var t=e[0],r=e[1],n=e[2],o=e[3],i=e[4],a=e[5],s=e[6],u=e[7],c=e[8],l=e[9],h=e[10],f=e[11],d=e[12],p=e[13],v=e[14],m=e[15];return d*l*s*o-c*p*s*o-d*a*h*o+i*p*h*o+c*a*v*o-i*l*v*o-d*l*n*u+c*p*n*u+d*r*h*u-t*p*h*u-c*r*v*u+t*l*v*u+d*a*n*f-i*p*n*f-d*r*s*f+t*p*s*f+i*r*v*f-t*a*v*f-c*a*n*m+i*l*n*m+c*r*s*m-t*l*s*m-i*r*h*m+t*a*h*m},inverseMat4:function(e,t){t||(t=e);var r=e[0],n=e[1],o=e[2],i=e[3],a=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],d=e[11],p=e[12],v=e[13],m=e[14],y=e[15],g=r*s-n*a,x=r*u-o*a,b=r*c-i*a,w=n*u-o*s,M=n*c-i*s,T=o*c-i*u,I=l*v-h*p,S=l*m-f*p,A=l*y-d*p,O=h*m-f*v,L=h*y-d*v,P=f*y-d*m,E=1/(g*P-x*L+b*O+w*A-M*S+T*I);return t[0]=(s*P-u*L+c*O)*E,t[1]=(-n*P+o*L-i*O)*E,t[2]=(v*T-m*M+y*w)*E,t[3]=(-h*T+f*M-d*w)*E,t[4]=(-a*P+u*A-c*S)*E,t[5]=(r*P-o*A+i*S)*E,t[6]=(-p*T+m*b-y*x)*E,t[7]=(l*T-f*b+d*x)*E,t[8]=(a*L-s*A+c*I)*E,t[9]=(-r*L+n*A-i*I)*E,t[10]=(p*M-v*b+y*g)*E,t[11]=(-l*M+h*b-d*g)*E,t[12]=(-a*O+s*S-u*I)*E,t[13]=(r*O-n*S+o*I)*E,t[14]=(-p*w+v*x-m*g)*E,t[15]=(l*w-h*x+f*g)*E,t},traceMat4:function(e){return e[0]+e[5]+e[10]+e[15]},translationMat4v:function(e,t){var r=t||_.identityMat4();return r[12]=e[0],r[13]=e[1],r[14]=e[2],r},translationMat3v:function(e,t){var r=t||_.identityMat3();return r[6]=e[0],r[7]=e[1],r},translationMat4c:(s=new E(3),function(e,t,r,n){return s[0]=e,s[1]=t,s[2]=r,_.translationMat4v(s,n)}),translationMat4s:function(e,t){return _.translationMat4c(e,e,e,t)},translateMat4v:function(e,t){return _.translateMat4c(e[0],e[1],e[2],t)},OLDtranslateMat4c:function(e,t,r,n){var o=n[12];n[0]+=o*e,n[4]+=o*t,n[8]+=o*r;var i=n[13];n[1]+=i*e,n[5]+=i*t,n[9]+=i*r;var a=n[14];n[2]+=a*e,n[6]+=a*t,n[10]+=a*r;var s=n[15];return n[3]+=s*e,n[7]+=s*t,n[11]+=s*r,n},translateMat4c:function(e,t,r,n){var o=n[3];n[0]+=o*e,n[1]+=o*t,n[2]+=o*r;var i=n[7];n[4]+=i*e,n[5]+=i*t,n[6]+=i*r;var a=n[11];n[8]+=a*e,n[9]+=a*t,n[10]+=a*r;var s=n[15];return n[12]+=s*e,n[13]+=s*t,n[14]+=s*r,n},rotationMat4v:function(e,t,r){var n,o,i,a,s,u,c=_.normalizeVec4([t[0],t[1],t[2],0],[]),l=Math.sin(e),h=Math.cos(e),f=1-h,d=c[0],p=c[1],v=c[2];return n=d*p,o=p*v,i=v*d,a=d*l,s=p*l,u=v*l,(r=r||_.mat4())[0]=f*d*d+h,r[1]=f*n+u,r[2]=f*i-s,r[3]=0,r[4]=f*n-u,r[5]=f*p*p+h,r[6]=f*o+a,r[7]=0,r[8]=f*i+s,r[9]=f*o-a,r[10]=f*v*v+h,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r},rotationMat4c:function(e,t,r,n,o){return _.rotationMat4v(e,[t,r,n],o)},scalingMat4v:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.identityMat4();return t[0]=e[0],t[5]=e[1],t[10]=e[2],t},scalingMat3v:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.identityMat3();return t[0]=e[0],t[4]=e[1],t},scalingMat4c:function(){var e=new E(3);return function(t,r,n,o){return e[0]=t,e[1]=r,e[2]=n,_.scalingMat4v(e,o)}}(),scaleMat4c:function(e,t,r,n){return n[0]*=e,n[4]*=t,n[8]*=r,n[1]*=e,n[5]*=t,n[9]*=r,n[2]*=e,n[6]*=t,n[10]*=r,n[3]*=e,n[7]*=t,n[11]*=r,n},scaleMat4v:function(e,t){var r=e[0],n=e[1],o=e[2];return t[0]*=r,t[4]*=n,t[8]*=o,t[1]*=r,t[5]*=n,t[9]*=o,t[2]*=r,t[6]*=n,t[10]*=o,t[3]*=r,t[7]*=n,t[11]*=o,t},scalingMat4s:function(e){return _.scalingMat4c(e,e,e)},rotationTranslationMat4:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.mat4(),n=e[0],o=e[1],i=e[2],a=e[3],s=n+n,u=o+o,c=i+i,l=n*s,h=n*u,f=n*c,d=o*u,p=o*c,v=i*c,m=a*s,y=a*u,g=a*c;return r[0]=1-(d+v),r[1]=h+g,r[2]=f-y,r[3]=0,r[4]=h-g,r[5]=1-(l+v),r[6]=p+m,r[7]=0,r[8]=f+y,r[9]=p-m,r[10]=1-(l+d),r[11]=0,r[12]=t[0],r[13]=t[1],r[14]=t[2],r[15]=1,r},mat4ToEuler:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.vec4(),n=_.clamp,o=e[0],i=e[4],a=e[8],s=e[1],u=e[5],c=e[9],l=e[2],h=e[6],f=e[10];return"XYZ"===t?(r[1]=Math.asin(n(a,-1,1)),Math.abs(a)<.99999?(r[0]=Math.atan2(-c,f),r[2]=Math.atan2(-i,o)):(r[0]=Math.atan2(h,u),r[2]=0)):"YXZ"===t?(r[0]=Math.asin(-n(c,-1,1)),Math.abs(c)<.99999?(r[1]=Math.atan2(a,f),r[2]=Math.atan2(s,u)):(r[1]=Math.atan2(-l,o),r[2]=0)):"ZXY"===t?(r[0]=Math.asin(n(h,-1,1)),Math.abs(h)<.99999?(r[1]=Math.atan2(-l,f),r[2]=Math.atan2(-i,u)):(r[1]=0,r[2]=Math.atan2(s,o))):"ZYX"===t?(r[1]=Math.asin(-n(l,-1,1)),Math.abs(l)<.99999?(r[0]=Math.atan2(h,f),r[2]=Math.atan2(s,o)):(r[0]=0,r[2]=Math.atan2(-i,u))):"YZX"===t?(r[2]=Math.asin(n(s,-1,1)),Math.abs(s)<.99999?(r[0]=Math.atan2(-c,u),r[1]=Math.atan2(-l,o)):(r[0]=0,r[1]=Math.atan2(a,f))):"XZY"===t&&(r[2]=Math.asin(-n(i,-1,1)),Math.abs(i)<.99999?(r[0]=Math.atan2(h,u),r[1]=Math.atan2(a,o)):(r[0]=Math.atan2(-c,f),r[1]=0)),r},composeMat4:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_.mat4();return _.quaternionToRotationMat4(t,n),_.scaleMat4v(r,n),_.translateMat4v(e,n),n},decomposeMat4:function(){var e=new E(3),t=new E(16);return function(r,n,o,i){e[0]=r[0],e[1]=r[1],e[2]=r[2];var a=_.lenVec3(e);e[0]=r[4],e[1]=r[5],e[2]=r[6];var s=_.lenVec3(e);e[8]=r[8],e[9]=r[9],e[10]=r[10];var u=_.lenVec3(e);_.determinantMat4(r)<0&&(a=-a),n[0]=r[12],n[1]=r[13],n[2]=r[14],t.set(r);var c=1/a,l=1/s,h=1/u;return t[0]*=c,t[1]*=c,t[2]*=c,t[4]*=l,t[5]*=l,t[6]*=l,t[8]*=h,t[9]*=h,t[10]*=h,_.mat4ToQuaternion(t,o),i[0]=a,i[1]=s,i[2]=u,this}}(),lookAtMat4v:function(e,t,r,n){n||(n=_.mat4());var o,i,a,s,u,c,l,h,f,d,p=e[0],v=e[1],m=e[2],y=r[0],g=r[1],x=r[2],b=t[0],w=t[1],M=t[2];return p===b&&v===w&&m===M?_.identityMat4():(o=p-b,i=v-w,a=m-M,s=g*(a*=d=1/Math.sqrt(o*o+i*i+a*a))-x*(i*=d),u=x*(o*=d)-y*a,c=y*i-g*o,(d=Math.sqrt(s*s+u*u+c*c))?(s*=d=1/d,u*=d,c*=d):(s=0,u=0,c=0),l=i*c-a*u,h=a*s-o*c,f=o*u-i*s,(d=Math.sqrt(l*l+h*h+f*f))?(l*=d=1/d,h*=d,f*=d):(l=0,h=0,f=0),n[0]=s,n[1]=l,n[2]=o,n[3]=0,n[4]=u,n[5]=h,n[6]=i,n[7]=0,n[8]=c,n[9]=f,n[10]=a,n[11]=0,n[12]=-(s*p+u*v+c*m),n[13]=-(l*p+h*v+f*m),n[14]=-(o*p+i*v+a*m),n[15]=1,n)},lookAtMat4c:function(e,t,r,n,o,i,a,s,u){return _.lookAtMat4v([e,t,r],[n,o,i],[a,s,u],[])},orthoMat4c:function(e,t,r,n,o,i,a){a||(a=_.mat4());var s=t-e,u=n-r,c=i-o;return a[0]=2/s,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=2/u,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=-2/c,a[11]=0,a[12]=-(e+t)/s,a[13]=-(n+r)/u,a[14]=-(i+o)/c,a[15]=1,a},frustumMat4v:function(e,t,r){r||(r=_.mat4());var n=[e[0],e[1],e[2],0],o=[t[0],t[1],t[2],0];_.addVec4(o,n,j),_.subVec4(o,n,G);var i=2*n[2],a=G[0],s=G[1],u=G[2];return r[0]=i/a,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=i/s,r[6]=0,r[7]=0,r[8]=j[0]/a,r[9]=j[1]/s,r[10]=-j[2]/u,r[11]=-1,r[12]=0,r[13]=0,r[14]=-i*o[2]/u,r[15]=0,r},frustumMat4:function(e,t,r,n,o,i,a){a||(a=_.mat4());var s=t-e,u=n-r,c=i-o;return a[0]=2*o/s,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=2*o/u,a[6]=0,a[7]=0,a[8]=(t+e)/s,a[9]=(n+r)/u,a[10]=-(i+o)/c,a[11]=-1,a[12]=0,a[13]=0,a[14]=-i*o*2/c,a[15]=0,a},perspectiveMat4:function(e,t,r,n,o){var i=[],a=[];return i[2]=r,a[2]=n,a[1]=i[2]*Math.tan(e/2),i[1]=-a[1],a[0]=a[1]*t,i[0]=-a[0],_.frustumMat4v(i,a,o)},transformPoint3:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.vec3(),n=t[0],o=t[1],i=t[2];return r[0]=e[0]*n+e[4]*o+e[8]*i+e[12],r[1]=e[1]*n+e[5]*o+e[9]*i+e[13],r[2]=e[2]*n+e[6]*o+e[10]*i+e[14],r},transformPoint4:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.vec4();return r[0]=e[0]*t[0]+e[4]*t[1]+e[8]*t[2]+e[12]*t[3],r[1]=e[1]*t[0]+e[5]*t[1]+e[9]*t[2]+e[13]*t[3],r[2]=e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]*t[3],r[3]=e[3]*t[0]+e[7]*t[1]+e[11]*t[2]+e[15]*t[3],r},transformPoints3:function(e,t,r){for(var n,o,i,a,s,u=r||[],c=t.length,l=e[0],h=e[1],f=e[2],d=e[3],p=e[4],v=e[5],m=e[6],y=e[7],g=e[8],x=e[9],b=e[10],w=e[11],M=e[12],T=e[13],I=e[14],S=e[15],A=0;A2&&void 0!==arguments[2]?arguments[2]:t,s=t.length,u=e[0],c=e[1],l=e[2],h=e[3],f=e[4],d=e[5],p=e[6],v=e[7],m=e[8],y=e[9],g=e[10],x=e[11],b=e[12],w=e[13],M=e[14],T=e[15];for(r=0;r2&&void 0!==arguments[2]?arguments[2]:t,s=t.length,u=e[0],c=e[1],l=e[2],h=e[3],f=e[4],d=e[5],p=e[6],v=e[7],m=e[8],y=e[9],g=e[10],x=e[11],b=e[12],w=e[13],M=e[14],T=e[15];for(r=0;r0&&void 0!==arguments[0]?arguments[0]:_.vec4();return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},eulerToQuaternion:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.vec4(),n=e[0]*_.DEGTORAD/2,o=e[1]*_.DEGTORAD/2,i=e[2]*_.DEGTORAD/2,a=Math.cos(n),s=Math.cos(o),u=Math.cos(i),c=Math.sin(n),l=Math.sin(o),h=Math.sin(i);return"XYZ"===t?(r[0]=c*s*u+a*l*h,r[1]=a*l*u-c*s*h,r[2]=a*s*h+c*l*u,r[3]=a*s*u-c*l*h):"YXZ"===t?(r[0]=c*s*u+a*l*h,r[1]=a*l*u-c*s*h,r[2]=a*s*h-c*l*u,r[3]=a*s*u+c*l*h):"ZXY"===t?(r[0]=c*s*u-a*l*h,r[1]=a*l*u+c*s*h,r[2]=a*s*h+c*l*u,r[3]=a*s*u-c*l*h):"ZYX"===t?(r[0]=c*s*u-a*l*h,r[1]=a*l*u+c*s*h,r[2]=a*s*h-c*l*u,r[3]=a*s*u+c*l*h):"YZX"===t?(r[0]=c*s*u+a*l*h,r[1]=a*l*u+c*s*h,r[2]=a*s*h-c*l*u,r[3]=a*s*u-c*l*h):"XZY"===t&&(r[0]=c*s*u-a*l*h,r[1]=a*l*u-c*s*h,r[2]=a*s*h+c*l*u,r[3]=a*s*u+c*l*h),r},mat4ToQuaternion:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.vec4(),n=e[0],o=e[4],i=e[8],a=e[1],s=e[5],u=e[9],c=e[2],l=e[6],h=e[10],f=n+s+h;return f>0?(t=.5/Math.sqrt(f+1),r[3]=.25/t,r[0]=(l-u)*t,r[1]=(i-c)*t,r[2]=(a-o)*t):n>s&&n>h?(t=2*Math.sqrt(1+n-s-h),r[3]=(l-u)/t,r[0]=.25*t,r[1]=(o+a)/t,r[2]=(i+c)/t):s>h?(t=2*Math.sqrt(1+s-n-h),r[3]=(i-c)/t,r[0]=(o+a)/t,r[1]=.25*t,r[2]=(u+l)/t):(t=2*Math.sqrt(1+h-n-s),r[3]=(a-o)/t,r[0]=(i+c)/t,r[1]=(u+l)/t,r[2]=.25*t),r},vec3PairToQuaternion:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.vec4(),n=Math.sqrt(_.dotVec3(e,e)*_.dotVec3(t,t)),o=n+_.dotVec3(e,t);return o<1e-8*n?(o=0,Math.abs(e[0])>Math.abs(e[2])?(r[0]=-e[1],r[1]=e[0],r[2]=0):(r[0]=0,r[1]=-e[2],r[2]=e[1])):_.cross3Vec3(e,t,r),r[3]=o,_.normalizeQuaternion(r)},angleAxisToQuaternion:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.vec4(),r=e[3]/2,n=Math.sin(r);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(r),t},quaternionToEuler:function(){var e=new E(16);return function(t,r,n){return n=n||_.vec3(),_.quaternionToRotationMat4(t,e),_.mat4ToEuler(e,r,n),n}}(),mulQuaternions:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.vec4(),n=e[0],o=e[1],i=e[2],a=e[3],s=t[0],u=t[1],c=t[2],l=t[3];return r[0]=a*s+n*l+o*c-i*u,r[1]=a*u+o*l+i*s-n*c,r[2]=a*c+i*l+n*u-o*s,r[3]=a*l-n*s-o*u-i*c,r},vec3ApplyQuaternion:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_.vec3(),n=t[0],o=t[1],i=t[2],a=e[0],s=e[1],u=e[2],c=e[3],l=c*n+s*i-u*o,h=c*o+u*n-a*i,f=c*i+a*o-s*n,d=-a*n-s*o-u*i;return r[0]=l*c+d*-a+h*-u-f*-s,r[1]=h*c+d*-s+f*-a-l*-u,r[2]=f*c+d*-u+l*-s-h*-a,r},quaternionToMat4:function(e,t){t=_.identityMat4(t);var r=e[0],n=e[1],o=e[2],i=e[3],a=2*r,s=2*n,u=2*o,c=a*i,l=s*i,h=u*i,f=a*r,d=s*r,p=u*r,v=s*n,m=u*n,y=u*o;return t[0]=1-(v+y),t[1]=d+h,t[2]=p-l,t[4]=d-h,t[5]=1-(f+y),t[6]=m+c,t[8]=p+l,t[9]=m-c,t[10]=1-(f+v),t},quaternionToRotationMat4:function(e,t){var r=e[0],n=e[1],o=e[2],i=e[3],a=r+r,s=n+n,u=o+o,c=r*a,l=r*s,h=r*u,f=n*s,d=n*u,p=o*u,v=i*a,m=i*s,y=i*u;return t[0]=1-(f+p),t[4]=l-y,t[8]=h+m,t[1]=l+y,t[5]=1-(c+p),t[9]=d-v,t[2]=h-m,t[6]=d+v,t[10]=1-(c+f),t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},normalizeQuaternion:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=_.lenVec4([e[0],e[1],e[2],e[3]]);return t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r,t[3]=e[3]/r,t},conjugateQuaternion:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},inverseQuaternion:function(e,t){return _.normalizeQuaternion(_.conjugateQuaternion(e,t))},quaternionToAngleAxis:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.vec4(),r=(e=_.normalizeQuaternion(e,k))[3],n=2*Math.acos(r),o=Math.sqrt(1-r*r);return o<.001?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=e[0]/o,t[1]=e[1]/o,t[2]=e[2]/o),t[3]=n,t},AABB3:function(e){return new E(e||6)},AABB2:function(e){return new E(e||4)},OBB3:function(e){return new E(e||32)},OBB2:function(e){return new E(e||16)},Sphere3:function(e,t,r,n){return new E([e,t,r,n])},transformOBB3:function(e,t){var r,n,o,i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,s=t.length,u=e[0],c=e[1],l=e[2],h=e[3],f=e[4],d=e[5],p=e[6],v=e[7],m=e[8],y=e[9],g=e[10],x=e[11],b=e[12],w=e[13],M=e[14],T=e[15];for(r=0;rs?a:s,i[1]+=u>c?u:c,i[2]+=l>h?l:h,Math.abs(_.lenVec3(i))}}(),getAABB3Center:function(e,t){var r=t||_.vec3();return r[0]=(e[0]+e[3])/2,r[1]=(e[1]+e[4])/2,r[2]=(e[2]+e[5])/2,r},getAABB2Center:function(e,t){var r=t||_.vec2();return r[0]=(e[2]+e[0])/2,r[1]=(e[3]+e[1])/2,r},collapseAABB3:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_.AABB3();return e[0]=_.MAX_DOUBLE,e[1]=_.MAX_DOUBLE,e[2]=_.MAX_DOUBLE,e[3]=-_.MAX_DOUBLE,e[4]=-_.MAX_DOUBLE,e[5]=-_.MAX_DOUBLE,e},AABB3ToOBB3:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.OBB3();return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t[4]=e[3],t[5]=e[1],t[6]=e[2],t[7]=1,t[8]=e[3],t[9]=e[4],t[10]=e[2],t[11]=1,t[12]=e[0],t[13]=e[4],t[14]=e[2],t[15]=1,t[16]=e[0],t[17]=e[1],t[18]=e[5],t[19]=1,t[20]=e[3],t[21]=e[1],t[22]=e[5],t[23]=1,t[24]=e[3],t[25]=e[4],t[26]=e[5],t[27]=1,t[28]=e[0],t[29]=e[4],t[30]=e[5],t[31]=1,t},positions3ToAABB3:(t=new E(3),function(e,r,n){r=r||_.AABB3();for(var o,i,a,s=_.MAX_DOUBLE,u=_.MAX_DOUBLE,c=_.MAX_DOUBLE,l=-_.MAX_DOUBLE,h=-_.MAX_DOUBLE,f=-_.MAX_DOUBLE,d=0,p=e.length;dl&&(l=o),i>h&&(h=i),a>f&&(f=a);return r[0]=s,r[1]=u,r[2]=c,r[3]=l,r[4]=h,r[5]=f,r}),OBB3ToAABB3:function(e){for(var t,r,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.AABB3(),i=_.MAX_DOUBLE,a=_.MAX_DOUBLE,s=_.MAX_DOUBLE,u=-_.MAX_DOUBLE,c=-_.MAX_DOUBLE,l=-_.MAX_DOUBLE,h=0,f=e.length;hu&&(u=t),r>c&&(c=r),n>l&&(l=n);return o[0]=i,o[1]=a,o[2]=s,o[3]=u,o[4]=c,o[5]=l,o},points3ToAABB3:function(e){for(var t,r,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.AABB3(),i=_.MAX_DOUBLE,a=_.MAX_DOUBLE,s=_.MAX_DOUBLE,u=-_.MAX_DOUBLE,c=-_.MAX_DOUBLE,l=-_.MAX_DOUBLE,h=0,f=e.length;hu&&(u=t),r>c&&(c=r),n>l&&(l=n);return o[0]=i,o[1]=a,o[2]=s,o[3]=u,o[4]=c,o[5]=l,o},points3ToSphere3:function(){var e=new E(3);return function(t,r){r=r||_.vec4();var n,o=0,i=0,a=0,s=t.length;for(n=0;nc&&(c=u);return r[3]=c,r}}(),positions3ToSphere3:function(){var e=new E(3),t=new E(3);return function(r,n){n=n||_.vec4();var o,i=0,a=0,s=0,u=r.length,c=0;for(o=0;oc&&(c=l);return n[3]=c,n}}(),OBB3ToSphere3:function(){var e=new E(3),t=new E(3);return function(r,n){n=n||_.vec4();var o,i=0,a=0,s=0,u=r.length,c=u/4;for(o=0;oh&&(h=l);return n[3]=h,n}}(),getSphere3Center:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.vec3();return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},expandAABB3:function(e,t){return e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]>t[2]&&(e[2]=t[2]),e[3]t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]>t[2]&&(e[2]=t[2]),e[3]3&&void 0!==arguments[3]?arguments[3]:_.vec3(),o=t[0]-e[0],i=t[1]-e[1],a=t[2]-e[2],s=r[0]-e[0],u=r[1]-e[1],c=r[2]-e[2],l=i*c-a*u,h=a*s-o*c,f=o*u-i*s,d=Math.sqrt(l*l+h*h+f*f);return 0===d?(n[0]=0,n[1]=0,n[2]=0):(n[0]=l/d,n[1]=h/d,n[2]=f/d),n}};function D(e,t,r,n){var o=e[t]/(Math.abs(e[t])+Math.abs(e[t+1])+Math.abs(e[t+2])),i=e[t+1]/(Math.abs(e[t])+Math.abs(e[t+1])+Math.abs(e[t+2]));if(e[t+2]<0){var a=(1-Math.abs(i))*(o>=0?1:-1),s=(1-Math.abs(o))*(i>=0?1:-1);o=a,i=s}return new Int8Array([Math[r](127.5*o+(o<0?-1:0)),Math[n](127.5*i+(i<0?-1:0))])}function N(e){var t=e[0],r=e[1];t/=t<0?127:128,r/=r<0?127:128;var n=1-Math.abs(t)-Math.abs(r);n<0&&(t=(1-Math.abs(r))*(t>=0?1:-1),r=(1-Math.abs(t))*(r>=0?1:-1));var o=Math.sqrt(t*t+r*r+n*n);return[t/o,r/o,n/o]}function F(e,t,r){return e[t]*r[0]+e[t+1]*r[1]+e[t+2]*r[2]}var V,C,B,z,U,X,R,K,q,Z,Y,W,Q,J,H,$,ee,te={quantizePositions:function(e,t,r,n){for(var o=r[0],i=r[1],a=r[2],s=65535,u=s/(r[3]-o),c=s/(r[4]-i),l=s/(r[5]-a),h=function(e){return e>=0?e:0},f=0;fu&&(a=i,u=s),(s=F(h,0,N(i=D(h,0,"floor","ceil"))))>u&&(a=i,u=s),(s=F(h,0,N(i=D(h,0,"ceil","ceil"))))>u&&(a=i,u=s),n[o+c+0]=a[0],n[o+c+1]=a[1],n[o+c+2]=0;return o+r},octEncodeNormals:function(e,t,r,n){for(var o,i,a,s,u=0;us&&(i=o,s=a),(a=F(e,u,N(o=D(e,u,"floor","ceil"))))>s&&(i=o,s=a),(a=F(e,u,N(o=D(e,u,"ceil","ceil"))))>s&&(i=o,s=a),r[n+u+0]=i[0],r[n+u+1]=i[1],r[n+u+2]=0;return n+t}},re=(V=[],C=[],B=[],z=[],U=[],X=0,R=new Uint16Array(3),K=new Uint16Array(3),q=new Uint16Array(3),Z=_.vec3(),Y=_.vec3(),W=_.vec3(),Q=_.vec3(),J=_.vec3(),H=_.vec3(),$=_.vec3(),ee=_.vec3(),function(e,t,r,n){!function(e,t){var r,n,o,i,a,s,u={},c=Math.pow(10,4),l=0;for(a=0,s=e.length;am&&T>m)continue}d=B[c.index1],p=B[c.index2],(!g&&d>65535||p>65535)&&(g=!0),v.push(d),v.push(p)}return g?new Uint32Array(v):new Uint16Array(v)}),ne=function(e,t,r,n){function o(e,r){for(var n,o,i=0;i<3;i++)if((n=t[3*e+i])!==(o=t[3*r+i]))return o-n;return 0}for(var i=e.slice().sort(o),a=null,s=0,u=i.length;sf&&h>d?f>d?(p=h,v=f,m=d):(p=h,v=d,m=f):f>h&&f>d?h>d?(p=f,v=h,m=d):(p=f,v=d,m=h):d>h&&d>f&&(h>f?(p=d,v=h,m=f):(p=d,v=f,m=h)),n[c+0]=[p,v],n[c+1]=[v,m],p>m){var y=m;m=p,p=y}n[c+2]=[m,p]}function g(e,t){for(var r,n,o=0;o<2;o++)if(r=e[o],(n=t[o])!==r)return n-r;return 0}(n=n.slice(0,e.length)).sort(g);for(var x=0,b=0;b0&&2!==x)};function oe(e){return oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oe(e)}function ie(e,t){for(var r=0;r1}}])&&ce(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function he(e){return he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},he(e)}function fe(e,t){for(var r=0;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:A(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}function Re(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function Ke(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modelId=t.modelId||"default",this.projectId=t.projectId||"",this.revisionId=t.revisionId||"",this.author=t.author||"",this.createdAt=t.createdAt||"",this.creatingApplication=t.creatingApplication||"",this.schema=t.schema||"",this.xktVersion=f.xktVersion,this.edgeThreshold=t.edgeThreshold||10,this.minTileSize=t.minTileSize||500,this.propertySets={},this.propertySetsList=[],this.metaObjects={},this.metaObjectsList=[],this.reusedGeometriesDecodeMatrix=new Float32Array(16),this.geometries={},this.geometriesList=[],this.textures={},this.texturesList=[],this.textureSets={},this.textureSetsList=[],this.meshes={},this.meshesList=[],this.entities={},this.entitiesList=[],this.tilesList=[],this.aabb=_.AABB3(),this.finalized=!1}var t,r,n,o;return t=e,r=[{key:"createPropertySet",value:function(e){if(!e)throw"Parameters expected: params";if(null===e.propertySetId||void 0===e.propertySetId)throw"Parameter expected: params.propertySetId";if(null===e.properties||void 0===e.properties)throw"Parameter expected: params.properties";if(this.finalized)console.error("XKTModel has been finalized, can't add more property sets");else if(!this.propertySets[e.propertySetId]){var t=e.propertySetId,r=e.propertySetType||"Default",n=e.propertySetName||e.propertySetId,o=e.properties||[],i=new Ee(t,r,n,o);return this.propertySets[t]=i,this.propertySetsList.push(i),i}}},{key:"createMetaObject",value:function(e){if(!e)throw"Parameters expected: params";if(null===e.metaObjectId||void 0===e.metaObjectId)throw"Parameter expected: params.metaObjectId";if(this.finalized)console.error("XKTModel has been finalized, can't add more meta objects");else if(!this.metaObjects[e.metaObjectId]){var t=e.metaObjectId,r=e.propertySetIds,n=e.metaObjectType||"Default",o=e.metaObjectName||e.metaObjectId,i=e.parentMetaObjectId,a=new Ae(t,r,n,o,i);return this.metaObjects[t]=a,this.metaObjectsList.push(a),i||this._rootMetaObject||(this._rootMetaObject=a),a}}},{key:"createTexture",value:function(e){if(!e)throw"Parameters expected: params";if(null===e.textureId||void 0===e.textureId)throw"Parameter expected: params.textureId";if(!e.imageData&&!e.src)throw"Parameter expected: params.imageData or params.src";if(this.finalized)console.error("XKTModel has been finalized, can't add more textures");else{if(!this.textures[e.textureId]){if(e.src){var t=e.src.split(".").pop();if("jpg"!==t&&"jpeg"!==t&&"png"!==t)return void console.error("XKTModel does not support image files with extension '".concat(t,"' - won't create texture '").concat(e.textureId))}var r=e.textureId,n=new _e({textureId:r,imageData:e.imageData,mediaType:e.mediaType,minFilter:e.minFilter,magFilter:e.magFilter,wrapS:e.wrapS,wrapT:e.wrapT,wrapR:e.wrapR,width:e.width,height:e.height,compressed:!1!==e.compressed,src:e.src});return this.textures[r]=n,this.texturesList.push(n),n}console.error("XKTTexture already exists with this ID: "+e.textureId)}}},{key:"createTextureSet",value:function(e){if(!e)throw"Parameters expected: params";if(null===e.textureSetId||void 0===e.textureSetId)throw"Parameter expected: params.textureSetId";if(this.finalized)console.error("XKTModel has been finalized, can't add more textureSets");else{if(!this.textureSets[e.textureSetId]){var t,r,n,o,i;if(void 0!==e.colorTextureId&&null!==e.colorTextureId){if(!(t=this.textures[e.colorTextureId]))return void console.error("Texture not found: ".concat(e.colorTextureId," - ensure that you create it first with createTexture()"));t.channel=0}if(void 0!==e.metallicRoughnessTextureId&&null!==e.metallicRoughnessTextureId){if(!(r=this.textures[e.metallicRoughnessTextureId]))return void console.error("Texture not found: ".concat(e.metallicRoughnessTextureId," - ensure that you create it first with createTexture()"));r.channel=1}if(void 0!==e.normalsTextureId&&null!==e.normalsTextureId){if(!(n=this.textures[e.normalsTextureId]))return void console.error("Texture not found: ".concat(e.normalsTextureId," - ensure that you create it first with createTexture()"));n.channel=2}if(void 0!==e.emissiveTextureId&&null!==e.emissiveTextureId){if(!(o=this.textures[e.emissiveTextureId]))return void console.error("Texture not found: ".concat(e.emissiveTextureId," - ensure that you create it first with createTexture()"));o.channel=3}if(void 0!==e.occlusionTextureId&&null!==e.occlusionTextureId){if(!(i=this.textures[e.occlusionTextureId]))return void console.error("Texture not found: ".concat(e.occlusionTextureId," - ensure that you create it first with createTexture()"));i.channel=4}var a=new Ve({textureSetId:e.textureSetId,textureSetIndex:this.textureSetsList.length,colorTexture:t,metallicRoughnessTexture:r,normalsTexture:n,emissiveTexture:o,occlusionTexture:i});return this.textureSets[e.textureSetId]=a,this.textureSetsList.push(a),a}console.error("XKTTextureSet already exists with this ID: "+e.textureSetId)}}},{key:"createGeometry",value:function(e){if(!e)throw"Parameters expected: params";if(null===e.geometryId||void 0===e.geometryId)throw"Parameter expected: params.geometryId";if(!e.primitiveType)throw"Parameter expected: params.primitiveType";if(!e.positions)throw"Parameter expected: params.positions";var t="triangles"===e.primitiveType,r="points"===e.primitiveType,n="lines"===e.primitiveType,o="line-strip"===e.primitiveType;if(e.primitiveType,e.primitiveType,!(t||r||n||o))throw"Unsupported value for params.primitiveType: "+e.primitiveType+"' - supported values are 'triangles', 'points', 'lines', 'line-strip', 'triangle-strip' and 'triangle-fan";if(t&&!e.indices)throw"Parameter expected for 'triangles' primitive: params.indices";if(r&&!e.colors&&!e.colorsCompressed)throw"Parameter expected for 'points' primitive: params.colors or params.colorsCompressed";if(n&&!e.indices)throw"Parameter expected for 'lines' primitive: params.indices";if(this.finalized)console.error("XKTModel has been finalized, can't add more geometries");else{if(!this.geometries[e.geometryId]){var i=e.geometryId,a=e.primitiveType,s=new Float64Array(e.positions),u={geometryId:i,geometryIndex:this.geometriesList.length,primitiveType:a,positions:s,uvs:e.uvs||e.uv};if(t&&(e.normals&&(u.normals=new Float32Array(e.normals)),u.indices=e.indices),r)if(e.colorsCompressed)u.colorsCompressed=new Uint8Array(e.colorsCompressed);else{for(var c=e.colors,l=new Uint8Array(c.length),h=0,f=c.length;h1)te.octEncodeNormals(n.normals,n.normals.length,n.normalsOctEncoded,0);else{var o=_.inverseMat4(_.transposeMat4(r.matrix,Ye),We);te.transformAndOctEncodeNormals(o,n.normals,n.normals.length,n.normalsOctEncoded,0)}}}},{key:"_createEntityAABBs",value:function(){for(var e=0,t=this.entitiesList.length;e1)for(var l=u.positions,h=0,f=l.length;hQe[o]&&(o=1),Qe[2]>Qe[o]&&(o=2),!e.left){var i=r.slice();if(i[o+3]=(r[o]+r[o+3])/2,e.left=new Me(i),_.containsAABB3(i,n))return void this._insertEntityIntoKDTree(e.left,t)}if(!e.right){var a=r.slice();if(a[o]=(r[o]+r[o+3])/2,e.right=new Me(a),_.containsAABB3(a,n))return void this._insertEntityIntoKDTree(e.right,t)}e.entities=e.entities||[],e.entities.push(t),_.expandAABB3(r,n)}}},{key:"_createTilesFromKDTree",value:function(e){this._createTilesFromKDNode(e)}},{key:"_createTilesFromKDNode",value:function(e){e.entities&&e.entities.length>0&&this._createTileFromEntities(e.entities),e.left&&this._createTilesFromKDNode(e.left),e.right&&this._createTilesFromKDNode(e.right)}},{key:"_createTileFromEntities",value:function(e){var t=_.AABB3();_.collapseAABB3(t);for(var r=0;r0){te.createPositionsDecodeMatrix(t,this.reusedGeometriesDecodeMatrix);for(var c=0,l=this.geometriesList.length;ce&&(e=o.positionsQuantized.length),o.indices.length>t&&(t=o.indices.length))}for(var i=new Array(e/3),a=new Array(t),s=0,u=this.geometriesList.length;s1&&(S+=16);var G={metadata:{},textureData:new Uint8Array(A),eachTextureDataPortion:new Uint32Array(p),eachTextureAttributes:new Uint16Array(p*tt),positions:new Uint16Array(x),normals:new Int8Array(b),colors:new Uint8Array(w),uvs:new Float32Array(M),indices:new Uint32Array(T),edgeIndices:new Uint32Array(I),eachTextureSetTextures:new Int32Array(5*v),matrices:new Float32Array(S),reusedGeometriesDecodeMatrix:new Float32Array(e.reusedGeometriesDecodeMatrix),eachGeometryPrimitiveType:new Uint8Array(d),eachGeometryPositionsPortion:new Uint32Array(d),eachGeometryNormalsPortion:new Uint32Array(d),eachGeometryColorsPortion:new Uint32Array(d),eachGeometryUVsPortion:new Uint32Array(d),eachGeometryIndicesPortion:new Uint32Array(d),eachGeometryEdgeIndicesPortion:new Uint32Array(d),eachMeshGeometriesPortion:new Uint32Array(m),eachMeshMatricesPortion:new Uint32Array(m),eachMeshTextureSet:new Int32Array(m),eachMeshMaterialAttributes:new Uint8Array(m*rt),eachEntityId:[],eachEntityMeshesPortion:new Uint32Array(y),eachTileAABB:new Float64Array(6*g),eachTileEntitiesPortion:new Uint32Array(g)},k=0,_=0,D=0,N=0,F=0,V=0;G.metadata={id:e.modelId,projectId:e.projectId,revisionId:e.revisionId,author:e.author,createdAt:e.createdAt,creatingApplication:e.creatingApplication,schema:e.schema,propertySets:[],metaObjects:[]};for(var C=0;C0&&(R.propertySetIds=X.propertySetIds),X.external&&(R.external=X.external),G.metadata.metaObjects.push(R)}for(var K=0;K1&&(G.matrices.set(xe.matrix,se),G.eachMeshMatricesPortion[ue]=se,se+=16),G.eachMeshTextureSet[ue]=xe.textureSet?xe.textureSet.textureSetIndex:-1,G.eachMeshMaterialAttributes[ae++]=255*xe.color[0],G.eachMeshMaterialAttributes[ae++]=255*xe.color[1],G.eachMeshMaterialAttributes[ae++]=255*xe.color[2],G.eachMeshMaterialAttributes[ae++]=255*xe.opacity,G.eachMeshMaterialAttributes[ae++]=255*xe.metallic,G.eachMeshMaterialAttributes[ae++]=255*xe.roughness,ue++}G.eachEntityId[oe]=ve.entityId,G.eachEntityMeshesPortion[oe]=ie,oe++,ie+=ye}var we=6*ce;G.eachTileAABB.set(de,we)}}return G}(e,t,r),i=function(e,t,r){function n(e){return!1!==r.zip?$e.deflate(e):e}return{metadata:n(ot(t||e.metadata)),textureData:n(e.textureData.buffer),eachTextureDataPortion:n(e.eachTextureDataPortion.buffer),eachTextureAttributes:n(e.eachTextureAttributes.buffer),positions:n(e.positions.buffer),normals:n(e.normals.buffer),colors:n(e.colors.buffer),uvs:n(e.uvs.buffer),indices:n(e.indices.buffer),edgeIndices:n(e.edgeIndices.buffer),eachTextureSetTextures:n(e.eachTextureSetTextures.buffer),matrices:n(e.matrices.buffer),reusedGeometriesDecodeMatrix:n(e.reusedGeometriesDecodeMatrix.buffer),eachGeometryPrimitiveType:n(e.eachGeometryPrimitiveType.buffer),eachGeometryPositionsPortion:n(e.eachGeometryPositionsPortion.buffer),eachGeometryNormalsPortion:n(e.eachGeometryNormalsPortion.buffer),eachGeometryColorsPortion:n(e.eachGeometryColorsPortion.buffer),eachGeometryUVsPortion:n(e.eachGeometryUVsPortion.buffer),eachGeometryIndicesPortion:n(e.eachGeometryIndicesPortion.buffer),eachGeometryEdgeIndicesPortion:n(e.eachGeometryEdgeIndicesPortion.buffer),eachMeshGeometriesPortion:n(e.eachMeshGeometriesPortion.buffer),eachMeshMatricesPortion:n(e.eachMeshMatricesPortion.buffer),eachMeshTextureSet:n(e.eachMeshTextureSet.buffer),eachMeshMaterialAttributes:n(e.eachMeshMaterialAttributes.buffer),eachEntityId:n(JSON.stringify(e.eachEntityId).replace(/[\u007F-\uFFFF]/g,(function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).substr(-4)}))),eachEntityMeshesPortion:n(e.eachEntityMeshesPortion.buffer),eachTileAABB:n(e.eachTileAABB.buffer),eachTileEntitiesPortion:n(e.eachTileEntitiesPortion.buffer)}}(o,t,n);r.texturesSize+=i.textureData.byteLength;var a=function(e){return function(e){var t=new Uint32Array(e.length+2);t[0]=et,t[1]=e.length;for(var r=0,n=0,o=e.length;n80*r){n=i=e[0],o=a=e[1];for(var p=r;pi&&(i=s),u>a&&(a=u);c=0!==(c=Math.max(i-n,a-o))?1/c:0}return ut(f,d,r,n,o,c),d}function at(e,t,r,n,o){var i,a;if(o===Et(e,t,r,n)>0)for(i=t;i=t;i-=n)a=Ot(i,e[i],e[i+1],a);return a&&wt(a,a.next)&&(Lt(a),a=a.next),a}function st(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!wt(n,n.next)&&0!==bt(n.prev,n,n.next))n=n.next;else{if(Lt(n),(n=t=n.prev)===n.next)break;r=!0}}while(r||n!==t);return t}function ut(e,t,r,n,o,i,a){if(e){!a&&i&&function(e,t,r,n){var o=e;do{null===o.z&&(o.z=mt(o.x,o.y,t,r,n)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,r,n,o,i,a,s,u,c=1;do{for(r=e,e=null,i=null,a=0;r;){for(a++,n=r,s=0,t=0;t0||u>0&&n;)0!==s&&(0===u||!n||r.z<=n.z)?(o=r,r=r.nextZ,s--):(o=n,n=n.nextZ,u--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;r=n}i.nextZ=null,c*=2}while(a>1)}(o)}(e,n,o,i);for(var s,u,c=e;e.prev!==e.next;)if(s=e.prev,u=e.next,i?lt(e,n,o,i):ct(e))t.push(s.i/r),t.push(e.i/r),t.push(u.i/r),Lt(e),e=u.next,c=u.next;else if((e=u)===c){a?1===a?ut(e=ht(st(e),t,r),t,r,n,o,i,2):2===a&&ft(e,t,r,n,o,i):ut(st(e),t,r,n,o,i,1);break}}}function ct(e){var t=e.prev,r=e,n=e.next;if(bt(t,r,n)>=0)return!1;for(var o=e.next.next;o!==e.prev;){if(gt(t.x,t.y,r.x,r.y,n.x,n.y,o.x,o.y)&&bt(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function lt(e,t,r,n){var o=e.prev,i=e,a=e.next;if(bt(o,i,a)>=0)return!1;for(var s=o.xi.x?o.x>a.x?o.x:a.x:i.x>a.x?i.x:a.x,l=o.y>i.y?o.y>a.y?o.y:a.y:i.y>a.y?i.y:a.y,h=mt(s,u,t,r,n),f=mt(c,l,t,r,n),d=e.prevZ,p=e.nextZ;d&&d.z>=h&&p&&p.z<=f;){if(d!==e.prev&&d!==e.next&>(o.x,o.y,i.x,i.y,a.x,a.y,d.x,d.y)&&bt(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,p!==e.prev&&p!==e.next&>(o.x,o.y,i.x,i.y,a.x,a.y,p.x,p.y)&&bt(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;d&&d.z>=h;){if(d!==e.prev&&d!==e.next&>(o.x,o.y,i.x,i.y,a.x,a.y,d.x,d.y)&&bt(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;p&&p.z<=f;){if(p!==e.prev&&p!==e.next&>(o.x,o.y,i.x,i.y,a.x,a.y,p.x,p.y)&&bt(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function ht(e,t,r){var n=e;do{var o=n.prev,i=n.next.next;!wt(o,i)&&Mt(o,n,n.next,i)&&St(o,i)&&St(i,o)&&(t.push(o.i/r),t.push(n.i/r),t.push(i.i/r),Lt(n),Lt(n.next),n=e=i),n=n.next}while(n!==e);return st(n)}function ft(e,t,r,n,o,i){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&xt(a,s)){var u=At(a,s);return a=st(a,a.next),u=st(u,u.next),ut(a,t,r,n,o,i),void ut(u,t,r,n,o,i)}s=s.next}a=a.next}while(a!==e)}function dt(e,t){return e.x-t.x}function pt(e,t){if(t=function(e,t){var r,n=t,o=e.x,i=e.y,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=o&&s>a){if(a=s,s===o){if(i===n.y)return n;if(i===n.next.y)return n.next}r=n.x=n.x&&n.x>=l&&o!==n.x&>(ir.x||n.x===r.x&&vt(r,n)))&&(r=n,f=u)),n=n.next}while(n!==c);return r}(e,t),t){var r=At(t,e);st(t,t.next),st(r,r.next)}}function vt(e,t){return bt(e.prev,e,t.prev)<0&&bt(t.next,e,e.next)<0}function mt(e,t,r,n,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*o)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*o)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function yt(e){var t=e,r=e;do{(t.x=0&&(e-a)*(n-s)-(r-a)*(t-s)>=0&&(r-a)*(i-s)-(o-a)*(n-s)>=0}function xt(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&Mt(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(St(e,t)&&St(t,e)&&function(e,t){var r=e,n=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{r.y>i!=r.next.y>i&&r.next.y!==r.y&&o<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(bt(e.prev,e,t.prev)||bt(e,t.prev,t))||wt(e,t)&&bt(e.prev,e,e.next)>0&&bt(t.prev,t,t.next)>0)}function bt(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function wt(e,t){return e.x===t.x&&e.y===t.y}function Mt(e,t,r,n){var o=It(bt(e,t,r)),i=It(bt(e,t,n)),a=It(bt(r,n,e)),s=It(bt(r,n,t));return o!==i&&a!==s||!(0!==o||!Tt(e,r,t))||!(0!==i||!Tt(e,n,t))||!(0!==a||!Tt(r,e,n))||!(0!==s||!Tt(r,t,n))}function Tt(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function It(e){return e>0?1:e<0?-1:0}function St(e,t){return bt(e.prev,e,e.next)<0?bt(e,t,e.next)>=0&&bt(e,e.prev,t)>=0:bt(e,t,e.prev)<0||bt(e,e.next,t)<0}function At(e,t){var r=new Pt(e.i,e.x,e.y),n=new Pt(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,r.next=o,o.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function Ot(e,t,r,n){var o=new Pt(e,t,r);return n?(o.next=n.next,o.prev=n,n.next.prev=o,n.next=o):(o.prev=o,o.next=o),o}function Lt(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Pt(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Et(e,t,r,n){for(var o=0,i=t,a=r-n;ie.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(n+=e[o-1].length,r.holes.push(n))}return r};var kt=_.vec2(),_t=_.vec3(),Dt=_.vec3(),Nt=_.vec3();function Ft(e){var t=e.data,r=e.xktModel,n=e.center,o=void 0!==n&&n,i=e.transform,a=void 0===i?null:i,s=e.stats,u=void 0===s?{}:s,c=e.log;return new Promise((function(e,n){if(t)if("CityJSON"===t.type)if(r){var i;c("Using parser: parseCityJSONIntoXKTModel"),c("center: ".concat(o)),a&&c("transform: [".concat(a,"]")),t.transform||o||a?(i=function(e){for(var t=[],r=0,n=0;r0){for(var c=[],l=0,h=t.geometry.length;l0){var x=y[g[0]];if(void 0!==x.value)d=m[x.value];else{var b=x.values;if(b){p=[];for(var w=0,M=b.length;w0&&(n.createEntity({entityId:r,meshIds:c}),e.stats.numObjects++)}}function Bt(e,t,r,n){switch(t.type){case"MultiPoint":case"MultiLineString":case"GeometryInstance":break;case"MultiSurface":case"CompositeSurface":zt(e,r,t.boundaries,n);break;case"Solid":for(var o=t.boundaries,i=0;i0&&l.push(c.length);var p=Rt(e,s[d],h,f);c.push.apply(c,jt(p))}if(3===c.length)f.indices.push(c[0]),f.indices.push(c[1]),f.indices.push(c[2]);else if(c.length>3){for(var v=[],m=0;m0&&s.push(a.length);var c=Rt(e,t[i][u],r,n);a.push.apply(a,jt(c))}if(3===a.length)n.indices.push(a[0]),n.indices.push(a[1]),n.indices.push(a[2]);else if(a.length>3){for(var l=[],h=0;h0)for(var u=0;u0){null==g&&e.log("Warning: 'name' properties not found on glTF scene nodes - will randomly-generate object IDs in XKT");var x=g;for(x&&i.entities[x]&&e.log("Warning: Two or more glTF nodes found with same 'name' attribute: '".concat(g," - will randomly-generating an object ID in XKT"));!x||i.entities[x];)x="entity-"+e.nextId++;if(e.metaModelCorrections){var b=e.metaModelCorrections.eachChildRoot[x];if(b){var w=e.metaModelCorrections.eachRootStats[b.id];w.countChildren++,w.countChildren>=w.numChildren&&(i.createEntity({entityId:b.id,meshIds:tr}),e.stats.numObjects++,tr.length=0)}else e.metaModelCorrections.metaObjectsMap[x]&&(i.createEntity({entityId:x,meshIds:tr}),e.stats.numObjects++,tr.length=0)}else i.createEntity({entityId:x,meshIds:tr}),e.stats.numObjects++,tr.length=0}}var nr="undefined"!=typeof atob?atob:function(e){return Buffer.from(e,"base64").toString("binary")},or={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},ir={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16};function ar(e){var t=e.data,r=e.xktModel,n=e.metaModelData,o=e.includeNormals,i=e.reuseGeometries,a=e.getAttachment,s=e.stats,u=void 0===s?{}:s,c=e.log;return c&&c("Using parser: parseGLTFJSONIntoXKTModel"),new Promise((function(e,s){if(t)if(r){u.sourceFormat="glTF",u.schemaVersion="2.0",u.title="",u.author="",u.created="",u.numTriangles=0,u.numVertices=0,u.numNormals=0,u.numObjects=0,u.numGeometries=0;var l={gltf:t,metaModelCorrections:n?sr(n):null,getAttachment:a||function(){throw new Error("You must define getAttachment() method to convert glTF with external resources")},log:c||function(e){},xktModel:r,includeNormals:o,createXKTGeometryIds:{},nextMeshId:0,reuseGeometries:!1!==i,stats:u};l.log("Parsing normals: ".concat(l.includeNormals?"enabled":"disabled")),function(e){var t=e.gltf.buffers;return t?Promise.all(t.map((function(t){return function(e,t){return new Promise((function(r,n){if(t._arrayBuffer)return t._buffer=t._arrayBuffer,void r(t);var o=t.uri;o?function(e,t){return new Promise((function(r,n){var o=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(o){var i=!!o[2],a=o[3];a=decodeURIComponent(a),i&&(a=nr(a));for(var s=new ArrayBuffer(a.length),u=new Uint8Array(s),c=0;c0)for(var l=0;l0){null==j&&e.log("[parseGLTFJSONIntoXKTModel] Warning: 'name' properties not found on glTF scene nodes - will randomly-generate object IDs in XKT");var G=j;if(null==G)for(a.entities[G]&&e.error("Two or more glTF nodes found with same 'name' attribute: '"+j+"'");!G||a.entities[G];)G="entity-"+e.nextId++;if(e.metaModelCorrections){var k=e.metaModelCorrections.eachChildRoot[G];if(k){var D=e.metaModelCorrections.eachRootStats[k.id];D.countChildren++,D.countChildren>=D.numChildren&&(a.createEntity({entityId:k.id,meshIds:lr}),e.stats.numObjects++,lr=[])}else e.metaModelCorrections.metaObjectsMap[G]&&(a.createEntity({entityId:G,meshIds:lr}),e.stats.numObjects++,lr=[])}else a.createEntity({entityId:G,meshIds:lr}),e.stats.numObjects++,lr=[]}}function fr(e){if(!e.attributes)return"empty";var t=e.mode,r=(e.material,e.indices),n=e.attributes.POSITION,o=e.attributes.NORMAL,i=e.attributes.COLOR_0,a=e.attributes.TEXCOORD_0;return[t,null!=r?r:"-",null!=n?n:"-",null!=o?o:"-",null!=i?i:"-",null!=a?a:"-"].join(";")}function dr(e,t,r){var n=t.attributes;if(n){switch(t.mode){case 0:r.primitive="points";break;case 1:case 2:case 3:r.primitive="lines";break;case 4:default:r.primitive="triangles";break;case 5:console.log("TRIANGLE_STRIP"),r.primitive="triangles";break;case 6:console.log("TRIANGLE_FAN"),r.primitive="triangles"}var o=e.gltf.accessors,i=t.indices;if(null!=i){var a=o[i];r.indices=pr(e,a)}var s=n.POSITION;if(null!=s){var u=o[s];r.positions=pr(e,u)}var c=n.NORMAL;if(null!=c){var l=o[c];r.normals=pr(e,l)}var h=n.COLOR_0;if(null!=h){var f=o[h];r.colors=pr(e,f)}}}function pr(e,t){var r=e.gltf.bufferViews[t.bufferView],n=ir[t.type],o=or[t.componentType],i=o.BYTES_PER_ELEMENT*n;if(t.byteStride&&t.byteStride!==i)throw new Error("interleaved buffer!");return new o(r._buffer,t.byteOffset||0,t.count*n)}function vr(e){var t=e.WebIFC,r=e.data,n=e.xktModel,o=e.autoNormals,i=void 0===o||o,a=e.includeTypes,s=e.excludeTypes,u=e.wasmPath,c=e.stats,l=void 0===c?{}:c,h=e.log;return h&&h("Using parser: parseIFCIntoXKTModel"),new Promise((function(e,o){if(r)if(n)if(u){var c=new t.IfcAPI;u&&c.SetWasmPath(u),c.Init().then((function(){var o=new Uint8Array(r),u=c.OpenModel(o);l.sourceFormat="IFC",l.schemaVersion="",l.title="",l.author="",l.created="",l.numMetaObjects=0,l.numPropertySets=0,l.numObjects=0,l.numGeometries=0,l.numTriangles=0,l.numVertices=0;var f={WebIFC:t,modelID:u,ifcAPI:c,xktModel:n,autoNormals:i,log:h||function(e){},nextId:0,stats:l};if(a){f.includeTypes={};for(var d=0,p=a.length;d0){for(var d=i.Name.value,p=[],v=0,m=f.length;v0&&(e.xktModel.createEntity({entityId:i,meshIds:o}),e.stats.numObjects++)}else console.log("excluding: "+a)}const xr=require("@loaders.gl/las");var br=5e5;function wr(e){var t=e.data,r=e.xktModel,n=e.center,o=void 0!==n&&n,i=e.transform,a=void 0===i?null:i,s=e.colorDepth,u=void 0===s?"auto":s,c=e.fp64,l=void 0!==c&&c,h=e.skip,f=void 0===h?1:h,d=e.stats,p=e.log,v=void 0===p?function(){}:p;return v&&v("Using parser: parseLASIntoXKTModel"),new Promise((function(e,n){t?r?(v("Converting LAZ/LAS"),v("center: ".concat(o)),a&&v("transform: [".concat(a,"]")),v("colorDepth: ".concat(u)),v("fp64: ".concat(l)),v("skip: ".concat(f)),(0,Ce.parse)(t,xr.LASLoader,{las:{colorDepth:u,fp64:l}}).then((function(t){var n=t.attributes,i=t.loaderData,s=void 0!==i.pointsFormatId?i.pointsFormatId:-1;if(n.POSITION){var u={};switch(s){case 0:if(!n.intensity)return void v("No intensities found in file (expected for LAS point format 0)");u=y(n.POSITION,n.intensity);break;case 1:if(!n.intensity)return void v("No intensities found in file (expected for LAS point format 1)");u=y(n.POSITION,n.intensity);break;case 2:if(!n.intensity)return void v("No intensities found in file (expected for LAS point format 2)");u=m(n.POSITION,n.COLOR_0,n.intensity);break;case 3:if(!n.intensity)return void v("No intensities found in file (expected for LAS point format 3)");u=m(n.POSITION,n.COLOR_0,n.intensity)}for(var c=g(function(e){if(e){if(o){for(var t=_.vec3(),r=e.length,n=0,i=e.length;n=e.length)return[e];for(var r=[],n=0;n0?L:null}),M++}}i&&i("Converted meta objects: "+M),e()}))}function Tr(e){var t=e.data,r=e.xktModel,n=e.littleEndian,o=void 0===n||n,i=e.stats,a=e.log;return a&&a("Using parser: parsePCDIntoXKTModel"),new Promise((function(e,n){var s=function(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);for(var t="",r=0,n=e.length;r>16&255,g=m>>8&255,x=m>>0&255;l.push(y,g,x,255)}else l.push(255),l.push(255),l.push(255)}if("binary_compressed"===u.data)for(var b=new Uint32Array(t.slice(u.headerLen,u.headerLen+8)),w=b[0],M=b[1],T=function(e,t){var r,n,o,i=e.length,a=new Uint8Array(t),s=0,u=0;do{if((r=e[s++])<32){if(u+ ++r>t)throw new Error("Output buffer is not large enough");if(s+r>i)throw new Error("Invalid compressed data");do{a[u++]=e[s++]}while(--r)}else{if(n=r>>5,o=u-((31&r)<<8)-1,s>=i)throw new Error("Invalid compressed data");if(7===n&&(n+=e[s++],s>=i))throw new Error("Invalid compressed data");if(o-=e[s++],u+n+2>t)throw new Error("Output buffer is not large enough");if(o<0)throw new Error("Invalid compressed data");if(o>=u)throw new Error("Invalid compressed data");do{a[u++]=a[o++]}while(2+--n)}}while(s0?l:null}),r.createMesh({meshId:"pointsMesh",geometryId:"pointsGeometry"}),r.createEntity({entityId:"geometries",meshIds:["pointsMesh"]}),a&&(a("Converted drawable objects: 1"),a("Converted geometries: 1"),a("Converted vertices: "+c.length/3)),i&&(i.sourceFormat="PCD",i.schemaVersion="",i.title="",i.author="",i.created="",i.numObjects=1,i.numGeometries=1,i.numVertices=c.length/3),e()}))}const Ir=require("@loaders.gl/ply");function Sr(e){return Sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sr(e)}function Ar(){Ar=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function c(e,t,r,o){var i=t&&t.prototype instanceof f?t:f,a=Object.create(i.prototype),s=new S(o||[]);return n(a,"_invoke",{value:w(e,r,s)}),a}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var h={};function f(){}function d(){}function p(){}var v={};u(v,i,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(A([])));y&&y!==t&&r.call(y,i)&&(v=y);var g=p.prototype=f.prototype=Object.create(v);function x(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function o(n,i,a,s){var u=l(e[n],e,i);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==Sr(h)&&r.call(h,"__await")?t.resolve(h.__await).then((function(e){o("next",e,a,s)}),(function(e){o("throw",e,a,s)})):t.resolve(h).then((function(e){c.value=e,a(c)}),(function(e){return o("throw",e,a,s)}))}s(u.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function w(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=M(a,r);if(s){if(s===h)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function M(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,M(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=l(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function A(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:A(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}function Or(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function Lr(e){return Pr.apply(this,arguments)}function Pr(){var e;return e=Ar().mark((function e(t){var r,n,o,i,a,s,u,c,l,h,f;return Ar().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.data,n=t.xktModel,o=t.stats,(i=t.log)&&i("Using parser: parsePLYIntoXKTModel"),r){e.next=4;break}throw"Argument expected: data";case 4:if(n){e.next=6;break}throw"Argument expected: xktModel";case 6:return e.prev=6,e.next=9,(0,Ce.parse)(r,Ir.PLYLoader);case 9:a=e.sent,e.next=16;break;case 12:return e.prev=12,e.t0=e.catch(6),i&&i("Error: "+e.t0),e.abrupt("return");case 16:if(s=a.attributes,u=!!s.COLOR_0){for(c=u?s.COLOR_0.value:null,l=[],h=0,f=c.length;h=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:A(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}function Gr(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function kr(e){return _r.apply(this,arguments)}function _r(){var e;return e=jr().mark((function e(t){var r,n,o,i,a,s,u,c;return jr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.data,n=t.splitMeshes,o=t.autoNormals,i=t.smoothNormals,a=t.smoothNormalsAngleThreshold,s=t.xktModel,u=t.stats,(c=t.log)&&c("Using parser: parseSTLIntoXKTModel"),e.abrupt("return",new Promise((function(e,t){if(r)if(s){var l=_.createUUID(),h=s.createMetaObject({metaObjectId:l,metaObjectType:"Model",metaObjectName:"Model"}),f={data:r,splitMeshes:n,autoNormals:o,smoothNormals:i,smoothNormalsAngleThreshold:a,xktModel:s,rootMetaObject:h,nextId:0,log:c||function(e){},stats:{numObjects:0,numGeometries:0,numTriangles:0,numVertices:0}},d=Br(r);Dr(d)?Nr(f,d):Fr(f,"string"!=typeof(p=r)?function(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);for(var t="",r=0,n=e.length;r>5&31)/31,o=(S>>10&31)/31):(r=a,n=s,o=u),(x&&r!==f||n!==d||o!==p)&&(null!==f&&(v=!0),f=r,d=n,p=o)}for(var A=1;A<=3;A++){var O=w+12*A;y.push(c.getFloat32(O,!0)),y.push(c.getFloat32(O+4,!0)),y.push(c.getFloat32(O+8,!0)),e.autoNormals||g.push(M,T,I),h&&i.push(r,n,o,1)}x&&v&&(Cr(e,y,g,i),y=[],g=[],i=i?[]:null,v=!1)}y.length>0&&Cr(e,y,g,i)}function Fr(e,t){for(var r,n,o,i,a,s,u,c=/facet([\s\S]*?)endfacet/g,l=0,h=/[\s]+([+-]?(?:\d+.\d+|\d+.|\d+|.\d+)(?:[eE][+-]?\d+)?)/.source,f=new RegExp("vertex"+h+h+h,"g"),d=new RegExp("normal"+h+h+h,"g"),p=[],v=[];null!==(i=c.exec(t));){for(a=0,s=0,u=i[0];null!==(i=d.exec(u));)r=parseFloat(i[1]),n=parseFloat(i[2]),o=parseFloat(i[3]),s++;for(;null!==(i=f.exec(u));)p.push(parseFloat(i[1]),parseFloat(i[2]),parseFloat(i[3])),v.push(r,n,o),a++;if(1!==s)return e.log("Error in normal of face "+l),-1;if(3!==a)return e.log("Error in positions of face "+l),-1;l++}Cr(e,p,v,null)}var Vr=0;function Cr(e,t,r,n){for(var o=new Int32Array(t.length/3),i=0,a=o.length;i0?r:null,n=n&&n.length>0?n:null,!e.autoNormals&&e.smoothNormals&&function(e,t){var r,n,o,i,a,s,u,c,l,h,f,d=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).smoothNormalsAngleThreshold||20,p={},v=[],m={},y=Math.pow(10,4);for(u=0,l=e.length;u0&&void 0!==arguments[0]?arguments[0]:{},t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);var r=e.ySize||1;r<0&&(console.error("negative ySize not allowed - will invert"),r*=-1);var n=e.zSize||1;n<0&&(console.error("negative zSize not allowed - will invert"),n*=-1);var o=e.center,i=o?o[0]:0,a=o?o[1]:0,s=o?o[2]:0,u=-t+i,c=-r+a,l=-n+s,h=t+i,f=r+a,d=n+s;return{primitiveType:"triangles",positions:[h,f,d,u,f,d,u,c,d,h,c,d,h,f,d,h,c,d,h,c,l,h,f,l,h,f,d,h,f,l,u,f,l,u,f,d,u,f,d,u,f,l,u,c,l,u,c,d,u,c,l,h,c,l,h,c,d,u,c,d,h,c,l,u,c,l,u,f,l,h,f,l],normals:[0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1],uv:[1,0,0,0,0,1,1,1,0,0,0,1,1,1,1,0,1,1,1,0,0,0,0,1,1,0,0,0,0,1,1,1,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}}function Ur(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);var r=e.ySize||1;r<0&&(console.error("negative ySize not allowed - will invert"),r*=-1);var n=e.zSize||1;n<0&&(console.error("negative zSize not allowed - will invert"),n*=-1);var o=e.center,i=o?o[0]:0,a=o?o[1]:0,s=o?o[2]:0,u=-t+i,c=-r+a,l=-n+s,h=t+i,f=r+a,d=n+s;return{primitiveType:"lines",positions:[u,c,l,u,c,d,u,f,l,u,f,d,h,c,l,h,c,d,h,f,l,h,f,d],indices:[0,1,1,3,3,2,2,0,4,5,5,7,7,6,6,4,0,4,1,5,2,6,3,7]}}function Xr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.radiusTop||1;t<0&&(console.error("negative radiusTop not allowed - will invert"),t*=-1);var r=e.radiusBottom||1;r<0&&(console.error("negative radiusBottom not allowed - will invert"),r*=-1);var n=e.height||1;n<0&&(console.error("negative height not allowed - will invert"),n*=-1);var o=e.radialSegments||32;o<0&&(console.error("negative radialSegments not allowed - will invert"),o*=-1),o<3&&(o=3);var i=e.heightSegments||1;i<0&&(console.error("negative heightSegments not allowed - will invert"),i*=-1),i<1&&(i=1);var a,s,u,c,l,h,f,d,p,v,m,y=!!e.openEnded,g=e.center,x=g?g[0]:0,b=g?g[1]:0,w=g?g[2]:0,M=n/2,T=n/i,I=2*Math.PI/o,S=1/o,A=(t-r)/i,O=[],L=[],P=[],E=[],j=(90-180*Math.atan(n/(r-t))/Math.PI)/90;for(a=0;a<=i;a++)for(l=t-a*A,h=M-a*T,s=0;s<=o;s++)u=Math.sin(s*I),c=Math.cos(s*I),L.push(l*u),L.push(j),L.push(l*c),P.push(s*S),P.push(1*a/i),O.push(l*u+x),O.push(h+b),O.push(l*c+w);for(a=0;a0){for(p=O.length/3,L.push(0),L.push(1),L.push(0),P.push(.5),P.push(.5),O.push(0+x),O.push(M+b),O.push(0+w),s=0;s<=o;s++)u=Math.sin(s*I),c=Math.cos(s*I),v=.5*Math.sin(s*I)+.5,m=.5*Math.cos(s*I)+.5,L.push(t*u),L.push(1),L.push(t*c),P.push(v),P.push(m),O.push(t*u+x),O.push(M+b),O.push(t*c+w);for(s=0;s0){for(p=O.length/3,L.push(0),L.push(-1),L.push(0),P.push(.5),P.push(.5),O.push(0+x),O.push(0-M+b),O.push(0+w),s=0;s<=o;s++)u=Math.sin(s*I),c=Math.cos(s*I),v=.5*Math.sin(s*I)+.5,m=.5*Math.cos(s*I)+.5,L.push(r*u),L.push(-1),L.push(r*c),P.push(v),P.push(m),O.push(r*u+x),O.push(0-M+b),O.push(r*c+w);for(s=0;s0&&void 0!==arguments[0]?arguments[0]:{},t=e.size||1;t<0&&(console.error("negative size not allowed - will invert"),t*=-1);var r=e.divisions||1;r<0&&(console.error("negative divisions not allowed - will invert"),r*=-1),r<1&&(r=1);for(var n=(t=t||10)/(r=r||10),o=t/2,i=[],a=[],s=0,u=0,c=-o;u<=r;u++,c+=n)i.push(-o),i.push(0),i.push(c),i.push(o),i.push(0),i.push(c),i.push(c),i.push(0),i.push(-o),i.push(c),i.push(0),i.push(o),a.push(s++),a.push(s++),a.push(s++),a.push(s++);return{primitiveType:"lines",positions:i,indices:a}}function Kr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);var r=e.zSize||1;r<0&&(console.error("negative zSize not allowed - will invert"),r*=-1);var n=e.xSegments||1;n<0&&(console.error("negative xSegments not allowed - will invert"),n*=-1),n<1&&(n=1);var o=e.xSegments||1;o<0&&(console.error("negative zSegments not allowed - will invert"),o*=-1),o<1&&(o=1);var i,a,s,u,c,l,h,f=e.center,d=f?f[0]:0,p=f?f[1]:0,v=f?f[2]:0,m=t/2,y=r/2,g=Math.floor(n)||1,x=Math.floor(o)||1,b=g+1,w=x+1,M=t/g,T=r/x,I=new Float32Array(b*w*3),S=new Float32Array(b*w*3),A=new Float32Array(b*w*2),O=0,L=0;for(i=0;i65535?Uint32Array:Uint16Array)(g*x*6);for(i=0;i0&&void 0!==arguments[0]?arguments[0]:{},t=e.lod||1,r=e.center?e.center[0]:0,n=e.center?e.center[1]:0,o=e.center?e.center[2]:0,i=e.radius||1;i<0&&(console.error("negative radius not allowed - will invert"),i*=-1);var a=e.heightSegments||18;a<0&&(console.error("negative heightSegments not allowed - will invert"),a*=-1),(a=Math.floor(t*a))<18&&(a=18);var s=e.widthSegments||18;s<0&&(console.error("negative widthSegments not allowed - will invert"),s*=-1),(s=Math.floor(t*s))<18&&(s=18);var u,c,l,h,f,d,p,v,m,y,g,x,b,w,M=[],T=[],I=[],S=[];for(u=0;u<=a;u++)for(l=u*Math.PI/a,h=Math.sin(l),f=Math.cos(l),c=0;c<=s;c++)d=2*c*Math.PI/s,p=Math.sin(d),v=Math.cos(d)*h,m=f,y=p*h,g=1-c/s,x=u/a,T.push(v),T.push(m),T.push(y),I.push(g),I.push(x),M.push(r+i*v),M.push(n+i*m),M.push(o+i*y);for(u=0;u0&&void 0!==arguments[0]?arguments[0]:{},t=e.radius||1;t<0&&(console.error("negative radius not allowed - will invert"),t*=-1),t*=.5;var r=e.tube||.3;r<0&&(console.error("negative tube not allowed - will invert"),r*=-1);var n=e.radialSegments||32;n<0&&(console.error("negative radialSegments not allowed - will invert"),n*=-1),n<4&&(n=4);var o=e.tubeSegments||24;o<0&&(console.error("negative tubeSegments not allowed - will invert"),o*=-1),o<4&&(o=4);var i=e.arc||2*Math.PI;i<0&&(console.warn("negative arc not allowed - will invert"),i*=-1),i>360&&(i=360);var a,s,u,c,l,h,f,d,p,v,m,y,g=e.center,x=g?g[0]:0,b=g?g[1]:0,w=g?g[2]:0,M=[],T=[],I=[],S=[];for(d=0;d<=o;d++)for(f=0;f<=n;f++)a=f/n*i,s=.785398+d/o*Math.PI*2,x=t*Math.cos(a),b=t*Math.sin(a),u=(t+r*Math.cos(s))*Math.cos(a),c=(t+r*Math.cos(s))*Math.sin(a),l=r*Math.sin(s),M.push(u+x),M.push(c+b),M.push(l+w),I.push(1-f/n),I.push(d/o),h=_.normalizeVec3(_.subVec3([u,c,l],[x,b,w],[]),[]),T.push(h[0]),T.push(h[1]),T.push(h[2]);for(d=1;d<=o;d++)for(f=1;f<=n;f++)p=(n+1)*d+f-1,v=(n+1)*(d-1)+f-1,m=(n+1)*(d-1)+f,y=(n+1)*d+f,S.push(p),S.push(v),S.push(m),S.push(m),S.push(y),S.push(p);return{primitiveType:"triangles",positions:M,normals:T,uv:I,uvs:I,indices:S}}var Yr={" ":{width:16,points:[]},"!":{width:10,points:[[5,21],[5,7],[-1,-1],[5,2],[4,1],[5,0],[6,1],[5,2]]},'"':{width:16,points:[[4,21],[4,14],[-1,-1],[12,21],[12,14]]},"#":{width:21,points:[[11,25],[4,-7],[-1,-1],[17,25],[10,-7],[-1,-1],[4,12],[18,12],[-1,-1],[3,6],[17,6]]},$:{width:20,points:[[8,25],[8,-4],[-1,-1],[12,25],[12,-4],[-1,-1],[17,18],[15,20],[12,21],[8,21],[5,20],[3,18],[3,16],[4,14],[5,13],[7,12],[13,10],[15,9],[16,8],[17,6],[17,3],[15,1],[12,0],[8,0],[5,1],[3,3]]},"%":{width:24,points:[[21,21],[3,0],[-1,-1],[8,21],[10,19],[10,17],[9,15],[7,14],[5,14],[3,16],[3,18],[4,20],[6,21],[8,21],[10,20],[13,19],[16,19],[19,20],[21,21],[-1,-1],[17,7],[15,6],[14,4],[14,2],[16,0],[18,0],[20,1],[21,3],[21,5],[19,7],[17,7]]},"&":{width:26,points:[[23,12],[23,13],[22,14],[21,14],[20,13],[19,11],[17,6],[15,3],[13,1],[11,0],[7,0],[5,1],[4,2],[3,4],[3,6],[4,8],[5,9],[12,13],[13,14],[14,16],[14,18],[13,20],[11,21],[9,20],[8,18],[8,16],[9,13],[11,10],[16,3],[18,1],[20,0],[22,0],[23,1],[23,2]]},"'":{width:10,points:[[5,19],[4,20],[5,21],[6,20],[6,18],[5,16],[4,15]]},"(":{width:14,points:[[11,25],[9,23],[7,20],[5,16],[4,11],[4,7],[5,2],[7,-2],[9,-5],[11,-7]]},")":{width:14,points:[[3,25],[5,23],[7,20],[9,16],[10,11],[10,7],[9,2],[7,-2],[5,-5],[3,-7]]},"*":{width:16,points:[[8,21],[8,9],[-1,-1],[3,18],[13,12],[-1,-1],[13,18],[3,12]]},"+":{width:26,points:[[13,18],[13,0],[-1,-1],[4,9],[22,9]]},",":{width:10,points:[[6,1],[5,0],[4,1],[5,2],[6,1],[6,-1],[5,-3],[4,-4]]},"-":{width:26,points:[[4,9],[22,9]]},".":{width:10,points:[[5,2],[4,1],[5,0],[6,1],[5,2]]},"/":{width:22,points:[[20,25],[2,-7]]},0:{width:20,points:[[9,21],[6,20],[4,17],[3,12],[3,9],[4,4],[6,1],[9,0],[11,0],[14,1],[16,4],[17,9],[17,12],[16,17],[14,20],[11,21],[9,21]]},1:{width:20,points:[[6,17],[8,18],[11,21],[11,0]]},2:{width:20,points:[[4,16],[4,17],[5,19],[6,20],[8,21],[12,21],[14,20],[15,19],[16,17],[16,15],[15,13],[13,10],[3,0],[17,0]]},3:{width:20,points:[[5,21],[16,21],[10,13],[13,13],[15,12],[16,11],[17,8],[17,6],[16,3],[14,1],[11,0],[8,0],[5,1],[4,2],[3,4]]},4:{width:20,points:[[13,21],[3,7],[18,7],[-1,-1],[13,21],[13,0]]},5:{width:20,points:[[15,21],[5,21],[4,12],[5,13],[8,14],[11,14],[14,13],[16,11],[17,8],[17,6],[16,3],[14,1],[11,0],[8,0],[5,1],[4,2],[3,4]]},6:{width:20,points:[[16,18],[15,20],[12,21],[10,21],[7,20],[5,17],[4,12],[4,7],[5,3],[7,1],[10,0],[11,0],[14,1],[16,3],[17,6],[17,7],[16,10],[14,12],[11,13],[10,13],[7,12],[5,10],[4,7]]},7:{width:20,points:[[17,21],[7,0],[-1,-1],[3,21],[17,21]]},8:{width:20,points:[[8,21],[5,20],[4,18],[4,16],[5,14],[7,13],[11,12],[14,11],[16,9],[17,7],[17,4],[16,2],[15,1],[12,0],[8,0],[5,1],[4,2],[3,4],[3,7],[4,9],[6,11],[9,12],[13,13],[15,14],[16,16],[16,18],[15,20],[12,21],[8,21]]},9:{width:20,points:[[16,14],[15,11],[13,9],[10,8],[9,8],[6,9],[4,11],[3,14],[3,15],[4,18],[6,20],[9,21],[10,21],[13,20],[15,18],[16,14],[16,9],[15,4],[13,1],[10,0],[8,0],[5,1],[4,3]]},":":{width:10,points:[[5,14],[4,13],[5,12],[6,13],[5,14],[-1,-1],[5,2],[4,1],[5,0],[6,1],[5,2]]},";":{width:10,points:[[5,14],[4,13],[5,12],[6,13],[5,14],[-1,-1],[6,1],[5,0],[4,1],[5,2],[6,1],[6,-1],[5,-3],[4,-4]]},"<":{width:24,points:[[20,18],[4,9],[20,0]]},"=":{width:26,points:[[4,12],[22,12],[-1,-1],[4,6],[22,6]]},">":{width:24,points:[[4,18],[20,9],[4,0]]},"?":{width:18,points:[[3,16],[3,17],[4,19],[5,20],[7,21],[11,21],[13,20],[14,19],[15,17],[15,15],[14,13],[13,12],[9,10],[9,7],[-1,-1],[9,2],[8,1],[9,0],[10,1],[9,2]]},"@":{width:27,points:[[18,13],[17,15],[15,16],[12,16],[10,15],[9,14],[8,11],[8,8],[9,6],[11,5],[14,5],[16,6],[17,8],[-1,-1],[12,16],[10,14],[9,11],[9,8],[10,6],[11,5],[-1,-1],[18,16],[17,8],[17,6],[19,5],[21,5],[23,7],[24,10],[24,12],[23,15],[22,17],[20,19],[18,20],[15,21],[12,21],[9,20],[7,19],[5,17],[4,15],[3,12],[3,9],[4,6],[5,4],[7,2],[9,1],[12,0],[15,0],[18,1],[20,2],[21,3],[-1,-1],[19,16],[18,8],[18,6],[19,5]]},A:{width:18,points:[[9,21],[1,0],[-1,-1],[9,21],[17,0],[-1,-1],[4,7],[14,7]]},B:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[-1,-1],[4,11],[13,11],[16,10],[17,9],[18,7],[18,4],[17,2],[16,1],[13,0],[4,0]]},C:{width:21,points:[[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5]]},D:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[11,21],[14,20],[16,18],[17,16],[18,13],[18,8],[17,5],[16,3],[14,1],[11,0],[4,0]]},E:{width:19,points:[[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11],[-1,-1],[4,0],[17,0]]},F:{width:18,points:[[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11]]},G:{width:21,points:[[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[18,8],[-1,-1],[13,8],[18,8]]},H:{width:22,points:[[4,21],[4,0],[-1,-1],[18,21],[18,0],[-1,-1],[4,11],[18,11]]},I:{width:8,points:[[4,21],[4,0]]},J:{width:16,points:[[12,21],[12,5],[11,2],[10,1],[8,0],[6,0],[4,1],[3,2],[2,5],[2,7]]},K:{width:21,points:[[4,21],[4,0],[-1,-1],[18,21],[4,7],[-1,-1],[9,12],[18,0]]},L:{width:17,points:[[4,21],[4,0],[-1,-1],[4,0],[16,0]]},M:{width:24,points:[[4,21],[4,0],[-1,-1],[4,21],[12,0],[-1,-1],[20,21],[12,0],[-1,-1],[20,21],[20,0]]},N:{width:22,points:[[4,21],[4,0],[-1,-1],[4,21],[18,0],[-1,-1],[18,21],[18,0]]},O:{width:22,points:[[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21]]},P:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,14],[17,12],[16,11],[13,10],[4,10]]},Q:{width:22,points:[[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21],[-1,-1],[12,4],[18,-2]]},R:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[4,11],[-1,-1],[11,11],[18,0]]},S:{width:20,points:[[17,18],[15,20],[12,21],[8,21],[5,20],[3,18],[3,16],[4,14],[5,13],[7,12],[13,10],[15,9],[16,8],[17,6],[17,3],[15,1],[12,0],[8,0],[5,1],[3,3]]},T:{width:16,points:[[8,21],[8,0],[-1,-1],[1,21],[15,21]]},U:{width:22,points:[[4,21],[4,6],[5,3],[7,1],[10,0],[12,0],[15,1],[17,3],[18,6],[18,21]]},V:{width:18,points:[[1,21],[9,0],[-1,-1],[17,21],[9,0]]},W:{width:24,points:[[2,21],[7,0],[-1,-1],[12,21],[7,0],[-1,-1],[12,21],[17,0],[-1,-1],[22,21],[17,0]]},X:{width:20,points:[[3,21],[17,0],[-1,-1],[17,21],[3,0]]},Y:{width:18,points:[[1,21],[9,11],[9,0],[-1,-1],[17,21],[9,11]]},Z:{width:20,points:[[17,21],[3,0],[-1,-1],[3,21],[17,21],[-1,-1],[3,0],[17,0]]},"[":{width:14,points:[[4,25],[4,-7],[-1,-1],[5,25],[5,-7],[-1,-1],[4,25],[11,25],[-1,-1],[4,-7],[11,-7]]},"\\":{width:14,points:[[0,21],[14,-3]]},"]":{width:14,points:[[9,25],[9,-7],[-1,-1],[10,25],[10,-7],[-1,-1],[3,25],[10,25],[-1,-1],[3,-7],[10,-7]]},"^":{width:16,points:[[6,15],[8,18],[10,15],[-1,-1],[3,12],[8,17],[13,12],[-1,-1],[8,17],[8,0]]},_:{width:16,points:[[0,-2],[16,-2]]},"`":{width:10,points:[[6,21],[5,20],[4,18],[4,16],[5,15],[6,16],[5,17]]},a:{width:19,points:[[15,14],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},b:{width:19,points:[[4,21],[4,0],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]]},c:{width:18,points:[[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},d:{width:19,points:[[15,21],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},e:{width:18,points:[[3,8],[15,8],[15,10],[14,12],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},f:{width:12,points:[[10,21],[8,21],[6,20],[5,17],[5,0],[-1,-1],[2,14],[9,14]]},g:{width:19,points:[[15,14],[15,-2],[14,-5],[13,-6],[11,-7],[8,-7],[6,-6],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},h:{width:19,points:[[4,21],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]]},i:{width:8,points:[[3,21],[4,20],[5,21],[4,22],[3,21],[-1,-1],[4,14],[4,0]]},j:{width:10,points:[[5,21],[6,20],[7,21],[6,22],[5,21],[-1,-1],[6,14],[6,-3],[5,-6],[3,-7],[1,-7]]},k:{width:17,points:[[4,21],[4,0],[-1,-1],[14,14],[4,4],[-1,-1],[8,8],[15,0]]},l:{width:8,points:[[4,21],[4,0]]},m:{width:30,points:[[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0],[-1,-1],[15,10],[18,13],[20,14],[23,14],[25,13],[26,10],[26,0]]},n:{width:19,points:[[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]]},o:{width:19,points:[[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3],[16,6],[16,8],[15,11],[13,13],[11,14],[8,14]]},p:{width:19,points:[[4,14],[4,-7],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]]},q:{width:19,points:[[15,14],[15,-7],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},r:{width:13,points:[[4,14],[4,0],[-1,-1],[4,8],[5,11],[7,13],[9,14],[12,14]]},s:{width:17,points:[[14,11],[13,13],[10,14],[7,14],[4,13],[3,11],[4,9],[6,8],[11,7],[13,6],[14,4],[14,3],[13,1],[10,0],[7,0],[4,1],[3,3]]},t:{width:12,points:[[5,21],[5,4],[6,1],[8,0],[10,0],[-1,-1],[2,14],[9,14]]},u:{width:19,points:[[4,14],[4,4],[5,1],[7,0],[10,0],[12,1],[15,4],[-1,-1],[15,14],[15,0]]},v:{width:16,points:[[2,14],[8,0],[-1,-1],[14,14],[8,0]]},w:{width:22,points:[[3,14],[7,0],[-1,-1],[11,14],[7,0],[-1,-1],[11,14],[15,0],[-1,-1],[19,14],[15,0]]},x:{width:17,points:[[3,14],[14,0],[-1,-1],[14,14],[3,0]]},y:{width:16,points:[[2,14],[8,0],[-1,-1],[14,14],[8,0],[6,-4],[4,-6],[2,-7],[1,-7]]},z:{width:17,points:[[14,14],[3,0],[-1,-1],[3,14],[14,14],[-1,-1],[3,0],[14,0]]},"{":{width:14,points:[[9,25],[7,24],[6,23],[5,21],[5,19],[6,17],[7,16],[8,14],[8,12],[6,10],[-1,-1],[7,24],[6,22],[6,20],[7,18],[8,17],[9,15],[9,13],[8,11],[4,9],[8,7],[9,5],[9,3],[8,1],[7,0],[6,-2],[6,-4],[7,-6],[-1,-1],[6,8],[8,6],[8,4],[7,2],[6,1],[5,-1],[5,-3],[6,-5],[7,-6],[9,-7]]},"|":{width:8,points:[[4,25],[4,-7]]},"}":{width:14,points:[[5,25],[7,24],[8,23],[9,21],[9,19],[8,17],[7,16],[6,14],[6,12],[8,10],[-1,-1],[7,24],[8,22],[8,20],[7,18],[6,17],[5,15],[5,13],[6,11],[10,9],[6,7],[5,5],[5,3],[6,1],[7,0],[8,-2],[8,-4],[7,-6],[-1,-1],[8,8],[6,6],[6,4],[7,2],[8,1],[9,-1],[9,-3],[8,-5],[7,-6],[5,-7]]},"~":{width:24,points:[[3,6],[3,8],[4,11],[6,12],[8,12],[10,11],[14,8],[16,7],[18,7],[20,8],[21,10],[-1,-1],[3,8],[4,10],[6,11],[8,11],[10,10],[14,7],[16,6],[18,6],[20,7],[21,10],[21,12]]}};function Wr(){for(var e,t,r,n,o,i,a,s,u,c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l=c.origin||[0,0,0],h=l[0],f=l[1],d=l[2],p=c.size||1,v=[],m=[],y=((""+c.text).trim()||"").split("\n"),g=0,x=0,b=.04,w=0;w=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:A(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}function $r(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}var en=r(231);function tn(e){var t=e.WebIFC,r=e.configs,n=e.source,o=e.sourceData,i=e.sourceFormat,a=e.metaModelSource,s=e.metaModelDataStr,u=e.output,c=e.outputXKTModel,l=e.outputXKT,h=e.includeTypes,d=e.excludeTypes,p=e.reuseGeometries,v=void 0===p||p,m=e.minTileSize,y=void 0===m?200:m,g=e.stats,x=void 0===g?{}:g,b=e.outputStats,w=e.rotateX,M=void 0!==w&&w,T=e.includeTextures,I=void 0===T||T,S=e.includeNormals,A=void 0===S||S,O=e.log,L=void 0===O?function(e){}:O;return x.sourceFormat="",x.schemaVersion="",x.title="",x.author="",x.created="",x.numMetaObjects=0,x.numPropertySets=0,x.numTriangles=0,x.numVertices=0,x.numNormals=0,x.numUVs=0,x.numTextures=0,x.numTextureSets=0,x.numObjects=0,x.numGeometries=0,x.sourceSize=0,x.xktSize=0,x.texturesSize=0,x.xktVersion="",x.compressionRatio=0,x.conversionTime=0,x.aabb=null,new Promise((function(e,p){var m=L;if(L=function(e){m("[convert2xkt] ".concat(e))},n||o)if(i||!o)if(u||c||l){n&&L("Reading input file: "+n);var g=new Date,w=r.sourceConfigs||{},T=i||n.split(".").pop(),S=w[T];if(S||(L('[WARNING] Could not find configs sourceConfigs entry for source format "'.concat(T,'". This is derived from the source file name extension. Will use internal default configs.')),S={}),!o)try{o=en.readFileSync(n)}catch(e){return void p(e)}var O,P=o.byteLength;if(L("Input file size: "+(P/1e3).toFixed(2)+" kB"),!s&&a){L("Reading input metadata file: "+a);try{s=en.readFileSync(a)}catch(e){return void p(e)}}else L("Not embedding metadata in XKT");if(s)try{O=JSON.parse(s)}catch(e){L("Error parsing metadata JSON: ".concat(e))}y=D(S.minTileSize,y),M=D(S.rotateX,M),v=D(S.reuseGeometries,v),I=D(S.includeTextures,I),A=D(S.includeNormals,A),h=D(S.includeTypes,h),d=D(S.excludeTypes,d),!1===v&&L("Geometry reuse is disabled");var E,j,G=new He({minTileSize:y});switch(T){case"json":N(Ft,{data:JSON.parse(o),xktModel:G,stats:x,rotateX:M,center:S.center,transform:S.transform,log:L});break;case"glb":N(Wt,{data:o=Qr(o),reuseGeometries:v,includeTextures:I,includeNormals:A,metaModelData:O,xktModel:G,stats:x,log:L});break;case"gltf":var k=JSON.parse(o),_=n?rn(n):"";N(ar,{baseUri:_,data:k,reuseGeometries:v,includeTextures:I,includeNormals:A,metaModelData:O,xktModel:G,getAttachment:(E=Hr().mark((function e(t){var r,n,o;return Hr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return L("Reading attachment file: ".concat(r=_+t)),n=en.readFileSync(r),o=Qr(n),e.abrupt("return",o);case 5:case"end":return e.stop()}}),e)})),j=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=E.apply(e,t);function i(e){$r(o,r,n,i,a,"next",e)}function a(e){$r(o,r,n,i,a,"throw",e)}i(void 0)}))},function(e){return j.apply(this,arguments)}),stats:x,log:L});break;case"ifc":N(vr,{WebIFC:t,data:o,xktModel:G,wasmPath:"./",includeTypes:h,excludeTypes:d,stats:x,log:L});break;case"laz":case"las":N(wr,{data:o,xktModel:G,stats:x,fp64:S.fp64,colorDepth:S.colorDepth,center:S.center,transform:S.transform,skip:D(S.skip,1),log:L});break;case"pcd":N(Tr,{data:o,xktModel:G,stats:x,log:L});break;case"ply":N(Lr,{data:o,xktModel:G,stats:x,log:L});break;case"stl":N(kr,{data:o,xktModel:G,stats:x,log:L});break;default:return void p('Error: unsupported source format: "'.concat(T,'".'))}}else p("Argument expected: output, outputXKTModel or outputXKT");else p("Argument expected: sourceFormat is required with sourceData");else p("Argument expected: source or sourceData");function D(e,t){return void 0!==e?e:t}function N(t,r){t(r).then((function(){O||G.createDefaultMetaObjects(),L("Input file parsed OK. Building XKT document..."),G.finalize().then((function(){L("XKT document built OK. Writing to XKT file...");var t=nt(G,O,x,{zip:!0}),r=Buffer.from(t),n=t.byteLength;if(x.minTileSize=y||200,x.sourceSize=(P/1e3).toFixed(2),x.xktSize=(n/1e3).toFixed(2),x.xktVersion=f.xktVersion,x.compressionRatio=(P/n).toFixed(2),x.conversionTime=((new Date-g)/1e3).toFixed(2),x.aabb=G.aabb,L("Converted to: XKT v".concat(x.xktVersion)),h&&L("Include types: "+(h||"(include all)")),d&&L("Exclude types: "+(d||"(exclude none)")),L("XKT size: "+x.xktSize+" kB"),L("XKT textures size: "+(x.texturesSize/1e3).toFixed(2)+"kB"),L("Compression ratio: "+x.compressionRatio),L("Conversion time: "+x.conversionTime+" s"),L("Converted metaobjects: "+x.numMetaObjects),L("Converted property sets: "+x.numPropertySets),L("Converted drawable objects: "+x.numObjects),L("Converted geometries: "+x.numGeometries),L("Converted textures: "+x.numTextures),L("Converted textureSets: "+x.numTextureSets),L("Converted triangles: "+x.numTriangles),L("Converted vertices: "+x.numVertices),L("Converted UVs: "+x.numUVs),L("Converted normals: "+x.numNormals),L("minTileSize: "+x.minTileSize),u){var o=rn(u).trim();""===o||en.existsSync(o)||en.mkdirSync(o,{recursive:!0}),L("Writing XKT file: "+u),en.writeFileSync(u,r)}c&&c(G),l&&l(r),b&&b(x),e()}))}),(function(e){p(e)}))}}))}function rn(e){var t=e.lastIndexOf("/");return 0!==t?e.substring(0,t+1):""}(0,e.installFilePolyfills)()})(),n})())); //# sourceMappingURL=xeokit-convert.cjs.js.map \ No newline at end of file diff --git a/dist/xeokit-convert.cjs.js.map b/dist/xeokit-convert.cjs.js.map index 4388d44..80d030a 100644 --- a/dist/xeokit-convert.cjs.js.map +++ b/dist/xeokit-convert.cjs.js.map @@ -1 +1 @@ -{"version":3,"file":"xeokit-convert.cjs.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,QAAQ,sCCTXH,EAAOD,QAAUK,QAAQ,QCCrBC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaT,QAGrB,IAAIC,EAASK,EAAyBE,GAAY,CAGjDR,QAAS,CAAC,GAOX,OAHAW,EAAoBH,GAAUP,EAAQA,EAAOD,QAASO,GAG/CN,EAAOD,OACf,CCrBAO,EAAoBK,EAAI,CAACZ,EAASa,KACjC,IA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C3BL,GAAG+C,cAAc1C,EAAQoC,EAC7B,CAEInC,GACAA,EAAe/sB,GAGfgtB,GACAA,EAAUkC,GAGV/B,GACAA,EAAYjtB,GAGhBlN,GACJ,GACJ,IAAG,SAAC/B,GACAgC,EAAOhC,EACX,GACJ,CACJ,GACJ,CAEA,SAASu9B,GAAYr/B,GACjB,IAAMjkB,EAAIikB,EAAIsgC,YAAY,KAC1B,OAAc,IAANvkD,EAAWikB,EAAIugC,UAAU,EAAGxkD,EAAI,GAAK,EACjD,EC/ZAykD,EAAAA,EAAAA","sources":["webpack://convert2xkt/webpack/universalModuleDefinition","webpack://convert2xkt/external commonjs \"fs\"","webpack://convert2xkt/webpack/bootstrap","webpack://convert2xkt/webpack/runtime/define property getters","webpack://convert2xkt/webpack/runtime/hasOwnProperty shorthand","webpack://convert2xkt/webpack/runtime/make namespace object","webpack://convert2xkt/external commonjs \"@loaders.gl/polyfills\"","webpack://convert2xkt/./src/XKT_INFO.js","webpack://convert2xkt/./src/lib/math.js","webpack://convert2xkt/./src/XKTModel/lib/geometryCompression.js","webpack://convert2xkt/./src/constants.js","webpack://convert2xkt/./src/XKTModel/lib/buildEdgeIndices.js","webpack://convert2xkt/./src/XKTModel/lib/isTriangleMeshSolid.js","webpack://convert2xkt/./src/XKTModel/XKTMesh.js","webpack://convert2xkt/./src/XKTModel/XKTGeometry.js","webpack://convert2xkt/./src/XKTModel/XKTEntity.js","webpack://convert2xkt/./src/XKTModel/XKTTile.js","webpack://convert2xkt/./src/XKTModel/KDNode.js","webpack://convert2xkt/./src/XKTModel/XKTMetaObject.js","webpack://convert2xkt/./src/XKTModel/XKTPropertySet.js","webpack://convert2xkt/./src/XKTModel/XKTTexture.js","webpack://convert2xkt/./src/XKTModel/XKTTextureSet.js","webpack://convert2xkt/external commonjs \"@loaders.gl/core\"","webpack://convert2xkt/external commonjs \"@loaders.gl/textures\"","webpack://convert2xkt/external commonjs \"@loaders.gl/images\"","webpack://convert2xkt/./src/XKTModel/XKTModel.js","webpack://convert2xkt/./src/lib/mergeVertices.js","webpack://convert2xkt/external commonjs \"pako\"","webpack://convert2xkt/./src/XKTModel/writeXKTModelToArrayBuffer.js","webpack://convert2xkt/./src/lib/earcut.js","webpack://convert2xkt/./src/parsers/parseCityJSONIntoXKTModel.js","webpack://convert2xkt/./src/XKTModel/lib/utils.js","webpack://convert2xkt/external commonjs \"@loaders.gl/gltf\"","webpack://convert2xkt/./src/parsers/parseGLTFIntoXKTModel.js","webpack://convert2xkt/./src/parsers/parseGLTFJSONIntoXKTModel.js","webpack://convert2xkt/./src/parsers/parseIFCIntoXKTModel.js","webpack://convert2xkt/external commonjs \"@loaders.gl/las\"","webpack://convert2xkt/./src/parsers/parseLASIntoXKTModel.js","webpack://convert2xkt/./src/parsers/parseMetaModelIntoXKTModel.js","webpack://convert2xkt/./src/parsers/parsePCDIntoXKTModel.js","webpack://convert2xkt/external commonjs \"@loaders.gl/ply\"","webpack://convert2xkt/./src/parsers/parsePLYIntoXKTModel.js","webpack://convert2xkt/./src/parsers/parseSTLIntoXKTModel.js","webpack://convert2xkt/./src/lib/faceToVertexNormals.js","webpack://convert2xkt/./src/geometryBuilders/buildBoxGeometry.js","webpack://convert2xkt/./src/geometryBuilders/buildBoxLinesGeometry.js","webpack://convert2xkt/./src/geometryBuilders/buildCylinderGeometry.js","webpack://convert2xkt/./src/geometryBuilders/buildGridGeometry.js","webpack://convert2xkt/./src/geometryBuilders/buildPlaneGeometry.js","webpack://convert2xkt/./src/geometryBuilders/buildSphereGeometry.js","webpack://convert2xkt/./src/geometryBuilders/buildTorusGeometry.js","webpack://convert2xkt/./src/geometryBuilders/buildVectorTextGeometry.js","webpack://convert2xkt/./src/XKTModel/lib/toArraybuffer.js","webpack://convert2xkt/./src/convert2xkt.js","webpack://convert2xkt/./index.dist.node.js"],"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[\"convert2xkt\"] = factory();\n\telse\n\t\troot[\"convert2xkt\"] = factory();\n})(global, () => {\nreturn ","module.exports = require(\"fs\");","// 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](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\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};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@loaders.gl/polyfills\");","/**\n * @desc Provides info on the XKT generated by xeokit-convert.\n */\nconst XKT_INFO = {\n\n /**\n * The XKT version generated by xeokit-convert.\n *\n * This is the XKT version that's modeled by {@link XKTModel}, serialized\n * by {@link writeXKTModelToArrayBuffer}, and written by {@link convert2xkt}.\n *\n * * Current XKT version: **10**\n * * [XKT format specs](https://github.com/xeokit/xeokit-convert/blob/main/specs/index.md)\n *\n * @property xktVersion\n * @type {number}\n */\n xktVersion: 10\n};\n\nexport {XKT_INFO};","// Some temporary vars to help avoid garbage collection\n\nconst doublePrecision = true;\nconst FloatArrayType = doublePrecision ? Float64Array : Float32Array;\n\nconst tempMat1 = new FloatArrayType(16);\nconst tempMat2 = new FloatArrayType(16);\nconst tempVec4 = new FloatArrayType(4);\n\n/**\n * @private\n */\nconst math = {\n\n MIN_DOUBLE: -Number.MAX_SAFE_INTEGER,\n MAX_DOUBLE: Number.MAX_SAFE_INTEGER,\n\n /**\n * The number of radiians in a degree (0.0174532925).\n * @property DEGTORAD\n * @type {Number}\n */\n DEGTORAD: 0.0174532925,\n\n /**\n * The number of degrees in a radian.\n * @property RADTODEG\n * @type {Number}\n */\n RADTODEG: 57.295779513,\n\n /**\n * Returns a new, uninitialized two-element vector.\n * @method vec2\n * @param [values] Initial values.\n * @static\n * @returns {Number[]}\n */\n vec2(values) {\n return new FloatArrayType(values || 2);\n },\n\n /**\n * Returns a new, uninitialized three-element vector.\n * @method vec3\n * @param [values] Initial values.\n * @static\n * @returns {Number[]}\n */\n vec3(values) {\n return new FloatArrayType(values || 3);\n },\n\n /**\n * Returns a new, uninitialized four-element vector.\n * @method vec4\n * @param [values] Initial values.\n * @static\n * @returns {Number[]}\n */\n vec4(values) {\n return new FloatArrayType(values || 4);\n },\n\n /**\n * Returns a new, uninitialized 3x3 matrix.\n * @method mat3\n * @param [values] Initial values.\n * @static\n * @returns {Number[]}\n */\n mat3(values) {\n return new FloatArrayType(values || 9);\n },\n\n /**\n * Converts a 3x3 matrix to 4x4\n * @method mat3ToMat4\n * @param mat3 3x3 matrix.\n * @param mat4 4x4 matrix\n * @static\n * @returns {Number[]}\n */\n mat3ToMat4(mat3, mat4 = new FloatArrayType(16)) {\n mat4[0] = mat3[0];\n mat4[1] = mat3[1];\n mat4[2] = mat3[2];\n mat4[3] = 0;\n mat4[4] = mat3[3];\n mat4[5] = mat3[4];\n mat4[6] = mat3[5];\n mat4[7] = 0;\n mat4[8] = mat3[6];\n mat4[9] = mat3[7];\n mat4[10] = mat3[8];\n mat4[11] = 0;\n mat4[12] = 0;\n mat4[13] = 0;\n mat4[14] = 0;\n mat4[15] = 1;\n return mat4;\n },\n\n /**\n * Returns a new, uninitialized 4x4 matrix.\n * @method mat4\n * @param [values] Initial values.\n * @static\n * @returns {Number[]}\n */\n mat4(values) {\n return new FloatArrayType(values || 16);\n },\n\n /**\n * Converts a 4x4 matrix to 3x3\n * @method mat4ToMat3\n * @param mat4 4x4 matrix.\n * @param mat3 3x3 matrix\n * @static\n * @returns {Number[]}\n */\n mat4ToMat3(mat4, mat3) { // TODO\n //return new FloatArrayType(values || 9);\n },\n\n /**\n * Returns a new UUID.\n * @method createUUID\n * @static\n * @return string The new UUID\n */\n createUUID: ((() => {\n const self = {};\n const lut = [];\n for (let i = 0; i < 256; i++) {\n lut[i] = (i < 16 ? '0' : '') + (i).toString(16);\n }\n return () => {\n const d0 = Math.random() * 0xffffffff | 0;\n const d1 = Math.random() * 0xffffffff | 0;\n const d2 = Math.random() * 0xffffffff | 0;\n const d3 = Math.random() * 0xffffffff | 0;\n return `${lut[d0 & 0xff] + lut[d0 >> 8 & 0xff] + lut[d0 >> 16 & 0xff] + lut[d0 >> 24 & 0xff]}-${lut[d1 & 0xff]}${lut[d1 >> 8 & 0xff]}-${lut[d1 >> 16 & 0x0f | 0x40]}${lut[d1 >> 24 & 0xff]}-${lut[d2 & 0x3f | 0x80]}${lut[d2 >> 8 & 0xff]}-${lut[d2 >> 16 & 0xff]}${lut[d2 >> 24 & 0xff]}${lut[d3 & 0xff]}${lut[d3 >> 8 & 0xff]}${lut[d3 >> 16 & 0xff]}${lut[d3 >> 24 & 0xff]}`;\n };\n }))(),\n\n /**\n * Clamps a value to the given range.\n * @param {Number} value Value to clamp.\n * @param {Number} min Lower bound.\n * @param {Number} max Upper bound.\n * @returns {Number} Clamped result.\n */\n clamp(value, min, max) {\n return Math.max(min, Math.min(max, value));\n },\n\n /**\n * Floating-point modulus\n * @method fmod\n * @static\n * @param {Number} a\n * @param {Number} b\n * @returns {*}\n */\n fmod(a, b) {\n if (a < b) {\n console.error(\"math.fmod : Attempting to find modulus within negative range - would be infinite loop - ignoring\");\n return a;\n }\n while (b <= a) {\n a -= b;\n }\n return a;\n },\n\n /**\n * Negates a four-element vector.\n * @method negateVec4\n * @static\n * @param {Array(Number)} v Vector to negate\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, v otherwise\n */\n negateVec4(v, dest) {\n if (!dest) {\n dest = v;\n }\n dest[0] = -v[0];\n dest[1] = -v[1];\n dest[2] = -v[2];\n dest[3] = -v[3];\n return dest;\n },\n\n /**\n * Adds one four-element vector to another.\n * @method addVec4\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Second vector\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, u otherwise\n */\n addVec4(u, v, dest) {\n if (!dest) {\n dest = u;\n }\n dest[0] = u[0] + v[0];\n dest[1] = u[1] + v[1];\n dest[2] = u[2] + v[2];\n dest[3] = u[3] + v[3];\n return dest;\n },\n\n /**\n * Adds a scalar value to each element of a four-element vector.\n * @method addVec4Scalar\n * @static\n * @param {Array(Number)} v The vector\n * @param {Number} s The scalar\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, v otherwise\n */\n addVec4Scalar(v, s, dest) {\n if (!dest) {\n dest = v;\n }\n dest[0] = v[0] + s;\n dest[1] = v[1] + s;\n dest[2] = v[2] + s;\n dest[3] = v[3] + s;\n return dest;\n },\n\n /**\n * Adds one three-element vector to another.\n * @method addVec3\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Second vector\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, u otherwise\n */\n addVec3(u, v, dest) {\n if (!dest) {\n dest = u;\n }\n dest[0] = u[0] + v[0];\n dest[1] = u[1] + v[1];\n dest[2] = u[2] + v[2];\n return dest;\n },\n\n /**\n * Adds a scalar value to each element of a three-element vector.\n * @method addVec4Scalar\n * @static\n * @param {Array(Number)} v The vector\n * @param {Number} s The scalar\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, v otherwise\n */\n addVec3Scalar(v, s, dest) {\n if (!dest) {\n dest = v;\n }\n dest[0] = v[0] + s;\n dest[1] = v[1] + s;\n dest[2] = v[2] + s;\n return dest;\n },\n\n /**\n * Subtracts one four-element vector from another.\n * @method subVec4\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Vector to subtract\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, u otherwise\n */\n subVec4(u, v, dest) {\n if (!dest) {\n dest = u;\n }\n dest[0] = u[0] - v[0];\n dest[1] = u[1] - v[1];\n dest[2] = u[2] - v[2];\n dest[3] = u[3] - v[3];\n return dest;\n },\n\n /**\n * Subtracts one three-element vector from another.\n * @method subVec3\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Vector to subtract\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, u otherwise\n */\n subVec3(u, v, dest) {\n if (!dest) {\n dest = u;\n }\n dest[0] = u[0] - v[0];\n dest[1] = u[1] - v[1];\n dest[2] = u[2] - v[2];\n return dest;\n },\n\n /**\n * Subtracts one two-element vector from another.\n * @method subVec2\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Vector to subtract\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, u otherwise\n */\n subVec2(u, v, dest) {\n if (!dest) {\n dest = u;\n }\n dest[0] = u[0] - v[0];\n dest[1] = u[1] - v[1];\n return dest;\n },\n\n /**\n * Subtracts a scalar value from each element of a four-element vector.\n * @method subVec4Scalar\n * @static\n * @param {Array(Number)} v The vector\n * @param {Number} s The scalar\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, v otherwise\n */\n subVec4Scalar(v, s, dest) {\n if (!dest) {\n dest = v;\n }\n dest[0] = v[0] - s;\n dest[1] = v[1] - s;\n dest[2] = v[2] - s;\n dest[3] = v[3] - s;\n return dest;\n },\n\n /**\n * Sets each element of a 4-element vector to a scalar value minus the value of that element.\n * @method subScalarVec4\n * @static\n * @param {Array(Number)} v The vector\n * @param {Number} s The scalar\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, v otherwise\n */\n subScalarVec4(v, s, dest) {\n if (!dest) {\n dest = v;\n }\n dest[0] = s - v[0];\n dest[1] = s - v[1];\n dest[2] = s - v[2];\n dest[3] = s - v[3];\n return dest;\n },\n\n /**\n * Multiplies one three-element vector by another.\n * @method mulVec3\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Second vector\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, u otherwise\n */\n mulVec4(u, v, dest) {\n if (!dest) {\n dest = u;\n }\n dest[0] = u[0] * v[0];\n dest[1] = u[1] * v[1];\n dest[2] = u[2] * v[2];\n dest[3] = u[3] * v[3];\n return dest;\n },\n\n /**\n * Multiplies each element of a four-element vector by a scalar.\n * @method mulVec34calar\n * @static\n * @param {Array(Number)} v The vector\n * @param {Number} s The scalar\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, v otherwise\n */\n mulVec4Scalar(v, s, dest) {\n if (!dest) {\n dest = v;\n }\n dest[0] = v[0] * s;\n dest[1] = v[1] * s;\n dest[2] = v[2] * s;\n dest[3] = v[3] * s;\n return dest;\n },\n\n /**\n * Multiplies each element of a three-element vector by a scalar.\n * @method mulVec3Scalar\n * @static\n * @param {Array(Number)} v The vector\n * @param {Number} s The scalar\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, v otherwise\n */\n mulVec3Scalar(v, s, dest) {\n if (!dest) {\n dest = v;\n }\n dest[0] = v[0] * s;\n dest[1] = v[1] * s;\n dest[2] = v[2] * s;\n return dest;\n },\n\n /**\n * Multiplies each element of a two-element vector by a scalar.\n * @method mulVec2Scalar\n * @static\n * @param {Array(Number)} v The vector\n * @param {Number} s The scalar\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, v otherwise\n */\n mulVec2Scalar(v, s, dest) {\n if (!dest) {\n dest = v;\n }\n dest[0] = v[0] * s;\n dest[1] = v[1] * s;\n return dest;\n },\n\n /**\n * Divides one three-element vector by another.\n * @method divVec3\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Second vector\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, u otherwise\n */\n divVec3(u, v, dest) {\n if (!dest) {\n dest = u;\n }\n dest[0] = u[0] / v[0];\n dest[1] = u[1] / v[1];\n dest[2] = u[2] / v[2];\n return dest;\n },\n\n /**\n * Divides one four-element vector by another.\n * @method divVec4\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Second vector\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, u otherwise\n */\n divVec4(u, v, dest) {\n if (!dest) {\n dest = u;\n }\n dest[0] = u[0] / v[0];\n dest[1] = u[1] / v[1];\n dest[2] = u[2] / v[2];\n dest[3] = u[3] / v[3];\n return dest;\n },\n\n /**\n * Divides a scalar by a three-element vector, returning a new vector.\n * @method divScalarVec3\n * @static\n * @param v vec3\n * @param s scalar\n * @param dest vec3 - optional destination\n * @return [] dest if specified, v otherwise\n */\n divScalarVec3(s, v, dest) {\n if (!dest) {\n dest = v;\n }\n dest[0] = s / v[0];\n dest[1] = s / v[1];\n dest[2] = s / v[2];\n return dest;\n },\n\n /**\n * Divides a three-element vector by a scalar.\n * @method divVec3Scalar\n * @static\n * @param v vec3\n * @param s scalar\n * @param dest vec3 - optional destination\n * @return [] dest if specified, v otherwise\n */\n divVec3Scalar(v, s, dest) {\n if (!dest) {\n dest = v;\n }\n dest[0] = v[0] / s;\n dest[1] = v[1] / s;\n dest[2] = v[2] / s;\n return dest;\n },\n\n /**\n * Divides a four-element vector by a scalar.\n * @method divVec4Scalar\n * @static\n * @param v vec4\n * @param s scalar\n * @param dest vec4 - optional destination\n * @return [] dest if specified, v otherwise\n */\n divVec4Scalar(v, s, dest) {\n if (!dest) {\n dest = v;\n }\n dest[0] = v[0] / s;\n dest[1] = v[1] / s;\n dest[2] = v[2] / s;\n dest[3] = v[3] / s;\n return dest;\n },\n\n\n /**\n * Divides a scalar by a four-element vector, returning a new vector.\n * @method divScalarVec4\n * @static\n * @param s scalar\n * @param v vec4\n * @param dest vec4 - optional destination\n * @return [] dest if specified, v otherwise\n */\n divScalarVec4(s, v, dest) {\n if (!dest) {\n dest = v;\n }\n dest[0] = s / v[0];\n dest[1] = s / v[1];\n dest[2] = s / v[2];\n dest[3] = s / v[3];\n return dest;\n },\n\n /**\n * Returns the dot product of two four-element vectors.\n * @method dotVec4\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Second vector\n * @return The dot product\n */\n dotVec4(u, v) {\n return (u[0] * v[0] + u[1] * v[1] + u[2] * v[2] + u[3] * v[3]);\n },\n\n /**\n * Returns the cross product of two four-element vectors.\n * @method cross3Vec4\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Second vector\n * @return The cross product\n */\n cross3Vec4(u, v) {\n const u0 = u[0];\n const u1 = u[1];\n const u2 = u[2];\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n return [\n u1 * v2 - u2 * v1,\n u2 * v0 - u0 * v2,\n u0 * v1 - u1 * v0,\n 0.0];\n },\n\n /**\n * Returns the cross product of two three-element vectors.\n * @method cross3Vec3\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Second vector\n * @return The cross product\n */\n cross3Vec3(u, v, dest) {\n if (!dest) {\n dest = u;\n }\n const x = u[0];\n const y = u[1];\n const z = u[2];\n const x2 = v[0];\n const y2 = v[1];\n const z2 = v[2];\n dest[0] = y * z2 - z * y2;\n dest[1] = z * x2 - x * z2;\n dest[2] = x * y2 - y * x2;\n return dest;\n },\n\n\n sqLenVec4(v) { // TODO\n return math.dotVec4(v, v);\n },\n\n /**\n * Returns the length of a four-element vector.\n * @method lenVec4\n * @static\n * @param {Array(Number)} v The vector\n * @return The length\n */\n lenVec4(v) {\n return Math.sqrt(math.sqLenVec4(v));\n },\n\n /**\n * Returns the dot product of two three-element vectors.\n * @method dotVec3\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Second vector\n * @return The dot product\n */\n dotVec3(u, v) {\n return (u[0] * v[0] + u[1] * v[1] + u[2] * v[2]);\n },\n\n /**\n * Returns the dot product of two two-element vectors.\n * @method dotVec4\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Second vector\n * @return The dot product\n */\n dotVec2(u, v) {\n return (u[0] * v[0] + u[1] * v[1]);\n },\n\n\n sqLenVec3(v) {\n return math.dotVec3(v, v);\n },\n\n\n sqLenVec2(v) {\n return math.dotVec2(v, v);\n },\n\n /**\n * Returns the length of a three-element vector.\n * @method lenVec3\n * @static\n * @param {Array(Number)} v The vector\n * @return The length\n */\n lenVec3(v) {\n return Math.sqrt(math.sqLenVec3(v));\n },\n\n distVec3: ((() => {\n const vec = new FloatArrayType(3);\n return (v, w) => math.lenVec3(math.subVec3(v, w, vec));\n }))(),\n\n /**\n * Returns the length of a two-element vector.\n * @method lenVec2\n * @static\n * @param {Array(Number)} v The vector\n * @return The length\n */\n lenVec2(v) {\n return Math.sqrt(math.sqLenVec2(v));\n },\n\n distVec2: ((() => {\n const vec = new FloatArrayType(2);\n return (v, w) => math.lenVec2(math.subVec2(v, w, vec));\n }))(),\n\n /**\n * @method rcpVec3\n * @static\n * @param v vec3\n * @param dest vec3 - optional destination\n * @return [] dest if specified, v otherwise\n *\n */\n rcpVec3(v, dest) {\n return math.divScalarVec3(1.0, v, dest);\n },\n\n /**\n * Normalizes a four-element vector\n * @method normalizeVec4\n * @static\n * @param v vec4\n * @param dest vec4 - optional destination\n * @return [] dest if specified, v otherwise\n *\n */\n normalizeVec4(v, dest) {\n const f = 1.0 / math.lenVec4(v);\n return math.mulVec4Scalar(v, f, dest);\n },\n\n /**\n * Normalizes a three-element vector\n * @method normalizeVec4\n * @static\n */\n normalizeVec3(v, dest) {\n const f = 1.0 / math.lenVec3(v);\n return math.mulVec3Scalar(v, f, dest);\n },\n\n /**\n * Normalizes a two-element vector\n * @method normalizeVec2\n * @static\n */\n normalizeVec2(v, dest) {\n const f = 1.0 / math.lenVec2(v);\n return math.mulVec2Scalar(v, f, dest);\n },\n\n /**\n * Gets the angle between two vectors\n * @method angleVec3\n * @param v\n * @param w\n * @returns {number}\n */\n angleVec3(v, w) {\n let theta = math.dotVec3(v, w) / (Math.sqrt(math.sqLenVec3(v) * math.sqLenVec3(w)));\n theta = theta < -1 ? -1 : (theta > 1 ? 1 : theta); // Clamp to handle numerical problems\n return Math.acos(theta);\n },\n\n /**\n * Creates a three-element vector from the rotation part of a sixteen-element matrix.\n * @param m\n * @param dest\n */\n vec3FromMat4Scale: ((() => {\n\n const tempVec3 = new FloatArrayType(3);\n\n return (m, dest) => {\n\n tempVec3[0] = m[0];\n tempVec3[1] = m[1];\n tempVec3[2] = m[2];\n\n dest[0] = math.lenVec3(tempVec3);\n\n tempVec3[0] = m[4];\n tempVec3[1] = m[5];\n tempVec3[2] = m[6];\n\n dest[1] = math.lenVec3(tempVec3);\n\n tempVec3[0] = m[8];\n tempVec3[1] = m[9];\n tempVec3[2] = m[10];\n\n dest[2] = math.lenVec3(tempVec3);\n\n return dest;\n };\n }))(),\n\n /**\n * Converts an n-element vector to a JSON-serializable\n * array with values rounded to two decimal places.\n */\n vecToArray: ((() => {\n function trunc(v) {\n return Math.round(v * 100000) / 100000\n }\n\n return v => {\n v = Array.prototype.slice.call(v);\n for (let i = 0, len = v.length; i < len; i++) {\n v[i] = trunc(v[i]);\n }\n return v;\n };\n }))(),\n\n /**\n * Converts a 3-element vector from an array to an object of the form ````{x:999, y:999, z:999}````.\n * @param arr\n * @returns {{x: *, y: *, z: *}}\n */\n xyzArrayToObject(arr) {\n return {\"x\": arr[0], \"y\": arr[1], \"z\": arr[2]};\n },\n\n /**\n * Converts a 3-element vector object of the form ````{x:999, y:999, z:999}```` to an array.\n * @param xyz\n * @param [arry]\n * @returns {*[]}\n */\n xyzObjectToArray(xyz, arry) {\n arry = arry || new FloatArrayType(3);\n arry[0] = xyz.x;\n arry[1] = xyz.y;\n arry[2] = xyz.z;\n return arry;\n },\n\n /**\n * Duplicates a 4x4 identity matrix.\n * @method dupMat4\n * @static\n */\n dupMat4(m) {\n return m.slice(0, 16);\n },\n\n /**\n * Extracts a 3x3 matrix from a 4x4 matrix.\n * @method mat4To3\n * @static\n */\n mat4To3(m) {\n return [\n m[0], m[1], m[2],\n m[4], m[5], m[6],\n m[8], m[9], m[10]\n ];\n },\n\n /**\n * Returns a 4x4 matrix with each element set to the given scalar value.\n * @method m4s\n * @static\n */\n m4s(s) {\n return [\n s, s, s, s,\n s, s, s, s,\n s, s, s, s,\n s, s, s, s\n ];\n },\n\n /**\n * Returns a 4x4 matrix with each element set to zero.\n * @method setMat4ToZeroes\n * @static\n */\n setMat4ToZeroes() {\n return math.m4s(0.0);\n },\n\n /**\n * Returns a 4x4 matrix with each element set to 1.0.\n * @method setMat4ToOnes\n * @static\n */\n setMat4ToOnes() {\n return math.m4s(1.0);\n },\n\n /**\n * Returns a 4x4 matrix with each element set to 1.0.\n * @method setMat4ToOnes\n * @static\n */\n diagonalMat4v(v) {\n return new FloatArrayType([\n v[0], 0.0, 0.0, 0.0,\n 0.0, v[1], 0.0, 0.0,\n 0.0, 0.0, v[2], 0.0,\n 0.0, 0.0, 0.0, v[3]\n ]);\n },\n\n /**\n * Returns a 4x4 matrix with diagonal elements set to the given vector.\n * @method diagonalMat4c\n * @static\n */\n diagonalMat4c(x, y, z, w) {\n return math.diagonalMat4v([x, y, z, w]);\n },\n\n /**\n * Returns a 4x4 matrix with diagonal elements set to the given scalar.\n * @method diagonalMat4s\n * @static\n */\n diagonalMat4s(s) {\n return math.diagonalMat4c(s, s, s, s);\n },\n\n /**\n * Returns a 4x4 identity matrix.\n * @method identityMat4\n * @static\n */\n identityMat4(mat = new FloatArrayType(16)) {\n mat[0] = 1.0;\n mat[1] = 0.0;\n mat[2] = 0.0;\n mat[3] = 0.0;\n\n mat[4] = 0.0;\n mat[5] = 1.0;\n mat[6] = 0.0;\n mat[7] = 0.0;\n\n mat[8] = 0.0;\n mat[9] = 0.0;\n mat[10] = 1.0;\n mat[11] = 0.0;\n\n mat[12] = 0.0;\n mat[13] = 0.0;\n mat[14] = 0.0;\n mat[15] = 1.0;\n\n return mat;\n },\n\n /**\n * Returns a 3x3 identity matrix.\n * @method identityMat3\n * @static\n */\n identityMat3(mat = new FloatArrayType(9)) {\n mat[0] = 1.0;\n mat[1] = 0.0;\n mat[2] = 0.0;\n\n mat[3] = 0.0;\n mat[4] = 1.0;\n mat[5] = 0.0;\n\n mat[6] = 0.0;\n mat[7] = 0.0;\n mat[8] = 1.0;\n\n return mat;\n },\n\n /**\n * Tests if the given 4x4 matrix is the identity matrix.\n * @method isIdentityMat4\n * @static\n */\n isIdentityMat4(m) {\n if (m[0] !== 1.0 || m[1] !== 0.0 || m[2] !== 0.0 || m[3] !== 0.0 ||\n m[4] !== 0.0 || m[5] !== 1.0 || m[6] !== 0.0 || m[7] !== 0.0 ||\n m[8] !== 0.0 || m[9] !== 0.0 || m[10] !== 1.0 || m[11] !== 0.0 ||\n m[12] !== 0.0 || m[13] !== 0.0 || m[14] !== 0.0 || m[15] !== 1.0) {\n return false;\n }\n return true;\n },\n\n /**\n * Negates the given 4x4 matrix.\n * @method negateMat4\n * @static\n */\n negateMat4(m, dest) {\n if (!dest) {\n dest = m;\n }\n dest[0] = -m[0];\n dest[1] = -m[1];\n dest[2] = -m[2];\n dest[3] = -m[3];\n dest[4] = -m[4];\n dest[5] = -m[5];\n dest[6] = -m[6];\n dest[7] = -m[7];\n dest[8] = -m[8];\n dest[9] = -m[9];\n dest[10] = -m[10];\n dest[11] = -m[11];\n dest[12] = -m[12];\n dest[13] = -m[13];\n dest[14] = -m[14];\n dest[15] = -m[15];\n return dest;\n },\n\n /**\n * Adds the given 4x4 matrices together.\n * @method addMat4\n * @static\n */\n addMat4(a, b, dest) {\n if (!dest) {\n dest = a;\n }\n dest[0] = a[0] + b[0];\n dest[1] = a[1] + b[1];\n dest[2] = a[2] + b[2];\n dest[3] = a[3] + b[3];\n dest[4] = a[4] + b[4];\n dest[5] = a[5] + b[5];\n dest[6] = a[6] + b[6];\n dest[7] = a[7] + b[7];\n dest[8] = a[8] + b[8];\n dest[9] = a[9] + b[9];\n dest[10] = a[10] + b[10];\n dest[11] = a[11] + b[11];\n dest[12] = a[12] + b[12];\n dest[13] = a[13] + b[13];\n dest[14] = a[14] + b[14];\n dest[15] = a[15] + b[15];\n return dest;\n },\n\n /**\n * Adds the given scalar to each element of the given 4x4 matrix.\n * @method addMat4Scalar\n * @static\n */\n addMat4Scalar(m, s, dest) {\n if (!dest) {\n dest = m;\n }\n dest[0] = m[0] + s;\n dest[1] = m[1] + s;\n dest[2] = m[2] + s;\n dest[3] = m[3] + s;\n dest[4] = m[4] + s;\n dest[5] = m[5] + s;\n dest[6] = m[6] + s;\n dest[7] = m[7] + s;\n dest[8] = m[8] + s;\n dest[9] = m[9] + s;\n dest[10] = m[10] + s;\n dest[11] = m[11] + s;\n dest[12] = m[12] + s;\n dest[13] = m[13] + s;\n dest[14] = m[14] + s;\n dest[15] = m[15] + s;\n return dest;\n },\n\n /**\n * Adds the given scalar to each element of the given 4x4 matrix.\n * @method addScalarMat4\n * @static\n */\n addScalarMat4(s, m, dest) {\n return math.addMat4Scalar(m, s, dest);\n },\n\n /**\n * Subtracts the second 4x4 matrix from the first.\n * @method subMat4\n * @static\n */\n subMat4(a, b, dest) {\n if (!dest) {\n dest = a;\n }\n dest[0] = a[0] - b[0];\n dest[1] = a[1] - b[1];\n dest[2] = a[2] - b[2];\n dest[3] = a[3] - b[3];\n dest[4] = a[4] - b[4];\n dest[5] = a[5] - b[5];\n dest[6] = a[6] - b[6];\n dest[7] = a[7] - b[7];\n dest[8] = a[8] - b[8];\n dest[9] = a[9] - b[9];\n dest[10] = a[10] - b[10];\n dest[11] = a[11] - b[11];\n dest[12] = a[12] - b[12];\n dest[13] = a[13] - b[13];\n dest[14] = a[14] - b[14];\n dest[15] = a[15] - b[15];\n return dest;\n },\n\n /**\n * Subtracts the given scalar from each element of the given 4x4 matrix.\n * @method subMat4Scalar\n * @static\n */\n subMat4Scalar(m, s, dest) {\n if (!dest) {\n dest = m;\n }\n dest[0] = m[0] - s;\n dest[1] = m[1] - s;\n dest[2] = m[2] - s;\n dest[3] = m[3] - s;\n dest[4] = m[4] - s;\n dest[5] = m[5] - s;\n dest[6] = m[6] - s;\n dest[7] = m[7] - s;\n dest[8] = m[8] - s;\n dest[9] = m[9] - s;\n dest[10] = m[10] - s;\n dest[11] = m[11] - s;\n dest[12] = m[12] - s;\n dest[13] = m[13] - s;\n dest[14] = m[14] - s;\n dest[15] = m[15] - s;\n return dest;\n },\n\n /**\n * Subtracts the given scalar from each element of the given 4x4 matrix.\n * @method subScalarMat4\n * @static\n */\n subScalarMat4(s, m, dest) {\n if (!dest) {\n dest = m;\n }\n dest[0] = s - m[0];\n dest[1] = s - m[1];\n dest[2] = s - m[2];\n dest[3] = s - m[3];\n dest[4] = s - m[4];\n dest[5] = s - m[5];\n dest[6] = s - m[6];\n dest[7] = s - m[7];\n dest[8] = s - m[8];\n dest[9] = s - m[9];\n dest[10] = s - m[10];\n dest[11] = s - m[11];\n dest[12] = s - m[12];\n dest[13] = s - m[13];\n dest[14] = s - m[14];\n dest[15] = s - m[15];\n return dest;\n },\n\n /**\n * Multiplies the two given 4x4 matrix by each other.\n * @method mulMat4\n * @static\n */\n mulMat4(a, b, dest) {\n if (!dest) {\n dest = a;\n }\n\n // Cache the matrix values (makes for huge speed increases!)\n const a00 = a[0];\n\n const a01 = a[1];\n const a02 = a[2];\n const a03 = a[3];\n const a10 = a[4];\n const a11 = a[5];\n const a12 = a[6];\n const a13 = a[7];\n const a20 = a[8];\n const a21 = a[9];\n const a22 = a[10];\n const a23 = a[11];\n const a30 = a[12];\n const a31 = a[13];\n const a32 = a[14];\n const a33 = a[15];\n const b00 = b[0];\n const b01 = b[1];\n const b02 = b[2];\n const b03 = b[3];\n const b10 = b[4];\n const b11 = b[5];\n const b12 = b[6];\n const b13 = b[7];\n const b20 = b[8];\n const b21 = b[9];\n const b22 = b[10];\n const b23 = b[11];\n const b30 = b[12];\n const b31 = b[13];\n const b32 = b[14];\n const b33 = b[15];\n\n dest[0] = b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30;\n dest[1] = b00 * a01 + b01 * a11 + b02 * a21 + b03 * a31;\n dest[2] = b00 * a02 + b01 * a12 + b02 * a22 + b03 * a32;\n dest[3] = b00 * a03 + b01 * a13 + b02 * a23 + b03 * a33;\n dest[4] = b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30;\n dest[5] = b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31;\n dest[6] = b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32;\n dest[7] = b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33;\n dest[8] = b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30;\n dest[9] = b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31;\n dest[10] = b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32;\n dest[11] = b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33;\n dest[12] = b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30;\n dest[13] = b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31;\n dest[14] = b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32;\n dest[15] = b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33;\n\n return dest;\n },\n\n /**\n * Multiplies the two given 3x3 matrices by each other.\n * @method mulMat4\n * @static\n */\n mulMat3(a, b, dest) {\n if (!dest) {\n dest = new FloatArrayType(9);\n }\n\n const a11 = a[0];\n const a12 = a[3];\n const a13 = a[6];\n const a21 = a[1];\n const a22 = a[4];\n const a23 = a[7];\n const a31 = a[2];\n const a32 = a[5];\n const a33 = a[8];\n const b11 = b[0];\n const b12 = b[3];\n const b13 = b[6];\n const b21 = b[1];\n const b22 = b[4];\n const b23 = b[7];\n const b31 = b[2];\n const b32 = b[5];\n const b33 = b[8];\n\n dest[0] = a11 * b11 + a12 * b21 + a13 * b31;\n dest[3] = a11 * b12 + a12 * b22 + a13 * b32;\n dest[6] = a11 * b13 + a12 * b23 + a13 * b33;\n\n dest[1] = a21 * b11 + a22 * b21 + a23 * b31;\n dest[4] = a21 * b12 + a22 * b22 + a23 * b32;\n dest[7] = a21 * b13 + a22 * b23 + a23 * b33;\n\n dest[2] = a31 * b11 + a32 * b21 + a33 * b31;\n dest[5] = a31 * b12 + a32 * b22 + a33 * b32;\n dest[8] = a31 * b13 + a32 * b23 + a33 * b33;\n\n return dest;\n },\n\n /**\n * Multiplies each element of the given 4x4 matrix by the given scalar.\n * @method mulMat4Scalar\n * @static\n */\n mulMat4Scalar(m, s, dest) {\n if (!dest) {\n dest = m;\n }\n dest[0] = m[0] * s;\n dest[1] = m[1] * s;\n dest[2] = m[2] * s;\n dest[3] = m[3] * s;\n dest[4] = m[4] * s;\n dest[5] = m[5] * s;\n dest[6] = m[6] * s;\n dest[7] = m[7] * s;\n dest[8] = m[8] * s;\n dest[9] = m[9] * s;\n dest[10] = m[10] * s;\n dest[11] = m[11] * s;\n dest[12] = m[12] * s;\n dest[13] = m[13] * s;\n dest[14] = m[14] * s;\n dest[15] = m[15] * s;\n return dest;\n },\n\n /**\n * Multiplies the given 4x4 matrix by the given four-element vector.\n * @method mulMat4v4\n * @static\n */\n mulMat4v4(m, v, dest = math.vec4()) {\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n const v3 = v[3];\n dest[0] = m[0] * v0 + m[4] * v1 + m[8] * v2 + m[12] * v3;\n dest[1] = m[1] * v0 + m[5] * v1 + m[9] * v2 + m[13] * v3;\n dest[2] = m[2] * v0 + m[6] * v1 + m[10] * v2 + m[14] * v3;\n dest[3] = m[3] * v0 + m[7] * v1 + m[11] * v2 + m[15] * v3;\n return dest;\n },\n\n /**\n * Transposes the given 4x4 matrix.\n * @method transposeMat4\n * @static\n */\n transposeMat4(mat, dest) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n const m4 = mat[4];\n\n const m14 = mat[14];\n const m8 = mat[8];\n const m13 = mat[13];\n const m12 = mat[12];\n const m9 = mat[9];\n if (!dest || mat === dest) {\n const a01 = mat[1];\n const a02 = mat[2];\n const a03 = mat[3];\n const a12 = mat[6];\n const a13 = mat[7];\n const a23 = mat[11];\n mat[1] = m4;\n mat[2] = m8;\n mat[3] = m12;\n mat[4] = a01;\n mat[6] = m9;\n mat[7] = m13;\n mat[8] = a02;\n mat[9] = a12;\n mat[11] = m14;\n mat[12] = a03;\n mat[13] = a13;\n mat[14] = a23;\n return mat;\n }\n dest[0] = mat[0];\n dest[1] = m4;\n dest[2] = m8;\n dest[3] = m12;\n dest[4] = mat[1];\n dest[5] = mat[5];\n dest[6] = m9;\n dest[7] = m13;\n dest[8] = mat[2];\n dest[9] = mat[6];\n dest[10] = mat[10];\n dest[11] = m14;\n dest[12] = mat[3];\n dest[13] = mat[7];\n dest[14] = mat[11];\n dest[15] = mat[15];\n return dest;\n },\n\n /**\n * Transposes the given 3x3 matrix.\n *\n * @method transposeMat3\n * @static\n */\n transposeMat3(mat, dest) {\n if (dest === mat) {\n const a01 = mat[1];\n const a02 = mat[2];\n const a12 = mat[5];\n dest[1] = mat[3];\n dest[2] = mat[6];\n dest[3] = a01;\n dest[5] = mat[7];\n dest[6] = a02;\n dest[7] = a12;\n } else {\n dest[0] = mat[0];\n dest[1] = mat[3];\n dest[2] = mat[6];\n dest[3] = mat[1];\n dest[4] = mat[4];\n dest[5] = mat[7];\n dest[6] = mat[2];\n dest[7] = mat[5];\n dest[8] = mat[8];\n }\n return dest;\n },\n\n /**\n * Returns the determinant of the given 4x4 matrix.\n * @method determinantMat4\n * @static\n */\n determinantMat4(mat) {\n // Cache the matrix values (makes for huge speed increases!)\n const a00 = mat[0];\n\n const a01 = mat[1];\n const a02 = mat[2];\n const a03 = mat[3];\n const a10 = mat[4];\n const a11 = mat[5];\n const a12 = mat[6];\n const a13 = mat[7];\n const a20 = mat[8];\n const a21 = mat[9];\n const a22 = mat[10];\n const a23 = mat[11];\n const a30 = mat[12];\n const a31 = mat[13];\n const a32 = mat[14];\n const a33 = mat[15];\n return a30 * a21 * a12 * a03 - a20 * a31 * a12 * a03 - a30 * a11 * a22 * a03 + a10 * a31 * a22 * a03 +\n a20 * a11 * a32 * a03 - a10 * a21 * a32 * a03 - a30 * a21 * a02 * a13 + a20 * a31 * a02 * a13 +\n a30 * a01 * a22 * a13 - a00 * a31 * a22 * a13 - a20 * a01 * a32 * a13 + a00 * a21 * a32 * a13 +\n a30 * a11 * a02 * a23 - a10 * a31 * a02 * a23 - a30 * a01 * a12 * a23 + a00 * a31 * a12 * a23 +\n a10 * a01 * a32 * a23 - a00 * a11 * a32 * a23 - a20 * a11 * a02 * a33 + a10 * a21 * a02 * a33 +\n a20 * a01 * a12 * a33 - a00 * a21 * a12 * a33 - a10 * a01 * a22 * a33 + a00 * a11 * a22 * a33;\n },\n\n /**\n * Returns the inverse of the given 4x4 matrix.\n * @method inverseMat4\n * @static\n */\n inverseMat4(mat, dest) {\n if (!dest) {\n dest = mat;\n }\n\n // Cache the matrix values (makes for huge speed increases!)\n const a00 = mat[0];\n\n const a01 = mat[1];\n const a02 = mat[2];\n const a03 = mat[3];\n const a10 = mat[4];\n const a11 = mat[5];\n const a12 = mat[6];\n const a13 = mat[7];\n const a20 = mat[8];\n const a21 = mat[9];\n const a22 = mat[10];\n const a23 = mat[11];\n const a30 = mat[12];\n const a31 = mat[13];\n const a32 = mat[14];\n const a33 = mat[15];\n const b00 = a00 * a11 - a01 * a10;\n const b01 = a00 * a12 - a02 * a10;\n const b02 = a00 * a13 - a03 * a10;\n const b03 = a01 * a12 - a02 * a11;\n const b04 = a01 * a13 - a03 * a11;\n const b05 = a02 * a13 - a03 * a12;\n const b06 = a20 * a31 - a21 * a30;\n const b07 = a20 * a32 - a22 * a30;\n const b08 = a20 * a33 - a23 * a30;\n const b09 = a21 * a32 - a22 * a31;\n const b10 = a21 * a33 - a23 * a31;\n const b11 = a22 * a33 - a23 * a32;\n\n // Calculate the determinant (inlined to avoid double-caching)\n const invDet = 1 / (b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06);\n\n dest[0] = (a11 * b11 - a12 * b10 + a13 * b09) * invDet;\n dest[1] = (-a01 * b11 + a02 * b10 - a03 * b09) * invDet;\n dest[2] = (a31 * b05 - a32 * b04 + a33 * b03) * invDet;\n dest[3] = (-a21 * b05 + a22 * b04 - a23 * b03) * invDet;\n dest[4] = (-a10 * b11 + a12 * b08 - a13 * b07) * invDet;\n dest[5] = (a00 * b11 - a02 * b08 + a03 * b07) * invDet;\n dest[6] = (-a30 * b05 + a32 * b02 - a33 * b01) * invDet;\n dest[7] = (a20 * b05 - a22 * b02 + a23 * b01) * invDet;\n dest[8] = (a10 * b10 - a11 * b08 + a13 * b06) * invDet;\n dest[9] = (-a00 * b10 + a01 * b08 - a03 * b06) * invDet;\n dest[10] = (a30 * b04 - a31 * b02 + a33 * b00) * invDet;\n dest[11] = (-a20 * b04 + a21 * b02 - a23 * b00) * invDet;\n dest[12] = (-a10 * b09 + a11 * b07 - a12 * b06) * invDet;\n dest[13] = (a00 * b09 - a01 * b07 + a02 * b06) * invDet;\n dest[14] = (-a30 * b03 + a31 * b01 - a32 * b00) * invDet;\n dest[15] = (a20 * b03 - a21 * b01 + a22 * b00) * invDet;\n\n return dest;\n },\n\n /**\n * Returns the trace of the given 4x4 matrix.\n * @method traceMat4\n * @static\n */\n traceMat4(m) {\n return (m[0] + m[5] + m[10] + m[15]);\n },\n\n /**\n * Returns 4x4 translation matrix.\n * @method translationMat4\n * @static\n */\n translationMat4v(v, dest) {\n const m = dest || math.identityMat4();\n m[12] = v[0];\n m[13] = v[1];\n m[14] = v[2];\n return m;\n },\n\n /**\n * Returns 3x3 translation matrix.\n * @method translationMat3\n * @static\n */\n translationMat3v(v, dest) {\n const m = dest || math.identityMat3();\n m[6] = v[0];\n m[7] = v[1];\n return m;\n },\n\n /**\n * Returns 4x4 translation matrix.\n * @method translationMat4c\n * @static\n */\n translationMat4c: ((() => {\n const xyz = new FloatArrayType(3);\n return (x, y, z, dest) => {\n xyz[0] = x;\n xyz[1] = y;\n xyz[2] = z;\n return math.translationMat4v(xyz, dest);\n };\n }))(),\n\n /**\n * Returns 4x4 translation matrix.\n * @method translationMat4s\n * @static\n */\n translationMat4s(s, dest) {\n return math.translationMat4c(s, s, s, dest);\n },\n\n /**\n * Efficiently post-concatenates a translation to the given matrix.\n * @param v\n * @param m\n */\n translateMat4v(xyz, m) {\n return math.translateMat4c(xyz[0], xyz[1], xyz[2], m);\n },\n\n /**\n * Efficiently post-concatenates a translation to the given matrix.\n * @param x\n * @param y\n * @param z\n * @param m\n */\n OLDtranslateMat4c(x, y, z, m) {\n\n const m12 = m[12];\n m[0] += m12 * x;\n m[4] += m12 * y;\n m[8] += m12 * z;\n\n const m13 = m[13];\n m[1] += m13 * x;\n m[5] += m13 * y;\n m[9] += m13 * z;\n\n const m14 = m[14];\n m[2] += m14 * x;\n m[6] += m14 * y;\n m[10] += m14 * z;\n\n const m15 = m[15];\n m[3] += m15 * x;\n m[7] += m15 * y;\n m[11] += m15 * z;\n\n return m;\n },\n\n translateMat4c(x, y, z, m) {\n\n const m3 = m[3];\n m[0] += m3 * x;\n m[1] += m3 * y;\n m[2] += m3 * z;\n\n const m7 = m[7];\n m[4] += m7 * x;\n m[5] += m7 * y;\n m[6] += m7 * z;\n\n const m11 = m[11];\n m[8] += m11 * x;\n m[9] += m11 * y;\n m[10] += m11 * z;\n\n const m15 = m[15];\n m[12] += m15 * x;\n m[13] += m15 * y;\n m[14] += m15 * z;\n\n return m;\n },\n /**\n * Returns 4x4 rotation matrix.\n * @method rotationMat4v\n * @static\n */\n rotationMat4v(anglerad, axis, m) {\n const ax = math.normalizeVec4([axis[0], axis[1], axis[2], 0.0], []);\n const s = Math.sin(anglerad);\n const c = Math.cos(anglerad);\n const q = 1.0 - c;\n\n const x = ax[0];\n const y = ax[1];\n const z = ax[2];\n\n let xy;\n let yz;\n let zx;\n let xs;\n let ys;\n let zs;\n\n //xx = x * x; used once\n //yy = y * y; used once\n //zz = z * z; used once\n xy = x * y;\n yz = y * z;\n zx = z * x;\n xs = x * s;\n ys = y * s;\n zs = z * s;\n\n m = m || math.mat4();\n\n m[0] = (q * x * x) + c;\n m[1] = (q * xy) + zs;\n m[2] = (q * zx) - ys;\n m[3] = 0.0;\n\n m[4] = (q * xy) - zs;\n m[5] = (q * y * y) + c;\n m[6] = (q * yz) + xs;\n m[7] = 0.0;\n\n m[8] = (q * zx) + ys;\n m[9] = (q * yz) - xs;\n m[10] = (q * z * z) + c;\n m[11] = 0.0;\n\n m[12] = 0.0;\n m[13] = 0.0;\n m[14] = 0.0;\n m[15] = 1.0;\n\n return m;\n },\n\n /**\n * Returns 4x4 rotation matrix.\n * @method rotationMat4c\n * @static\n */\n rotationMat4c(anglerad, x, y, z, mat) {\n return math.rotationMat4v(anglerad, [x, y, z], mat);\n },\n\n /**\n * Returns 4x4 scale matrix.\n * @method scalingMat4v\n * @static\n */\n scalingMat4v(v, m = math.identityMat4()) {\n m[0] = v[0];\n m[5] = v[1];\n m[10] = v[2];\n return m;\n },\n\n /**\n * Returns 3x3 scale matrix.\n * @method scalingMat3v\n * @static\n */\n scalingMat3v(v, m = math.identityMat3()) {\n m[0] = v[0];\n m[4] = v[1];\n return m;\n },\n\n /**\n * Returns 4x4 scale matrix.\n * @method scalingMat4c\n * @static\n */\n scalingMat4c: ((() => {\n const xyz = new FloatArrayType(3);\n return (x, y, z, dest) => {\n xyz[0] = x;\n xyz[1] = y;\n xyz[2] = z;\n return math.scalingMat4v(xyz, dest);\n };\n }))(),\n\n /**\n * Efficiently post-concatenates a scaling to the given matrix.\n * @method scaleMat4c\n * @param x\n * @param y\n * @param z\n * @param m\n */\n scaleMat4c(x, y, z, m) {\n\n m[0] *= x;\n m[4] *= y;\n m[8] *= z;\n\n m[1] *= x;\n m[5] *= y;\n m[9] *= z;\n\n m[2] *= x;\n m[6] *= y;\n m[10] *= z;\n\n m[3] *= x;\n m[7] *= y;\n m[11] *= z;\n return m;\n },\n\n /**\n * Efficiently post-concatenates a scaling to the given matrix.\n * @method scaleMat4c\n * @param xyz\n * @param m\n */\n scaleMat4v(xyz, m) {\n\n const x = xyz[0];\n const y = xyz[1];\n const z = xyz[2];\n\n m[0] *= x;\n m[4] *= y;\n m[8] *= z;\n m[1] *= x;\n m[5] *= y;\n m[9] *= z;\n m[2] *= x;\n m[6] *= y;\n m[10] *= z;\n m[3] *= x;\n m[7] *= y;\n m[11] *= z;\n\n return m;\n },\n\n /**\n * Returns 4x4 scale matrix.\n * @method scalingMat4s\n * @static\n */\n scalingMat4s(s) {\n return math.scalingMat4c(s, s, s);\n },\n\n /**\n * Creates a matrix from a quaternion rotation and vector translation\n *\n * @param {Number[]} q Rotation quaternion\n * @param {Number[]} v Translation vector\n * @param {Number[]} dest Destination matrix\n * @returns {Number[]} dest\n */\n rotationTranslationMat4(q, v, dest = math.mat4()) {\n const x = q[0];\n const y = q[1];\n const z = q[2];\n const w = q[3];\n\n const x2 = x + x;\n const y2 = y + y;\n const z2 = z + z;\n const xx = x * x2;\n const xy = x * y2;\n const xz = x * z2;\n const yy = y * y2;\n const yz = y * z2;\n const zz = z * z2;\n const wx = w * x2;\n const wy = w * y2;\n const wz = w * z2;\n\n dest[0] = 1 - (yy + zz);\n dest[1] = xy + wz;\n dest[2] = xz - wy;\n dest[3] = 0;\n dest[4] = xy - wz;\n dest[5] = 1 - (xx + zz);\n dest[6] = yz + wx;\n dest[7] = 0;\n dest[8] = xz + wy;\n dest[9] = yz - wx;\n dest[10] = 1 - (xx + yy);\n dest[11] = 0;\n dest[12] = v[0];\n dest[13] = v[1];\n dest[14] = v[2];\n dest[15] = 1;\n\n return dest;\n },\n\n /**\n * Gets Euler angles from a 4x4 matrix.\n *\n * @param {Number[]} mat The 4x4 matrix.\n * @param {String} order Desired Euler angle order: \"XYZ\", \"YXZ\", \"ZXY\" etc.\n * @param {Number[]} [dest] Destination Euler angles, created by default.\n * @returns {Number[]} The Euler angles.\n */\n mat4ToEuler(mat, order, dest = math.vec4()) {\n const clamp = math.clamp;\n\n // Assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\n const m11 = mat[0];\n\n const m12 = mat[4];\n const m13 = mat[8];\n const m21 = mat[1];\n const m22 = mat[5];\n const m23 = mat[9];\n const m31 = mat[2];\n const m32 = mat[6];\n const m33 = mat[10];\n\n if (order === 'XYZ') {\n\n dest[1] = Math.asin(clamp(m13, -1, 1));\n\n if (Math.abs(m13) < 0.99999) {\n dest[0] = Math.atan2(-m23, m33);\n dest[2] = Math.atan2(-m12, m11);\n } else {\n dest[0] = Math.atan2(m32, m22);\n dest[2] = 0;\n\n }\n\n } else if (order === 'YXZ') {\n\n dest[0] = Math.asin(-clamp(m23, -1, 1));\n\n if (Math.abs(m23) < 0.99999) {\n dest[1] = Math.atan2(m13, m33);\n dest[2] = Math.atan2(m21, m22);\n } else {\n dest[1] = Math.atan2(-m31, m11);\n dest[2] = 0;\n }\n\n } else if (order === 'ZXY') {\n\n dest[0] = Math.asin(clamp(m32, -1, 1));\n\n if (Math.abs(m32) < 0.99999) {\n dest[1] = Math.atan2(-m31, m33);\n dest[2] = Math.atan2(-m12, m22);\n } else {\n dest[1] = 0;\n dest[2] = Math.atan2(m21, m11);\n }\n\n } else if (order === 'ZYX') {\n\n dest[1] = Math.asin(-clamp(m31, -1, 1));\n\n if (Math.abs(m31) < 0.99999) {\n dest[0] = Math.atan2(m32, m33);\n dest[2] = Math.atan2(m21, m11);\n } else {\n dest[0] = 0;\n dest[2] = Math.atan2(-m12, m22);\n }\n\n } else if (order === 'YZX') {\n\n dest[2] = Math.asin(clamp(m21, -1, 1));\n\n if (Math.abs(m21) < 0.99999) {\n dest[0] = Math.atan2(-m23, m22);\n dest[1] = Math.atan2(-m31, m11);\n } else {\n dest[0] = 0;\n dest[1] = Math.atan2(m13, m33);\n }\n\n } else if (order === 'XZY') {\n\n dest[2] = Math.asin(-clamp(m12, -1, 1));\n\n if (Math.abs(m12) < 0.99999) {\n dest[0] = Math.atan2(m32, m22);\n dest[1] = Math.atan2(m13, m11);\n } else {\n dest[0] = Math.atan2(-m23, m33);\n dest[1] = 0;\n }\n }\n\n return dest;\n },\n\n composeMat4(position, quaternion, scale, mat = math.mat4()) {\n math.quaternionToRotationMat4(quaternion, mat);\n math.scaleMat4v(scale, mat);\n math.translateMat4v(position, mat);\n\n return mat;\n },\n\n decomposeMat4: (() => {\n\n const vec = new FloatArrayType(3);\n const matrix = new FloatArrayType(16);\n\n return function decompose(mat, position, quaternion, scale) {\n\n vec[0] = mat[0];\n vec[1] = mat[1];\n vec[2] = mat[2];\n\n let sx = math.lenVec3(vec);\n\n vec[0] = mat[4];\n vec[1] = mat[5];\n vec[2] = mat[6];\n\n const sy = math.lenVec3(vec);\n\n vec[8] = mat[8];\n vec[9] = mat[9];\n vec[10] = mat[10];\n\n const sz = math.lenVec3(vec);\n\n // if determine is negative, we need to invert one scale\n const det = math.determinantMat4(mat);\n\n if (det < 0) {\n sx = -sx;\n }\n\n position[0] = mat[12];\n position[1] = mat[13];\n position[2] = mat[14];\n\n // scale the rotation part\n matrix.set(mat);\n\n const invSX = 1 / sx;\n const invSY = 1 / sy;\n const invSZ = 1 / sz;\n\n matrix[0] *= invSX;\n matrix[1] *= invSX;\n matrix[2] *= invSX;\n\n matrix[4] *= invSY;\n matrix[5] *= invSY;\n matrix[6] *= invSY;\n\n matrix[8] *= invSZ;\n matrix[9] *= invSZ;\n matrix[10] *= invSZ;\n\n math.mat4ToQuaternion(matrix, quaternion);\n\n scale[0] = sx;\n scale[1] = sy;\n scale[2] = sz;\n\n return this;\n\n };\n\n })(),\n\n /**\n * Returns a 4x4 'lookat' viewing transform matrix.\n * @method lookAtMat4v\n * @param pos vec3 position of the viewer\n * @param target vec3 point the viewer is looking at\n * @param up vec3 pointing \"up\"\n * @param dest mat4 Optional, mat4 matrix will be written into\n *\n * @return {mat4} dest if specified, a new mat4 otherwise\n */\n lookAtMat4v(pos, target, up, dest) {\n if (!dest) {\n dest = math.mat4();\n }\n\n const posx = pos[0];\n const posy = pos[1];\n const posz = pos[2];\n const upx = up[0];\n const upy = up[1];\n const upz = up[2];\n const targetx = target[0];\n const targety = target[1];\n const targetz = target[2];\n\n if (posx === targetx && posy === targety && posz === targetz) {\n return math.identityMat4();\n }\n\n let z0;\n let z1;\n let z2;\n let x0;\n let x1;\n let x2;\n let y0;\n let y1;\n let y2;\n let len;\n\n //vec3.direction(eye, center, z);\n z0 = posx - targetx;\n z1 = posy - targety;\n z2 = posz - targetz;\n\n // normalize (no check needed for 0 because of early return)\n len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n\n //vec3.normalize(vec3.cross(up, z, x));\n x0 = upy * z2 - upz * z1;\n x1 = upz * z0 - upx * z2;\n x2 = upx * z1 - upy * z0;\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\n if (!len) {\n x0 = 0;\n x1 = 0;\n x2 = 0;\n } else {\n len = 1 / len;\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n //vec3.normalize(vec3.cross(z, x, y));\n y0 = z1 * x2 - z2 * x1;\n y1 = z2 * x0 - z0 * x2;\n y2 = z0 * x1 - z1 * x0;\n\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\n if (!len) {\n y0 = 0;\n y1 = 0;\n y2 = 0;\n } else {\n len = 1 / len;\n y0 *= len;\n y1 *= len;\n y2 *= len;\n }\n\n dest[0] = x0;\n dest[1] = y0;\n dest[2] = z0;\n dest[3] = 0;\n dest[4] = x1;\n dest[5] = y1;\n dest[6] = z1;\n dest[7] = 0;\n dest[8] = x2;\n dest[9] = y2;\n dest[10] = z2;\n dest[11] = 0;\n dest[12] = -(x0 * posx + x1 * posy + x2 * posz);\n dest[13] = -(y0 * posx + y1 * posy + y2 * posz);\n dest[14] = -(z0 * posx + z1 * posy + z2 * posz);\n dest[15] = 1;\n\n return dest;\n },\n\n /**\n * Returns a 4x4 'lookat' viewing transform matrix.\n * @method lookAtMat4c\n * @static\n */\n lookAtMat4c(posx, posy, posz, targetx, targety, targetz, upx, upy, upz) {\n return math.lookAtMat4v([posx, posy, posz], [targetx, targety, targetz], [upx, upy, upz], []);\n },\n\n /**\n * Returns a 4x4 orthographic projection matrix.\n * @method orthoMat4c\n * @static\n */\n orthoMat4c(left, right, bottom, top, near, far, dest) {\n if (!dest) {\n dest = math.mat4();\n }\n const rl = (right - left);\n const tb = (top - bottom);\n const fn = (far - near);\n\n dest[0] = 2.0 / rl;\n dest[1] = 0.0;\n dest[2] = 0.0;\n dest[3] = 0.0;\n\n dest[4] = 0.0;\n dest[5] = 2.0 / tb;\n dest[6] = 0.0;\n dest[7] = 0.0;\n\n dest[8] = 0.0;\n dest[9] = 0.0;\n dest[10] = -2.0 / fn;\n dest[11] = 0.0;\n\n dest[12] = -(left + right) / rl;\n dest[13] = -(top + bottom) / tb;\n dest[14] = -(far + near) / fn;\n dest[15] = 1.0;\n\n return dest;\n },\n\n /**\n * Returns a 4x4 perspective projection matrix.\n * @method frustumMat4v\n * @static\n */\n frustumMat4v(fmin, fmax, m) {\n if (!m) {\n m = math.mat4();\n }\n\n const fmin4 = [fmin[0], fmin[1], fmin[2], 0.0];\n const fmax4 = [fmax[0], fmax[1], fmax[2], 0.0];\n\n math.addVec4(fmax4, fmin4, tempMat1);\n math.subVec4(fmax4, fmin4, tempMat2);\n\n const t = 2.0 * fmin4[2];\n\n const tempMat20 = tempMat2[0];\n const tempMat21 = tempMat2[1];\n const tempMat22 = tempMat2[2];\n\n m[0] = t / tempMat20;\n m[1] = 0.0;\n m[2] = 0.0;\n m[3] = 0.0;\n\n m[4] = 0.0;\n m[5] = t / tempMat21;\n m[6] = 0.0;\n m[7] = 0.0;\n\n m[8] = tempMat1[0] / tempMat20;\n m[9] = tempMat1[1] / tempMat21;\n m[10] = -tempMat1[2] / tempMat22;\n m[11] = -1.0;\n\n m[12] = 0.0;\n m[13] = 0.0;\n m[14] = -t * fmax4[2] / tempMat22;\n m[15] = 0.0;\n\n return m;\n },\n\n /**\n * Returns a 4x4 perspective projection matrix.\n * @method frustumMat4v\n * @static\n */\n frustumMat4(left, right, bottom, top, near, far, dest) {\n if (!dest) {\n dest = math.mat4();\n }\n const rl = (right - left);\n const tb = (top - bottom);\n const fn = (far - near);\n dest[0] = (near * 2) / rl;\n dest[1] = 0;\n dest[2] = 0;\n dest[3] = 0;\n dest[4] = 0;\n dest[5] = (near * 2) / tb;\n dest[6] = 0;\n dest[7] = 0;\n dest[8] = (right + left) / rl;\n dest[9] = (top + bottom) / tb;\n dest[10] = -(far + near) / fn;\n dest[11] = -1;\n dest[12] = 0;\n dest[13] = 0;\n dest[14] = -(far * near * 2) / fn;\n dest[15] = 0;\n return dest;\n },\n\n /**\n * Returns a 4x4 perspective projection matrix.\n * @method perspectiveMat4v\n * @static\n */\n perspectiveMat4(fovyrad, aspectratio, znear, zfar, m) {\n const pmin = [];\n const pmax = [];\n\n pmin[2] = znear;\n pmax[2] = zfar;\n\n pmax[1] = pmin[2] * Math.tan(fovyrad / 2.0);\n pmin[1] = -pmax[1];\n\n pmax[0] = pmax[1] * aspectratio;\n pmin[0] = -pmax[0];\n\n return math.frustumMat4v(pmin, pmax, m);\n },\n\n /**\n * Transforms a three-element position by a 4x4 matrix.\n * @method transformPoint3\n * @static\n */\n transformPoint3(m, p, dest = math.vec3()) {\n\n const x = p[0];\n const y = p[1];\n const z = p[2];\n\n dest[0] = (m[0] * x) + (m[4] * y) + (m[8] * z) + m[12];\n dest[1] = (m[1] * x) + (m[5] * y) + (m[9] * z) + m[13];\n dest[2] = (m[2] * x) + (m[6] * y) + (m[10] * z) + m[14];\n\n return dest;\n },\n\n /**\n * Transforms a homogeneous coordinate by a 4x4 matrix.\n * @method transformPoint3\n * @static\n */\n transformPoint4(m, v, dest = math.vec4()) {\n dest[0] = m[0] * v[0] + m[4] * v[1] + m[8] * v[2] + m[12] * v[3];\n dest[1] = m[1] * v[0] + m[5] * v[1] + m[9] * v[2] + m[13] * v[3];\n dest[2] = m[2] * v[0] + m[6] * v[1] + m[10] * v[2] + m[14] * v[3];\n dest[3] = m[3] * v[0] + m[7] * v[1] + m[11] * v[2] + m[15] * v[3];\n\n return dest;\n },\n\n\n /**\n * Transforms an array of three-element positions by a 4x4 matrix.\n * @method transformPoints3\n * @static\n */\n transformPoints3(m, points, points2) {\n const result = points2 || [];\n const len = points.length;\n let p0;\n let p1;\n let p2;\n let pi;\n\n // cache values\n const m0 = m[0];\n\n const m1 = m[1];\n const m2 = m[2];\n const m3 = m[3];\n const m4 = m[4];\n const m5 = m[5];\n const m6 = m[6];\n const m7 = m[7];\n const m8 = m[8];\n const m9 = m[9];\n const m10 = m[10];\n const m11 = m[11];\n const m12 = m[12];\n const m13 = m[13];\n const m14 = m[14];\n const m15 = m[15];\n\n let r;\n\n for (let i = 0; i < len; ++i) {\n\n // cache values\n pi = points[i];\n\n p0 = pi[0];\n p1 = pi[1];\n p2 = pi[2];\n\n r = result[i] || (result[i] = [0, 0, 0]);\n\n r[0] = (m0 * p0) + (m4 * p1) + (m8 * p2) + m12;\n r[1] = (m1 * p0) + (m5 * p1) + (m9 * p2) + m13;\n r[2] = (m2 * p0) + (m6 * p1) + (m10 * p2) + m14;\n r[3] = (m3 * p0) + (m7 * p1) + (m11 * p2) + m15;\n }\n\n result.length = len;\n\n return result;\n },\n\n /**\n * Transforms an array of positions by a 4x4 matrix.\n * @method transformPositions3\n * @static\n */\n transformPositions3(m, p, p2 = p) {\n let i;\n const len = p.length;\n\n let x;\n let y;\n let z;\n\n const m0 = m[0];\n const m1 = m[1];\n const m2 = m[2];\n const m3 = m[3];\n const m4 = m[4];\n const m5 = m[5];\n const m6 = m[6];\n const m7 = m[7];\n const m8 = m[8];\n const m9 = m[9];\n const m10 = m[10];\n const m11 = m[11];\n const m12 = m[12];\n const m13 = m[13];\n const m14 = m[14];\n const m15 = m[15];\n\n for (i = 0; i < len; i += 3) {\n\n x = p[i + 0];\n y = p[i + 1];\n z = p[i + 2];\n\n p2[i + 0] = (m0 * x) + (m4 * y) + (m8 * z) + m12;\n p2[i + 1] = (m1 * x) + (m5 * y) + (m9 * z) + m13;\n p2[i + 2] = (m2 * x) + (m6 * y) + (m10 * z) + m14;\n p2[i + 3] = (m3 * x) + (m7 * y) + (m11 * z) + m15;\n }\n\n return p2;\n },\n\n /**\n * Transforms an array of positions by a 4x4 matrix.\n * @method transformPositions4\n * @static\n */\n transformPositions4(m, p, p2 = p) {\n let i;\n const len = p.length;\n\n let x;\n let y;\n let z;\n\n const m0 = m[0];\n const m1 = m[1];\n const m2 = m[2];\n const m3 = m[3];\n const m4 = m[4];\n const m5 = m[5];\n const m6 = m[6];\n const m7 = m[7];\n const m8 = m[8];\n const m9 = m[9];\n const m10 = m[10];\n const m11 = m[11];\n const m12 = m[12];\n const m13 = m[13];\n const m14 = m[14];\n const m15 = m[15];\n\n for (i = 0; i < len; i += 4) {\n\n x = p[i + 0];\n y = p[i + 1];\n z = p[i + 2];\n\n p2[i + 0] = (m0 * x) + (m4 * y) + (m8 * z) + m12;\n p2[i + 1] = (m1 * x) + (m5 * y) + (m9 * z) + m13;\n p2[i + 2] = (m2 * x) + (m6 * y) + (m10 * z) + m14;\n p2[i + 3] = (m3 * x) + (m7 * y) + (m11 * z) + m15;\n }\n\n return p2;\n },\n\n /**\n * Transforms a three-element vector by a 4x4 matrix.\n * @method transformVec3\n * @static\n */\n transformVec3(m, v, dest) {\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n dest = dest || this.vec3();\n dest[0] = (m[0] * v0) + (m[4] * v1) + (m[8] * v2);\n dest[1] = (m[1] * v0) + (m[5] * v1) + (m[9] * v2);\n dest[2] = (m[2] * v0) + (m[6] * v1) + (m[10] * v2);\n return dest;\n },\n\n /**\n * Transforms a four-element vector by a 4x4 matrix.\n * @method transformVec4\n * @static\n */\n transformVec4(m, v, dest) {\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n const v3 = v[3];\n dest = dest || math.vec4();\n dest[0] = m[0] * v0 + m[4] * v1 + m[8] * v2 + m[12] * v3;\n dest[1] = m[1] * v0 + m[5] * v1 + m[9] * v2 + m[13] * v3;\n dest[2] = m[2] * v0 + m[6] * v1 + m[10] * v2 + m[14] * v3;\n dest[3] = m[3] * v0 + m[7] * v1 + m[11] * v2 + m[15] * v3;\n return dest;\n },\n\n /**\n * Rotate a 3D vector around the x-axis\n *\n * @method rotateVec3X\n * @param {Number[]} a The vec3 point to rotate\n * @param {Number[]} b The origin of the rotation\n * @param {Number} c The angle of rotation\n * @param {Number[]} dest The receiving vec3\n * @returns {Number[]} dest\n * @static\n */\n rotateVec3X(a, b, c, dest) {\n const p = [];\n const r = [];\n\n //Translate point to the origin\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2];\n\n //perform rotation\n r[0] = p[0];\n r[1] = p[1] * Math.cos(c) - p[2] * Math.sin(c);\n r[2] = p[1] * Math.sin(c) + p[2] * Math.cos(c);\n\n //translate to correct position\n dest[0] = r[0] + b[0];\n dest[1] = r[1] + b[1];\n dest[2] = r[2] + b[2];\n\n return dest;\n },\n\n /**\n * Rotate a 3D vector around the y-axis\n *\n * @method rotateVec3Y\n * @param {Number[]} a The vec3 point to rotate\n * @param {Number[]} b The origin of the rotation\n * @param {Number} c The angle of rotation\n * @param {Number[]} dest The receiving vec3\n * @returns {Number[]} dest\n * @static\n */\n rotateVec3Y(a, b, c, dest) {\n const p = [];\n const r = [];\n\n //Translate point to the origin\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2];\n\n //perform rotation\n r[0] = p[2] * Math.sin(c) + p[0] * Math.cos(c);\n r[1] = p[1];\n r[2] = p[2] * Math.cos(c) - p[0] * Math.sin(c);\n\n //translate to correct position\n dest[0] = r[0] + b[0];\n dest[1] = r[1] + b[1];\n dest[2] = r[2] + b[2];\n\n return dest;\n },\n\n /**\n * Rotate a 3D vector around the z-axis\n *\n * @method rotateVec3Z\n * @param {Number[]} a The vec3 point to rotate\n * @param {Number[]} b The origin of the rotation\n * @param {Number} c The angle of rotation\n * @param {Number[]} dest The receiving vec3\n * @returns {Number[]} dest\n * @static\n */\n rotateVec3Z(a, b, c, dest) {\n const p = [];\n const r = [];\n\n //Translate point to the origin\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2];\n\n //perform rotation\n r[0] = p[0] * Math.cos(c) - p[1] * Math.sin(c);\n r[1] = p[0] * Math.sin(c) + p[1] * Math.cos(c);\n r[2] = p[2];\n\n //translate to correct position\n dest[0] = r[0] + b[0];\n dest[1] = r[1] + b[1];\n dest[2] = r[2] + b[2];\n\n return dest;\n },\n\n /**\n * Transforms a four-element vector by a 4x4 projection matrix.\n *\n * @method projectVec4\n * @param {Number[]} p 3D View-space coordinate\n * @param {Number[]} q 2D Projected coordinate\n * @returns {Number[]} 2D Projected coordinate\n * @static\n */\n projectVec4(p, q) {\n const f = 1.0 / p[3];\n q = q || math.vec2();\n q[0] = v[0] * f;\n q[1] = v[1] * f;\n return q;\n },\n\n /**\n * Unprojects a three-element vector.\n *\n * @method unprojectVec3\n * @param {Number[]} p 3D Projected coordinate\n * @param {Number[]} viewMat View matrix\n * @returns {Number[]} projMat Projection matrix\n * @static\n */\n unprojectVec3: ((() => {\n const mat = new FloatArrayType(16);\n const mat2 = new FloatArrayType(16);\n const mat3 = new FloatArrayType(16);\n return function (p, viewMat, projMat, q) {\n return this.transformVec3(this.mulMat4(this.inverseMat4(viewMat, mat), this.inverseMat4(projMat, mat2), mat3), p, q)\n };\n }))(),\n\n /**\n * Linearly interpolates between two 3D vectors.\n * @method lerpVec3\n * @static\n */\n lerpVec3(t, t1, t2, p1, p2, dest) {\n const result = dest || math.vec3();\n const f = (t - t1) / (t2 - t1);\n result[0] = p1[0] + (f * (p2[0] - p1[0]));\n result[1] = p1[1] + (f * (p2[1] - p1[1]));\n result[2] = p1[2] + (f * (p2[2] - p1[2]));\n return result;\n },\n\n\n /**\n * Flattens a two-dimensional array into a one-dimensional array.\n *\n * @method flatten\n * @static\n * @param {Array of Arrays} a A 2D array\n * @returns Flattened 1D array\n */\n flatten(a) {\n\n const result = [];\n\n let i;\n let leni;\n let j;\n let lenj;\n let item;\n\n for (i = 0, leni = a.length; i < leni; i++) {\n item = a[i];\n for (j = 0, lenj = item.length; j < lenj; j++) {\n result.push(item[j]);\n }\n }\n\n return result;\n },\n\n\n identityQuaternion(dest = math.vec4()) {\n dest[0] = 0.0;\n dest[1] = 0.0;\n dest[2] = 0.0;\n dest[3] = 1.0;\n return dest;\n },\n\n /**\n * Initializes a quaternion from Euler angles.\n *\n * @param {Number[]} euler The Euler angles.\n * @param {String} order Euler angle order: \"XYZ\", \"YXZ\", \"ZXY\" etc.\n * @param {Number[]} [dest] Destination quaternion, created by default.\n * @returns {Number[]} The quaternion.\n */\n eulerToQuaternion(euler, order, dest = math.vec4()) {\n // http://www.mathworks.com/matlabcentral/fileexchange/\n // \t20696-function-to-convert-between-dcm-euler-angles-quaternions-and-euler-vectors/\n //\tcontent/SpinCalc.m\n\n const a = (euler[0] * math.DEGTORAD) / 2;\n const b = (euler[1] * math.DEGTORAD) / 2;\n const c = (euler[2] * math.DEGTORAD) / 2;\n\n const c1 = Math.cos(a);\n const c2 = Math.cos(b);\n const c3 = Math.cos(c);\n const s1 = Math.sin(a);\n const s2 = Math.sin(b);\n const s3 = Math.sin(c);\n\n if (order === 'XYZ') {\n\n dest[0] = s1 * c2 * c3 + c1 * s2 * s3;\n dest[1] = c1 * s2 * c3 - s1 * c2 * s3;\n dest[2] = c1 * c2 * s3 + s1 * s2 * c3;\n dest[3] = c1 * c2 * c3 - s1 * s2 * s3;\n\n } else if (order === 'YXZ') {\n\n dest[0] = s1 * c2 * c3 + c1 * s2 * s3;\n dest[1] = c1 * s2 * c3 - s1 * c2 * s3;\n dest[2] = c1 * c2 * s3 - s1 * s2 * c3;\n dest[3] = c1 * c2 * c3 + s1 * s2 * s3;\n\n } else if (order === 'ZXY') {\n\n dest[0] = s1 * c2 * c3 - c1 * s2 * s3;\n dest[1] = c1 * s2 * c3 + s1 * c2 * s3;\n dest[2] = c1 * c2 * s3 + s1 * s2 * c3;\n dest[3] = c1 * c2 * c3 - s1 * s2 * s3;\n\n } else if (order === 'ZYX') {\n\n dest[0] = s1 * c2 * c3 - c1 * s2 * s3;\n dest[1] = c1 * s2 * c3 + s1 * c2 * s3;\n dest[2] = c1 * c2 * s3 - s1 * s2 * c3;\n dest[3] = c1 * c2 * c3 + s1 * s2 * s3;\n\n } else if (order === 'YZX') {\n\n dest[0] = s1 * c2 * c3 + c1 * s2 * s3;\n dest[1] = c1 * s2 * c3 + s1 * c2 * s3;\n dest[2] = c1 * c2 * s3 - s1 * s2 * c3;\n dest[3] = c1 * c2 * c3 - s1 * s2 * s3;\n\n } else if (order === 'XZY') {\n\n dest[0] = s1 * c2 * c3 - c1 * s2 * s3;\n dest[1] = c1 * s2 * c3 - s1 * c2 * s3;\n dest[2] = c1 * c2 * s3 + s1 * s2 * c3;\n dest[3] = c1 * c2 * c3 + s1 * s2 * s3;\n }\n\n return dest;\n },\n\n mat4ToQuaternion(m, dest = math.vec4()) {\n // http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm\n\n // Assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\n const m11 = m[0];\n const m12 = m[4];\n const m13 = m[8];\n const m21 = m[1];\n const m22 = m[5];\n const m23 = m[9];\n const m31 = m[2];\n const m32 = m[6];\n const m33 = m[10];\n let s;\n\n const trace = m11 + m22 + m33;\n\n if (trace > 0) {\n\n s = 0.5 / Math.sqrt(trace + 1.0);\n\n dest[3] = 0.25 / s;\n dest[0] = (m32 - m23) * s;\n dest[1] = (m13 - m31) * s;\n dest[2] = (m21 - m12) * s;\n\n } else if (m11 > m22 && m11 > m33) {\n\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\n\n dest[3] = (m32 - m23) / s;\n dest[0] = 0.25 * s;\n dest[1] = (m12 + m21) / s;\n dest[2] = (m13 + m31) / s;\n\n } else if (m22 > m33) {\n\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\n\n dest[3] = (m13 - m31) / s;\n dest[0] = (m12 + m21) / s;\n dest[1] = 0.25 * s;\n dest[2] = (m23 + m32) / s;\n\n } else {\n\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\n\n dest[3] = (m21 - m12) / s;\n dest[0] = (m13 + m31) / s;\n dest[1] = (m23 + m32) / s;\n dest[2] = 0.25 * s;\n }\n\n return dest;\n },\n\n vec3PairToQuaternion(u, v, dest = math.vec4()) {\n const norm_u_norm_v = Math.sqrt(math.dotVec3(u, u) * math.dotVec3(v, v));\n let real_part = norm_u_norm_v + math.dotVec3(u, v);\n\n if (real_part < 0.00000001 * norm_u_norm_v) {\n\n // If u and v are exactly opposite, rotate 180 degrees\n // around an arbitrary orthogonal axis. Axis normalisation\n // can happen later, when we normalise the quaternion.\n\n real_part = 0.0;\n\n if (Math.abs(u[0]) > Math.abs(u[2])) {\n\n dest[0] = -u[1];\n dest[1] = u[0];\n dest[2] = 0;\n\n } else {\n dest[0] = 0;\n dest[1] = -u[2];\n dest[2] = u[1]\n }\n\n } else {\n\n // Otherwise, build quaternion the standard way.\n math.cross3Vec3(u, v, dest);\n }\n\n dest[3] = real_part;\n\n return math.normalizeQuaternion(dest);\n },\n\n angleAxisToQuaternion(angleAxis, dest = math.vec4()) {\n const halfAngle = angleAxis[3] / 2.0;\n const fsin = Math.sin(halfAngle);\n dest[0] = fsin * angleAxis[0];\n dest[1] = fsin * angleAxis[1];\n dest[2] = fsin * angleAxis[2];\n dest[3] = Math.cos(halfAngle);\n return dest;\n },\n\n quaternionToEuler: ((() => {\n const mat = new FloatArrayType(16);\n return (q, order, dest) => {\n dest = dest || math.vec3();\n math.quaternionToRotationMat4(q, mat);\n math.mat4ToEuler(mat, order, dest);\n return dest;\n };\n }))(),\n\n mulQuaternions(p, q, dest = math.vec4()) {\n const p0 = p[0];\n const p1 = p[1];\n const p2 = p[2];\n const p3 = p[3];\n const q0 = q[0];\n const q1 = q[1];\n const q2 = q[2];\n const q3 = q[3];\n dest[0] = p3 * q0 + p0 * q3 + p1 * q2 - p2 * q1;\n dest[1] = p3 * q1 + p1 * q3 + p2 * q0 - p0 * q2;\n dest[2] = p3 * q2 + p2 * q3 + p0 * q1 - p1 * q0;\n dest[3] = p3 * q3 - p0 * q0 - p1 * q1 - p2 * q2;\n return dest;\n },\n\n vec3ApplyQuaternion(q, vec, dest = math.vec3()) {\n const x = vec[0];\n const y = vec[1];\n const z = vec[2];\n\n const qx = q[0];\n const qy = q[1];\n const qz = q[2];\n const qw = q[3];\n\n // calculate quat * vector\n\n const ix = qw * x + qy * z - qz * y;\n const iy = qw * y + qz * x - qx * z;\n const iz = qw * z + qx * y - qy * x;\n const iw = -qx * x - qy * y - qz * z;\n\n // calculate result * inverse quat\n\n dest[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n dest[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n dest[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n\n return dest;\n },\n\n quaternionToMat4(q, dest) {\n\n dest = math.identityMat4(dest);\n\n const q0 = q[0]; //x\n const q1 = q[1]; //y\n const q2 = q[2]; //z\n const q3 = q[3]; //w\n\n const tx = 2.0 * q0;\n const ty = 2.0 * q1;\n const tz = 2.0 * q2;\n\n const twx = tx * q3;\n const twy = ty * q3;\n const twz = tz * q3;\n\n const txx = tx * q0;\n const txy = ty * q0;\n const txz = tz * q0;\n\n const tyy = ty * q1;\n const tyz = tz * q1;\n const tzz = tz * q2;\n\n dest[0] = 1.0 - (tyy + tzz);\n dest[1] = txy + twz;\n dest[2] = txz - twy;\n\n dest[4] = txy - twz;\n dest[5] = 1.0 - (txx + tzz);\n dest[6] = tyz + twx;\n\n dest[8] = txz + twy;\n dest[9] = tyz - twx;\n\n dest[10] = 1.0 - (txx + tyy);\n\n return dest;\n },\n\n quaternionToRotationMat4(q, m) {\n const x = q[0];\n const y = q[1];\n const z = q[2];\n const w = q[3];\n\n const x2 = x + x;\n const y2 = y + y;\n const z2 = z + z;\n const xx = x * x2;\n const xy = x * y2;\n const xz = x * z2;\n const yy = y * y2;\n const yz = y * z2;\n const zz = z * z2;\n const wx = w * x2;\n const wy = w * y2;\n const wz = w * z2;\n\n m[0] = 1 - (yy + zz);\n m[4] = xy - wz;\n m[8] = xz + wy;\n\n m[1] = xy + wz;\n m[5] = 1 - (xx + zz);\n m[9] = yz - wx;\n\n m[2] = xz - wy;\n m[6] = yz + wx;\n m[10] = 1 - (xx + yy);\n\n // last column\n m[3] = 0;\n m[7] = 0;\n m[11] = 0;\n\n // bottom row\n m[12] = 0;\n m[13] = 0;\n m[14] = 0;\n m[15] = 1;\n\n return m;\n },\n\n normalizeQuaternion(q, dest = q) {\n const len = math.lenVec4([q[0], q[1], q[2], q[3]]);\n dest[0] = q[0] / len;\n dest[1] = q[1] / len;\n dest[2] = q[2] / len;\n dest[3] = q[3] / len;\n return dest;\n },\n\n conjugateQuaternion(q, dest = q) {\n dest[0] = -q[0];\n dest[1] = -q[1];\n dest[2] = -q[2];\n dest[3] = q[3];\n return dest;\n },\n\n inverseQuaternion(q, dest) {\n return math.normalizeQuaternion(math.conjugateQuaternion(q, dest));\n },\n\n quaternionToAngleAxis(q, angleAxis = math.vec4()) {\n q = math.normalizeQuaternion(q, tempVec4);\n const q3 = q[3];\n const angle = 2 * Math.acos(q3);\n const s = Math.sqrt(1 - q3 * q3);\n if (s < 0.001) { // test to avoid divide by zero, s is always positive due to sqrt\n angleAxis[0] = q[0];\n angleAxis[1] = q[1];\n angleAxis[2] = q[2];\n } else {\n angleAxis[0] = q[0] / s;\n angleAxis[1] = q[1] / s;\n angleAxis[2] = q[2] / s;\n }\n angleAxis[3] = angle; // * 57.295779579;\n return angleAxis;\n },\n\n //------------------------------------------------------------------------------------------------------------------\n // Boundaries\n //------------------------------------------------------------------------------------------------------------------\n\n /**\n * Returns a new, uninitialized 3D axis-aligned bounding box.\n *\n * @private\n */\n AABB3(values) {\n return new FloatArrayType(values || 6);\n },\n\n /**\n * Returns a new, uninitialized 2D axis-aligned bounding box.\n *\n * @private\n */\n AABB2(values) {\n return new FloatArrayType(values || 4);\n },\n\n /**\n * Returns a new, uninitialized 3D oriented bounding box (OBB).\n *\n * @private\n */\n OBB3(values) {\n return new FloatArrayType(values || 32);\n },\n\n /**\n * Returns a new, uninitialized 2D oriented bounding box (OBB).\n *\n * @private\n */\n OBB2(values) {\n return new FloatArrayType(values || 16);\n },\n\n /** Returns a new 3D bounding sphere */\n Sphere3(x, y, z, r) {\n return new FloatArrayType([x, y, z, r]);\n },\n\n /**\n * Transforms an OBB3 by a 4x4 matrix.\n *\n * @private\n */\n transformOBB3(m, p, p2 = p) {\n let i;\n const len = p.length;\n\n let x;\n let y;\n let z;\n\n const m0 = m[0];\n const m1 = m[1];\n const m2 = m[2];\n const m3 = m[3];\n const m4 = m[4];\n const m5 = m[5];\n const m6 = m[6];\n const m7 = m[7];\n const m8 = m[8];\n const m9 = m[9];\n const m10 = m[10];\n const m11 = m[11];\n const m12 = m[12];\n const m13 = m[13];\n const m14 = m[14];\n const m15 = m[15];\n\n for (i = 0; i < len; i += 4) {\n\n x = p[i + 0];\n y = p[i + 1];\n z = p[i + 2];\n\n p2[i + 0] = (m0 * x) + (m4 * y) + (m8 * z) + m12;\n p2[i + 1] = (m1 * x) + (m5 * y) + (m9 * z) + m13;\n p2[i + 2] = (m2 * x) + (m6 * y) + (m10 * z) + m14;\n p2[i + 3] = (m3 * x) + (m7 * y) + (m11 * z) + m15;\n }\n\n return p2;\n },\n\n /** Returns true if the first AABB contains the second AABB.\n * @param aabb1\n * @param aabb2\n * @returns {boolean}\n */\n containsAABB3: function (aabb1, aabb2) {\n const result = (\n aabb1[0] <= aabb2[0] && aabb2[3] <= aabb1[3] &&\n aabb1[1] <= aabb2[1] && aabb2[4] <= aabb1[4] &&\n aabb1[2] <= aabb2[2] && aabb2[5] <= aabb1[5]);\n return result;\n },\n\n /**\n * Gets the diagonal size of an AABB3 given as minima and maxima.\n *\n * @private\n */\n getAABB3Diag: ((() => {\n\n const min = new FloatArrayType(3);\n const max = new FloatArrayType(3);\n const tempVec3 = new FloatArrayType(3);\n\n return aabb => {\n\n min[0] = aabb[0];\n min[1] = aabb[1];\n min[2] = aabb[2];\n\n max[0] = aabb[3];\n max[1] = aabb[4];\n max[2] = aabb[5];\n\n math.subVec3(max, min, tempVec3);\n\n return Math.abs(math.lenVec3(tempVec3));\n };\n }))(),\n\n /**\n * Get a diagonal boundary size that is symmetrical about the given point.\n *\n * @private\n */\n getAABB3DiagPoint: ((() => {\n\n const min = new FloatArrayType(3);\n const max = new FloatArrayType(3);\n const tempVec3 = new FloatArrayType(3);\n\n return (aabb, p) => {\n\n min[0] = aabb[0];\n min[1] = aabb[1];\n min[2] = aabb[2];\n\n max[0] = aabb[3];\n max[1] = aabb[4];\n max[2] = aabb[5];\n\n const diagVec = math.subVec3(max, min, tempVec3);\n\n const xneg = p[0] - aabb[0];\n const xpos = aabb[3] - p[0];\n const yneg = p[1] - aabb[1];\n const ypos = aabb[4] - p[1];\n const zneg = p[2] - aabb[2];\n const zpos = aabb[5] - p[2];\n\n diagVec[0] += (xneg > xpos) ? xneg : xpos;\n diagVec[1] += (yneg > ypos) ? yneg : ypos;\n diagVec[2] += (zneg > zpos) ? zneg : zpos;\n\n return Math.abs(math.lenVec3(diagVec));\n };\n }))(),\n\n /**\n * Gets the center of an AABB.\n *\n * @private\n */\n getAABB3Center(aabb, dest) {\n const r = dest || math.vec3();\n\n r[0] = (aabb[0] + aabb[3]) / 2;\n r[1] = (aabb[1] + aabb[4]) / 2;\n r[2] = (aabb[2] + aabb[5]) / 2;\n\n return r;\n },\n\n /**\n * Gets the center of a 2D AABB.\n *\n * @private\n */\n getAABB2Center(aabb, dest) {\n const r = dest || math.vec2();\n\n r[0] = (aabb[2] + aabb[0]) / 2;\n r[1] = (aabb[3] + aabb[1]) / 2;\n\n return r;\n },\n\n /**\n * Collapses a 3D axis-aligned boundary, ready to expand to fit 3D points.\n * Creates new AABB if none supplied.\n *\n * @private\n */\n collapseAABB3(aabb = math.AABB3()) {\n aabb[0] = math.MAX_DOUBLE;\n aabb[1] = math.MAX_DOUBLE;\n aabb[2] = math.MAX_DOUBLE;\n aabb[3] = -math.MAX_DOUBLE;\n aabb[4] = -math.MAX_DOUBLE;\n aabb[5] = -math.MAX_DOUBLE;\n\n return aabb;\n },\n\n /**\n * Converts an axis-aligned 3D boundary into an oriented boundary consisting of\n * an array of eight 3D positions, one for each corner of the boundary.\n *\n * @private\n */\n AABB3ToOBB3(aabb, obb = math.OBB3()) {\n obb[0] = aabb[0];\n obb[1] = aabb[1];\n obb[2] = aabb[2];\n obb[3] = 1;\n\n obb[4] = aabb[3];\n obb[5] = aabb[1];\n obb[6] = aabb[2];\n obb[7] = 1;\n\n obb[8] = aabb[3];\n obb[9] = aabb[4];\n obb[10] = aabb[2];\n obb[11] = 1;\n\n obb[12] = aabb[0];\n obb[13] = aabb[4];\n obb[14] = aabb[2];\n obb[15] = 1;\n\n obb[16] = aabb[0];\n obb[17] = aabb[1];\n obb[18] = aabb[5];\n obb[19] = 1;\n\n obb[20] = aabb[3];\n obb[21] = aabb[1];\n obb[22] = aabb[5];\n obb[23] = 1;\n\n obb[24] = aabb[3];\n obb[25] = aabb[4];\n obb[26] = aabb[5];\n obb[27] = 1;\n\n obb[28] = aabb[0];\n obb[29] = aabb[4];\n obb[30] = aabb[5];\n obb[31] = 1;\n\n return obb;\n },\n\n /**\n * Finds the minimum axis-aligned 3D boundary enclosing the homogeneous 3D points (x,y,z,w) given in a flattened array.\n *\n * @private\n */\n positions3ToAABB3: ((() => {\n\n const p = new FloatArrayType(3);\n\n return (positions, aabb, positionsDecodeMatrix) => {\n aabb = aabb || math.AABB3();\n\n let xmin = math.MAX_DOUBLE;\n let ymin = math.MAX_DOUBLE;\n let zmin = math.MAX_DOUBLE;\n let xmax = -math.MAX_DOUBLE;\n let ymax = -math.MAX_DOUBLE;\n let zmax = -math.MAX_DOUBLE;\n\n let x;\n let y;\n let z;\n\n for (let i = 0, len = positions.length; i < len; i += 3) {\n\n if (positionsDecodeMatrix) {\n\n p[0] = positions[i + 0];\n p[1] = positions[i + 1];\n p[2] = positions[i + 2];\n\n math.decompressPosition(p, positionsDecodeMatrix, p);\n\n x = p[0];\n y = p[1];\n z = p[2];\n\n } else {\n x = positions[i + 0];\n y = positions[i + 1];\n z = positions[i + 2];\n }\n\n if (x < xmin) {\n xmin = x;\n }\n\n if (y < ymin) {\n ymin = y;\n }\n\n if (z < zmin) {\n zmin = z;\n }\n\n if (x > xmax) {\n xmax = x;\n }\n\n if (y > ymax) {\n ymax = y;\n }\n\n if (z > zmax) {\n zmax = z;\n }\n }\n\n aabb[0] = xmin;\n aabb[1] = ymin;\n aabb[2] = zmin;\n aabb[3] = xmax;\n aabb[4] = ymax;\n aabb[5] = zmax;\n\n return aabb;\n };\n }))(),\n\n /**\n * Finds the minimum axis-aligned 3D boundary enclosing the homogeneous 3D points (x,y,z,w) given in a flattened array.\n *\n * @private\n */\n OBB3ToAABB3(obb, aabb = math.AABB3()) {\n let xmin = math.MAX_DOUBLE;\n let ymin = math.MAX_DOUBLE;\n let zmin = math.MAX_DOUBLE;\n let xmax = -math.MAX_DOUBLE;\n let ymax = -math.MAX_DOUBLE;\n let zmax = -math.MAX_DOUBLE;\n\n let x;\n let y;\n let z;\n\n for (let i = 0, len = obb.length; i < len; i += 4) {\n\n x = obb[i + 0];\n y = obb[i + 1];\n z = obb[i + 2];\n\n if (x < xmin) {\n xmin = x;\n }\n\n if (y < ymin) {\n ymin = y;\n }\n\n if (z < zmin) {\n zmin = z;\n }\n\n if (x > xmax) {\n xmax = x;\n }\n\n if (y > ymax) {\n ymax = y;\n }\n\n if (z > zmax) {\n zmax = z;\n }\n }\n\n aabb[0] = xmin;\n aabb[1] = ymin;\n aabb[2] = zmin;\n aabb[3] = xmax;\n aabb[4] = ymax;\n aabb[5] = zmax;\n\n return aabb;\n },\n\n /**\n * Finds the minimum axis-aligned 3D boundary enclosing the given 3D points.\n *\n * @private\n */\n points3ToAABB3(points, aabb = math.AABB3()) {\n let xmin = math.MAX_DOUBLE;\n let ymin = math.MAX_DOUBLE;\n let zmin = math.MAX_DOUBLE;\n let xmax = -math.MAX_DOUBLE;\n let ymax = -math.MAX_DOUBLE;\n let zmax = -math.MAX_DOUBLE;\n\n let x;\n let y;\n let z;\n\n for (let i = 0, len = points.length; i < len; i++) {\n\n x = points[i][0];\n y = points[i][1];\n z = points[i][2];\n\n if (x < xmin) {\n xmin = x;\n }\n\n if (y < ymin) {\n ymin = y;\n }\n\n if (z < zmin) {\n zmin = z;\n }\n\n if (x > xmax) {\n xmax = x;\n }\n\n if (y > ymax) {\n ymax = y;\n }\n\n if (z > zmax) {\n zmax = z;\n }\n }\n\n aabb[0] = xmin;\n aabb[1] = ymin;\n aabb[2] = zmin;\n aabb[3] = xmax;\n aabb[4] = ymax;\n aabb[5] = zmax;\n\n return aabb;\n },\n\n /**\n * Finds the minimum boundary sphere enclosing the given 3D points.\n *\n * @private\n */\n points3ToSphere3: ((() => {\n\n const tempVec3 = new FloatArrayType(3);\n\n return (points, sphere) => {\n\n sphere = sphere || math.vec4();\n\n let x = 0;\n let y = 0;\n let z = 0;\n\n let i;\n const numPoints = points.length;\n\n for (i = 0; i < numPoints; i++) {\n x += points[i][0];\n y += points[i][1];\n z += points[i][2];\n }\n\n sphere[0] = x / numPoints;\n sphere[1] = y / numPoints;\n sphere[2] = z / numPoints;\n\n let radius = 0;\n let dist;\n\n for (i = 0; i < numPoints; i++) {\n\n dist = Math.abs(math.lenVec3(math.subVec3(points[i], sphere, tempVec3)));\n\n if (dist > radius) {\n radius = dist;\n }\n }\n\n sphere[3] = radius;\n\n return sphere;\n };\n }))(),\n\n /**\n * Finds the minimum boundary sphere enclosing the given 3D positions.\n *\n * @private\n */\n positions3ToSphere3: ((() => {\n\n const tempVec3a = new FloatArrayType(3);\n const tempVec3b = new FloatArrayType(3);\n\n return (positions, sphere) => {\n\n sphere = sphere || math.vec4();\n\n let x = 0;\n let y = 0;\n let z = 0;\n\n let i;\n const lenPositions = positions.length;\n let radius = 0;\n\n for (i = 0; i < lenPositions; i += 3) {\n x += positions[i];\n y += positions[i + 1];\n z += positions[i + 2];\n }\n\n const numPositions = lenPositions / 3;\n\n sphere[0] = x / numPositions;\n sphere[1] = y / numPositions;\n sphere[2] = z / numPositions;\n\n let dist;\n\n for (i = 0; i < lenPositions; i += 3) {\n\n tempVec3a[0] = positions[i];\n tempVec3a[1] = positions[i + 1];\n tempVec3a[2] = positions[i + 2];\n\n dist = Math.abs(math.lenVec3(math.subVec3(tempVec3a, sphere, tempVec3b)));\n\n if (dist > radius) {\n radius = dist;\n }\n }\n\n sphere[3] = radius;\n\n return sphere;\n };\n }))(),\n\n /**\n * Finds the minimum boundary sphere enclosing the given 3D points.\n *\n * @private\n */\n OBB3ToSphere3: ((() => {\n\n const point = new FloatArrayType(3);\n const tempVec3 = new FloatArrayType(3);\n\n return (points, sphere) => {\n\n sphere = sphere || math.vec4();\n\n let x = 0;\n let y = 0;\n let z = 0;\n\n let i;\n const lenPoints = points.length;\n const numPoints = lenPoints / 4;\n\n for (i = 0; i < lenPoints; i += 4) {\n x += points[i + 0];\n y += points[i + 1];\n z += points[i + 2];\n }\n\n sphere[0] = x / numPoints;\n sphere[1] = y / numPoints;\n sphere[2] = z / numPoints;\n\n let radius = 0;\n let dist;\n\n for (i = 0; i < lenPoints; i += 4) {\n\n point[0] = points[i + 0];\n point[1] = points[i + 1];\n point[2] = points[i + 2];\n\n dist = Math.abs(math.lenVec3(math.subVec3(point, sphere, tempVec3)));\n\n if (dist > radius) {\n radius = dist;\n }\n }\n\n sphere[3] = radius;\n\n return sphere;\n };\n }))(),\n\n /**\n * Gets the center of a bounding sphere.\n *\n * @private\n */\n getSphere3Center(sphere, dest = math.vec3()) {\n dest[0] = sphere[0];\n dest[1] = sphere[1];\n dest[2] = sphere[2];\n\n return dest;\n },\n\n /**\n * Expands the first axis-aligned 3D boundary to enclose the second, if required.\n *\n * @private\n */\n expandAABB3(aabb1, aabb2) {\n\n if (aabb1[0] > aabb2[0]) {\n aabb1[0] = aabb2[0];\n }\n\n if (aabb1[1] > aabb2[1]) {\n aabb1[1] = aabb2[1];\n }\n\n if (aabb1[2] > aabb2[2]) {\n aabb1[2] = aabb2[2];\n }\n\n if (aabb1[3] < aabb2[3]) {\n aabb1[3] = aabb2[3];\n }\n\n if (aabb1[4] < aabb2[4]) {\n aabb1[4] = aabb2[4];\n }\n\n if (aabb1[5] < aabb2[5]) {\n aabb1[5] = aabb2[5];\n }\n\n return aabb1;\n },\n\n /**\n * Expands an axis-aligned 3D boundary to enclose the given point, if needed.\n *\n * @private\n */\n expandAABB3Point3(aabb, p) {\n\n if (aabb[0] > p[0]) {\n aabb[0] = p[0];\n }\n\n if (aabb[1] > p[1]) {\n aabb[1] = p[1];\n }\n\n if (aabb[2] > p[2]) {\n aabb[2] = p[2];\n }\n\n if (aabb[3] < p[0]) {\n aabb[3] = p[0];\n }\n\n if (aabb[4] < p[1]) {\n aabb[4] = p[1];\n }\n\n if (aabb[5] < p[2]) {\n aabb[5] = p[2];\n }\n\n return aabb;\n },\n\n /**\n * Calculates the normal vector of a triangle.\n *\n * @private\n */\n triangleNormal(a, b, c, normal = math.vec3()) {\n const p1x = b[0] - a[0];\n const p1y = b[1] - a[1];\n const p1z = b[2] - a[2];\n\n const p2x = c[0] - a[0];\n const p2y = c[1] - a[1];\n const p2z = c[2] - a[2];\n\n const p3x = p1y * p2z - p1z * p2y;\n const p3y = p1z * p2x - p1x * p2z;\n const p3z = p1x * p2y - p1y * p2x;\n\n const mag = Math.sqrt(p3x * p3x + p3y * p3y + p3z * p3z);\n if (mag === 0) {\n normal[0] = 0;\n normal[1] = 0;\n normal[2] = 0;\n } else {\n normal[0] = p3x / mag;\n normal[1] = p3y / mag;\n normal[2] = p3z / mag;\n }\n\n return normal\n }\n};\n\nexport {math};","import {math} from \"../../lib/math.js\";\n\nfunction quantizePositions (positions, lenPositions, aabb, quantizedPositions) {\n const xmin = aabb[0];\n const ymin = aabb[1];\n const zmin = aabb[2];\n const xwid = aabb[3] - xmin;\n const ywid = aabb[4] - ymin;\n const zwid = aabb[5] - zmin;\n const maxInt = 65535;\n const xMultiplier = maxInt / xwid;\n const yMultiplier = maxInt / ywid;\n const zMultiplier = maxInt / zwid;\n const verify = (num) => num >= 0 ? num : 0;\n for (let i = 0; i < lenPositions; i += 3) {\n quantizedPositions[i + 0] = Math.max(0, Math.min(65535,Math.floor(verify(positions[i + 0] - xmin) * xMultiplier)));\n quantizedPositions[i + 1] = Math.max(0, Math.min(65535,Math.floor(verify(positions[i + 1] - ymin) * yMultiplier)));\n quantizedPositions[i + 2] = Math.max(0, Math.min(65535,Math.floor(verify(positions[i + 2] - zmin) * zMultiplier)));\n }\n}\n\nfunction compressPosition(p, aabb, q) {\n const multiplier = new Float32Array([\n aabb[3] !== aabb[0] ? 65535 / (aabb[3] - aabb[0]) : 0,\n aabb[4] !== aabb[1] ? 65535 / (aabb[4] - aabb[1]) : 0,\n aabb[5] !== aabb[2] ? 65535 / (aabb[5] - aabb[2]) : 0\n ]);\n q[0] = Math.max(0, Math.min(65535, Math.floor((p[0] - aabb[0]) * multiplier[0])));\n q[1] = Math.max(0, Math.min(65535, Math.floor((p[1] - aabb[1]) * multiplier[1])));\n q[2] = Math.max(0, Math.min(65535, Math.floor((p[2] - aabb[2]) * multiplier[2])));\n}\n\nvar createPositionsDecodeMatrix = (function () {\n const translate = math.mat4();\n const scale = math.mat4();\n return function (aabb, positionsDecodeMatrix) {\n positionsDecodeMatrix = positionsDecodeMatrix || math.mat4();\n const xmin = aabb[0];\n const ymin = aabb[1];\n const zmin = aabb[2];\n const xwid = aabb[3] - xmin;\n const ywid = aabb[4] - ymin;\n const zwid = aabb[5] - zmin;\n const maxInt = 65535;\n math.identityMat4(translate);\n math.translationMat4v(aabb, translate);\n math.identityMat4(scale);\n math.scalingMat4v([xwid / maxInt, ywid / maxInt, zwid / maxInt], scale);\n math.mulMat4(translate, scale, positionsDecodeMatrix);\n return positionsDecodeMatrix;\n };\n})();\n\nfunction transformAndOctEncodeNormals(modelNormalMatrix, normals, lenNormals, compressedNormals, lenCompressedNormals) {\n // http://jcgt.org/published/0003/02/01/\n let oct, dec, best, currentCos, bestCos;\n let i, ei;\n let localNormal = math.vec3();\n let worldNormal = math.vec3();\n for (i = 0; i < lenNormals; i += 3) {\n localNormal[0] = normals[i];\n localNormal[1] = normals[i + 1];\n localNormal[2] = normals[i + 2];\n\n math.transformVec3(modelNormalMatrix, localNormal, worldNormal);\n math.normalizeVec3(worldNormal, worldNormal);\n\n // Test various combinations of ceil and floor to minimize rounding errors\n best = oct = octEncodeVec3(worldNormal, 0, \"floor\", \"floor\");\n dec = octDecodeVec2(oct);\n currentCos = bestCos = dot(worldNormal, 0, dec);\n oct = octEncodeVec3(worldNormal, 0, \"ceil\", \"floor\");\n dec = octDecodeVec2(oct);\n currentCos = dot(worldNormal, 0, dec);\n if (currentCos > bestCos) {\n best = oct;\n bestCos = currentCos;\n }\n oct = octEncodeVec3(worldNormal, 0, \"floor\", \"ceil\");\n dec = octDecodeVec2(oct);\n currentCos = dot(worldNormal, 0, dec);\n if (currentCos > bestCos) {\n best = oct;\n bestCos = currentCos;\n }\n oct = octEncodeVec3(worldNormal, 0, \"ceil\", \"ceil\");\n dec = octDecodeVec2(oct);\n currentCos = dot(worldNormal, 0, dec);\n if (currentCos > bestCos) {\n best = oct;\n bestCos = currentCos;\n }\n compressedNormals[lenCompressedNormals + i + 0] = best[0];\n compressedNormals[lenCompressedNormals + i + 1] = best[1];\n compressedNormals[lenCompressedNormals + i + 2] = 0.0; // Unused\n }\n lenCompressedNormals += lenNormals;\n return lenCompressedNormals;\n}\n\nfunction octEncodeNormals(normals, lenNormals, compressedNormals, lenCompressedNormals) { // http://jcgt.org/published/0003/02/01/\n let oct, dec, best, currentCos, bestCos;\n for (let i = 0; i < lenNormals; i += 3) {\n // Test various combinations of ceil and floor to minimize rounding errors\n best = oct = octEncodeVec3(normals, i, \"floor\", \"floor\");\n dec = octDecodeVec2(oct);\n currentCos = bestCos = dot(normals, i, dec);\n oct = octEncodeVec3(normals, i, \"ceil\", \"floor\");\n dec = octDecodeVec2(oct);\n currentCos = dot(normals, i, dec);\n if (currentCos > bestCos) {\n best = oct;\n bestCos = currentCos;\n }\n oct = octEncodeVec3(normals, i, \"floor\", \"ceil\");\n dec = octDecodeVec2(oct);\n currentCos = dot(normals, i, dec);\n if (currentCos > bestCos) {\n best = oct;\n bestCos = currentCos;\n }\n oct = octEncodeVec3(normals, i, \"ceil\", \"ceil\");\n dec = octDecodeVec2(oct);\n currentCos = dot(normals, i, dec);\n if (currentCos > bestCos) {\n best = oct;\n bestCos = currentCos;\n }\n compressedNormals[lenCompressedNormals + i + 0] = best[0];\n compressedNormals[lenCompressedNormals + i + 1] = best[1];\n compressedNormals[lenCompressedNormals + i + 2] = 0.0; // Unused\n }\n lenCompressedNormals += lenNormals;\n return lenCompressedNormals;\n}\n\n/**\n * @private\n */\nfunction octEncodeVec3(array, i, xfunc, yfunc) { // Oct-encode single normal vector in 2 bytes\n let x = array[i] / (Math.abs(array[i]) + Math.abs(array[i + 1]) + Math.abs(array[i + 2]));\n let y = array[i + 1] / (Math.abs(array[i]) + Math.abs(array[i + 1]) + Math.abs(array[i + 2]));\n if (array[i + 2] < 0) {\n let tempx = (1 - Math.abs(y)) * (x >= 0 ? 1 : -1);\n let tempy = (1 - Math.abs(x)) * (y >= 0 ? 1 : -1);\n x = tempx;\n y = tempy;\n }\n return new Int8Array([\n Math[xfunc](x * 127.5 + (x < 0 ? -1 : 0)),\n Math[yfunc](y * 127.5 + (y < 0 ? -1 : 0))\n ]);\n}\n\n/**\n * Decode an oct-encoded normal\n */\nfunction octDecodeVec2(oct) {\n let x = oct[0];\n let y = oct[1];\n x /= x < 0 ? 127 : 128;\n y /= y < 0 ? 127 : 128;\n const z = 1 - Math.abs(x) - Math.abs(y);\n if (z < 0) {\n x = (1 - Math.abs(y)) * (x >= 0 ? 1 : -1);\n y = (1 - Math.abs(x)) * (y >= 0 ? 1 : -1);\n }\n const length = Math.sqrt(x * x + y * y + z * z);\n return [\n x / length,\n y / length,\n z / length\n ];\n}\n\n/**\n * Dot product of a normal in an array against a candidate decoding\n * @private\n */\nfunction dot(array, i, vec3) {\n return array[i] * vec3[0] + array[i + 1] * vec3[1] + array[i + 2] * vec3[2];\n}\n\n/**\n * @private\n */\nconst geometryCompression = {\n quantizePositions,\n compressPosition,\n createPositionsDecodeMatrix,\n transformAndOctEncodeNormals,\n octEncodeNormals,\n};\n\nexport {geometryCompression}","/*----------------------------------------------------------------------------------------------------------------------\n * NOTE: The values of these constants must match those within xeokit-sdk\n *--------------------------------------------------------------------------------------------------------------------*/\n\n/**\n * Texture wrapping mode in which the texture repeats to infinity.\n */\nexport const RepeatWrapping = 1000;\n\n/**\n * Texture wrapping mode in which the last pixel of the texture stretches to the edge of the mesh.\n */\nexport const ClampToEdgeWrapping = 1001;\n\n/**\n * Texture wrapping mode in which the texture repeats to infinity, mirroring on each repeat.\n */\nexport const MirroredRepeatWrapping = 1002;\n\n/**\n * Texture magnification and minification filter that returns the nearest texel to the given sample coordinates.\n */\nexport const NearestFilter = 1003;\n\n/**\n * Texture minification filter that chooses the mipmap that most closely matches the size of the pixel being textured and returns the nearest texel to the given sample coordinates.\n */\nexport const NearestMipMapNearestFilter = 1004;\n\n/**\n * Texture minification filter that chooses the mipmap that most closely matches the size of the pixel being textured\n * and returns the nearest texel to the given sample coordinates.\n */\nexport const NearestMipmapNearestFilter = 1004;\n\n/**\n * Texture minification filter that chooses two mipmaps that most closely match the size of the pixel being textured\n * and returns the nearest texel to the center of the pixel at the given sample coordinates.\n */\nexport const NearestMipmapLinearFilter = 1005;\n\n/**\n * Texture minification filter that chooses two mipmaps that most closely match the size of the pixel being textured\n * and returns the nearest texel to the center of the pixel at the given sample coordinates.\n */\nexport const NearestMipMapLinearFilter = 1005;\n\n/**\n * Texture magnification and minification filter that returns the weighted average of the four nearest texels to the given sample coordinates.\n */\nexport const LinearFilter = 1006;\n\n/**\n * Texture minification filter that chooses the mipmap that most closely matches the size of the pixel being textured and\n * returns the weighted average of the four nearest texels to the given sample coordinates.\n */\nexport const LinearMipmapNearestFilter = 1007;\n\n/**\n * Texture minification filter that chooses the mipmap that most closely matches the size of the pixel being textured and\n * returns the weighted average of the four nearest texels to the given sample coordinates.\n */\nexport const LinearMipMapNearestFilter = 1007;\n\n/**\n * Texture minification filter that chooses two mipmaps that most closely match the size of the pixel being textured,\n * finds within each mipmap the weighted average of the nearest texel to the center of the pixel, then returns the\n * weighted average of those two values.\n */\nexport const LinearMipmapLinearFilter = 1008;\n\n/**\n * Texture minification filter that chooses two mipmaps that most closely match the size of the pixel being textured,\n * finds within each mipmap the weighted average of the nearest texel to the center of the pixel, then returns the\n * weighted average of those two values.\n */\nexport const LinearMipMapLinearFilter = 1008;\n\n/**\n * Media type for GIF images.\n */\nexport const GIFMediaType = 10000;\n\n/**\n * Media type for JPEG images.\n */\nexport const JPEGMediaType = 10001;\n\n/**\n * Media type for PNG images.\n */\nexport const PNGMediaType = 10002;","import {math} from \"../../lib/math.js\";\n\n/**\n * @private\n */\nconst buildEdgeIndices = (function () {\n\n const uniquePositions = [];\n const indicesLookup = [];\n const indicesReverseLookup = [];\n const weldedIndices = [];\n\n// TODO: Optimize with caching, but need to cater to both compressed and uncompressed positions\n\n const faces = [];\n let numFaces = 0;\n const compa = new Uint16Array(3);\n const compb = new Uint16Array(3);\n const compc = new Uint16Array(3);\n const a = math.vec3();\n const b = math.vec3();\n const c = math.vec3();\n const cb = math.vec3();\n const ab = math.vec3();\n const cross = math.vec3();\n const normal = math.vec3();\n const inverseNormal = math.vec3();\n\n function weldVertices(positions, indices) {\n const positionsMap = {}; // Hashmap for looking up vertices by position coordinates (and making sure they are unique)\n let vx;\n let vy;\n let vz;\n let key;\n const precisionPoints = 4; // number of decimal points, e.g. 4 for epsilon of 0.0001\n const precision = Math.pow(10, precisionPoints);\n let i;\n let len;\n let lenUniquePositions = 0;\n for (i = 0, len = positions.length; i < len; i += 3) {\n vx = positions[i];\n vy = positions[i + 1];\n vz = positions[i + 2];\n key = Math.round(vx * precision) + '_' + Math.round(vy * precision) + '_' + Math.round(vz * precision);\n if (positionsMap[key] === undefined) {\n positionsMap[key] = lenUniquePositions / 3;\n uniquePositions[lenUniquePositions++] = vx;\n uniquePositions[lenUniquePositions++] = vy;\n uniquePositions[lenUniquePositions++] = vz;\n }\n indicesLookup[i / 3] = positionsMap[key];\n }\n for (i = 0, len = indices.length; i < len; i++) {\n weldedIndices[i] = indicesLookup[indices[i]];\n indicesReverseLookup[weldedIndices[i]] = indices[i];\n }\n }\n\n function buildFaces(numIndices, positionsDecodeMatrix) {\n numFaces = 0;\n for (let i = 0, len = numIndices; i < len; i += 3) {\n const ia = ((weldedIndices[i]) * 3);\n const ib = ((weldedIndices[i + 1]) * 3);\n const ic = ((weldedIndices[i + 2]) * 3);\n if (positionsDecodeMatrix) {\n compa[0] = uniquePositions[ia];\n compa[1] = uniquePositions[ia + 1];\n compa[2] = uniquePositions[ia + 2];\n compb[0] = uniquePositions[ib];\n compb[1] = uniquePositions[ib + 1];\n compb[2] = uniquePositions[ib + 2];\n compc[0] = uniquePositions[ic];\n compc[1] = uniquePositions[ic + 1];\n compc[2] = uniquePositions[ic + 2];\n // Decode\n math.decompressPosition(compa, positionsDecodeMatrix, a);\n math.decompressPosition(compb, positionsDecodeMatrix, b);\n math.decompressPosition(compc, positionsDecodeMatrix, c);\n } else {\n a[0] = uniquePositions[ia];\n a[1] = uniquePositions[ia + 1];\n a[2] = uniquePositions[ia + 2];\n b[0] = uniquePositions[ib];\n b[1] = uniquePositions[ib + 1];\n b[2] = uniquePositions[ib + 2];\n c[0] = uniquePositions[ic];\n c[1] = uniquePositions[ic + 1];\n c[2] = uniquePositions[ic + 2];\n }\n math.subVec3(c, b, cb);\n math.subVec3(a, b, ab);\n math.cross3Vec3(cb, ab, cross);\n math.normalizeVec3(cross, normal);\n const face = faces[numFaces] || (faces[numFaces] = {normal: math.vec3()});\n face.normal[0] = normal[0];\n face.normal[1] = normal[1];\n face.normal[2] = normal[2];\n numFaces++;\n }\n }\n\n return function (positions, indices, positionsDecodeMatrix, edgeThreshold) {\n weldVertices(positions, indices);\n buildFaces(indices.length, positionsDecodeMatrix);\n const edgeIndices = [];\n const thresholdDot = Math.cos(math.DEGTORAD * edgeThreshold);\n const edges = {};\n let edge1;\n let edge2;\n let index1;\n let index2;\n let key;\n let largeIndex = false;\n let edge;\n let normal1;\n let normal2;\n let dot;\n let ia;\n let ib;\n for (let i = 0, len = indices.length; i < len; i += 3) {\n const faceIndex = i / 3;\n for (let j = 0; j < 3; j++) {\n edge1 = weldedIndices[i + j];\n edge2 = weldedIndices[i + ((j + 1) % 3)];\n index1 = Math.min(edge1, edge2);\n index2 = Math.max(edge1, edge2);\n key = index1 + ',' + index2;\n if (edges[key] === undefined) {\n edges[key] = {\n index1: index1,\n index2: index2,\n face1: faceIndex,\n face2: undefined,\n };\n } else {\n edges[key].face2 = faceIndex;\n }\n }\n }\n for (key in edges) {\n edge = edges[key];\n // an edge is only rendered if the angle (in degrees) between the face normals of the adjoining faces exceeds this value. default = 1 degree.\n if (edge.face2 !== undefined) {\n normal1 = faces[edge.face1].normal;\n normal2 = faces[edge.face2].normal;\n inverseNormal[0] = -normal2[0];\n inverseNormal[1] = -normal2[1];\n inverseNormal[2] = -normal2[2];\n dot = Math.abs(math.dotVec3(normal1, normal2));\n const dot2 = Math.abs(math.dotVec3(normal1, inverseNormal));\n if (dot > thresholdDot && dot2 > thresholdDot) {\n continue;\n }\n }\n ia = indicesReverseLookup[edge.index1];\n ib = indicesReverseLookup[edge.index2];\n if (!largeIndex && ia > 65535 || ib > 65535) {\n largeIndex = true;\n }\n edgeIndices.push(ia);\n edgeIndices.push(ib);\n }\n return (largeIndex) ? new Uint32Array(edgeIndices) : new Uint16Array(edgeIndices);\n };\n})();\n\n\nexport {buildEdgeIndices};","/**\n * Uses edge adjacency counts to identify if the given triangle mesh can be rendered with backface culling enabled.\n *\n * If all edges are connected to exactly two triangles, then the mesh will likely be a closed solid, and we can safely\n * render it with backface culling enabled.\n *\n * Otherwise, the mesh is a surface, and we must render it with backface culling disabled.\n *\n * @private\n */\nconst isTriangleMeshSolid = (indices, positions, vertexIndexMapping, edges) => {\n\n function compareIndexPositions(a, b)\n {\n let posA, posB;\n\n for (let i = 0; i < 3; i++) {\n posA = positions [a*3+i];\n posB = positions [b*3+i];\n\n if (posA !== posB) {\n return posB - posA;\n }\n }\n\n return 0;\n };\n\n // Group together indices corresponding to same position coordinates\n let newIndices = indices.slice ().sort (compareIndexPositions);\n\n // Calculate the mapping:\n // - from original index in indices array\n // - to indices-for-unique-positions\n let uniqueVertexIndex = null;\n\n for (let i = 0, len = newIndices.length; i < len; i++) {\n if (i == 0 || 0 != compareIndexPositions (\n newIndices[i],\n newIndices[i-1],\n )) {\n // different position\n uniqueVertexIndex = newIndices [i];\n }\n\n vertexIndexMapping [\n newIndices[i]\n ] = uniqueVertexIndex;\n }\n\n // Generate the list of edges\n for (let i = 0, len = indices.length; i < len; i += 3) {\n\n const a = vertexIndexMapping[indices[i]];\n const b = vertexIndexMapping[indices[i+1]];\n const c = vertexIndexMapping[indices[i+2]];\n\n let a2 = a;\n let b2 = b;\n let c2 = c;\n\n if (a > b && a > c) {\n if (b > c) {\n a2 = a;\n b2 = b;\n c2 = c;\n } else {\n a2 = a;\n b2 = c;\n c2 = b;\n }\n } else if (b > a && b > c) {\n if (a > c) {\n a2 = b;\n b2 = a;\n c2 = c;\n } else {\n a2 = b;\n b2 = c;\n c2 = a;\n }\n } else if (c > a && c > b) {\n if (a > b) {\n a2 = c;\n b2 = a;\n c2 = b;\n } else {\n a2 = c;\n b2 = b;\n c2 = a;\n }\n }\n\n edges[i+0] = [\n a2, b2\n ];\n edges[i+1] = [\n b2, c2\n ];\n\n if (a2 > c2) {\n const temp = c2;\n c2 = a2;\n a2 = temp;\n }\n\n edges[i+2] = [\n c2, a2\n ];\n }\n\n // Group semantically equivalent edgdes together\n function compareEdges (e1, e2) {\n let a, b;\n\n for (let i = 0; i < 2; i++) {\n a = e1[i];\n b = e2[i];\n\n if (b !== a) {\n return b - a;\n }\n }\n\n return 0;\n }\n\n edges = edges.slice(0, indices.length);\n\n edges.sort (compareEdges);\n\n // Make sure each edge is used exactly twice\n let sameEdgeCount = 0;\n\n for (let i = 0; i < edges.length; i++)\n {\n if (i === 0 || 0 !== compareEdges (\n edges[i], edges[i-1]\n )) {\n // different edge\n if (0 !== i && sameEdgeCount !== 2)\n {\n return false;\n }\n\n sameEdgeCount = 1;\n }\n else\n {\n // same edge\n sameEdgeCount++;\n }\n }\n\n if (edges.length > 0 && sameEdgeCount !== 2)\n {\n return false;\n }\n\n // Each edge is used exactly twice, this is a\n // watertight surface and hence a solid geometry.\n return true;\n};\n\nexport {isTriangleMeshSolid};","/**\n * Represents the usage of a {@link XKTGeometry} by an {@link XKTEntity}.\n *\n * * Created by {@link XKTModel#createEntity}\n * * Stored in {@link XKTEntity#meshes} and {@link XKTModel#meshesList}\n * * Has an {@link XKTGeometry}, and an optional {@link XKTTextureSet}, both of which it can share with other {@link XKTMesh}es\n * * Has {@link XKTMesh#color}, {@link XKTMesh#opacity}, {@link XKTMesh#metallic} and {@link XKTMesh#roughness} PBR attributes\n * @class XKTMesh\n */\nclass XKTMesh {\n\n /**\n * @private\n */\n constructor(cfg) {\n\n /**\n * Unique ID of this XKTMesh in {@link XKTModel#meshes}.\n *\n * @type {Number}\n */\n this.meshId = cfg.meshId;\n\n /**\n * Index of this XKTMesh in {@link XKTModel#meshesList};\n *\n * @type {Number}\n */\n this.meshIndex = cfg.meshIndex;\n\n /**\n * The 4x4 modeling transform matrix.\n *\n * Transform is relative to the center of the {@link XKTTile} that contains this XKTMesh's {@link XKTEntity},\n * which is given in {@link XKTMesh#entity}.\n *\n * When the ````XKTEntity```` shares its {@link XKTGeometry}s with other ````XKTEntity````s, this matrix is used\n * to transform this XKTMesh's XKTGeometry into World-space. When this XKTMesh does not share its ````XKTGeometry````,\n * then this matrix is ignored.\n *\n * @type {Number[]}\n */\n this.matrix = cfg.matrix;\n\n /**\n * The instanced {@link XKTGeometry}.\n *\n * @type {XKTGeometry}\n */\n this.geometry = cfg.geometry;\n\n /**\n * RGB color of this XKTMesh.\n *\n * @type {Float32Array}\n */\n this.color = cfg.color || new Float32Array([1, 1, 1]);\n\n /**\n * PBR metallness of this XKTMesh.\n *\n * @type {Number}\n */\n this.metallic = (cfg.metallic !== null && cfg.metallic !== undefined) ? cfg.metallic : 0;\n\n /**\n * PBR roughness of this XKTMesh.\n * The {@link XKTTextureSet} that defines the appearance of this XKTMesh.\n *\n * @type {Number}\n * @type {XKTTextureSet}\n */\n this.roughness = (cfg.roughness !== null && cfg.roughness !== undefined) ? cfg.roughness : 1;\n\n /**\n * Opacity of this XKTMesh.\n *\n * @type {Number}\n */\n this.opacity = (cfg.opacity !== undefined && cfg.opacity !== null) ? cfg.opacity : 1.0;\n\n /**\n * The {@link XKTTextureSet} that defines the appearance of this XKTMesh.\n *\n * @type {XKTTextureSet}\n */\n this.textureSet = cfg.textureSet;\n\n /**\n * The owner {@link XKTEntity}.\n *\n * Set by {@link XKTModel#createEntity}.\n *\n * @type {XKTEntity}\n */\n this.entity = null; // Set after instantiation, when the Entity is known\n }\n}\n\nexport {XKTMesh};","/**\n * An element of reusable geometry within an {@link XKTModel}.\n *\n * * Created by {@link XKTModel#createGeometry}\n * * Stored in {@link XKTModel#geometries} and {@link XKTModel#geometriesList}\n * * Referenced by {@link XKTMesh}s, which belong to {@link XKTEntity}s\n *\n * @class XKTGeometry\n */\nclass XKTGeometry {\n\n /**\n * @private\n * @param {*} cfg Configuration for the XKTGeometry.\n * @param {Number} cfg.geometryId Unique ID of the geometry in {@link XKTModel#geometries}.\n * @param {String} cfg.primitiveType Type of this geometry - \"triangles\", \"points\" or \"lines\" so far.\n * @param {Number} cfg.geometryIndex Index of this XKTGeometry in {@link XKTModel#geometriesList}.\n * @param {Float64Array} cfg.positions Non-quantized 3D vertex positions.\n * @param {Float32Array} cfg.normals Non-compressed vertex normals.\n * @param {Uint8Array} cfg.colorsCompressed Unsigned 8-bit integer RGBA vertex colors.\n * @param {Float32Array} cfg.uvs Non-compressed vertex UV coordinates.\n * @param {Uint32Array} cfg.indices Indices to organize the vertex positions and normals into triangles.\n * @param {Uint32Array} cfg.edgeIndices Indices to organize the vertex positions into edges.\n */\n constructor(cfg) {\n\n /**\n * Unique ID of this XKTGeometry in {@link XKTModel#geometries}.\n *\n * @type {Number}\n */\n this.geometryId = cfg.geometryId;\n\n /**\n * The type of primitive - \"triangles\" | \"points\" | \"lines\".\n *\n * @type {String}\n */\n this.primitiveType = cfg.primitiveType;\n\n /**\n * Index of this XKTGeometry in {@link XKTModel#geometriesList}.\n *\n * @type {Number}\n */\n this.geometryIndex = cfg.geometryIndex;\n\n /**\n * The number of {@link XKTMesh}s that reference this XKTGeometry.\n *\n * @type {Number}\n */\n this.numInstances = 0;\n\n /**\n * Non-quantized 3D vertex positions.\n *\n * Defined for all primitive types.\n *\n * @type {Float64Array}\n */\n this.positions = cfg.positions;\n\n /**\n * Quantized vertex positions.\n *\n * Defined for all primitive types.\n *\n * This array is later created from {@link XKTGeometry#positions} by {@link XKTModel#finalize}.\n *\n * @type {Uint16Array}\n */\n this.positionsQuantized = new Uint16Array(cfg.positions.length);\n\n /**\n * Non-compressed 3D vertex normals.\n *\n * Defined only for triangle primitives. Can be null if we want xeokit to auto-generate them. Ignored for points and lines.\n *\n * @type {Float32Array}\n */\n this.normals = cfg.normals;\n\n /**\n * Compressed vertex normals.\n *\n * Defined only for triangle primitives. Ignored for points and lines.\n *\n * This array is later created from {@link XKTGeometry#normals} by {@link XKTModel#finalize}.\n *\n * Will be null if {@link XKTGeometry#normals} is also null.\n *\n * @type {Int8Array}\n */\n this.normalsOctEncoded = null;\n\n /**\n * Compressed RGBA vertex colors.\n *\n * Defined only for point primitives. Ignored for triangles and lines.\n *\n * @type {Uint8Array}\n */\n this.colorsCompressed = cfg.colorsCompressed;\n\n /**\n * Non-compressed vertex UVs.\n *\n * @type {Float32Array}\n */\n this.uvs = cfg.uvs;\n\n /**\n * Compressed vertex UVs.\n *\n * @type {Uint16Array}\n */\n this.uvsCompressed = cfg.uvsCompressed;\n\n /**\n * Indices that organize the vertex positions and normals as triangles.\n *\n * Defined only for triangle and lines primitives. Ignored for points.\n *\n * @type {Uint32Array}\n */\n this.indices = cfg.indices;\n\n /**\n * Indices that organize the vertex positions as edges.\n *\n * Defined only for triangle primitives. Ignored for points and lines.\n *\n * @type {Uint32Array}\n */\n this.edgeIndices = cfg.edgeIndices;\n\n /**\n * When {@link XKTGeometry#primitiveType} is \"triangles\", this is ````true```` when this geometry is a watertight mesh.\n *\n * Defined only for triangle primitives. Ignored for points and lines.\n *\n * Set by {@link XKTModel#finalize}.\n *\n * @type {boolean}\n */\n this.solid = false;\n }\n\n /**\n * Convenience property that is ````true```` when {@link XKTGeometry#numInstances} is greater that one.\n * @returns {boolean}\n */\n get reused() {\n return (this.numInstances > 1);\n }\n}\n\nexport {XKTGeometry};","import {math} from \"../lib/math.js\";\n\n/**\n * An object within an {@link XKTModel}.\n *\n * * Created by {@link XKTModel#createEntity}\n * * Stored in {@link XKTModel#entities} and {@link XKTModel#entitiesList}\n * * Has one or more {@link XKTMesh}s, each having an {@link XKTGeometry}\n *\n * @class XKTEntity\n */\nclass XKTEntity {\n\n /**\n * @private\n * @param entityId\n * @param meshes\n */\n constructor(entityId, meshes) {\n\n /**\n * Unique ID of this ````XKTEntity```` in {@link XKTModel#entities}.\n *\n * For a BIM model, this will be an IFC product ID.\n *\n * We can also use {@link XKTModel#createMetaObject} to create an {@link XKTMetaObject} to specify metadata for\n * this ````XKTEntity````. To associate the {@link XKTMetaObject} with our {@link XKTEntity}, we give\n * {@link XKTMetaObject#metaObjectId} the same value as {@link XKTEntity#entityId}.\n *\n * @type {String}\n */\n this.entityId = entityId;\n\n /**\n * Index of this ````XKTEntity```` in {@link XKTModel#entitiesList}.\n *\n * Set by {@link XKTModel#finalize}.\n *\n * @type {Number}\n */\n this.entityIndex = null;\n\n /**\n * A list of {@link XKTMesh}s that indicate which {@link XKTGeometry}s are used by this Entity.\n *\n * @type {XKTMesh[]}\n */\n this.meshes = meshes;\n\n /**\n * World-space axis-aligned bounding box (AABB) that encloses the {@link XKTGeometry#positions} of\n * the {@link XKTGeometry}s that are used by this ````XKTEntity````.\n *\n * Set by {@link XKTModel#finalize}.\n *\n * @type {Float32Array}\n */\n this.aabb = math.AABB3();\n\n /**\n * Indicates if this ````XKTEntity```` shares {@link XKTGeometry}s with other {@link XKTEntity}'s.\n *\n * Set by {@link XKTModel#finalize}.\n *\n * Note that when an ````XKTEntity```` shares ````XKTGeometrys````, it shares **all** of its ````XKTGeometrys````. An ````XKTEntity````\n * never shares only some of its ````XKTGeometrys```` - it always shares either the whole set or none at all.\n *\n * @type {Boolean}\n */\n this.hasReusedGeometries = false;\n }\n}\n\nexport {XKTEntity};","/**\n * @desc A box-shaped 3D region within an {@link XKTModel} that contains {@link XKTEntity}s.\n *\n * * Created by {@link XKTModel#finalize}\n * * Stored in {@link XKTModel#tilesList}\n *\n * @class XKTTile\n */\nclass XKTTile {\n\n /**\n * Creates a new XKTTile.\n *\n * @private\n * @param aabb\n * @param entities\n */\n constructor(aabb, entities) {\n\n /**\n * Axis-aligned World-space bounding box that encloses the {@link XKTEntity}'s within this Tile.\n *\n * @type {Float64Array}\n */\n this.aabb = aabb;\n\n /**\n * The {@link XKTEntity}'s within this XKTTile.\n *\n * @type {XKTEntity[]}\n */\n this.entities = entities;\n }\n}\n\nexport {XKTTile};","/**\n * A kd-Tree node, used internally by {@link XKTModel}.\n *\n * @private\n */\nclass KDNode {\n\n /**\n * Create a KDNode with an axis-aligned 3D World-space boundary.\n */\n constructor(aabb) {\n\n /**\n * The axis-aligned 3D World-space boundary of this KDNode.\n *\n * @type {Float64Array}\n */\n this.aabb = aabb;\n\n /**\n * The {@link XKTEntity}s within this KDNode.\n */\n this.entities = null;\n\n /**\n * The left child KDNode.\n */\n this.left = null;\n\n /**\n * The right child KDNode.\n */\n this.right = null;\n }\n}\n\nexport {KDNode};","/**\n * A meta object within an {@link XKTModel}.\n *\n * These are plugged together into a parent-child hierarchy to represent structural\n * metadata for the {@link XKTModel}.\n *\n * The leaf XKTMetaObjects are usually associated with\n * an {@link XKTEntity}, which they do so by sharing the same ID,\n * ie. where {@link XKTMetaObject#metaObjectId} == {@link XKTEntity#entityId}.\n *\n * * Created by {@link XKTModel#createMetaObject}\n * * Stored in {@link XKTModel#metaObjects} and {@link XKTModel#metaObjectsList}\n * * Has an ID, a type, and a human-readable name\n * * May have a parent {@link XKTMetaObject}\n * * When no children, is usually associated with an {@link XKTEntity}\n *\n * @class XKTMetaObject\n */\nclass XKTMetaObject {\n\n /**\n * @private\n * @param metaObjectId\n * @param propertySetIds\n * @param metaObjectType\n * @param metaObjectName\n * @param parentMetaObjectId\n */\n constructor(metaObjectId, propertySetIds, metaObjectType, metaObjectName, parentMetaObjectId) {\n\n /**\n * Unique ID of this ````XKTMetaObject```` in {@link XKTModel#metaObjects}.\n *\n * For a BIM model, this will be an IFC product ID.\n *\n * If this is a leaf XKTMetaObject, where it is not a parent to any other XKTMetaObject,\n * then this will be equal to the ID of an {@link XKTEntity} in {@link XKTModel#entities},\n * ie. where {@link XKTMetaObject#metaObjectId} == {@link XKTEntity#entityId}.\n *\n * @type {String}\n */\n this.metaObjectId = metaObjectId;\n\n /**\n * Unique ID of one or more property sets that contains additional metadata about this\n * {@link XKTMetaObject}. The property sets can be stored in an external system, or\n * within the {@link XKTModel}, as {@link XKTPropertySet}s within {@link XKTModel#propertySets}.\n *\n * @type {String[]}\n */\n this.propertySetIds = propertySetIds;\n\n /**\n * Indicates the XKTMetaObject meta object type.\n *\n * This defaults to \"default\".\n *\n * @type {string}\n */\n this.metaObjectType = metaObjectType;\n\n /**\n * Indicates the XKTMetaObject meta object name.\n *\n * This defaults to {@link XKTMetaObject#metaObjectId}.\n *\n * @type {string}\n */\n this.metaObjectName = metaObjectName;\n\n /**\n * The parent XKTMetaObject, if any.\n *\n * Will be null if there is no parent.\n *\n * @type {String}\n */\n this.parentMetaObjectId = parentMetaObjectId;\n }\n}\n\nexport {XKTMetaObject};","/**\n * A property set within an {@link XKTModel}.\n *\n * These are shared among {@link XKTMetaObject}s.\n *\n * * Created by {@link XKTModel#createPropertySet}\n * * Stored in {@link XKTModel#propertySets} and {@link XKTModel#propertySetsList}\n * * Has an ID, a type, and a human-readable name\n *\n * @class XKTPropertySet\n */\nclass XKTPropertySet {\n\n /**\n * @private\n */\n constructor(propertySetId, propertySetType, propertySetName, properties) {\n\n /**\n * Unique ID of this ````XKTPropertySet```` in {@link XKTModel#propertySets}.\n *\n * @type {String}\n */\n this.propertySetId = propertySetId;\n\n /**\n * Indicates the ````XKTPropertySet````'s type.\n *\n * This defaults to \"default\".\n *\n * @type {string}\n */\n this.propertySetType = propertySetType;\n\n /**\n * Indicates the XKTPropertySet meta object name.\n *\n * This defaults to {@link XKTPropertySet#propertySetId}.\n *\n * @type {string}\n */\n this.propertySetName = propertySetName;\n\n /**\n * The properties within this ````XKTPropertySet````.\n *\n * @type {*[]}\n */\n this.properties = properties;\n }\n}\n\nexport {XKTPropertySet};","/**\n * A texture shared by {@link XKTTextureSet}s.\n *\n * * Created by {@link XKTModel#createTexture}\n * * Stored in {@link XKTTextureSet#textures}, {@link XKTModel#textures} and {@link XKTModel#texturesList}\n *\n * @class XKTTexture\n */\nimport {RepeatWrapping, LinearMipMapNearestFilter} from \"../constants\";\n\nclass XKTTexture {\n\n /**\n * @private\n */\n constructor(cfg) {\n\n /**\n * Unique ID of this XKTTexture in {@link XKTModel#textures}.\n *\n * @type {Number}\n */\n this.textureId = cfg.textureId;\n\n /**\n * Index of this XKTTexture in {@link XKTModel#texturesList};\n *\n * @type {Number}\n */\n this.textureIndex = cfg.textureIndex;\n\n /**\n * Texture image data.\n *\n * @type {Buffer}\n */\n this.imageData = cfg.imageData;\n\n /**\n * Which material channel this texture is applied to, as determined by its {@link XKTTextureSet}s.\n *\n * @type {Number}\n */\n this.channel = null;\n\n /**\n * Width of this XKTTexture.\n *\n * @type {Number}\n */\n this.width = cfg.width;\n\n /**\n * Height of this XKTTexture.\n *\n * @type {Number}\n */\n this.height = cfg.height;\n\n /**\n * Texture file source.\n *\n * @type {String}\n */\n this.src = cfg.src;\n\n /**\n * Whether this XKTTexture is to be compressed.\n *\n * @type {Boolean}\n */\n this.compressed = (!!cfg.compressed);\n\n /**\n * Media type of this XKTTexture.\n *\n * Supported values are {@link GIFMediaType}, {@link PNGMediaType} and {@link JPEGMediaType}.\n *\n * Ignored for compressed textures.\n *\n * @type {Number}\n */\n this.mediaType = cfg.mediaType;\n\n /**\n * How the texture is sampled when a texel covers less than one pixel. Supported values\n * are {@link LinearMipmapLinearFilter}, {@link LinearMipMapNearestFilter},\n * {@link NearestMipMapNearestFilter}, {@link NearestMipMapLinearFilter}\n * and {@link LinearMipMapLinearFilter}.\n *\n * Ignored for compressed textures.\n *\n * @type {Number}\n */\n this.minFilter = cfg.minFilter || LinearMipMapNearestFilter;\n\n /**\n * How the texture is sampled when a texel covers more than one pixel. Supported values\n * are {@link LinearFilter} and {@link NearestFilter}.\n *\n * Ignored for compressed textures.\n *\n * @type {Number}\n */\n this.magFilter = cfg.magFilter || LinearMipMapNearestFilter;\n\n /**\n * S wrapping mode.\n *\n * Supported values are {@link ClampToEdgeWrapping},\n * {@link MirroredRepeatWrapping} and {@link RepeatWrapping}.\n *\n * Ignored for compressed textures.\n *\n * @type {Number}\n */\n this.wrapS = cfg.wrapS || RepeatWrapping;\n\n /**\n * T wrapping mode.\n *\n * Supported values are {@link ClampToEdgeWrapping},\n * {@link MirroredRepeatWrapping} and {@link RepeatWrapping}.\n *\n * Ignored for compressed textures.\n *\n * @type {Number}\n */\n this.wrapT = cfg.wrapT || RepeatWrapping;\n\n /**\n * R wrapping mode.\n *\n * Ignored for compressed textures.\n *\n * Supported values are {@link ClampToEdgeWrapping},\n * {@link MirroredRepeatWrapping} and {@link RepeatWrapping}.\n *\n * @type {*|number}\n */\n this.wrapR = cfg.wrapR || RepeatWrapping\n }\n}\n\nexport {XKTTexture};","/**\n * A set of textures shared by {@link XKTMesh}es.\n *\n * * Created by {@link XKTModel#createTextureSet}\n * * Registered in {@link XKTMesh#material}, {@link XKTModel#materials} and {@link XKTModel#.textureSetsList}\n *\n * @class XKTMetalRoughMaterial\n */\nclass XKTTextureSet {\n\n /**\n * @private\n */\n constructor(cfg) {\n\n /**\n * Unique ID of this XKTTextureSet in {@link XKTModel#materials}.\n *\n * @type {Number}\n */\n this.textureSetId = cfg.textureSetId;\n\n /**\n * Index of this XKTTexture in {@link XKTModel#texturesList};\n *\n * @type {Number}\n */\n this.textureSetIndex = cfg.textureSetIndex;\n\n /**\n * Identifies the material type.\n *\n * @type {Number}\n */\n this.materialType = cfg.materialType;\n\n /**\n * Index of this XKTTextureSet in {@link XKTModel#meshesList};\n *\n * @type {Number}\n */\n this.materialIndex = cfg.materialIndex;\n\n /**\n * The number of {@link XKTMesh}s that reference this XKTTextureSet.\n *\n * @type {Number}\n */\n this.numInstances = 0;\n\n /**\n * RGBA {@link XKTTexture} containing base color in RGB and opacity in A.\n *\n * @type {XKTTexture}\n */\n this.colorTexture = cfg.colorTexture;\n\n /**\n * RGBA {@link XKTTexture} containing metallic and roughness factors in R and G.\n *\n * @type {XKTTexture}\n */\n this.metallicRoughnessTexture = cfg.metallicRoughnessTexture;\n\n /**\n * RGBA {@link XKTTexture} with surface normals in RGB.\n *\n * @type {XKTTexture}\n */\n this.normalsTexture = cfg.normalsTexture;\n\n /**\n * RGBA {@link XKTTexture} with emissive color in RGB.\n *\n * @type {XKTTexture}\n */\n this.emissiveTexture = cfg.emissiveTexture;\n\n /**\n * RGBA {@link XKTTexture} with ambient occlusion factors in RGB.\n *\n * @type {XKTTexture}\n */\n this.occlusionTexture = cfg.occlusionTexture;\n }\n}\n\nexport {XKTTextureSet};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@loaders.gl/core\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@loaders.gl/textures\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@loaders.gl/images\");","import {math} from \"../lib/math.js\";\nimport {geometryCompression} from \"./lib/geometryCompression.js\";\nimport {buildEdgeIndices} from \"./lib/buildEdgeIndices.js\";\nimport {isTriangleMeshSolid} from \"./lib/isTriangleMeshSolid.js\";\n\nimport {XKTMesh} from './XKTMesh.js';\nimport {XKTGeometry} from './XKTGeometry.js';\nimport {XKTEntity} from './XKTEntity.js';\nimport {XKTTile} from './XKTTile.js';\nimport {KDNode} from \"./KDNode.js\";\nimport {XKTMetaObject} from \"./XKTMetaObject.js\";\nimport {XKTPropertySet} from \"./XKTPropertySet.js\";\nimport {mergeVertices} from \"../lib/mergeVertices.js\";\nimport {XKT_INFO} from \"../XKT_INFO.js\";\nimport {XKTTexture} from \"./XKTTexture\";\nimport {XKTTextureSet} from \"./XKTTextureSet\";\nimport {encode} from \"@loaders.gl/core\";\nimport {KTX2BasisWriter} from \"@loaders.gl/textures\";\nimport {ImageLoader} from '@loaders.gl/images';\nimport {load} from '@loaders.gl/core';\n\nconst tempVec4a = math.vec4([0, 0, 0, 1]);\nconst tempVec4b = math.vec4([0, 0, 0, 1]);\n\nconst tempMat4 = math.mat4();\nconst tempMat4b = math.mat4();\n\nconst kdTreeDimLength = new Float64Array(3);\n\n// XKT texture types\n\nconst COLOR_TEXTURE = 0;\nconst METALLIC_ROUGHNESS_TEXTURE = 1;\nconst NORMALS_TEXTURE = 2;\nconst EMISSIVE_TEXTURE = 3;\nconst OCCLUSION_TEXTURE = 4;\n\n// KTX2 encoding options for each texture type\n\nconst TEXTURE_ENCODING_OPTIONS = {}\nTEXTURE_ENCODING_OPTIONS[COLOR_TEXTURE] = {\n useSRGB: true,\n qualityLevel: 50,\n encodeUASTC: true,\n mipmaps: true\n};\nTEXTURE_ENCODING_OPTIONS[EMISSIVE_TEXTURE] = {\n useSRGB: true,\n encodeUASTC: true,\n qualityLevel: 10,\n mipmaps: false\n};\nTEXTURE_ENCODING_OPTIONS[METALLIC_ROUGHNESS_TEXTURE] = {\n useSRGB: false,\n encodeUASTC: true,\n qualityLevel: 50,\n mipmaps: true // Needed for GGX roughness shading\n};\nTEXTURE_ENCODING_OPTIONS[NORMALS_TEXTURE] = {\n useSRGB: false,\n encodeUASTC: true,\n qualityLevel: 10,\n mipmaps: false\n};\nTEXTURE_ENCODING_OPTIONS[OCCLUSION_TEXTURE] = {\n useSRGB: false,\n encodeUASTC: true,\n qualityLevel: 10,\n mipmaps: false\n};\n\n/**\n * A document model that represents the contents of an .XKT file.\n *\n * * An XKTModel contains {@link XKTTile}s, which spatially subdivide the model into axis-aligned, box-shaped regions.\n * * Each {@link XKTTile} contains {@link XKTEntity}s, which represent the objects within its region.\n * * Each {@link XKTEntity} has {@link XKTMesh}s, which each have a {@link XKTGeometry}. Each {@link XKTGeometry} can be shared by multiple {@link XKTMesh}s.\n * * Import models into an XKTModel using {@link parseGLTFJSONIntoXKTModel}, {@link parseIFCIntoXKTModel}, {@link parseCityJSONIntoXKTModel} etc.\n * * Build an XKTModel programmatically using {@link XKTModel#createGeometry}, {@link XKTModel#createMesh} and {@link XKTModel#createEntity}.\n * * Serialize an XKTModel to an ArrayBuffer using {@link writeXKTModelToArrayBuffer}.\n *\n * ## Usage\n *\n * See [main docs page](/docs/#javascript-api) for usage examples.\n *\n * @class XKTModel\n */\nclass XKTModel {\n\n /**\n * Constructs a new XKTModel.\n *\n * @param {*} [cfg] Configuration\n * @param {Number} [cfg.edgeThreshold=10]\n * @param {Number} [cfg.minTileSize=500]\n */\n constructor(cfg = {}) {\n\n /**\n * The model's ID, if available.\n *\n * Will be \"default\" by default.\n *\n * @type {String}\n */\n this.modelId = cfg.modelId || \"default\";\n\n /**\n * The project ID, if available.\n *\n * Will be an empty string by default.\n *\n * @type {String}\n */\n this.projectId = cfg.projectId || \"\";\n\n /**\n * The revision ID, if available.\n *\n * Will be an empty string by default.\n *\n * @type {String}\n */\n this.revisionId = cfg.revisionId || \"\";\n\n /**\n * The model author, if available.\n *\n * Will be an empty string by default.\n *\n * @property author\n * @type {String}\n */\n this.author = cfg.author || \"\";\n\n /**\n * The date the model was created, if available.\n *\n * Will be an empty string by default.\n *\n * @property createdAt\n * @type {String}\n */\n this.createdAt = cfg.createdAt || \"\";\n\n /**\n * The application that created the model, if available.\n *\n * Will be an empty string by default.\n *\n * @property creatingApplication\n * @type {String}\n */\n this.creatingApplication = cfg.creatingApplication || \"\";\n\n /**\n * The model schema version, if available.\n *\n * In the case of IFC, this could be \"IFC2x3\" or \"IFC4\", for example.\n *\n * Will be an empty string by default.\n *\n * @property schema\n * @type {String}\n */\n this.schema = cfg.schema || \"\";\n\n /**\n * The XKT format version.\n *\n * @property xktVersion;\n * @type {number}\n */\n this.xktVersion = XKT_INFO.xktVersion;\n\n /**\n *\n * @type {Number|number}\n */\n this.edgeThreshold = cfg.edgeThreshold || 10;\n\n /**\n * Minimum diagonal size of the boundary of an {@link XKTTile}.\n *\n * @type {Number|number}\n */\n this.minTileSize = cfg.minTileSize || 500;\n\n /**\n * Map of {@link XKTPropertySet}s within this XKTModel, each mapped to {@link XKTPropertySet#propertySetId}.\n *\n * Created by {@link XKTModel#createPropertySet}.\n *\n * @type {{String:XKTPropertySet}}\n */\n this.propertySets = {};\n\n /**\n * {@link XKTPropertySet}s within this XKTModel.\n *\n * Each XKTPropertySet holds its position in this list in {@link XKTPropertySet#propertySetIndex}.\n *\n * Created by {@link XKTModel#finalize}.\n *\n * @type {XKTPropertySet[]}\n */\n this.propertySetsList = [];\n\n /**\n * Map of {@link XKTMetaObject}s within this XKTModel, each mapped to {@link XKTMetaObject#metaObjectId}.\n *\n * Created by {@link XKTModel#createMetaObject}.\n *\n * @type {{String:XKTMetaObject}}\n */\n this.metaObjects = {};\n\n /**\n * {@link XKTMetaObject}s within this XKTModel.\n *\n * Each XKTMetaObject holds its position in this list in {@link XKTMetaObject#metaObjectIndex}.\n *\n * Created by {@link XKTModel#finalize}.\n *\n * @type {XKTMetaObject[]}\n */\n this.metaObjectsList = [];\n\n /**\n * The positions of all shared {@link XKTGeometry}s are de-quantized using this singular\n * de-quantization matrix.\n *\n * This de-quantization matrix is generated from the collective Local-space boundary of the\n * positions of all shared {@link XKTGeometry}s.\n *\n * @type {Float32Array}\n */\n this.reusedGeometriesDecodeMatrix = new Float32Array(16);\n\n /**\n * Map of {@link XKTGeometry}s within this XKTModel, each mapped to {@link XKTGeometry#geometryId}.\n *\n * Created by {@link XKTModel#createGeometry}.\n *\n * @type {{Number:XKTGeometry}}\n */\n this.geometries = {};\n\n /**\n * List of {@link XKTGeometry}s within this XKTModel, in the order they were created.\n *\n * Each XKTGeometry holds its position in this list in {@link XKTGeometry#geometryIndex}.\n *\n * Created by {@link XKTModel#finalize}.\n *\n * @type {XKTGeometry[]}\n */\n this.geometriesList = [];\n\n /**\n * Map of {@link XKTTexture}s within this XKTModel, each mapped to {@link XKTTexture#textureId}.\n *\n * Created by {@link XKTModel#createTexture}.\n *\n * @type {{Number:XKTTexture}}\n */\n this.textures = {};\n\n /**\n * List of {@link XKTTexture}s within this XKTModel, in the order they were created.\n *\n * Each XKTTexture holds its position in this list in {@link XKTTexture#textureIndex}.\n *\n * Created by {@link XKTModel#finalize}.\n *\n * @type {XKTTexture[]}\n */\n this.texturesList = [];\n\n /**\n * Map of {@link XKTTextureSet}s within this XKTModel, each mapped to {@link XKTTextureSet#textureSetId}.\n *\n * Created by {@link XKTModel#createTextureSet}.\n *\n * @type {{Number:XKTTextureSet}}\n */\n this.textureSets = {};\n\n /**\n * List of {@link XKTTextureSet}s within this XKTModel, in the order they were created.\n *\n * Each XKTTextureSet holds its position in this list in {@link XKTTextureSet#textureSetIndex}.\n *\n * Created by {@link XKTModel#finalize}.\n *\n * @type {XKTTextureSet[]}\n */\n this.textureSetsList = [];\n\n /**\n * Map of {@link XKTMesh}s within this XKTModel, each mapped to {@link XKTMesh#meshId}.\n *\n * Created by {@link XKTModel#createMesh}.\n *\n * @type {{Number:XKTMesh}}\n */\n this.meshes = {};\n\n /**\n * List of {@link XKTMesh}s within this XKTModel, in the order they were created.\n *\n * Each XKTMesh holds its position in this list in {@link XKTMesh#meshIndex}.\n *\n * Created by {@link XKTModel#finalize}.\n *\n * @type {XKTMesh[]}\n */\n this.meshesList = [];\n\n /**\n * Map of {@link XKTEntity}s within this XKTModel, each mapped to {@link XKTEntity#entityId}.\n *\n * Created by {@link XKTModel#createEntity}.\n *\n * @type {{String:XKTEntity}}\n */\n this.entities = {};\n\n /**\n * {@link XKTEntity}s within this XKTModel.\n *\n * Each XKTEntity holds its position in this list in {@link XKTEntity#entityIndex}.\n *\n * Created by {@link XKTModel#finalize}.\n *\n * @type {XKTEntity[]}\n */\n this.entitiesList = [];\n\n /**\n * {@link XKTTile}s within this XKTModel.\n *\n * Created by {@link XKTModel#finalize}.\n *\n * @type {XKTTile[]}\n */\n this.tilesList = [];\n\n /**\n * The axis-aligned 3D World-space boundary of this XKTModel.\n *\n * Created by {@link XKTModel#finalize}.\n *\n * @type {Float64Array}\n */\n this.aabb = math.AABB3();\n\n /**\n * Indicates if this XKTModel has been finalized.\n *\n * Set ````true```` by {@link XKTModel#finalize}.\n *\n * @type {boolean}\n */\n this.finalized = false;\n }\n\n /**\n * Creates an {@link XKTPropertySet} within this XKTModel.\n *\n * Logs error and does nothing if this XKTModel has been finalized (see {@link XKTModel#finalized}).\n *\n * @param {*} params Method parameters.\n * @param {String} params.propertySetId Unique ID for the {@link XKTPropertySet}.\n * @param {String} [params.propertySetType=\"default\"] A meta type for the {@link XKTPropertySet}.\n * @param {String} [params.propertySetName] Human-readable name for the {@link XKTPropertySet}. Defaults to the ````propertySetId```` parameter.\n * @param {String[]} params.properties Properties for the {@link XKTPropertySet}.\n * @returns {XKTPropertySet} The new {@link XKTPropertySet}.\n */\n createPropertySet(params) {\n\n if (!params) {\n throw \"Parameters expected: params\";\n }\n\n if (params.propertySetId === null || params.propertySetId === undefined) {\n throw \"Parameter expected: params.propertySetId\";\n }\n\n if (params.properties === null || params.properties === undefined) {\n throw \"Parameter expected: params.properties\";\n }\n\n if (this.finalized) {\n console.error(\"XKTModel has been finalized, can't add more property sets\");\n return;\n }\n\n if (this.propertySets[params.propertySetId]) {\n // console.error(\"XKTPropertySet already exists with this ID: \" + params.propertySetId);\n return;\n }\n\n const propertySetId = params.propertySetId;\n const propertySetType = params.propertySetType || \"Default\";\n const propertySetName = params.propertySetName || params.propertySetId;\n const properties = params.properties || [];\n\n const propertySet = new XKTPropertySet(propertySetId, propertySetType, propertySetName, properties);\n\n this.propertySets[propertySetId] = propertySet;\n this.propertySetsList.push(propertySet);\n\n return propertySet;\n }\n\n /**\n * Creates an {@link XKTMetaObject} within this XKTModel.\n *\n * Logs error and does nothing if this XKTModel has been finalized (see {@link XKTModel#finalized}).\n *\n * @param {*} params Method parameters.\n * @param {String} params.metaObjectId Unique ID for the {@link XKTMetaObject}.\n * @param {String} params.propertySetIds ID of one or more property sets that contains additional metadata about\n * this {@link XKTMetaObject}. The property sets could be stored externally (ie not managed at all by the XKT file),\n * or could be {@link XKTPropertySet}s within {@link XKTModel#propertySets}.\n * @param {String} [params.metaObjectType=\"default\"] A meta type for the {@link XKTMetaObject}. Can be anything,\n * but is usually an IFC type, such as \"IfcSite\" or \"IfcWall\".\n * @param {String} [params.metaObjectName] Human-readable name for the {@link XKTMetaObject}. Defaults to the ````metaObjectId```` parameter.\n * @param {String} [params.parentMetaObjectId] ID of the parent {@link XKTMetaObject}, if any. Defaults to the ````metaObjectId```` parameter.\n * @returns {XKTMetaObject} The new {@link XKTMetaObject}.\n */\n createMetaObject(params) {\n\n if (!params) {\n throw \"Parameters expected: params\";\n }\n\n if (params.metaObjectId === null || params.metaObjectId === undefined) {\n throw \"Parameter expected: params.metaObjectId\";\n }\n\n if (this.finalized) {\n console.error(\"XKTModel has been finalized, can't add more meta objects\");\n return;\n }\n\n if (this.metaObjects[params.metaObjectId]) {\n // console.error(\"XKTMetaObject already exists with this ID: \" + params.metaObjectId);\n return;\n }\n\n const metaObjectId = params.metaObjectId;\n const propertySetIds = params.propertySetIds;\n const metaObjectType = params.metaObjectType || \"Default\";\n const metaObjectName = params.metaObjectName || params.metaObjectId;\n const parentMetaObjectId = params.parentMetaObjectId;\n\n const metaObject = new XKTMetaObject(metaObjectId, propertySetIds, metaObjectType, metaObjectName, parentMetaObjectId);\n\n this.metaObjects[metaObjectId] = metaObject;\n this.metaObjectsList.push(metaObject);\n\n if (!parentMetaObjectId) {\n if (!this._rootMetaObject) {\n this._rootMetaObject = metaObject;\n }\n }\n\n return metaObject;\n }\n\n /**\n * Creates an {@link XKTTexture} within this XKTModel.\n *\n * Registers the new {@link XKTTexture} in {@link XKTModel#textures} and {@link XKTModel#texturesList}.\n *\n * Logs error and does nothing if this XKTModel has been finalized (see {@link XKTModel#finalized}).\n *\n * @param {*} params Method parameters.\n * @param {Number} params.textureId Unique ID for the {@link XKTTexture}.\n * @param {String} [params.src] Source of an image file for the texture.\n * @param {Buffer} [params.imageData] Image data for the texture.\n * @param {Number} [params.mediaType] Media type (ie. MIME type) of ````imageData````. Supported values are {@link GIFMediaType}, {@link PNGMediaType} and {@link JPEGMediaType}.\n * @param {Number} [params.width] Texture width, used with ````imageData````. Ignored for compressed textures.\n * @param {Number} [params.height] Texture height, used with ````imageData````. Ignored for compressed textures.\n * @param {Boolean} [params.compressed=true] Whether to compress the texture.\n * @param {Number} [params.minFilter=LinearMipMapNearestFilter] How the texture is sampled when a texel covers less than one pixel. Supported\n * values are {@link LinearMipmapLinearFilter}, {@link LinearMipMapNearestFilter}, {@link NearestMipMapNearestFilter},\n * {@link NearestMipMapLinearFilter} and {@link LinearMipMapLinearFilter}. Ignored for compressed textures.\n * @param {Number} [params.magFilter=LinearMipMapNearestFilter] How the texture is sampled when a texel covers more than one pixel. Supported values\n * are {@link LinearFilter} and {@link NearestFilter}. Ignored for compressed textures.\n * @param {Number} [params.wrapS=RepeatWrapping] Wrap parameter for texture coordinate *S*. Supported values are {@link ClampToEdgeWrapping},\n * {@link MirroredRepeatWrapping} and {@link RepeatWrapping}. Ignored for compressed textures.\n * @param {Number} [params.wrapT=RepeatWrapping] Wrap parameter for texture coordinate *T*. Supported values are {@link ClampToEdgeWrapping},\n * {@link MirroredRepeatWrapping} and {@link RepeatWrapping}. Ignored for compressed textures.\n * {@param {Number} [params.wrapR=RepeatWrapping] Wrap parameter for texture coordinate *R*. Supported values are {@link ClampToEdgeWrapping},\n * {@link MirroredRepeatWrapping} and {@link RepeatWrapping}. Ignored for compressed textures.\n * @returns {XKTTexture} The new {@link XKTTexture}.\n */\n createTexture(params) {\n\n if (!params) {\n throw \"Parameters expected: params\";\n }\n\n if (params.textureId === null || params.textureId === undefined) {\n throw \"Parameter expected: params.textureId\";\n }\n\n if (!params.imageData && !params.src) {\n throw \"Parameter expected: params.imageData or params.src\";\n }\n\n if (this.finalized) {\n console.error(\"XKTModel has been finalized, can't add more textures\");\n return;\n }\n\n if (this.textures[params.textureId]) {\n console.error(\"XKTTexture already exists with this ID: \" + params.textureId);\n return;\n }\n\n if (params.src) {\n const fileExt = params.src.split('.').pop();\n if (fileExt !== \"jpg\" && fileExt !== \"jpeg\" && fileExt !== \"png\") {\n console.error(`XKTModel does not support image files with extension '${fileExt}' - won't create texture '${params.textureId}`);\n return;\n }\n }\n\n const textureId = params.textureId;\n\n const texture = new XKTTexture({\n textureId,\n imageData: params.imageData,\n mediaType: params.mediaType,\n minFilter: params.minFilter,\n magFilter: params.magFilter,\n wrapS: params.wrapS,\n wrapT: params.wrapT,\n wrapR: params.wrapR,\n width: params.width,\n height: params.height,\n compressed: (params.compressed !== false),\n src: params.src\n });\n\n this.textures[textureId] = texture;\n this.texturesList.push(texture);\n\n return texture;\n }\n\n /**\n * Creates an {@link XKTTextureSet} within this XKTModel.\n *\n * Registers the new {@link XKTTextureSet} in {@link XKTModel#textureSets} and {@link XKTModel#.textureSetsList}.\n *\n * Logs error and does nothing if this XKTModel has been finalized (see {@link XKTModel#finalized}).\n *\n * @param {*} params Method parameters.\n * @param {Number} params.textureSetId Unique ID for the {@link XKTTextureSet}.\n * @param {*} [params.colorTextureId] ID of *RGBA* base color {@link XKTTexture}, with color in *RGB* and alpha in *A*.\n * @param {*} [params.metallicRoughnessTextureId] ID of *RGBA* metal-roughness {@link XKTTexture}, with the metallic factor in *R*, and roughness factor in *G*.\n * @param {*} [params.normalsTextureId] ID of *RGBA* normal {@link XKTTexture}, with normal map vectors in *RGB*.\n * @param {*} [params.emissiveTextureId] ID of *RGBA* emissive {@link XKTTexture}, with emissive color in *RGB*.\n * @param {*} [params.occlusionTextureId] ID of *RGBA* occlusion {@link XKTTexture}, with occlusion factor in *R*.\n * @returns {XKTTextureSet} The new {@link XKTTextureSet}.\n */\n createTextureSet(params) {\n\n if (!params) {\n throw \"Parameters expected: params\";\n }\n\n if (params.textureSetId === null || params.textureSetId === undefined) {\n throw \"Parameter expected: params.textureSetId\";\n }\n\n if (this.finalized) {\n console.error(\"XKTModel has been finalized, can't add more textureSets\");\n return;\n }\n\n if (this.textureSets[params.textureSetId]) {\n console.error(\"XKTTextureSet already exists with this ID: \" + params.textureSetId);\n return;\n }\n\n let colorTexture;\n if (params.colorTextureId !== undefined && params.colorTextureId !== null) {\n colorTexture = this.textures[params.colorTextureId];\n if (!colorTexture) {\n console.error(`Texture not found: ${params.colorTextureId} - ensure that you create it first with createTexture()`);\n return;\n }\n colorTexture.channel = COLOR_TEXTURE;\n }\n\n let metallicRoughnessTexture;\n if (params.metallicRoughnessTextureId !== undefined && params.metallicRoughnessTextureId !== null) {\n metallicRoughnessTexture = this.textures[params.metallicRoughnessTextureId];\n if (!metallicRoughnessTexture) {\n console.error(`Texture not found: ${params.metallicRoughnessTextureId} - ensure that you create it first with createTexture()`);\n return;\n }\n metallicRoughnessTexture.channel = METALLIC_ROUGHNESS_TEXTURE;\n }\n\n let normalsTexture;\n if (params.normalsTextureId !== undefined && params.normalsTextureId !== null) {\n normalsTexture = this.textures[params.normalsTextureId];\n if (!normalsTexture) {\n console.error(`Texture not found: ${params.normalsTextureId} - ensure that you create it first with createTexture()`);\n return;\n }\n normalsTexture.channel = NORMALS_TEXTURE;\n }\n\n let emissiveTexture;\n if (params.emissiveTextureId !== undefined && params.emissiveTextureId !== null) {\n emissiveTexture = this.textures[params.emissiveTextureId];\n if (!emissiveTexture) {\n console.error(`Texture not found: ${params.emissiveTextureId} - ensure that you create it first with createTexture()`);\n return;\n }\n emissiveTexture.channel = EMISSIVE_TEXTURE;\n }\n\n let occlusionTexture;\n if (params.occlusionTextureId !== undefined && params.occlusionTextureId !== null) {\n occlusionTexture = this.textures[params.occlusionTextureId];\n if (!occlusionTexture) {\n console.error(`Texture not found: ${params.occlusionTextureId} - ensure that you create it first with createTexture()`);\n return;\n }\n occlusionTexture.channel = OCCLUSION_TEXTURE;\n }\n\n const textureSet = new XKTTextureSet({\n textureSetId: params.textureSetId,\n textureSetIndex: this.textureSetsList.length,\n colorTexture,\n metallicRoughnessTexture,\n normalsTexture,\n emissiveTexture,\n occlusionTexture\n });\n\n this.textureSets[params.textureSetId] = textureSet;\n this.textureSetsList.push(textureSet);\n\n return textureSet;\n }\n\n /**\n * Creates an {@link XKTGeometry} within this XKTModel.\n *\n * Registers the new {@link XKTGeometry} in {@link XKTModel#geometries} and {@link XKTModel#geometriesList}.\n *\n * Logs error and does nothing if this XKTModel has been finalized (see {@link XKTModel#finalized}).\n *\n * @param {*} params Method parameters.\n * @param {Number} params.geometryId Unique ID for the {@link XKTGeometry}.\n * @param {String} params.primitiveType The type of {@link XKTGeometry}: \"triangles\", \"lines\" or \"points\".\n * @param {Float64Array} params.positions Floating-point Local-space vertex positions for the {@link XKTGeometry}. Required for all primitive types.\n * @param {Number[]} [params.normals] Floating-point vertex normals for the {@link XKTGeometry}. Only used with triangles primitives. Ignored for points and lines.\n * @param {Number[]} [params.colors] Floating-point RGBA vertex colors for the {@link XKTGeometry}. Required for points primitives. Ignored for lines and triangles.\n * @param {Number[]} [params.colorsCompressed] Integer RGBA vertex colors for the {@link XKTGeometry}. Required for points primitives. Ignored for lines and triangles.\n * @param {Number[]} [params.uvs] Floating-point vertex UV coordinates for the {@link XKTGeometry}. Alias for ````uv````.\n * @param {Number[]} [params.uv] Floating-point vertex UV coordinates for the {@link XKTGeometry}. Alias for ````uvs````.\n * @param {Number[]} [params.colorsCompressed] Integer RGBA vertex colors for the {@link XKTGeometry}. Required for points primitives. Ignored for lines and triangles.\n * @param {Uint32Array} [params.indices] Indices for the {@link XKTGeometry}. Required for triangles and lines primitives. Ignored for points.\n * @param {Number} [params.edgeThreshold=10]\n * @returns {XKTGeometry} The new {@link XKTGeometry}.\n */\n createGeometry(params) {\n\n if (!params) {\n throw \"Parameters expected: params\";\n }\n\n if (params.geometryId === null || params.geometryId === undefined) {\n throw \"Parameter expected: params.geometryId\";\n }\n\n if (!params.primitiveType) {\n throw \"Parameter expected: params.primitiveType\";\n }\n\n if (!params.positions) {\n throw \"Parameter expected: params.positions\";\n }\n\n const triangles = params.primitiveType === \"triangles\";\n const points = params.primitiveType === \"points\";\n const lines = params.primitiveType === \"lines\";\n const line_strip = params.primitiveType === \"line-strip\";\n const triangle_strip = params.primitiveType === \"triangle-strip\";\n const triangle_fan = params.primitiveType === \"triangle-fan\";\n\n if (!triangles && !points && !lines && !line_strip) {\n throw \"Unsupported value for params.primitiveType: \"\n + params.primitiveType\n + \"' - supported values are 'triangles', 'points', 'lines', 'line-strip', 'triangle-strip' and 'triangle-fan\";\n }\n\n if (triangles) {\n if (!params.indices) {\n throw \"Parameter expected for 'triangles' primitive: params.indices\";\n }\n }\n\n if (points) {\n if (!params.colors && !params.colorsCompressed) {\n throw \"Parameter expected for 'points' primitive: params.colors or params.colorsCompressed\";\n }\n }\n\n if (lines) {\n if (!params.indices) {\n throw \"Parameter expected for 'lines' primitive: params.indices\";\n }\n }\n\n if (this.finalized) {\n console.error(\"XKTModel has been finalized, can't add more geometries\");\n return;\n }\n\n if (this.geometries[params.geometryId]) {\n console.error(\"XKTGeometry already exists with this ID: \" + params.geometryId);\n return;\n }\n\n const geometryId = params.geometryId;\n const primitiveType = params.primitiveType;\n const positions = new Float64Array(params.positions); // May modify in #finalize\n\n const xktGeometryCfg = {\n geometryId: geometryId,\n geometryIndex: this.geometriesList.length,\n primitiveType: primitiveType,\n positions: positions,\n uvs: params.uvs || params.uv\n }\n\n if (triangles) {\n if (params.normals) {\n xktGeometryCfg.normals = new Float32Array(params.normals);\n }\n xktGeometryCfg.indices = params.indices;\n }\n\n if (points) {\n if (params.colorsCompressed) {\n xktGeometryCfg.colorsCompressed = new Uint8Array(params.colorsCompressed);\n\n } else {\n const colors = params.colors;\n const colorsCompressed = new Uint8Array(colors.length);\n for (let i = 0, len = colors.length; i < len; i++) {\n colorsCompressed[i] = Math.floor(colors[i] * 255);\n }\n xktGeometryCfg.colorsCompressed = colorsCompressed;\n }\n }\n\n if (lines) {\n xktGeometryCfg.indices = params.indices;\n }\n\n if (triangles) {\n\n if (!params.normals && !params.uv && !params.uvs) {\n\n // Building models often duplicate positions to allow face-aligned vertex normals; when we're not\n // providing normals for a geometry, it becomes possible to merge duplicate vertex positions within it.\n\n // TODO: Make vertex merging also merge normals?\n\n const mergedPositions = [];\n const mergedIndices = [];\n mergeVertices(xktGeometryCfg.positions, xktGeometryCfg.indices, mergedPositions, mergedIndices);\n xktGeometryCfg.positions = new Float64Array(mergedPositions);\n xktGeometryCfg.indices = mergedIndices;\n }\n\n xktGeometryCfg.edgeIndices = buildEdgeIndices(xktGeometryCfg.positions, xktGeometryCfg.indices, null, params.edgeThreshold || this.edgeThreshold || 10);\n }\n\n const geometry = new XKTGeometry(xktGeometryCfg);\n\n this.geometries[geometryId] = geometry;\n this.geometriesList.push(geometry);\n\n return geometry;\n }\n\n /**\n * Creates an {@link XKTMesh} within this XKTModel.\n *\n * An {@link XKTMesh} can be owned by one {@link XKTEntity}, which can own multiple {@link XKTMesh}es.\n *\n * Registers the new {@link XKTMesh} in {@link XKTModel#meshes} and {@link XKTModel#meshesList}.\n *\n * @param {*} params Method parameters.\n * @param {Number} params.meshId Unique ID for the {@link XKTMesh}.\n * @param {Number} params.geometryId ID of an existing {@link XKTGeometry} in {@link XKTModel#geometries}.\n * @param {Number} [params.textureSetId] Unique ID of an {@link XKTTextureSet} in {@link XKTModel#textureSets}.\n * @param {Float32Array} params.color RGB color for the {@link XKTMesh}, with each color component in range [0..1].\n * @param {Number} [params.metallic=0] How metallic the {@link XKTMesh} is, in range [0..1]. A value of ````0```` indicates fully dielectric material, while ````1```` indicates fully metallic.\n * @param {Number} [params.roughness=1] How rough the {@link XKTMesh} is, in range [0..1]. A value of ````0```` indicates fully smooth, while ````1```` indicates fully rough.\n * @param {Number} params.opacity Opacity factor for the {@link XKTMesh}, in range [0..1].\n * @param {Float64Array} [params.matrix] Modeling matrix for the {@link XKTMesh}. Overrides ````position````, ````scale```` and ````rotation```` parameters.\n * @param {Number[]} [params.position=[0,0,0]] Position of the {@link XKTMesh}. Overridden by the ````matrix```` parameter.\n * @param {Number[]} [params.scale=[1,1,1]] Scale of the {@link XKTMesh}. Overridden by the ````matrix```` parameter.\n * @param {Number[]} [params.rotation=[0,0,0]] Rotation of the {@link XKTMesh} as Euler angles given in degrees, for each of the X, Y and Z axis. Overridden by the ````matrix```` parameter.\n * @returns {XKTMesh} The new {@link XKTMesh}.\n */\n createMesh(params) {\n\n if (params.meshId === null || params.meshId === undefined) {\n throw \"Parameter expected: params.meshId\";\n }\n\n if (params.geometryId === null || params.geometryId === undefined) {\n throw \"Parameter expected: params.geometryId\";\n }\n\n if (this.finalized) {\n throw \"XKTModel has been finalized, can't add more meshes\";\n }\n\n if (this.meshes[params.meshId]) {\n console.error(\"XKTMesh already exists with this ID: \" + params.meshId);\n return;\n }\n\n const geometry = this.geometries[params.geometryId];\n\n if (!geometry) {\n console.error(\"XKTGeometry not found: \" + params.geometryId);\n return;\n }\n\n geometry.numInstances++;\n\n let textureSet = null;\n if (params.textureSetId) {\n textureSet = this.textureSets[params.textureSetId];\n if (!textureSet) {\n console.error(\"XKTTextureSet not found: \" + params.textureSetId);\n return;\n }\n textureSet.numInstances++;\n }\n\n let matrix = params.matrix;\n\n if (!matrix) {\n\n const position = params.position;\n const scale = params.scale;\n const rotation = params.rotation;\n\n if (position || scale || rotation) {\n matrix = math.identityMat4();\n const quaternion = math.eulerToQuaternion(rotation || [0, 0, 0], \"XYZ\", math.identityQuaternion());\n math.composeMat4(position || [0, 0, 0], quaternion, scale || [1, 1, 1], matrix)\n\n } else {\n matrix = math.identityMat4();\n }\n }\n\n const meshIndex = this.meshesList.length;\n\n const mesh = new XKTMesh({\n meshId: params.meshId,\n meshIndex,\n matrix,\n geometry,\n color: params.color,\n metallic: params.metallic,\n roughness: params.roughness,\n opacity: params.opacity,\n textureSet\n });\n\n this.meshes[mesh.meshId] = mesh;\n this.meshesList.push(mesh);\n\n return mesh;\n }\n\n /**\n * Creates an {@link XKTEntity} within this XKTModel.\n *\n * Registers the new {@link XKTEntity} in {@link XKTModel#entities} and {@link XKTModel#entitiesList}.\n *\n * Logs error and does nothing if this XKTModel has been finalized (see {@link XKTModel#finalized}).\n *\n * @param {*} params Method parameters.\n * @param {String} params.entityId Unique ID for the {@link XKTEntity}.\n * @param {String[]} params.meshIds IDs of {@link XKTMesh}es used by the {@link XKTEntity}. Note that each {@link XKTMesh} can only be used by one {@link XKTEntity}.\n * @returns {XKTEntity} The new {@link XKTEntity}.\n */\n createEntity(params) {\n\n if (!params) {\n throw \"Parameters expected: params\";\n }\n\n if (params.entityId === null || params.entityId === undefined) {\n throw \"Parameter expected: params.entityId\";\n }\n\n if (!params.meshIds) {\n throw \"Parameter expected: params.meshIds\";\n }\n\n if (this.finalized) {\n console.error(\"XKTModel has been finalized, can't add more entities\");\n return;\n }\n\n if (params.meshIds.length === 0) {\n console.warn(\"XKTEntity has no meshes - won't create: \" + params.entityId);\n return;\n }\n\n let entityId = params.entityId;\n\n if (this.entities[entityId]) {\n while (this.entities[entityId]) {\n entityId = math.createUUID();\n }\n console.error(\"XKTEntity already exists with this ID: \" + params.entityId + \" - substituting random ID instead: \" + entityId);\n }\n\n const meshIds = params.meshIds;\n const meshes = [];\n\n for (let meshIdIdx = 0, meshIdLen = meshIds.length; meshIdIdx < meshIdLen; meshIdIdx++) {\n\n const meshId = meshIds[meshIdIdx];\n const mesh = this.meshes[meshId];\n\n if (!mesh) {\n console.error(\"XKTMesh found: \" + meshId);\n continue;\n }\n\n if (mesh.entity) {\n console.error(\"XKTMesh \" + meshId + \" already used by XKTEntity \" + mesh.entity.entityId);\n continue;\n }\n\n meshes.push(mesh);\n }\n\n const entity = new XKTEntity(entityId, meshes);\n\n for (let i = 0, len = meshes.length; i < len; i++) {\n const mesh = meshes[i];\n mesh.entity = entity;\n }\n\n this.entities[entityId] = entity;\n this.entitiesList.push(entity);\n\n return entity;\n }\n\n /**\n * Creates a default {@link XKTMetaObject} for each {@link XKTEntity} that does not already have one.\n */\n createDefaultMetaObjects() {\n\n for (let i = 0, len = this.entitiesList.length; i < len; i++) {\n\n const entity = this.entitiesList[i];\n const metaObjectId = entity.entityId;\n const metaObject = this.metaObjects[metaObjectId];\n\n if (!metaObject) {\n\n if (!this._rootMetaObject) {\n this._rootMetaObject = this.createMetaObject({\n metaObjectId: this.modelId,\n metaObjectType: \"Default\",\n metaObjectName: this.modelId\n });\n }\n\n this.createMetaObject({\n metaObjectId: metaObjectId,\n metaObjectType: \"Default\",\n metaObjectName: \"\" + metaObjectId,\n parentMetaObjectId: this._rootMetaObject.metaObjectId\n });\n }\n }\n }\n\n /**\n * Finalizes this XKTModel.\n *\n * After finalizing, we may then serialize the model to an array buffer using {@link writeXKTModelToArrayBuffer}.\n *\n * Logs error and does nothing if this XKTModel has already been finalized.\n *\n * Internally, this method:\n *\n * * for each {@link XKTEntity} that doesn't already have a {@link XKTMetaObject}, creates one with {@link XKTMetaObject#metaObjectType} set to \"default\"\n * * sets each {@link XKTEntity}'s {@link XKTEntity#hasReusedGeometries} true if it shares its {@link XKTGeometry}s with other {@link XKTEntity}s,\n * * creates each {@link XKTEntity}'s {@link XKTEntity#aabb},\n * * creates {@link XKTTile}s in {@link XKTModel#tilesList}, and\n * * sets {@link XKTModel#finalized} ````true````.\n */\n async finalize() {\n\n if (this.finalized) {\n console.log(\"XKTModel already finalized\");\n return;\n }\n\n this._removeUnusedTextures();\n\n await this._compressTextures();\n\n this._bakeSingleUseGeometryPositions();\n\n this._bakeAndOctEncodeNormals();\n\n this._createEntityAABBs();\n\n const rootKDNode = this._createKDTree();\n\n this.entitiesList = [];\n\n this._createTilesFromKDTree(rootKDNode);\n\n this._createReusedGeometriesDecodeMatrix();\n\n this._flagSolidGeometries();\n\n this.aabb.set(rootKDNode.aabb);\n\n this.finalized = true;\n }\n\n _removeUnusedTextures() {\n let texturesList = [];\n const textures = {};\n for (let i = 0, leni = this.texturesList.length; i < leni; i++) {\n const texture = this.texturesList[i];\n if (texture.channel !== null) {\n texture.textureIndex = texturesList.length;\n texturesList.push(texture);\n textures[texture.textureId] = texture;\n }\n }\n this.texturesList = texturesList;\n this.textures = textures;\n }\n\n _compressTextures() {\n let countTextures = this.texturesList.length;\n return new Promise((resolve) => {\n if (countTextures === 0) {\n resolve();\n return;\n }\n for (let i = 0, leni = this.texturesList.length; i < leni; i++) {\n const texture = this.texturesList[i];\n const encodingOptions = TEXTURE_ENCODING_OPTIONS[texture.channel] || {};\n\n if (texture.src) {\n\n // XKTTexture created with XKTModel#createTexture({ src: ... })\n\n const src = texture.src;\n const fileExt = src.split('.').pop();\n switch (fileExt) {\n case \"jpeg\":\n case \"jpg\":\n case \"png\":\n load(src, ImageLoader, {\n image: {\n type: \"data\"\n }\n }).then((imageData) => {\n if (texture.compressed) {\n encode(imageData, KTX2BasisWriter, encodingOptions).then((encodedData) => {\n const encodedImageData = new Uint8Array(encodedData);\n texture.imageData = encodedImageData;\n if (--countTextures <= 0) {\n resolve();\n }\n }).catch((err) => {\n console.error(\"[XKTModel.finalize] Failed to encode image: \" + err);\n if (--countTextures <= 0) {\n resolve();\n }\n });\n } else {\n texture.imageData = new Uint8Array(1);\n if (--countTextures <= 0) {\n resolve();\n }\n }\n }).catch((err) => {\n console.error(\"[XKTModel.finalize] Failed to load image: \" + err);\n if (--countTextures <= 0) {\n resolve();\n }\n });\n break;\n default:\n if (--countTextures <= 0) {\n resolve();\n }\n break;\n }\n }\n\n if (texture.imageData) {\n\n // XKTTexture created with XKTModel#createTexture({ imageData: ... })\n\n if (texture.compressed) {\n encode(texture.imageData, KTX2BasisWriter, encodingOptions)\n .then((encodedImageData) => {\n texture.imageData = new Uint8Array(encodedImageData);\n if (--countTextures <= 0) {\n resolve();\n }\n }).catch((err) => {\n console.error(\"[XKTModel.finalize] Failed to encode image: \" + err);\n if (--countTextures <= 0) {\n resolve();\n }\n });\n } else {\n texture.imageData = new Uint8Array(1);\n if (--countTextures <= 0) {\n resolve();\n }\n }\n }\n }\n });\n }\n\n _bakeSingleUseGeometryPositions() {\n\n for (let j = 0, lenj = this.meshesList.length; j < lenj; j++) {\n\n const mesh = this.meshesList[j];\n\n const geometry = mesh.geometry;\n\n if (geometry.numInstances === 1) {\n\n const matrix = mesh.matrix;\n\n if (matrix && (!math.isIdentityMat4(matrix))) {\n\n const positions = geometry.positions;\n\n for (let i = 0, len = positions.length; i < len; i += 3) {\n\n tempVec4a[0] = positions[i + 0];\n tempVec4a[1] = positions[i + 1];\n tempVec4a[2] = positions[i + 2];\n tempVec4a[3] = 1;\n\n math.transformPoint4(matrix, tempVec4a, tempVec4b);\n\n positions[i + 0] = tempVec4b[0];\n positions[i + 1] = tempVec4b[1];\n positions[i + 2] = tempVec4b[2];\n }\n }\n }\n }\n }\n\n _bakeAndOctEncodeNormals() {\n\n for (let i = 0, len = this.meshesList.length; i < len; i++) {\n\n const mesh = this.meshesList[i];\n const geometry = mesh.geometry;\n\n if (geometry.normals && !geometry.normalsOctEncoded) {\n\n geometry.normalsOctEncoded = new Int8Array(geometry.normals.length);\n\n if (geometry.numInstances > 1) {\n geometryCompression.octEncodeNormals(geometry.normals, geometry.normals.length, geometry.normalsOctEncoded, 0);\n\n } else {\n const modelNormalMatrix = math.inverseMat4(math.transposeMat4(mesh.matrix, tempMat4), tempMat4b);\n geometryCompression.transformAndOctEncodeNormals(modelNormalMatrix, geometry.normals, geometry.normals.length, geometry.normalsOctEncoded, 0);\n }\n }\n }\n }\n\n _createEntityAABBs() {\n\n for (let i = 0, len = this.entitiesList.length; i < len; i++) {\n\n const entity = this.entitiesList[i];\n const entityAABB = entity.aabb;\n const meshes = entity.meshes;\n\n math.collapseAABB3(entityAABB);\n\n for (let j = 0, lenj = meshes.length; j < lenj; j++) {\n\n const mesh = meshes[j];\n const geometry = mesh.geometry;\n const matrix = mesh.matrix;\n\n if (geometry.numInstances > 1) {\n\n const positions = geometry.positions;\n for (let i = 0, len = positions.length; i < len; i += 3) {\n tempVec4a[0] = positions[i + 0];\n tempVec4a[1] = positions[i + 1];\n tempVec4a[2] = positions[i + 2];\n tempVec4a[3] = 1;\n math.transformPoint4(matrix, tempVec4a, tempVec4b);\n math.expandAABB3Point3(entityAABB, tempVec4b);\n }\n\n } else {\n\n const positions = geometry.positions;\n for (let i = 0, len = positions.length; i < len; i += 3) {\n tempVec4a[0] = positions[i + 0];\n tempVec4a[1] = positions[i + 1];\n tempVec4a[2] = positions[i + 2];\n math.expandAABB3Point3(entityAABB, tempVec4a);\n }\n }\n }\n }\n }\n\n _createKDTree() {\n\n const aabb = math.collapseAABB3();\n\n for (let i = 0, len = this.entitiesList.length; i < len; i++) {\n const entity = this.entitiesList[i];\n math.expandAABB3(aabb, entity.aabb);\n }\n\n const rootKDNode = new KDNode(aabb);\n\n for (let i = 0, len = this.entitiesList.length; i < len; i++) {\n const entity = this.entitiesList[i];\n this._insertEntityIntoKDTree(rootKDNode, entity);\n }\n\n return rootKDNode;\n }\n\n _insertEntityIntoKDTree(kdNode, entity) {\n\n const nodeAABB = kdNode.aabb;\n const entityAABB = entity.aabb;\n\n const nodeAABBDiag = math.getAABB3Diag(nodeAABB);\n\n if (nodeAABBDiag < this.minTileSize) {\n kdNode.entities = kdNode.entities || [];\n kdNode.entities.push(entity);\n math.expandAABB3(nodeAABB, entityAABB);\n return;\n }\n\n if (kdNode.left) {\n if (math.containsAABB3(kdNode.left.aabb, entityAABB)) {\n this._insertEntityIntoKDTree(kdNode.left, entity);\n return;\n }\n }\n\n if (kdNode.right) {\n if (math.containsAABB3(kdNode.right.aabb, entityAABB)) {\n this._insertEntityIntoKDTree(kdNode.right, entity);\n return;\n }\n }\n\n kdTreeDimLength[0] = nodeAABB[3] - nodeAABB[0];\n kdTreeDimLength[1] = nodeAABB[4] - nodeAABB[1];\n kdTreeDimLength[2] = nodeAABB[5] - nodeAABB[2];\n\n let dim = 0;\n\n if (kdTreeDimLength[1] > kdTreeDimLength[dim]) {\n dim = 1;\n }\n\n if (kdTreeDimLength[2] > kdTreeDimLength[dim]) {\n dim = 2;\n }\n\n if (!kdNode.left) {\n const aabbLeft = nodeAABB.slice();\n aabbLeft[dim + 3] = ((nodeAABB[dim] + nodeAABB[dim + 3]) / 2.0);\n kdNode.left = new KDNode(aabbLeft);\n if (math.containsAABB3(aabbLeft, entityAABB)) {\n this._insertEntityIntoKDTree(kdNode.left, entity);\n return;\n }\n }\n\n if (!kdNode.right) {\n const aabbRight = nodeAABB.slice();\n aabbRight[dim] = ((nodeAABB[dim] + nodeAABB[dim + 3]) / 2.0);\n kdNode.right = new KDNode(aabbRight);\n if (math.containsAABB3(aabbRight, entityAABB)) {\n this._insertEntityIntoKDTree(kdNode.right, entity);\n return;\n }\n }\n\n kdNode.entities = kdNode.entities || [];\n kdNode.entities.push(entity);\n\n math.expandAABB3(nodeAABB, entityAABB);\n }\n\n _createTilesFromKDTree(rootKDNode) {\n this._createTilesFromKDNode(rootKDNode);\n }\n\n _createTilesFromKDNode(kdNode) {\n if (kdNode.entities && kdNode.entities.length > 0) {\n this._createTileFromEntities(kdNode.entities);\n }\n if (kdNode.left) {\n this._createTilesFromKDNode(kdNode.left);\n }\n if (kdNode.right) {\n this._createTilesFromKDNode(kdNode.right);\n }\n }\n\n /**\n * Creates a tile from the given entities.\n *\n * For each single-use {@link XKTGeometry}, this method centers {@link XKTGeometry#positions} to make them relative to the\n * tile's center, then quantizes the positions to unsigned 16-bit integers, relative to the tile's boundary.\n *\n * @param entities\n */\n _createTileFromEntities(entities) {\n\n const tileAABB = math.AABB3(); // A tighter World-space AABB around the entities\n math.collapseAABB3(tileAABB);\n\n for (let i = 0; i < entities.length; i++) {\n const entity = entities [i];\n math.expandAABB3(tileAABB, entity.aabb);\n }\n\n const tileCenter = math.getAABB3Center(tileAABB);\n const tileCenterNeg = math.mulVec3Scalar(tileCenter, -1, math.vec3());\n\n const rtcAABB = math.AABB3(); // AABB centered at the RTC origin\n\n rtcAABB[0] = tileAABB[0] - tileCenter[0];\n rtcAABB[1] = tileAABB[1] - tileCenter[1];\n rtcAABB[2] = tileAABB[2] - tileCenter[2];\n rtcAABB[3] = tileAABB[3] - tileCenter[0];\n rtcAABB[4] = tileAABB[4] - tileCenter[1];\n rtcAABB[5] = tileAABB[5] - tileCenter[2];\n\n for (let i = 0; i < entities.length; i++) {\n\n const entity = entities [i];\n\n const meshes = entity.meshes;\n\n for (let j = 0, lenj = meshes.length; j < lenj; j++) {\n\n const mesh = meshes[j];\n const geometry = mesh.geometry;\n\n if (!geometry.reused) { // Batched geometry\n\n const positions = geometry.positions;\n\n // Center positions relative to their tile's World-space center\n\n for (let k = 0, lenk = positions.length; k < lenk; k += 3) {\n\n positions[k + 0] -= tileCenter[0];\n positions[k + 1] -= tileCenter[1];\n positions[k + 2] -= tileCenter[2];\n }\n\n // Quantize positions relative to tile's RTC-space boundary\n\n geometryCompression.quantizePositions(positions, positions.length, rtcAABB, geometry.positionsQuantized);\n\n } else { // Instanced geometry\n\n // Post-multiply a translation to the mesh's modeling matrix\n // to center the entity's geometry instances to the tile RTC center\n\n //////////////////////////////\n // Why do we do this?\n // Seems to break various models\n /////////////////////////////////\n\n math.translateMat4v(tileCenterNeg, mesh.matrix);\n }\n }\n\n entity.entityIndex = this.entitiesList.length;\n\n this.entitiesList.push(entity);\n }\n\n const tile = new XKTTile(tileAABB, entities);\n\n this.tilesList.push(tile);\n }\n\n _createReusedGeometriesDecodeMatrix() {\n\n const tempVec3a = math.vec3();\n const reusedGeometriesAABB = math.collapseAABB3(math.AABB3());\n let countReusedGeometries = 0;\n\n for (let geometryIndex = 0, numGeometries = this.geometriesList.length; geometryIndex < numGeometries; geometryIndex++) {\n\n const geometry = this.geometriesList [geometryIndex];\n\n if (geometry.reused) { // Instanced geometry\n\n const positions = geometry.positions;\n\n for (let i = 0, len = positions.length; i < len; i += 3) {\n\n tempVec3a[0] = positions[i];\n tempVec3a[1] = positions[i + 1];\n tempVec3a[2] = positions[i + 2];\n\n math.expandAABB3Point3(reusedGeometriesAABB, tempVec3a);\n }\n\n countReusedGeometries++;\n }\n }\n\n if (countReusedGeometries > 0) {\n\n geometryCompression.createPositionsDecodeMatrix(reusedGeometriesAABB, this.reusedGeometriesDecodeMatrix);\n\n for (let geometryIndex = 0, numGeometries = this.geometriesList.length; geometryIndex < numGeometries; geometryIndex++) {\n\n const geometry = this.geometriesList [geometryIndex];\n\n if (geometry.reused) {\n geometryCompression.quantizePositions(geometry.positions, geometry.positions.length, reusedGeometriesAABB, geometry.positionsQuantized);\n }\n }\n\n } else {\n math.identityMat4(this.reusedGeometriesDecodeMatrix); // No need for this matrix, but we'll be tidy and set it to identity\n }\n }\n\n _flagSolidGeometries() {\n let maxNumPositions = 0;\n let maxNumIndices = 0;\n for (let i = 0, len = this.geometriesList.length; i < len; i++) {\n const geometry = this.geometriesList[i];\n if (geometry.primitiveType === \"triangles\") {\n if (geometry.positionsQuantized.length > maxNumPositions) {\n maxNumPositions = geometry.positionsQuantized.length;\n }\n if (geometry.indices.length > maxNumIndices) {\n maxNumIndices = geometry.indices.length;\n }\n }\n }\n let vertexIndexMapping = new Array(maxNumPositions / 3);\n let edges = new Array(maxNumIndices);\n for (let i = 0, len = this.geometriesList.length; i < len; i++) {\n const geometry = this.geometriesList[i];\n if (geometry.primitiveType === \"triangles\") {\n geometry.solid = isTriangleMeshSolid(geometry.indices, geometry.positionsQuantized, vertexIndexMapping, edges);\n }\n }\n }\n}\n\nexport {\n XKTModel\n}","/**\n * Given geometry defined as an array of positions, optional normals, option uv and an array of indices, returns\n * modified arrays that have duplicate vertices removed.\n *\n * @private\n */\nfunction mergeVertices(positions, indices, mergedPositions, mergedIndices) {\n const positionsMap = {};\n const indicesLookup = [];\n const precisionPoints = 4; // number of decimal points, e.g. 4 for epsilon of 0.0001\n const precision = 10 ** precisionPoints;\n let uvi = 0;\n for (let i = 0, len = positions.length; i < len; i += 3) {\n const vx = positions[i];\n const vy = positions[i + 1];\n const vz = positions[i + 2];\n const key = `${Math.round(vx * precision)}_${Math.round(vy * precision)}_${Math.round(vz * precision)}`;\n if (positionsMap[key] === undefined) {\n positionsMap[key] = mergedPositions.length / 3;\n mergedPositions.push(vx);\n mergedPositions.push(vy);\n mergedPositions.push(vz);\n }\n indicesLookup[i / 3] = positionsMap[key];\n uvi += 2;\n }\n for (let i = 0, len = indices.length; i < len; i++) {\n mergedIndices[i] = indicesLookup[indices[i]];\n }\n}\n\nexport {mergeVertices};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"pako\");","import {XKT_INFO} from \"../XKT_INFO.js\";\nimport * as pako from 'pako';\n\nconst XKT_VERSION = XKT_INFO.xktVersion;\nconst NUM_TEXTURE_ATTRIBUTES = 9;\nconst NUM_MATERIAL_ATTRIBUTES = 6;\n\n/**\n * Writes an {@link XKTModel} to an {@link ArrayBuffer}.\n *\n * @param {XKTModel} xktModel The {@link XKTModel}.\n * @param {String} metaModelJSON The metamodel JSON in a string.\n * @param {Object} [stats] Collects statistics.\n * @param {Object} options Options for how the XKT is written.\n * @param {Boolean} [options.zip=true] ZIP the contents?\n * @returns {ArrayBuffer} The {@link ArrayBuffer}.\n */\nfunction writeXKTModelToArrayBuffer(xktModel, metaModelJSON, stats, options) {\n const data = getModelData(xktModel, metaModelJSON, stats);\n const deflatedData = deflateData(data, metaModelJSON, options);\n stats.texturesSize += deflatedData.textureData.byteLength;\n const arrayBuffer = createArrayBuffer(deflatedData);\n return arrayBuffer;\n}\n\nfunction getModelData(xktModel, metaModelDataStr, stats) {\n\n //------------------------------------------------------------------------------------------------------------------\n // Allocate data\n //------------------------------------------------------------------------------------------------------------------\n\n const propertySetsList = xktModel.propertySetsList;\n const metaObjectsList = xktModel.metaObjectsList;\n const geometriesList = xktModel.geometriesList;\n const texturesList = xktModel.texturesList;\n const textureSetsList = xktModel.textureSetsList;\n const meshesList = xktModel.meshesList;\n const entitiesList = xktModel.entitiesList;\n const tilesList = xktModel.tilesList;\n\n const numPropertySets = propertySetsList.length;\n const numMetaObjects = metaObjectsList.length;\n const numGeometries = geometriesList.length;\n const numTextures = texturesList.length;\n const numTextureSets = textureSetsList.length;\n const numMeshes = meshesList.length;\n const numEntities = entitiesList.length;\n const numTiles = tilesList.length;\n\n let lenPositions = 0;\n let lenNormals = 0;\n let lenColors = 0;\n let lenUVs = 0;\n let lenIndices = 0;\n let lenEdgeIndices = 0;\n let lenMatrices = 0;\n let lenTextures = 0;\n\n for (let geometryIndex = 0; geometryIndex < numGeometries; geometryIndex++) {\n const geometry = geometriesList [geometryIndex];\n if (geometry.positionsQuantized) {\n lenPositions += geometry.positionsQuantized.length;\n }\n if (geometry.normalsOctEncoded) {\n lenNormals += geometry.normalsOctEncoded.length;\n }\n if (geometry.colorsCompressed) {\n lenColors += geometry.colorsCompressed.length;\n }\n if (geometry.uvs) {\n lenUVs += geometry.uvs.length;\n }\n if (geometry.indices) {\n lenIndices += geometry.indices.length;\n }\n if (geometry.edgeIndices) {\n lenEdgeIndices += geometry.edgeIndices.length;\n }\n }\n\n for (let textureIndex = 0; textureIndex < numTextures; textureIndex++) {\n const xktTexture = texturesList[textureIndex];\n const imageData = xktTexture.imageData;\n lenTextures += imageData.byteLength;\n\n if (xktTexture.compressed) {\n stats.numCompressedTextures++;\n }\n }\n\n for (let meshIndex = 0; meshIndex < numMeshes; meshIndex++) {\n const mesh = meshesList[meshIndex];\n if (mesh.geometry.numInstances > 1) {\n lenMatrices += 16;\n }\n }\n\n const data = {\n metadata: {},\n textureData: new Uint8Array(lenTextures), // All textures\n eachTextureDataPortion: new Uint32Array(numTextures), // For each texture, an index to its first element in textureData\n eachTextureAttributes: new Uint16Array(numTextures * NUM_TEXTURE_ATTRIBUTES),\n positions: new Uint16Array(lenPositions), // All geometry arrays\n normals: new Int8Array(lenNormals),\n colors: new Uint8Array(lenColors),\n uvs: new Float32Array(lenUVs),\n indices: new Uint32Array(lenIndices),\n edgeIndices: new Uint32Array(lenEdgeIndices),\n eachTextureSetTextures: new Int32Array(numTextureSets * 5), // For each texture set, a set of five Texture indices [color, metal/roughness,normals,emissive,occlusion]; each index has value -1 if no texture\n matrices: new Float32Array(lenMatrices), // Modeling matrices for entities that share geometries. Each entity either shares all it's geometries, or owns all its geometries exclusively. Exclusively-owned geometries are pre-transformed into World-space, and so their entities don't have modeling matrices in this array.\n reusedGeometriesDecodeMatrix: new Float32Array(xktModel.reusedGeometriesDecodeMatrix), // A single, global vertex position de-quantization matrix for all reused geometries. Reused geometries are quantized to their collective Local-space AABB, and this matrix is derived from that AABB.\n eachGeometryPrimitiveType: new Uint8Array(numGeometries), // Primitive type for each geometry (0=solid triangles, 1=surface triangles, 2=lines, 3=points, 4=line-strip)\n eachGeometryPositionsPortion: new Uint32Array(numGeometries), // For each geometry, an index to its first element in data.positions. Every primitive type has positions.\n eachGeometryNormalsPortion: new Uint32Array(numGeometries), // For each geometry, an index to its first element in data.normals. If the next geometry has the same index, then this geometry has no normals.\n eachGeometryColorsPortion: new Uint32Array(numGeometries), // For each geometry, an index to its first element in data.colors. If the next geometry has the same index, then this geometry has no colors.\n eachGeometryUVsPortion: new Uint32Array(numGeometries), // For each geometry, an index to its first element in data.uvs. If the next geometry has the same index, then this geometry has no UVs.\n eachGeometryIndicesPortion: new Uint32Array(numGeometries), // For each geometry, an index to its first element in data.indices. If the next geometry has the same index, then this geometry has no indices.\n eachGeometryEdgeIndicesPortion: new Uint32Array(numGeometries), // For each geometry, an index to its first element in data.edgeIndices. If the next geometry has the same index, then this geometry has no edge indices.\n eachMeshGeometriesPortion: new Uint32Array(numMeshes), // For each mesh, an index into the eachGeometry* arrays\n eachMeshMatricesPortion: new Uint32Array(numMeshes), // For each mesh that shares its geometry, an index to its first element in data.matrices, to indicate the modeling matrix that transforms the shared geometry Local-space vertex positions. This is ignored for meshes that don't share geometries, because the vertex positions of non-shared geometries are pre-transformed into World-space.\n eachMeshTextureSet: new Int32Array(numMeshes), // For each mesh, the index of its texture set in data.eachTextureSetTextures; this array contains signed integers so that we can use -1 to indicate when a mesh has no texture set\n eachMeshMaterialAttributes: new Uint8Array(numMeshes * NUM_MATERIAL_ATTRIBUTES), // For each mesh, an RGBA integer color of format [0..255, 0..255, 0..255, 0..255], and PBR metallic and roughness factors, of format [0..255, 0..255]\n eachEntityId: [], // For each entity, an ID string\n eachEntityMeshesPortion: new Uint32Array(numEntities), // For each entity, the index of the first element of meshes used by the entity\n eachTileAABB: new Float64Array(numTiles * 6), // For each tile, an axis-aligned bounding box\n eachTileEntitiesPortion: new Uint32Array(numTiles) // For each tile, the index of the first element of eachEntityId, eachEntityMeshesPortion and eachEntityMatricesPortion used by the tile\n };\n\n let countPositions = 0;\n let countNormals = 0;\n let countColors = 0;\n let countUVs = 0;\n let countIndices = 0;\n let countEdgeIndices = 0;\n\n // Metadata\n\n data.metadata = {\n id: xktModel.modelId,\n projectId: xktModel.projectId,\n revisionId: xktModel.revisionId,\n author: xktModel.author,\n createdAt: xktModel.createdAt,\n creatingApplication: xktModel.creatingApplication,\n schema: xktModel.schema,\n propertySets: [],\n metaObjects: []\n };\n\n // Property sets\n\n for (let propertySetsIndex = 0; propertySetsIndex < numPropertySets; propertySetsIndex++) {\n const propertySet = propertySetsList[propertySetsIndex];\n const propertySetJSON = {\n id: \"\" + propertySet.propertySetId,\n name: propertySet.propertySetName,\n type: propertySet.propertySetType,\n properties: propertySet.properties\n };\n data.metadata.propertySets.push(propertySetJSON);\n }\n\n // Metaobjects\n\n if (!metaModelDataStr) {\n for (let metaObjectsIndex = 0; metaObjectsIndex < numMetaObjects; metaObjectsIndex++) {\n const metaObject = metaObjectsList[metaObjectsIndex];\n const metaObjectJSON = {\n name: metaObject.metaObjectName,\n type: metaObject.metaObjectType,\n id: \"\" + metaObject.metaObjectId\n };\n if (metaObject.parentMetaObjectId !== undefined && metaObject.parentMetaObjectId !== null) {\n metaObjectJSON.parent = \"\" + metaObject.parentMetaObjectId;\n }\n if (metaObject.propertySetIds && metaObject.propertySetIds.length > 0) {\n metaObjectJSON.propertySetIds = metaObject.propertySetIds;\n }\n if (metaObject.external) {\n metaObjectJSON.external = metaObject.external;\n }\n data.metadata.metaObjects.push(metaObjectJSON);\n }\n }\n\n // Geometries\n\n for (let geometryIndex = 0; geometryIndex < numGeometries; geometryIndex++) {\n const geometry = geometriesList [geometryIndex];\n let primitiveType = 1;\n switch (geometry.primitiveType) {\n case \"triangles\":\n primitiveType = geometry.solid ? 0 : 1;\n break;\n case \"points\":\n primitiveType = 2;\n break;\n case \"lines\":\n primitiveType = 3;\n break;\n case \"line-strip\":\n primitiveType = 4;\n break;\n case \"triangle-strip\":\n primitiveType = 5;\n break;\n case \"triangle-fan\":\n primitiveType = 6;\n break;\n default:\n primitiveType = 1\n }\n data.eachGeometryPrimitiveType [geometryIndex] = primitiveType;\n data.eachGeometryPositionsPortion [geometryIndex] = countPositions;\n data.eachGeometryNormalsPortion [geometryIndex] = countNormals;\n data.eachGeometryColorsPortion [geometryIndex] = countColors;\n data.eachGeometryUVsPortion [geometryIndex] = countUVs;\n data.eachGeometryIndicesPortion [geometryIndex] = countIndices;\n data.eachGeometryEdgeIndicesPortion [geometryIndex] = countEdgeIndices;\n if (geometry.positionsQuantized) {\n data.positions.set(geometry.positionsQuantized, countPositions);\n countPositions += geometry.positionsQuantized.length;\n }\n if (geometry.normalsOctEncoded) {\n data.normals.set(geometry.normalsOctEncoded, countNormals);\n countNormals += geometry.normalsOctEncoded.length;\n }\n if (geometry.colorsCompressed) {\n data.colors.set(geometry.colorsCompressed, countColors);\n countColors += geometry.colorsCompressed.length;\n }\n if (geometry.uvs) {\n data.uvs.set(geometry.uvs, countUVs);\n countUVs += geometry.uvs.length;\n }\n if (geometry.indices) {\n data.indices.set(geometry.indices, countIndices);\n countIndices += geometry.indices.length;\n }\n if (geometry.edgeIndices) {\n data.edgeIndices.set(geometry.edgeIndices, countEdgeIndices);\n countEdgeIndices += geometry.edgeIndices.length;\n }\n }\n\n // Textures\n\n for (let textureIndex = 0, numTextures = xktModel.texturesList.length, portionIdx = 0; textureIndex < numTextures; textureIndex++) {\n const xktTexture = xktModel.texturesList[textureIndex];\n const imageData = xktTexture.imageData;\n data.textureData.set(imageData, portionIdx);\n data.eachTextureDataPortion[textureIndex] = portionIdx;\n\n portionIdx += imageData.byteLength;\n\n let textureAttrIdx = textureIndex * NUM_TEXTURE_ATTRIBUTES;\n data.eachTextureAttributes[textureAttrIdx++] = xktTexture.compressed ? 1 : 0;\n data.eachTextureAttributes[textureAttrIdx++] = xktTexture.mediaType; // GIFMediaType | PNGMediaType | JPEGMediaType\n data.eachTextureAttributes[textureAttrIdx++] = xktTexture.width;\n data.eachTextureAttributes[textureAttrIdx++] = xktTexture.height;\n data.eachTextureAttributes[textureAttrIdx++] = xktTexture.minFilter; // LinearMipmapLinearFilter | LinearMipMapNearestFilter | NearestMipMapNearestFilter | NearestMipMapLinearFilter | LinearMipMapLinearFilter\n data.eachTextureAttributes[textureAttrIdx++] = xktTexture.magFilter; // LinearFilter | NearestFilter\n data.eachTextureAttributes[textureAttrIdx++] = xktTexture.wrapS; // ClampToEdgeWrapping | MirroredRepeatWrapping | RepeatWrapping\n data.eachTextureAttributes[textureAttrIdx++] = xktTexture.wrapT; // ClampToEdgeWrapping | MirroredRepeatWrapping | RepeatWrapping\n data.eachTextureAttributes[textureAttrIdx++] = xktTexture.wrapR; // ClampToEdgeWrapping | MirroredRepeatWrapping | RepeatWrapping\n }\n\n // Texture sets\n\n for (let textureSetIndex = 0, numTextureSets = xktModel.textureSetsList.length, eachTextureSetTexturesIndex = 0; textureSetIndex < numTextureSets; textureSetIndex++) {\n const textureSet = textureSetsList[textureSetIndex];\n data.eachTextureSetTextures[eachTextureSetTexturesIndex++] = textureSet.colorTexture ? textureSet.colorTexture.textureIndex : -1; // Color map\n data.eachTextureSetTextures[eachTextureSetTexturesIndex++] = textureSet.metallicRoughnessTexture ? textureSet.metallicRoughnessTexture.textureIndex : -1; // Metal/rough map\n data.eachTextureSetTextures[eachTextureSetTexturesIndex++] = textureSet.normalsTexture ? textureSet.normalsTexture.textureIndex : -1; // Normal map\n data.eachTextureSetTextures[eachTextureSetTexturesIndex++] = textureSet.emissiveTexture ? textureSet.emissiveTexture.textureIndex : -1; // Emissive map\n data.eachTextureSetTextures[eachTextureSetTexturesIndex++] = textureSet.occlusionTexture ? textureSet.occlusionTexture.textureIndex : -1; // Occlusion map\n }\n\n // Tiles -> Entities -> Meshes\n\n let entityIndex = 0;\n let countEntityMeshesPortion = 0;\n let eachMeshMaterialAttributesIndex = 0;\n let matricesIndex = 0;\n let meshIndex = 0;\n\n for (let tileIndex = 0; tileIndex < numTiles; tileIndex++) {\n\n const tile = tilesList [tileIndex];\n const tileEntities = tile.entities;\n const numTileEntities = tileEntities.length;\n\n if (numTileEntities === 0) {\n continue;\n }\n\n data.eachTileEntitiesPortion[tileIndex] = entityIndex;\n\n const tileAABB = tile.aabb;\n\n for (let j = 0; j < numTileEntities; j++) {\n\n const entity = tileEntities[j];\n const entityMeshes = entity.meshes;\n const numEntityMeshes = entityMeshes.length;\n\n for (let k = 0; k < numEntityMeshes; k++) {\n\n const mesh = entityMeshes[k];\n const geometry = mesh.geometry;\n const geometryIndex = geometry.geometryIndex;\n\n data.eachMeshGeometriesPortion [countEntityMeshesPortion + k] = geometryIndex;\n\n if (mesh.geometry.numInstances > 1) {\n data.matrices.set(mesh.matrix, matricesIndex);\n data.eachMeshMatricesPortion [meshIndex] = matricesIndex;\n matricesIndex += 16;\n }\n\n data.eachMeshTextureSet[meshIndex] = mesh.textureSet ? mesh.textureSet.textureSetIndex : -1;\n\n data.eachMeshMaterialAttributes[eachMeshMaterialAttributesIndex++] = (mesh.color[0] * 255); // Color RGB\n data.eachMeshMaterialAttributes[eachMeshMaterialAttributesIndex++] = (mesh.color[1] * 255);\n data.eachMeshMaterialAttributes[eachMeshMaterialAttributesIndex++] = (mesh.color[2] * 255);\n data.eachMeshMaterialAttributes[eachMeshMaterialAttributesIndex++] = (mesh.opacity * 255); // Opacity\n data.eachMeshMaterialAttributes[eachMeshMaterialAttributesIndex++] = (mesh.metallic * 255); // Metallic\n data.eachMeshMaterialAttributes[eachMeshMaterialAttributesIndex++] = (mesh.roughness * 255); // Roughness\n\n meshIndex++;\n }\n\n data.eachEntityId [entityIndex] = entity.entityId;\n data.eachEntityMeshesPortion[entityIndex] = countEntityMeshesPortion; // <<<<<<<<<<<<<<<<<<<< Error here? Order/value of countEntityMeshesPortion correct?\n\n entityIndex++;\n countEntityMeshesPortion += numEntityMeshes;\n }\n\n const tileAABBIndex = tileIndex * 6;\n\n data.eachTileAABB.set(tileAABB, tileAABBIndex);\n }\n\n return data;\n}\n\nfunction deflateData(data, metaModelJSON, options) {\n\n function deflate(buffer) {\n return (options.zip !== false) ? pako.deflate(buffer) : buffer;\n }\n\n let metaModelBytes;\n if (metaModelJSON) {\n const deflatedJSON = deflateJSON(metaModelJSON);\n metaModelBytes = deflate(deflatedJSON)\n } else {\n const deflatedJSON = deflateJSON(data.metadata);\n metaModelBytes = deflate(deflatedJSON)\n }\n\n return {\n metadata: metaModelBytes,\n textureData: deflate(data.textureData.buffer),\n eachTextureDataPortion: deflate(data.eachTextureDataPortion.buffer),\n eachTextureAttributes: deflate(data.eachTextureAttributes.buffer),\n positions: deflate(data.positions.buffer),\n normals: deflate(data.normals.buffer),\n colors: deflate(data.colors.buffer),\n uvs: deflate(data.uvs.buffer),\n indices: deflate(data.indices.buffer),\n edgeIndices: deflate(data.edgeIndices.buffer),\n eachTextureSetTextures: deflate(data.eachTextureSetTextures.buffer),\n matrices: deflate(data.matrices.buffer),\n reusedGeometriesDecodeMatrix: deflate(data.reusedGeometriesDecodeMatrix.buffer),\n eachGeometryPrimitiveType: deflate(data.eachGeometryPrimitiveType.buffer),\n eachGeometryPositionsPortion: deflate(data.eachGeometryPositionsPortion.buffer),\n eachGeometryNormalsPortion: deflate(data.eachGeometryNormalsPortion.buffer),\n eachGeometryColorsPortion: deflate(data.eachGeometryColorsPortion.buffer),\n eachGeometryUVsPortion: deflate(data.eachGeometryUVsPortion.buffer),\n eachGeometryIndicesPortion: deflate(data.eachGeometryIndicesPortion.buffer),\n eachGeometryEdgeIndicesPortion: deflate(data.eachGeometryEdgeIndicesPortion.buffer),\n eachMeshGeometriesPortion: deflate(data.eachMeshGeometriesPortion.buffer),\n eachMeshMatricesPortion: deflate(data.eachMeshMatricesPortion.buffer),\n eachMeshTextureSet: deflate(data.eachMeshTextureSet.buffer),\n eachMeshMaterialAttributes: deflate(data.eachMeshMaterialAttributes.buffer),\n eachEntityId: deflate(JSON.stringify(data.eachEntityId)\n .replace(/[\\u007F-\\uFFFF]/g, function (chr) { // Produce only ASCII-chars, so that the data can be inflated later\n return \"\\\\u\" + (\"0000\" + chr.charCodeAt(0).toString(16)).substr(-4)\n })),\n eachEntityMeshesPortion: deflate(data.eachEntityMeshesPortion.buffer),\n eachTileAABB: deflate(data.eachTileAABB.buffer),\n eachTileEntitiesPortion: deflate(data.eachTileEntitiesPortion.buffer)\n };\n}\n\nfunction deflateJSON(strings) {\n return JSON.stringify(strings)\n .replace(/[\\u007F-\\uFFFF]/g, function (chr) { // Produce only ASCII-chars, so that the data can be inflated later\n return \"\\\\u\" + (\"0000\" + chr.charCodeAt(0).toString(16)).substr(-4)\n });\n}\n\nfunction createArrayBuffer(deflatedData) {\n return toArrayBuffer([\n deflatedData.metadata,\n deflatedData.textureData,\n deflatedData.eachTextureDataPortion,\n deflatedData.eachTextureAttributes,\n deflatedData.positions,\n deflatedData.normals,\n deflatedData.colors,\n deflatedData.uvs,\n deflatedData.indices,\n deflatedData.edgeIndices,\n deflatedData.eachTextureSetTextures,\n deflatedData.matrices,\n deflatedData.reusedGeometriesDecodeMatrix,\n deflatedData.eachGeometryPrimitiveType,\n deflatedData.eachGeometryPositionsPortion,\n deflatedData.eachGeometryNormalsPortion,\n deflatedData.eachGeometryColorsPortion,\n deflatedData.eachGeometryUVsPortion,\n deflatedData.eachGeometryIndicesPortion,\n deflatedData.eachGeometryEdgeIndicesPortion,\n deflatedData.eachMeshGeometriesPortion,\n deflatedData.eachMeshMatricesPortion,\n deflatedData.eachMeshTextureSet,\n deflatedData.eachMeshMaterialAttributes,\n deflatedData.eachEntityId,\n deflatedData.eachEntityMeshesPortion,\n deflatedData.eachTileAABB,\n deflatedData.eachTileEntitiesPortion\n ]);\n}\n\nfunction toArrayBuffer(elements) {\n const indexData = new Uint32Array(elements.length + 2);\n indexData[0] = XKT_VERSION;\n indexData [1] = elements.length; // Stored Data 1.1: number of stored elements\n let dataLen = 0; // Stored Data 1.2: length of stored elements\n for (let i = 0, len = elements.length; i < len; i++) {\n const element = elements[i];\n const elementsize = element.length;\n indexData[i + 2] = elementsize;\n dataLen += elementsize;\n }\n const indexBuf = new Uint8Array(indexData.buffer);\n const dataArray = new Uint8Array(indexBuf.length + dataLen);\n dataArray.set(indexBuf);\n let offset = indexBuf.length;\n for (let i = 0, len = elements.length; i < len; i++) { // Stored Data 2: the elements themselves\n const element = elements[i];\n dataArray.set(element, offset);\n offset += element.length;\n }\n return dataArray.buffer;\n}\n\nexport {writeXKTModelToArrayBuffer};","/** @private */\nfunction earcut(data, holeIndices, dim) {\n\n dim = dim || 2;\n\n var hasHoles = holeIndices && holeIndices.length,\n outerLen = hasHoles ? holeIndices[0] * dim : data.length,\n outerNode = linkedList(data, 0, outerLen, dim, true),\n triangles = [];\n\n if (!outerNode || outerNode.next === outerNode.prev) return triangles;\n\n var minX, minY, maxX, maxY, x, y, invSize;\n\n if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);\n\n // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n if (data.length > 80 * dim) {\n minX = maxX = data[0];\n minY = maxY = data[1];\n\n for (var i = dim; i < outerLen; i += dim) {\n x = data[i];\n y = data[i + 1];\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x > maxX) maxX = x;\n if (y > maxY) maxY = y;\n }\n\n // minX, minY and invSize are later used to transform coords into integers for z-order calculation\n invSize = Math.max(maxX - minX, maxY - minY);\n invSize = invSize !== 0 ? 1 / invSize : 0;\n }\n\n earcutLinked(outerNode, triangles, dim, minX, minY, invSize);\n\n return triangles;\n}\n\n// create a circular doubly linked list from polygon points in the specified winding order\nfunction linkedList(data, start, end, dim, clockwise) {\n var i, last;\n\n if (clockwise === (signedArea(data, start, end, dim) > 0)) {\n for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last);\n } else {\n for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last);\n }\n\n if (last && equals(last, last.next)) {\n removeNode(last);\n last = last.next;\n }\n\n return last;\n}\n\n// eliminate colinear or duplicate points\nfunction filterPoints(start, end) {\n if (!start) return start;\n if (!end) end = start;\n\n var p = start,\n again;\n do {\n again = false;\n\n if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {\n removeNode(p);\n p = end = p.prev;\n if (p === p.next) break;\n again = true;\n\n } else {\n p = p.next;\n }\n } while (again || p !== end);\n\n return end;\n}\n\n// main ear slicing loop which triangulates a polygon (given as a linked list)\nfunction earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {\n if (!ear) return;\n\n // interlink polygon nodes in z-order\n if (!pass && invSize) indexCurve(ear, minX, minY, invSize);\n\n var stop = ear,\n prev, next;\n\n // iterate through ears, slicing them one by one\n while (ear.prev !== ear.next) {\n prev = ear.prev;\n next = ear.next;\n\n if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {\n // cut off the triangle\n triangles.push(prev.i / dim);\n triangles.push(ear.i / dim);\n triangles.push(next.i / dim);\n\n removeNode(ear);\n\n // skipping the next vertex leads to less sliver triangles\n ear = next.next;\n stop = next.next;\n\n continue;\n }\n\n ear = next;\n\n // if we looped through the whole remaining polygon and can't find any more ears\n if (ear === stop) {\n // try filtering points and slicing again\n if (!pass) {\n earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);\n\n // if this didn't work, try curing all small self-intersections locally\n } else if (pass === 1) {\n ear = cureLocalIntersections(filterPoints(ear), triangles, dim);\n earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);\n\n // as a last resort, try splitting the remaining polygon into two\n } else if (pass === 2) {\n splitEarcut(ear, triangles, dim, minX, minY, invSize);\n }\n\n break;\n }\n }\n}\n\n// check whether a polygon node forms a valid ear with adjacent nodes\nfunction isEar(ear) {\n var a = ear.prev,\n b = ear,\n c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n // now make sure we don't have other points inside the potential ear\n var p = ear.next.next;\n\n while (p !== ear.prev) {\n if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.next;\n }\n\n return true;\n}\n\nfunction isEarHashed(ear, minX, minY, invSize) {\n var a = ear.prev,\n b = ear,\n c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n // triangle bbox; min & max are calculated like this for speed\n var minTX = a.x < b.x ? (a.x < c.x ? a.x : c.x) : (b.x < c.x ? b.x : c.x),\n minTY = a.y < b.y ? (a.y < c.y ? a.y : c.y) : (b.y < c.y ? b.y : c.y),\n maxTX = a.x > b.x ? (a.x > c.x ? a.x : c.x) : (b.x > c.x ? b.x : c.x),\n maxTY = a.y > b.y ? (a.y > c.y ? a.y : c.y) : (b.y > c.y ? b.y : c.y);\n\n // z-order range for the current triangle bbox;\n var minZ = zOrder(minTX, minTY, minX, minY, invSize),\n maxZ = zOrder(maxTX, maxTY, minX, minY, invSize);\n\n var p = ear.prevZ,\n n = ear.nextZ;\n\n // look for points inside the triangle in both directions\n while (p && p.z >= minZ && n && n.z <= maxZ) {\n if (p !== ear.prev && p !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n\n if (n !== ear.prev && n !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&\n area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n\n // look for remaining points in decreasing z-order\n while (p && p.z >= minZ) {\n if (p !== ear.prev && p !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n }\n\n // look for remaining points in increasing z-order\n while (n && n.z <= maxZ) {\n if (n !== ear.prev && n !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&\n area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n\n return true;\n}\n\n// go through all polygon nodes and cure small local self-intersections\nfunction cureLocalIntersections(start, triangles, dim) {\n var p = start;\n do {\n var a = p.prev,\n b = p.next.next;\n\n if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {\n\n triangles.push(a.i / dim);\n triangles.push(p.i / dim);\n triangles.push(b.i / dim);\n\n // remove two nodes involved\n removeNode(p);\n removeNode(p.next);\n\n p = start = b;\n }\n p = p.next;\n } while (p !== start);\n\n return filterPoints(p);\n}\n\n// try splitting polygon into two and triangulate them independently\nfunction splitEarcut(start, triangles, dim, minX, minY, invSize) {\n // look for a valid diagonal that divides the polygon into two\n var a = start;\n do {\n var b = a.next.next;\n while (b !== a.prev) {\n if (a.i !== b.i && isValidDiagonal(a, b)) {\n // split the polygon in two by the diagonal\n var c = splitPolygon(a, b);\n\n // filter colinear points around the cuts\n a = filterPoints(a, a.next);\n c = filterPoints(c, c.next);\n\n // run earcut on each half\n earcutLinked(a, triangles, dim, minX, minY, invSize);\n earcutLinked(c, triangles, dim, minX, minY, invSize);\n return;\n }\n b = b.next;\n }\n a = a.next;\n } while (a !== start);\n}\n\n// link every hole into the outer loop, producing a single-ring polygon without holes\nfunction eliminateHoles(data, holeIndices, outerNode, dim) {\n var queue = [],\n i, len, start, end, list;\n\n for (i = 0, len = holeIndices.length; i < len; i++) {\n start = holeIndices[i] * dim;\n end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n list = linkedList(data, start, end, dim, false);\n if (list === list.next) list.steiner = true;\n queue.push(getLeftmost(list));\n }\n\n queue.sort(compareX);\n\n // process holes from left to right\n for (i = 0; i < queue.length; i++) {\n eliminateHole(queue[i], outerNode);\n outerNode = filterPoints(outerNode, outerNode.next);\n }\n\n return outerNode;\n}\n\nfunction compareX(a, b) {\n return a.x - b.x;\n}\n\n// find a bridge between vertices that connects hole with an outer ring and and link it\nfunction eliminateHole(hole, outerNode) {\n outerNode = findHoleBridge(hole, outerNode);\n if (outerNode) {\n var b = splitPolygon(outerNode, hole);\n\n // filter collinear points around the cuts\n filterPoints(outerNode, outerNode.next);\n filterPoints(b, b.next);\n }\n}\n\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\nfunction findHoleBridge(hole, outerNode) {\n var p = outerNode,\n hx = hole.x,\n hy = hole.y,\n qx = -Infinity,\n m;\n\n // find a segment intersected by a ray from the hole's leftmost point to the left;\n // segment's endpoint with lesser x will be potential connection point\n do {\n if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {\n var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);\n if (x <= hx && x > qx) {\n qx = x;\n if (x === hx) {\n if (hy === p.y) return p;\n if (hy === p.next.y) return p.next;\n }\n m = p.x < p.next.x ? p : p.next;\n }\n }\n p = p.next;\n } while (p !== outerNode);\n\n if (!m) return null;\n\n if (hx === qx) return m; // hole touches outer segment; pick leftmost endpoint\n\n // look for points inside the triangle of hole point, segment intersection and endpoint;\n // if there are no points found, we have a valid connection;\n // otherwise choose the point of the minimum angle with the ray as connection point\n\n var stop = m,\n mx = m.x,\n my = m.y,\n tanMin = Infinity,\n tan;\n\n p = m;\n\n do {\n if (hx >= p.x && p.x >= mx && hx !== p.x &&\n pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {\n\n tan = Math.abs(hy - p.y) / (hx - p.x); // tangential\n\n if (locallyInside(p, hole) &&\n (tan < tanMin || (tan === tanMin && (p.x > m.x || (p.x === m.x && sectorContainsSector(m, p)))))) {\n m = p;\n tanMin = tan;\n }\n }\n\n p = p.next;\n } while (p !== stop);\n\n return m;\n}\n\n// whether sector in vertex m contains sector in vertex p in the same coordinates\nfunction sectorContainsSector(m, p) {\n return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0;\n}\n\n// interlink polygon nodes in z-order\nfunction indexCurve(start, minX, minY, invSize) {\n var p = start;\n do {\n if (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, invSize);\n p.prevZ = p.prev;\n p.nextZ = p.next;\n p = p.next;\n } while (p !== start);\n\n p.prevZ.nextZ = null;\n p.prevZ = null;\n\n sortLinked(p);\n}\n\n// Simon Tatham's linked list merge sort algorithm\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\nfunction sortLinked(list) {\n var i, p, q, e, tail, numMerges, pSize, qSize,\n inSize = 1;\n\n do {\n p = list;\n list = null;\n tail = null;\n numMerges = 0;\n\n while (p) {\n numMerges++;\n q = p;\n pSize = 0;\n for (i = 0; i < inSize; i++) {\n pSize++;\n q = q.nextZ;\n if (!q) break;\n }\n qSize = inSize;\n\n while (pSize > 0 || (qSize > 0 && q)) {\n\n if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {\n e = p;\n p = p.nextZ;\n pSize--;\n } else {\n e = q;\n q = q.nextZ;\n qSize--;\n }\n\n if (tail) tail.nextZ = e;\n else list = e;\n\n e.prevZ = tail;\n tail = e;\n }\n\n p = q;\n }\n\n tail.nextZ = null;\n inSize *= 2;\n\n } while (numMerges > 1);\n\n return list;\n}\n\n// z-order of a point given coords and inverse of the longer side of data bbox\nfunction zOrder(x, y, minX, minY, invSize) {\n // coords are transformed into non-negative 15-bit integer range\n x = 32767 * (x - minX) * invSize;\n y = 32767 * (y - minY) * invSize;\n\n x = (x | (x << 8)) & 0x00FF00FF;\n x = (x | (x << 4)) & 0x0F0F0F0F;\n x = (x | (x << 2)) & 0x33333333;\n x = (x | (x << 1)) & 0x55555555;\n\n y = (y | (y << 8)) & 0x00FF00FF;\n y = (y | (y << 4)) & 0x0F0F0F0F;\n y = (y | (y << 2)) & 0x33333333;\n y = (y | (y << 1)) & 0x55555555;\n\n return x | (y << 1);\n}\n\n// find the leftmost node of a polygon ring\nfunction getLeftmost(start) {\n var p = start,\n leftmost = start;\n do {\n if (p.x < leftmost.x || (p.x === leftmost.x && p.y < leftmost.y)) leftmost = p;\n p = p.next;\n } while (p !== start);\n\n return leftmost;\n}\n\n// check if a point lies within a convex triangle\nfunction pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}\n\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\nfunction isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges\n (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible\n (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors\n equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case\n}\n\n// signed area of a triangle\nfunction area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}\n\n// check if two points are equal\nfunction equals(p1, p2) {\n return p1.x === p2.x && p1.y === p2.y;\n}\n\n// check if two segments intersect\nfunction intersects(p1, q1, p2, q2) {\n var o1 = sign(area(p1, q1, p2));\n var o2 = sign(area(p1, q1, q2));\n var o3 = sign(area(p2, q2, p1));\n var o4 = sign(area(p2, q2, q1));\n\n if (o1 !== o2 && o3 !== o4) return true; // general case\n\n if (o1 === 0 && onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1\n if (o2 === 0 && onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1\n if (o3 === 0 && onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2\n if (o4 === 0 && onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2\n\n return false;\n}\n\n// for collinear points p, q, r, check if point q lies on segment pr\nfunction onSegment(p, q, r) {\n return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n}\n\nfunction sign(num) {\n return num > 0 ? 1 : num < 0 ? -1 : 0;\n}\n\n// check if a polygon diagonal intersects any polygon segments\nfunction intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}\n\n// check if a polygon diagonal is locally inside the polygon\nfunction locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}\n\n// check if the middle point of a polygon diagonal is inside the polygon\nfunction middleInside(a, b) {\n var p = a,\n inside = false,\n px = (a.x + b.x) / 2,\n py = (a.y + b.y) / 2;\n do {\n if (((p.y > py) !== (p.next.y > py)) && p.next.y !== p.y &&\n (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x))\n inside = !inside;\n p = p.next;\n } while (p !== a);\n\n return inside;\n}\n\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\nfunction splitPolygon(a, b) {\n var a2 = new Node(a.i, a.x, a.y),\n b2 = new Node(b.i, b.x, b.y),\n an = a.next,\n bp = b.prev;\n\n a.next = b;\n b.prev = a;\n\n a2.next = an;\n an.prev = a2;\n\n b2.next = a2;\n a2.prev = b2;\n\n bp.next = b2;\n b2.prev = bp;\n\n return b2;\n}\n\n// create a node and optionally link it with previous one (in a circular doubly linked list)\nfunction insertNode(i, x, y, last) {\n var p = new Node(i, x, y);\n\n if (!last) {\n p.prev = p;\n p.next = p;\n\n } else {\n p.next = last.next;\n p.prev = last;\n last.next.prev = p;\n last.next = p;\n }\n return p;\n}\n\nfunction removeNode(p) {\n p.next.prev = p.prev;\n p.prev.next = p.next;\n\n if (p.prevZ) p.prevZ.nextZ = p.nextZ;\n if (p.nextZ) p.nextZ.prevZ = p.prevZ;\n}\n\nfunction Node(i, x, y) {\n // vertex index in coordinates array\n this.i = i;\n\n // vertex coordinates\n this.x = x;\n this.y = y;\n\n // previous and next vertex nodes in a polygon ring\n this.prev = null;\n this.next = null;\n\n // z-order curve value\n this.z = null;\n\n // previous and next nodes in z-order\n this.prevZ = null;\n this.nextZ = null;\n\n // indicates whether this is a steiner point\n this.steiner = false;\n}\n\n// return a percentage difference between the polygon area and its triangulation area;\n// used to verify correctness of triangulation\nearcut.deviation = function (data, holeIndices, dim, triangles) {\n var hasHoles = holeIndices && holeIndices.length;\n var outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n\n var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));\n if (hasHoles) {\n for (var i = 0, len = holeIndices.length; i < len; i++) {\n var start = holeIndices[i] * dim;\n var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n polygonArea -= Math.abs(signedArea(data, start, end, dim));\n }\n }\n\n var trianglesArea = 0;\n for (i = 0; i < triangles.length; i += 3) {\n var a = triangles[i] * dim;\n var b = triangles[i + 1] * dim;\n var c = triangles[i + 2] * dim;\n trianglesArea += Math.abs(\n (data[a] - data[c]) * (data[b + 1] - data[a + 1]) -\n (data[a] - data[b]) * (data[c + 1] - data[a + 1]));\n }\n\n return polygonArea === 0 && trianglesArea === 0 ? 0 :\n Math.abs((trianglesArea - polygonArea) / polygonArea);\n};\n\nfunction signedArea(data, start, end, dim) {\n var sum = 0;\n for (var i = start, j = end - dim; i < end; i += dim) {\n sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);\n j = i;\n }\n return sum;\n}\n\n// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts\nearcut.flatten = function (data) {\n var dim = data[0][0].length,\n result = {vertices: [], holes: [], dimensions: dim},\n holeIndex = 0;\n\n for (var i = 0; i < data.length; i++) {\n for (var j = 0; j < data[i].length; j++) {\n for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);\n }\n if (i > 0) {\n holeIndex += data[i - 1].length;\n result.holes.push(holeIndex);\n }\n }\n return result;\n};\n\nexport {earcut};","import {earcut} from './../lib/earcut';\nimport {math} from \"./../lib/math.js\";\n\nconst tempVec2a = math.vec2();\nconst tempVec3a = math.vec3();\nconst tempVec3b = math.vec3();\nconst tempVec3c = math.vec3();\n\n/**\n * @desc Parses a CityJSON model into an {@link XKTModel}.\n *\n * [CityJSON](https://www.cityjson.org) is a JSON-based encoding for a subset of the CityGML data model (version 2.0.0),\n * which is an open standardised data model and exchange format to store digital 3D models of cities and\n * landscapes. CityGML is an official standard of the [Open Geospatial Consortium](https://www.ogc.org/).\n *\n * This converter function supports most of the [CityJSON 1.0.2 Specification](https://www.cityjson.org/specs/1.0.2),\n * with the following limitations:\n *\n * * Does not (yet) support CityJSON semantics for geometry primitives.\n * * Does not (yet) support textured geometries.\n * * Does not (yet) support geometry templates.\n * * When the CityJSON file provides multiple *themes* for a geometry, then we parse only the first of the provided themes for that geometry.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then load a CityJSON model into it.\n *\n * ````javascript\n * utils.loadJSON(\"./models/cityjson/DenHaag.json\", async (data) => {\n *\n * const xktModel = new XKTModel();\n *\n * parseCityJSONIntoXKTModel({\n * data,\n * xktModel,\n * log: (msg) => { console.log(msg); }\n * }).then(()=>{\n * xktModel.finalize();\n * },\n * (msg) => {\n * console.error(msg);\n * });\n * });\n * ````\n *\n * @param {Object} params Parsing params.\n * @param {Object} params.data CityJSON data.\n * @param {XKTModel} params.xktModel XKTModel to parse into.\n * @param {boolean} [params.center=false] Set true to center the CityJSON vertex positions to [0,0,0]. This is applied before the transformation matrix, if specified.\n * @param {Boolean} [params.transform] 4x4 transformation matrix to transform CityJSON vertex positions. Use this to rotate, translate and scale them if neccessary.\n * @param {Object} [params.stats] Collects statistics.\n * @param {function} [params.log] Logging callback.\n @returns {Promise} Resolves when CityJSON has been parsed.\n */\nfunction parseCityJSONIntoXKTModel({\n data,\n xktModel,\n center = false,\n transform = null,\n stats = {}, log\n }) {\n\n return new Promise(function (resolve, reject) {\n\n if (!data) {\n reject(\"Argument expected: data\");\n return;\n }\n\n if (data.type !== \"CityJSON\") {\n reject(\"Invalid argument: data is not a CityJSON file\");\n return;\n }\n\n if (!xktModel) {\n reject(\"Argument expected: xktModel\");\n return;\n }\n\n let vertices;\n\n log(\"Using parser: parseCityJSONIntoXKTModel\");\n\n log(`center: ${center}`);\n if (transform) {\n log(`transform: [${transform}]`);\n }\n\n if (data.transform || center || transform) {\n vertices = copyVertices(data.vertices);\n if (data.transform) {\n transformVertices(vertices, data.transform)\n }\n if (center) {\n centerVertices(vertices);\n }\n if (transform) {\n customTransformVertices(vertices, transform);\n }\n } else {\n vertices = data.vertices;\n }\n\n stats.sourceFormat = data.type || \"\";\n stats.schemaVersion = data.version || \"\";\n stats.title = \"\";\n stats.author = \"\";\n stats.created = \"\";\n stats.numMetaObjects = 0;\n stats.numPropertySets = 0;\n stats.numTriangles = 0;\n stats.numVertices = 0;\n stats.numObjects = 0;\n stats.numGeometries = 0;\n\n const rootMetaObjectId = math.createUUID();\n\n xktModel.createMetaObject({\n metaObjectId: rootMetaObjectId,\n metaObjectType: \"Model\",\n metaObjectName: \"Model\"\n });\n\n stats.numMetaObjects++;\n\n const modelMetaObjectId = math.createUUID();\n\n xktModel.createMetaObject({\n metaObjectId: modelMetaObjectId,\n metaObjectType: \"CityJSON\",\n metaObjectName: \"CityJSON\",\n parentMetaObjectId: rootMetaObjectId\n });\n\n stats.numMetaObjects++;\n\n const ctx = {\n data,\n vertices,\n xktModel,\n rootMetaObjectId: modelMetaObjectId,\n log: (log || function (msg) {\n }),\n nextId: 0,\n stats\n };\n\n ctx.xktModel.schema = data.type + \" \" + data.version;\n\n ctx.log(\"Converting \" + ctx.xktModel.schema);\n\n parseCityJSON(ctx);\n\n resolve();\n });\n}\n\nfunction copyVertices(vertices) {\n const vertices2 = [];\n for (let i = 0, j = 0; i < vertices.length; i++, j += 3) {\n const x = vertices[i][0];\n const y = vertices[i][1];\n const z = vertices[i][2];\n vertices2.push([x, y, z]);\n }\n return vertices2;\n}\n\nfunction transformVertices(vertices, cityJSONTransform) {\n const scale = cityJSONTransform.scale || math.vec3([1, 1, 1]);\n const translate = cityJSONTransform.translate || math.vec3([0, 0, 0]);\n for (let i = 0; i < vertices.length; i++) {\n const vertex = vertices[i];\n vertex[0] = (vertex[0] * scale[0]) + translate[0];\n vertex[1] = (vertex[1] * scale[1]) + translate[1];\n vertex[2] = (vertex[2] * scale[2]) + translate[2];\n }\n}\n\nfunction centerVertices(vertices) {\n if (center) {\n const centerPos = math.vec3();\n const numPoints = vertices.length;\n for (let i = 0, len = vertices.length; i < len; i++) {\n const vertex = vertices[i];\n centerPos[0] += vertex[0];\n centerPos[1] += vertex[1];\n centerPos[2] += vertex[2];\n }\n centerPos[0] /= numPoints;\n centerPos[1] /= numPoints;\n centerPos[2] /= numPoints;\n for (let i = 0, len = vertices.length; i < len; i++) {\n const vertex = vertices[i];\n vertex[0] -= centerPos[0];\n vertex[1] -= centerPos[1];\n vertex[2] -= centerPos[2];\n }\n }\n}\n\nfunction customTransformVertices(vertices, transform) {\n if (transform) {\n const mat = math.mat4(transform);\n for (let i = 0, len = vertices.length; i < len; i++) {\n const vertex = vertices[i];\n math.transformPoint3(mat, vertex, vertex);\n }\n }\n}\n\nfunction parseCityJSON(ctx) {\n\n const data = ctx.data;\n const cityObjects = data.CityObjects;\n\n for (const objectId in cityObjects) {\n if (cityObjects.hasOwnProperty(objectId)) {\n const cityObject = cityObjects[objectId];\n parseCityObject(ctx, cityObject, objectId);\n }\n }\n}\n\nfunction parseCityObject(ctx, cityObject, objectId) {\n\n const xktModel = ctx.xktModel;\n const data = ctx.data;\n const metaObjectId = objectId;\n const metaObjectType = cityObject.type;\n const metaObjectName = metaObjectType + \" : \" + objectId;\n\n const parentMetaObjectId = cityObject.parents ? cityObject.parents[0] : ctx.rootMetaObjectId;\n\n xktModel.createMetaObject({\n metaObjectId,\n metaObjectName,\n metaObjectType,\n parentMetaObjectId\n });\n\n ctx.stats.numMetaObjects++;\n\n if (!(cityObject.geometry && cityObject.geometry.length > 0)) {\n return;\n }\n\n const meshIds = [];\n\n for (let i = 0, len = cityObject.geometry.length; i < len; i++) {\n\n const geometry = cityObject.geometry[i];\n\n let objectMaterial;\n let surfaceMaterials;\n\n const appearance = data.appearance;\n if (appearance) {\n const materials = appearance.materials;\n if (materials) {\n const geometryMaterial = geometry.material;\n if (geometryMaterial) {\n const themeIds = Object.keys(geometryMaterial);\n if (themeIds.length > 0) {\n const themeId = themeIds[0];\n const theme = geometryMaterial[themeId];\n if (theme.value !== undefined) {\n objectMaterial = materials[theme.value];\n } else {\n const values = theme.values;\n if (values) {\n surfaceMaterials = [];\n for (let j = 0, lenj = values.length; j < lenj; j++) {\n const value = values[i];\n const surfaceMaterial = materials[value];\n surfaceMaterials.push(surfaceMaterial);\n }\n }\n }\n }\n }\n }\n }\n\n if (surfaceMaterials) {\n parseGeometrySurfacesWithOwnMaterials(ctx, geometry, surfaceMaterials, meshIds);\n\n } else {\n parseGeometrySurfacesWithSharedMaterial(ctx, geometry, objectMaterial, meshIds);\n }\n }\n\n if (meshIds.length > 0) {\n xktModel.createEntity({\n entityId: objectId,\n meshIds: meshIds\n });\n\n ctx.stats.numObjects++;\n }\n}\n\nfunction parseGeometrySurfacesWithOwnMaterials(ctx, geometry, surfaceMaterials, meshIds) {\n\n const geomType = geometry.type;\n\n switch (geomType) {\n\n case \"MultiPoint\":\n break;\n\n case \"MultiLineString\":\n break;\n\n case \"MultiSurface\":\n\n case \"CompositeSurface\":\n const surfaces = geometry.boundaries;\n parseSurfacesWithOwnMaterials(ctx, surfaceMaterials, surfaces, meshIds);\n break;\n\n case \"Solid\":\n const shells = geometry.boundaries;\n for (let j = 0; j < shells.length; j++) {\n const surfaces = shells[j];\n parseSurfacesWithOwnMaterials(ctx, surfaceMaterials, surfaces, meshIds);\n }\n break;\n\n case \"MultiSolid\":\n\n case \"CompositeSolid\":\n const solids = geometry.boundaries;\n for (let j = 0; j < solids.length; j++) {\n for (let k = 0; k < solids[j].length; k++) {\n const surfaces = solids[j][k];\n parseSurfacesWithOwnMaterials(ctx, surfaceMaterials, surfaces, meshIds);\n }\n }\n break;\n\n case \"GeometryInstance\":\n break;\n }\n}\n\nfunction parseSurfacesWithOwnMaterials(ctx, surfaceMaterials, surfaces, meshIds) {\n\n const vertices = ctx.vertices;\n const xktModel = ctx.xktModel;\n\n for (let i = 0; i < surfaces.length; i++) {\n\n const surface = surfaces[i];\n const surfaceMaterial = surfaceMaterials[i] || {diffuseColor: [0.8, 0.8, 0.8], transparency: 1.0};\n\n const face = [];\n const holes = [];\n\n const sharedIndices = [];\n\n const geometryCfg = {\n positions: [],\n indices: []\n };\n\n for (let j = 0; j < surface.length; j++) {\n\n if (face.length > 0) {\n holes.push(face.length);\n }\n\n const newFace = extractLocalIndices(ctx, surface[j], sharedIndices, geometryCfg);\n\n face.push(...newFace);\n }\n\n if (face.length === 3) { // Triangle\n\n geometryCfg.indices.push(face[0]);\n geometryCfg.indices.push(face[1]);\n geometryCfg.indices.push(face[2]);\n\n } else if (face.length > 3) { // Polygon\n\n // Prepare to triangulate\n\n const pList = [];\n\n for (let k = 0; k < face.length; k++) {\n pList.push({\n x: vertices[sharedIndices[face[k]]][0],\n y: vertices[sharedIndices[face[k]]][1],\n z: vertices[sharedIndices[face[k]]][2]\n });\n }\n\n const normal = getNormalOfPositions(pList, math.vec3());\n\n // Convert to 2D\n\n let pv = [];\n\n for (let k = 0; k < pList.length; k++) {\n\n to2D(pList[k], normal, tempVec2a);\n\n pv.unshift(tempVec2a[0]);\n pv.unshift(tempVec2a[1]);\n }\n\n // Triangulate\n\n const tr = earcut(pv, holes, 2);\n\n // Create triangles\n\n for (let k = 0; k < tr.length; k += 3) {\n geometryCfg.indices.unshift(face[tr[k]]);\n geometryCfg.indices.unshift(face[tr[k + 1]]);\n geometryCfg.indices.unshift(face[tr[k + 2]]);\n }\n }\n\n const geometryId = \"\" + ctx.nextId++;\n const meshId = \"\" + ctx.nextId++;\n\n xktModel.createGeometry({\n geometryId: geometryId,\n primitiveType: \"triangles\",\n positions: geometryCfg.positions,\n indices: geometryCfg.indices\n });\n\n xktModel.createMesh({\n meshId: meshId,\n geometryId: geometryId,\n color: (surfaceMaterial && surfaceMaterial.diffuseColor) ? surfaceMaterial.diffuseColor : [0.8, 0.8, 0.8],\n opacity: 1.0\n //opacity: (surfaceMaterial && surfaceMaterial.transparency !== undefined) ? (1.0 - surfaceMaterial.transparency) : 1.0\n });\n\n meshIds.push(meshId);\n\n ctx.stats.numGeometries++;\n ctx.stats.numVertices += geometryCfg.positions.length / 3;\n ctx.stats.numTriangles += geometryCfg.indices.length / 3;\n }\n}\n\nfunction parseGeometrySurfacesWithSharedMaterial(ctx, geometry, objectMaterial, meshIds) {\n\n const xktModel = ctx.xktModel;\n const sharedIndices = [];\n const geometryCfg = {\n positions: [],\n indices: []\n };\n\n const geomType = geometry.type;\n\n switch (geomType) {\n case \"MultiPoint\":\n break;\n\n case \"MultiLineString\":\n break;\n\n case \"MultiSurface\":\n case \"CompositeSurface\":\n const surfaces = geometry.boundaries;\n parseSurfacesWithSharedMaterial(ctx, surfaces, sharedIndices, geometryCfg);\n break;\n\n case \"Solid\":\n const shells = geometry.boundaries;\n for (let j = 0; j < shells.length; j++) {\n const surfaces = shells[j];\n parseSurfacesWithSharedMaterial(ctx, surfaces, sharedIndices, geometryCfg);\n }\n break;\n\n case \"MultiSolid\":\n case \"CompositeSolid\":\n const solids = geometry.boundaries;\n for (let j = 0; j < solids.length; j++) {\n for (let k = 0; k < solids[j].length; k++) {\n const surfaces = solids[j][k];\n parseSurfacesWithSharedMaterial(ctx, surfaces, sharedIndices, geometryCfg);\n }\n }\n break;\n\n case \"GeometryInstance\":\n break;\n }\n\n const geometryId = \"\" + ctx.nextId++;\n const meshId = \"\" + ctx.nextId++;\n\n xktModel.createGeometry({\n geometryId: geometryId,\n primitiveType: \"triangles\",\n positions: geometryCfg.positions,\n indices: geometryCfg.indices\n });\n\n xktModel.createMesh({\n meshId: meshId,\n geometryId: geometryId,\n color: (objectMaterial && objectMaterial.diffuseColor) ? objectMaterial.diffuseColor : [0.8, 0.8, 0.8],\n opacity: 1.0\n //opacity: (objectMaterial && objectMaterial.transparency !== undefined) ? (1.0 - objectMaterial.transparency) : 1.0\n });\n\n meshIds.push(meshId);\n\n ctx.stats.numGeometries++;\n ctx.stats.numVertices += geometryCfg.positions.length / 3;\n ctx.stats.numTriangles += geometryCfg.indices.length / 3;\n}\n\nfunction parseSurfacesWithSharedMaterial(ctx, surfaces, sharedIndices, primitiveCfg) {\n\n const vertices = ctx.vertices;\n\n for (let i = 0; i < surfaces.length; i++) {\n\n let boundary = [];\n let holes = [];\n\n for (let j = 0; j < surfaces[i].length; j++) {\n if (boundary.length > 0) {\n holes.push(boundary.length);\n }\n const newBoundary = extractLocalIndices(ctx, surfaces[i][j], sharedIndices, primitiveCfg);\n boundary.push(...newBoundary);\n }\n\n if (boundary.length === 3) { // Triangle\n\n primitiveCfg.indices.push(boundary[0]);\n primitiveCfg.indices.push(boundary[1]);\n primitiveCfg.indices.push(boundary[2]);\n\n } else if (boundary.length > 3) { // Polygon\n\n let pList = [];\n\n for (let k = 0; k < boundary.length; k++) {\n pList.push({\n x: vertices[sharedIndices[boundary[k]]][0],\n y: vertices[sharedIndices[boundary[k]]][1],\n z: vertices[sharedIndices[boundary[k]]][2]\n });\n }\n\n const normal = getNormalOfPositions(pList, math.vec3());\n let pv = [];\n\n for (let k = 0; k < pList.length; k++) {\n to2D(pList[k], normal, tempVec2a);\n pv.unshift(tempVec2a[0]);\n pv.unshift(tempVec2a[1]);\n }\n\n const tr = earcut(pv, holes, 2);\n\n for (let k = 0; k < tr.length; k += 3) {\n primitiveCfg.indices.unshift(boundary[tr[k]]);\n primitiveCfg.indices.unshift(boundary[tr[k + 1]]);\n primitiveCfg.indices.unshift(boundary[tr[k + 2]]);\n }\n }\n }\n}\n\nfunction extractLocalIndices(ctx, boundary, sharedIndices, geometryCfg) {\n\n const vertices = ctx.vertices;\n const newBoundary = []\n\n for (let i = 0, len = boundary.length; i < len; i++) {\n\n const index = boundary[i];\n\n if (sharedIndices.includes(index)) {\n const vertexIndex = sharedIndices.indexOf(index);\n newBoundary.push(vertexIndex);\n\n } else {\n geometryCfg.positions.push(vertices[index][0]);\n geometryCfg.positions.push(vertices[index][1]);\n geometryCfg.positions.push(vertices[index][2]);\n\n newBoundary.push(sharedIndices.length);\n\n sharedIndices.push(index);\n }\n }\n\n return newBoundary\n}\n\nfunction getNormalOfPositions(positions, normal) {\n\n for (let i = 0; i < positions.length; i++) {\n\n let nexti = i + 1;\n if (nexti === positions.length) {\n nexti = 0;\n }\n\n normal[0] += ((positions[i].y - positions[nexti].y) * (positions[i].z + positions[nexti].z));\n normal[1] += ((positions[i].z - positions[nexti].z) * (positions[i].x + positions[nexti].x));\n normal[2] += ((positions[i].x - positions[nexti].x) * (positions[i].y + positions[nexti].y));\n }\n\n return math.normalizeVec3(normal);\n}\n\nfunction to2D(_p, _n, re) {\n\n const p = tempVec3a;\n const n = tempVec3b;\n const x3 = tempVec3c;\n\n p[0] = _p.x;\n p[1] = _p.y;\n p[2] = _p.z;\n\n n[0] = _n.x;\n n[1] = _n.y;\n n[2] = _n.z;\n\n x3[0] = 1.1;\n x3[1] = 1.1;\n x3[2] = 1.1;\n\n const dist = math.lenVec3(math.subVec3(x3, n));\n\n if (dist < 0.01) {\n x3[0] += 1.0;\n x3[1] += 2.0;\n x3[2] += 3.0;\n }\n\n const dot = math.dotVec3(x3, n);\n const tmp2 = math.mulVec3Scalar(n, dot, math.vec3());\n\n x3[0] -= tmp2[0];\n x3[1] -= tmp2[1];\n x3[2] -= tmp2[2];\n\n math.normalizeVec3(x3);\n\n const y3 = math.cross3Vec3(n, x3, math.vec3());\n const x = math.dotVec3(p, x3);\n const y = math.dotVec3(p, y3);\n\n re[0] = x;\n re[1] = y;\n}\n\nexport {parseCityJSONIntoXKTModel};","function isString(value) {\n return (typeof value === 'string' || value instanceof String);\n}\n\nfunction apply(o, o2) {\n for (const name in o) {\n if (o.hasOwnProperty(name)) {\n o2[name] = o[name];\n }\n }\n return o2;\n}\n\n/**\n * @private\n */\nconst utils = {\n isString,\n apply\n};\n\nexport {utils};\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@loaders.gl/gltf\");","import {utils} from \"../XKTModel/lib/utils.js\";\nimport {math} from \"../lib/math.js\";\n\nimport {parse} from '@loaders.gl/core';\nimport {GLTFLoader} from '@loaders.gl/gltf';\nimport {\n ClampToEdgeWrapping,\n LinearFilter,\n LinearMipMapLinearFilter,\n LinearMipMapNearestFilter,\n MirroredRepeatWrapping,\n NearestFilter,\n NearestMipMapLinearFilter,\n NearestMipMapNearestFilter,\n RepeatWrapping\n} from \"../constants.js\";\n\n/**\n * @desc Parses glTF into an {@link XKTModel}, supporting ````.glb```` and textures.\n *\n * * Supports ````.glb```` and textures\n * * For a lightweight glTF JSON parser that ignores textures, see {@link parseGLTFJSONIntoXKTModel}.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then load a binary glTF model into it.\n *\n * ````javascript\n * utils.loadArraybuffer(\"../assets/models/gltf/HousePlan/glTF-Binary/HousePlan.glb\", async (data) => {\n *\n * const xktModel = new XKTModel();\n *\n * parseGLTFIntoXKTModel({\n * data,\n * xktModel,\n * log: (msg) => { console.log(msg); }\n * }).then(()=>{\n * xktModel.finalize();\n * },\n * (msg) => {\n * console.error(msg);\n * });\n * });\n * ````\n *\n * @param {Object} params Parsing parameters.\n * @param {ArrayBuffer} params.data The glTF.\n * @param {String} [params.baseUri] The base URI used to load this glTF, if any. For resolving relative uris to linked resources.\n * @param {Object} [params.metaModelData] Metamodel JSON. If this is provided, then parsing is able to ensure that the XKTObjects it creates will fit the metadata properly.\n * @param {XKTModel} params.xktModel XKTModel to parse into.\n * @param {Boolean} [params.includeTextures=true] Whether to parse textures.\n * @param {Boolean} [params.includeNormals=true] Whether to parse normals. When false, the parser will ignore the glTF\n * geometry normals, and the glTF data will rely on the xeokit ````Viewer```` to automatically generate them. This has\n * the limitation that the normals will be face-aligned, and therefore the ````Viewer```` will only be able to render\n * a flat-shaded non-PBR representation of the glTF.\n * @param {Object} [params.stats] Collects statistics.\n * @param {function} [params.log] Logging callback.\n @returns {Promise} Resolves when glTF has been parsed.\n */\nfunction parseGLTFIntoXKTModel({\n data,\n baseUri,\n xktModel,\n metaModelData,\n includeTextures = true,\n includeNormals = true,\n getAttachment,\n stats = {},\n log\n }) {\n\n return new Promise(function (resolve, reject) {\n\n if (!data) {\n reject(\"Argument expected: data\");\n return;\n }\n\n if (!xktModel) {\n reject(\"Argument expected: xktModel\");\n return;\n }\n\n stats.sourceFormat = \"glTF\";\n stats.schemaVersion = \"2.0\";\n stats.title = \"\";\n stats.author = \"\";\n stats.created = \"\";\n stats.numTriangles = 0;\n stats.numVertices = 0;\n stats.numNormals = 0;\n stats.numUVs = 0;\n stats.numTextures = 0;\n stats.numObjects = 0;\n stats.numGeometries = 0;\n\n parse(data, GLTFLoader, {\n baseUri\n }).then((gltfData) => {\n\n const ctx = {\n gltfData,\n metaModelCorrections: metaModelData ? getMetaModelCorrections(metaModelData) : null,\n getAttachment: getAttachment || (() => {\n throw new Error('You must define getAttachment() method to convert glTF with external resources')\n }),\n log: (log || function (msg) {\n }),\n error: function (msg) {\n console.error(msg);\n },\n xktModel,\n includeNormals: (includeNormals !== false),\n includeTextures: (includeTextures !== false),\n geometryCreated: {},\n nextId: 0,\n stats\n };\n\n ctx.log(\"Using parser: parseGLTFIntoXKTModel\");\n ctx.log(`Parsing normals: ${ctx.includeNormals ? \"enabled\" : \"disabled\"}`);\n ctx.log(`Parsing textures: ${ctx.includeTextures ? \"enabled\" : \"disabled\"}`);\n\n if (ctx.includeTextures) {\n parseTextures(ctx);\n }\n parseMaterials(ctx);\n parseDefaultScene(ctx);\n\n resolve();\n\n }, (errMsg) => {\n reject(`[parseGLTFIntoXKTModel] ${errMsg}`);\n });\n });\n}\n\nfunction getMetaModelCorrections(metaModelData) {\n const eachRootStats = {};\n const eachChildRoot = {};\n const metaObjects = metaModelData.metaObjects || [];\n const metaObjectsMap = {};\n for (let i = 0, len = metaObjects.length; i < len; i++) {\n const metaObject = metaObjects[i];\n metaObjectsMap[metaObject.id] = metaObject;\n }\n for (let i = 0, len = metaObjects.length; i < len; i++) {\n const metaObject = metaObjects[i];\n if (metaObject.parent !== undefined && metaObject.parent !== null) {\n const metaObjectParent = metaObjectsMap[metaObject.parent];\n if (metaObject.type === metaObjectParent.type) {\n let rootMetaObject = metaObjectParent;\n while (rootMetaObject.parent && metaObjectsMap[rootMetaObject.parent].type === rootMetaObject.type) {\n rootMetaObject = metaObjectsMap[rootMetaObject.parent];\n }\n const rootStats = eachRootStats[rootMetaObject.id] || (eachRootStats[rootMetaObject.id] = {\n numChildren: 0,\n countChildren: 0\n });\n rootStats.numChildren++;\n eachChildRoot[metaObject.id] = rootMetaObject;\n } else {\n\n }\n }\n }\n return {\n metaObjectsMap,\n eachRootStats,\n eachChildRoot\n };\n}\n\nfunction parseTextures(ctx) {\n const gltfData = ctx.gltfData;\n const textures = gltfData.textures;\n if (textures) {\n for (let i = 0, len = textures.length; i < len; i++) {\n parseTexture(ctx, textures[i]);\n ctx.stats.numTextures++;\n }\n }\n}\n\nfunction parseTexture(ctx, texture) {\n if (!texture.source || !texture.source.image) {\n return;\n }\n const textureId = `texture-${ctx.nextId++}`;\n\n let minFilter = NearestMipMapLinearFilter;\n switch (texture.sampler.minFilter) {\n case 9728:\n minFilter = NearestFilter;\n break;\n case 9729:\n minFilter = LinearFilter;\n break;\n case 9984:\n minFilter = NearestMipMapNearestFilter;\n break;\n case 9985:\n minFilter = LinearMipMapNearestFilter;\n break;\n case 9986:\n minFilter = NearestMipMapLinearFilter;\n break;\n case 9987:\n minFilter = LinearMipMapLinearFilter;\n break;\n }\n\n let magFilter = LinearFilter;\n switch (texture.sampler.magFilter) {\n case 9728:\n magFilter = NearestFilter;\n break;\n case 9729:\n magFilter = LinearFilter;\n break;\n }\n\n let wrapS = RepeatWrapping;\n switch (texture.sampler.wrapS) {\n case 33071:\n wrapS = ClampToEdgeWrapping;\n break;\n case 33648:\n wrapS = MirroredRepeatWrapping;\n break;\n case 10497:\n wrapS = RepeatWrapping;\n break;\n }\n\n let wrapT = RepeatWrapping;\n switch (texture.sampler.wrapT) {\n case 33071:\n wrapT = ClampToEdgeWrapping;\n break;\n case 33648:\n wrapT = MirroredRepeatWrapping;\n break;\n case 10497:\n wrapT = RepeatWrapping;\n break;\n }\n\n let wrapR = RepeatWrapping;\n switch (texture.sampler.wrapR) {\n case 33071:\n wrapR = ClampToEdgeWrapping;\n break;\n case 33648:\n wrapR = MirroredRepeatWrapping;\n break;\n case 10497:\n wrapR = RepeatWrapping;\n break;\n }\n\n ctx.xktModel.createTexture({\n textureId: textureId,\n imageData: texture.source.image,\n mediaType: texture.source.mediaType,\n compressed: true,\n width: texture.source.image.width,\n height: texture.source.image.height,\n minFilter,\n magFilter,\n wrapS,\n wrapT,\n wrapR,\n flipY: !!texture.flipY,\n // encoding: \"sRGB\"\n });\n texture._textureId = textureId;\n}\n\nfunction parseMaterials(ctx) {\n const gltfData = ctx.gltfData;\n const materials = gltfData.materials;\n if (materials) {\n for (let i = 0, len = materials.length; i < len; i++) {\n const material = materials[i];\n material._textureSetId = ctx.includeTextures ? parseTextureSet(ctx, material) : null;\n material._attributes = parseMaterialAttributes(ctx, material);\n }\n }\n}\n\nfunction parseTextureSet(ctx, material) {\n const textureSetCfg = {};\n if (material.normalTexture) {\n textureSetCfg.normalTextureId = material.normalTexture.texture._textureId;\n }\n if (material.occlusionTexture) {\n textureSetCfg.occlusionTextureId = material.occlusionTexture.texture._textureId;\n }\n if (material.emissiveTexture) {\n textureSetCfg.emissiveTextureId = material.emissiveTexture.texture._textureId;\n }\n // const alphaMode = material.alphaMode;\n // switch (alphaMode) {\n // case \"NORMAL_OPAQUE\":\n // materialCfg.alphaMode = \"opaque\";\n // break;\n // case \"MASK\":\n // materialCfg.alphaMode = \"mask\";\n // break;\n // case \"BLEND\":\n // materialCfg.alphaMode = \"blend\";\n // break;\n // default:\n // }\n // const alphaCutoff = material.alphaCutoff;\n // if (alphaCutoff !== undefined) {\n // materialCfg.alphaCutoff = alphaCutoff;\n // }\n const metallicPBR = material.pbrMetallicRoughness;\n if (material.pbrMetallicRoughness) {\n const pbrMetallicRoughness = material.pbrMetallicRoughness;\n const baseColorTexture = pbrMetallicRoughness.baseColorTexture || pbrMetallicRoughness.colorTexture;\n if (baseColorTexture) {\n if (baseColorTexture.texture) {\n textureSetCfg.colorTextureId = baseColorTexture.texture._textureId;\n } else {\n textureSetCfg.colorTextureId = ctx.gltfData.textures[baseColorTexture.index]._textureId;\n }\n }\n if (metallicPBR.metallicRoughnessTexture) {\n textureSetCfg.metallicRoughnessTextureId = metallicPBR.metallicRoughnessTexture.texture._textureId;\n }\n }\n const extensions = material.extensions;\n if (extensions) {\n const specularPBR = extensions[\"KHR_materials_pbrSpecularGlossiness\"];\n if (specularPBR) {\n const specularTexture = specularPBR.specularTexture;\n if (specularTexture !== null && specularTexture !== undefined) {\n // textureSetCfg.colorTextureId = ctx.gltfData.textures[specularColorTexture.index]._textureId;\n }\n const specularColorTexture = specularPBR.specularColorTexture;\n if (specularColorTexture !== null && specularColorTexture !== undefined) {\n textureSetCfg.colorTextureId = ctx.gltfData.textures[specularColorTexture.index]._textureId;\n }\n }\n }\n if (textureSetCfg.normalTextureId !== undefined ||\n textureSetCfg.occlusionTextureId !== undefined ||\n textureSetCfg.emissiveTextureId !== undefined ||\n textureSetCfg.colorTextureId !== undefined ||\n textureSetCfg.metallicRoughnessTextureId !== undefined) {\n textureSetCfg.textureSetId = `textureSet-${ctx.nextId++};`\n ctx.xktModel.createTextureSet(textureSetCfg);\n ctx.stats.numTextureSets++;\n return textureSetCfg.textureSetId;\n }\n return null;\n}\n\nfunction parseMaterialAttributes(ctx, material) { // Substitute RGBA for material, to use fast flat shading instead\n const extensions = material.extensions;\n const materialAttributes = {\n color: new Float32Array([1, 1, 1, 1]),\n opacity: 1,\n metallic: 0,\n roughness: 1\n };\n if (extensions) {\n const specularPBR = extensions[\"KHR_materials_pbrSpecularGlossiness\"];\n if (specularPBR) {\n const diffuseFactor = specularPBR.diffuseFactor;\n if (diffuseFactor !== null && diffuseFactor !== undefined) {\n materialAttributes.color.set(diffuseFactor);\n }\n }\n const common = extensions[\"KHR_materials_common\"];\n if (common) {\n const technique = common.technique;\n const values = common.values || {};\n const blinn = technique === \"BLINN\";\n const phong = technique === \"PHONG\";\n const lambert = technique === \"LAMBERT\";\n const diffuse = values.diffuse;\n if (diffuse && (blinn || phong || lambert)) {\n if (!utils.isString(diffuse)) {\n materialAttributes.color.set(diffuse);\n }\n }\n const transparency = values.transparency;\n if (transparency !== null && transparency !== undefined) {\n materialAttributes.opacity = transparency;\n }\n const transparent = values.transparent;\n if (transparent !== null && transparent !== undefined) {\n materialAttributes.opacity = transparent;\n }\n }\n }\n const metallicPBR = material.pbrMetallicRoughness;\n if (metallicPBR) {\n const baseColorFactor = metallicPBR.baseColorFactor;\n if (baseColorFactor) {\n materialAttributes.color[0] = baseColorFactor[0];\n materialAttributes.color[1] = baseColorFactor[1];\n materialAttributes.color[2] = baseColorFactor[2];\n materialAttributes.opacity = baseColorFactor[3];\n }\n const metallicFactor = metallicPBR.metallicFactor;\n if (metallicFactor !== null && metallicFactor !== undefined) {\n materialAttributes.metallic = metallicFactor;\n }\n const roughnessFactor = metallicPBR.roughnessFactor;\n if (roughnessFactor !== null && roughnessFactor !== undefined) {\n materialAttributes.roughness = roughnessFactor;\n }\n }\n return materialAttributes;\n}\n\nfunction parseDefaultScene(ctx) {\n const gltfData = ctx.gltfData;\n const scene = gltfData.scene || gltfData.scenes[0];\n if (!scene) {\n ctx.error(\"glTF has no default scene\");\n return;\n }\n parseScene(ctx, scene);\n}\n\nfunction parseScene(ctx, scene) {\n const nodes = scene.nodes;\n if (!nodes) {\n return;\n }\n for (let i = 0, len = nodes.length; i < len; i++) {\n const node = nodes[i];\n countMeshUsage(ctx, node);\n }\n for (let i = 0, len = nodes.length; i < len; i++) {\n const node = nodes[i];\n parseNode(ctx, node, 0, null);\n }\n}\n\nfunction countMeshUsage(ctx, node) {\n const mesh = node.mesh;\n if (mesh) {\n mesh.instances = mesh.instances ? mesh.instances + 1 : 1;\n }\n if (node.children) {\n const children = node.children;\n for (let i = 0, len = children.length; i < len; i++) {\n const childNode = children[i];\n if (!childNode) {\n ctx.error(\"Node not found: \" + i);\n continue;\n }\n countMeshUsage(ctx, childNode);\n }\n }\n}\n\nconst deferredMeshIds = [];\n\nfunction parseNode(ctx, node, depth, matrix) {\n\n const xktModel = ctx.xktModel;\n\n // Pre-order visit scene node\n\n let localMatrix;\n if (node.matrix) {\n localMatrix = node.matrix;\n if (matrix) {\n matrix = math.mulMat4(matrix, localMatrix, math.mat4());\n } else {\n matrix = localMatrix;\n }\n }\n if (node.translation) {\n localMatrix = math.translationMat4v(node.translation);\n if (matrix) {\n matrix = math.mulMat4(matrix, localMatrix, math.mat4());\n } else {\n matrix = localMatrix;\n }\n }\n if (node.rotation) {\n localMatrix = math.quaternionToMat4(node.rotation);\n if (matrix) {\n matrix = math.mulMat4(matrix, localMatrix, math.mat4());\n } else {\n matrix = localMatrix;\n }\n }\n if (node.scale) {\n localMatrix = math.scalingMat4v(node.scale);\n if (matrix) {\n matrix = math.mulMat4(matrix, localMatrix, math.mat4());\n } else {\n matrix = localMatrix;\n }\n }\n\n if (node.mesh) {\n\n const mesh = node.mesh;\n const numPrimitives = mesh.primitives.length;\n\n if (numPrimitives > 0) {\n for (let i = 0; i < numPrimitives; i++) {\n const primitive = mesh.primitives[i];\n if (!primitive._xktGeometryId) {\n const xktGeometryId = \"geometry-\" + ctx.nextId++;\n const geometryCfg = {\n geometryId: xktGeometryId\n };\n switch (primitive.mode) {\n case 0: // POINTS\n geometryCfg.primitiveType = \"points\";\n break;\n case 1: // LINES\n geometryCfg.primitiveType = \"lines\";\n break;\n case 2: // LINE_LOOP\n geometryCfg.primitiveType = \"line-loop\";\n break;\n case 3: // LINE_STRIP\n geometryCfg.primitiveType = \"line-strip\";\n break;\n case 4: // TRIANGLES\n geometryCfg.primitiveType = \"triangles\";\n break;\n case 5: // TRIANGLE_STRIP\n geometryCfg.primitiveType = \"triangle-strip\";\n break;\n case 6: // TRIANGLE_FAN\n geometryCfg.primitiveType = \"triangle-fan\";\n break;\n default:\n geometryCfg.primitiveType = \"triangles\";\n }\n const POSITION = primitive.attributes.POSITION;\n if (!POSITION) {\n continue;\n }\n geometryCfg.positions = primitive.attributes.POSITION.value;\n ctx.stats.numVertices += geometryCfg.positions.length / 3;\n if (ctx.includeNormals) {\n if (primitive.attributes.NORMAL) {\n geometryCfg.normals = primitive.attributes.NORMAL.value;\n ctx.stats.numNormals += geometryCfg.normals.length / 3;\n }\n }\n if (primitive.attributes.COLOR_0) {\n geometryCfg.colorsCompressed = primitive.attributes.COLOR_0.value;\n }\n if (ctx.includeTextures) {\n if (primitive.attributes.TEXCOORD_0) {\n geometryCfg.uvs = primitive.attributes.TEXCOORD_0.value;\n ctx.stats.numUVs += geometryCfg.uvs.length / 2;\n }\n }\n if (primitive.indices) {\n geometryCfg.indices = primitive.indices.value;\n if (primitive.mode === 4) {\n ctx.stats.numTriangles += geometryCfg.indices.length / 3;\n }\n }\n xktModel.createGeometry(geometryCfg);\n primitive._xktGeometryId = xktGeometryId;\n ctx.stats.numGeometries++;\n }\n\n const xktMeshId = ctx.nextId++;\n const meshCfg = {\n meshId: xktMeshId,\n geometryId: primitive._xktGeometryId,\n matrix: matrix ? matrix.slice() : math.identityMat4()\n };\n const material = primitive.material;\n if (material) {\n meshCfg.textureSetId = material._textureSetId;\n meshCfg.color = material._attributes.color;\n meshCfg.opacity = material._attributes.opacity;\n meshCfg.metallic = material._attributes.metallic;\n meshCfg.roughness = material._attributes.roughness;\n } else {\n meshCfg.color = [1.0, 1.0, 1.0];\n meshCfg.opacity = 1.0;\n }\n xktModel.createMesh(meshCfg);\n deferredMeshIds.push(xktMeshId);\n }\n }\n }\n\n // Visit child scene nodes\n\n if (node.children) {\n const children = node.children;\n for (let i = 0, len = children.length; i < len; i++) {\n const childNode = children[i];\n parseNode(ctx, childNode, depth + 1, matrix);\n }\n }\n\n // Post-order visit scene node\n\n const nodeName = node.name;\n if (((nodeName !== undefined && nodeName !== null) || depth === 0) && deferredMeshIds.length > 0) {\n if (nodeName === undefined || nodeName === null) {\n ctx.log(`Warning: 'name' properties not found on glTF scene nodes - will randomly-generate object IDs in XKT`);\n }\n let xktEntityId = nodeName; // Fall back on generated ID when `name` not found on glTF scene node(s)\n if (!!xktEntityId && xktModel.entities[xktEntityId]) {\n ctx.log(`Warning: Two or more glTF nodes found with same 'name' attribute: '${nodeName} - will randomly-generating an object ID in XKT`);\n }\n while (!xktEntityId || xktModel.entities[xktEntityId]) {\n xktEntityId = \"entity-\" + ctx.nextId++;\n }\n if (ctx.metaModelCorrections) {\n // Merging meshes into XKTObjects that map to metaobjects\n const rootMetaObject = ctx.metaModelCorrections.eachChildRoot[xktEntityId];\n if (rootMetaObject) {\n const rootMetaObjectStats = ctx.metaModelCorrections.eachRootStats[rootMetaObject.id];\n rootMetaObjectStats.countChildren++;\n if (rootMetaObjectStats.countChildren >= rootMetaObjectStats.numChildren) {\n xktModel.createEntity({\n entityId: rootMetaObject.id,\n meshIds: deferredMeshIds\n });\n ctx.stats.numObjects++;\n deferredMeshIds.length = 0;\n }\n } else {\n const metaObject = ctx.metaModelCorrections.metaObjectsMap[xktEntityId];\n if (metaObject) {\n xktModel.createEntity({\n entityId: xktEntityId,\n meshIds: deferredMeshIds\n });\n ctx.stats.numObjects++;\n deferredMeshIds.length = 0;\n }\n }\n } else {\n // Create an XKTObject from the meshes at each named glTF node, don't care about metaobjects\n xktModel.createEntity({\n entityId: xktEntityId,\n meshIds: deferredMeshIds\n });\n ctx.stats.numObjects++;\n deferredMeshIds.length = 0;\n }\n }\n}\n\nexport {parseGLTFIntoXKTModel};\n","import {utils} from \"../XKTModel/lib/utils.js\";\nimport {math} from \"../lib/math.js\";\n\nconst atob2 = (typeof atob !== 'undefined') ? atob : a => Buffer.from(a, 'base64').toString('binary');\n\nconst WEBGL_COMPONENT_TYPES = {\n 5120: Int8Array,\n 5121: Uint8Array,\n 5122: Int16Array,\n 5123: Uint16Array,\n 5125: Uint32Array,\n 5126: Float32Array\n};\n\nconst WEBGL_TYPE_SIZES = {\n 'SCALAR': 1,\n 'VEC2': 2,\n 'VEC3': 3,\n 'VEC4': 4,\n 'MAT2': 4,\n 'MAT3': 9,\n 'MAT4': 16\n};\n\n/**\n * @desc Parses glTF JSON into an {@link XKTModel}, without ````.glb```` and textures.\n *\n * * Lightweight JSON-based glTF parser which ignores textures\n * * For texture and ````.glb```` support, see {@link parseGLTFIntoXKTModel}\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then load a glTF model into it.\n *\n * ````javascript\n * utils.loadJSON(\"./models/gltf/duplex/scene.gltf\", async (data) => {\n *\n * const xktModel = new XKTModel();\n *\n * parseGLTFJSONIntoXKTModel({\n * data,\n * xktModel,\n * log: (msg) => { console.log(msg); }\n * }).then(()=>{\n * xktModel.finalize();\n * },\n * (msg) => {\n * console.error(msg);\n * });\n * });\n * ````\n *\n * @param {Object} params Parsing parameters.\n * @param {Object} params.data The glTF JSON.\n * @param {Object} [params.metaModelData] Metamodel JSON. If this is provided, then parsing is able to ensure that the XKTObjects it creates will fit the metadata properly.\n * @param {XKTModel} params.xktModel XKTModel to parse into.\n * @param {Boolean} [params.includeNormals=false] Whether to parse normals. When false, the parser will ignore the glTF\n * geometry normals, and the glTF data will rely on the xeokit ````Viewer```` to automatically generate them. This has\n * the limitation that the normals will be face-aligned, and therefore the ````Viewer```` will only be able to render\n * a flat-shaded representation of the glTF.\n * @param {Boolean} [params.reuseGeometries=true] When true, the parser will enable geometry reuse within the XKTModel. When false,\n * will automatically \"expand\" all reused geometries into duplicate copies. This has the drawback of increasing the XKT\n * file size (~10-30% for typical models), but can make the model more responsive in the xeokit Viewer, especially if the model\n * has excessive geometry reuse. An example of excessive geometry reuse would be if we have 4000 geometries that are\n * shared amongst 2000 objects, ie. a large number of geometries with a low amount of reuse, which can present a\n * pathological performance case for xeokit's underlying graphics APIs (WebGL, WebGPU etc).\n * @param {function} [params.getAttachment] Callback through which to fetch attachments, if the glTF has them.\n * @param {Object} [params.stats] Collects statistics.\n * @param {function} [params.log] Logging callback.\n * @returns {Promise}\n */\nfunction parseGLTFJSONIntoXKTModel({\n data,\n xktModel,\n metaModelData,\n includeNormals,\n reuseGeometries,\n getAttachment,\n stats = {},\n log\n }) {\n\n if (log) {\n log(\"Using parser: parseGLTFJSONIntoXKTModel\");\n }\n\n return new Promise(function (resolve, reject) {\n\n if (!data) {\n reject(\"Argument expected: data\");\n return;\n }\n\n if (!xktModel) {\n reject(\"Argument expected: xktModel\");\n return;\n }\n\n stats.sourceFormat = \"glTF\";\n stats.schemaVersion = \"2.0\";\n stats.title = \"\";\n stats.author = \"\";\n stats.created = \"\";\n stats.numTriangles = 0;\n stats.numVertices = 0;\n stats.numNormals = 0;\n stats.numObjects = 0;\n stats.numGeometries = 0;\n\n const ctx = {\n gltf: data,\n metaModelCorrections: metaModelData ? getMetaModelCorrections(metaModelData) : null,\n getAttachment: getAttachment || (() => {\n throw new Error('You must define getAttachment() method to convert glTF with external resources')\n }),\n log: (log || function (msg) {\n }),\n xktModel,\n includeNormals,\n createXKTGeometryIds: {},\n nextMeshId: 0,\n reuseGeometries: (reuseGeometries !== false),\n stats\n };\n\n ctx.log(`Parsing normals: ${ctx.includeNormals ? \"enabled\" : \"disabled\"}`);\n\n parseBuffers(ctx).then(() => {\n\n parseBufferViews(ctx);\n freeBuffers(ctx);\n parseMaterials(ctx);\n parseDefaultScene(ctx);\n\n resolve();\n\n }, (errMsg) => {\n reject(errMsg);\n });\n });\n}\n\nfunction getMetaModelCorrections(metaModelData) {\n const eachRootStats = {};\n const eachChildRoot = {};\n const metaObjects = metaModelData.metaObjects || [];\n const metaObjectsMap = {};\n for (let i = 0, len = metaObjects.length; i < len; i++) {\n const metaObject = metaObjects[i];\n metaObjectsMap[metaObject.id] = metaObject;\n }\n for (let i = 0, len = metaObjects.length; i < len; i++) {\n const metaObject = metaObjects[i];\n if (metaObject.parent !== undefined && metaObject.parent !== null) {\n const metaObjectParent = metaObjectsMap[metaObject.parent];\n if (metaObject.type === metaObjectParent.type) {\n let rootMetaObject = metaObjectParent;\n while (rootMetaObject.parent && metaObjectsMap[rootMetaObject.parent].type === rootMetaObject.type) {\n rootMetaObject = metaObjectsMap[rootMetaObject.parent];\n }\n const rootStats = eachRootStats[rootMetaObject.id] || (eachRootStats[rootMetaObject.id] = {\n numChildren: 0,\n countChildren: 0\n });\n rootStats.numChildren++;\n eachChildRoot[metaObject.id] = rootMetaObject;\n } else {\n\n }\n }\n }\n const metaModelCorrections = {\n metaObjectsMap,\n eachRootStats,\n eachChildRoot\n };\n return metaModelCorrections;\n}\n\nfunction parseBuffers(ctx) { // Parses geometry buffers into temporary \"_buffer\" Unit8Array properties on the glTF \"buffer\" elements\n const buffers = ctx.gltf.buffers;\n if (buffers) {\n return Promise.all(buffers.map(buffer => parseBuffer(ctx, buffer)));\n } else {\n return new Promise(function (resolve, reject) {\n resolve();\n });\n }\n}\n\nfunction parseBuffer(ctx, bufferInfo) {\n return new Promise(function (resolve, reject) {\n // Allow a shortcut where the glTF buffer is \"enrichened\" with direct\n // access to the data-arrayBuffer, w/out needing to either:\n // - read the file indicated by the \".uri\" component of the buffer\n // - base64-decode the encoded data in the \".uri\" component\n if (bufferInfo._arrayBuffer) {\n bufferInfo._buffer = bufferInfo._arrayBuffer;\n resolve(bufferInfo);\n return;\n }\n // Otherwise, proceed with \"standard-glTF\" .uri component.\n const uri = bufferInfo.uri;\n if (!uri) {\n reject('gltf/handleBuffer missing uri in ' + JSON.stringify(bufferInfo));\n return;\n }\n parseArrayBuffer(ctx, uri).then((arrayBuffer) => {\n bufferInfo._buffer = arrayBuffer;\n resolve(arrayBuffer);\n }, (errMsg) => {\n reject(errMsg);\n })\n });\n}\n\nfunction parseArrayBuffer(ctx, uri) {\n return new Promise(function (resolve, reject) {\n const dataUriRegex = /^data:(.*?)(;base64)?,(.*)$/; // Check for data: URI\n const dataUriRegexResult = uri.match(dataUriRegex);\n if (dataUriRegexResult) { // Safari can't handle data URIs through XMLHttpRequest\n const isBase64 = !!dataUriRegexResult[2];\n let data = dataUriRegexResult[3];\n data = decodeURIComponent(data);\n if (isBase64) {\n data = atob2(data);\n }\n const buffer = new ArrayBuffer(data.length);\n const view = new Uint8Array(buffer);\n for (let i = 0; i < data.length; i++) {\n view[i] = data.charCodeAt(i);\n }\n resolve(buffer);\n } else { // Uri is a path to a file\n ctx.getAttachment(uri).then(\n (arrayBuffer) => {\n resolve(arrayBuffer);\n },\n (errMsg) => {\n reject(errMsg);\n });\n }\n });\n}\n\nfunction parseBufferViews(ctx) { // Parses our temporary \"_buffer\" properties into \"_buffer\" properties on glTF \"bufferView\" elements\n const bufferViewsInfo = ctx.gltf.bufferViews;\n if (bufferViewsInfo) {\n for (let i = 0, len = bufferViewsInfo.length; i < len; i++) {\n parseBufferView(ctx, bufferViewsInfo[i]);\n }\n }\n}\n\nfunction parseBufferView(ctx, bufferViewInfo) {\n const buffer = ctx.gltf.buffers[bufferViewInfo.buffer];\n bufferViewInfo._typedArray = null;\n const byteLength = bufferViewInfo.byteLength || 0;\n const byteOffset = bufferViewInfo.byteOffset || 0;\n bufferViewInfo._buffer = buffer._buffer.slice(byteOffset, byteOffset + byteLength);\n}\n\nfunction freeBuffers(ctx) { // Deletes the \"_buffer\" properties from the glTF \"buffer\" elements, to save memory\n const buffers = ctx.gltf.buffers;\n if (buffers) {\n for (let i = 0, len = buffers.length; i < len; i++) {\n buffers[i]._buffer = null;\n }\n }\n}\n\nfunction parseMaterials(ctx) {\n const materialsInfo = ctx.gltf.materials;\n if (materialsInfo) {\n for (let i = 0, len = materialsInfo.length; i < len; i++) {\n const materialInfo = materialsInfo[i];\n const material = parseMaterial(ctx, materialInfo);\n materialInfo._materialData = material;\n }\n }\n}\n\nfunction parseMaterial(ctx, materialInfo) { // Attempts to extract an RGBA color for a glTF material\n const material = {\n color: new Float32Array([1, 1, 1]),\n opacity: 1.0,\n metallic: 0,\n roughness: 1\n };\n const extensions = materialInfo.extensions;\n if (extensions) {\n const specularPBR = extensions[\"KHR_materials_pbrSpecularGlossiness\"];\n if (specularPBR) {\n const diffuseFactor = specularPBR.diffuseFactor;\n if (diffuseFactor !== null && diffuseFactor !== undefined) {\n material.color[0] = diffuseFactor[0];\n material.color[1] = diffuseFactor[1];\n material.color[2] = diffuseFactor[2];\n }\n }\n const common = extensions[\"KHR_materials_common\"];\n if (common) {\n const technique = common.technique;\n const values = common.values || {};\n const blinn = technique === \"BLINN\";\n const phong = technique === \"PHONG\";\n const lambert = technique === \"LAMBERT\";\n const diffuse = values.diffuse;\n if (diffuse && (blinn || phong || lambert)) {\n if (!utils.isString(diffuse)) {\n material.color[0] = diffuse[0];\n material.color[1] = diffuse[1];\n material.color[2] = diffuse[2];\n }\n }\n const transparency = values.transparency;\n if (transparency !== null && transparency !== undefined) {\n material.opacity = transparency;\n }\n const transparent = values.transparent;\n if (transparent !== null && transparent !== undefined) {\n material.opacity = transparent;\n }\n }\n }\n const metallicPBR = materialInfo.pbrMetallicRoughness;\n if (metallicPBR) {\n const baseColorFactor = metallicPBR.baseColorFactor;\n if (baseColorFactor) {\n material.color[0] = baseColorFactor[0];\n material.color[1] = baseColorFactor[1];\n material.color[2] = baseColorFactor[2];\n material.opacity = baseColorFactor[3];\n }\n const metallicFactor = metallicPBR.metallicFactor;\n if (metallicFactor !== null && metallicFactor !== undefined) {\n material.metallic = metallicFactor;\n }\n const roughnessFactor = metallicPBR.roughnessFactor;\n if (roughnessFactor !== null && roughnessFactor !== undefined) {\n material.roughness = roughnessFactor;\n }\n }\n return material;\n}\n\nfunction parseDefaultScene(ctx) {\n const scene = ctx.gltf.scene || 0;\n const defaultSceneInfo = ctx.gltf.scenes[scene];\n if (!defaultSceneInfo) {\n throw new Error(\"glTF has no default scene\");\n }\n parseScene(ctx, defaultSceneInfo);\n}\n\n\nfunction parseScene(ctx, sceneInfo) {\n const nodes = sceneInfo.nodes;\n if (!nodes) {\n return;\n }\n for (let i = 0, len = nodes.length; i < len; i++) {\n const glTFNode = ctx.gltf.nodes[nodes[i]];\n if (glTFNode) {\n parseNode(ctx, glTFNode, 0, null);\n }\n }\n}\n\nlet deferredMeshIds = [];\n\nfunction parseNode(ctx, glTFNode, depth, matrix) {\n\n const gltf = ctx.gltf;\n const xktModel = ctx.xktModel;\n\n let localMatrix;\n\n if (glTFNode.matrix) {\n localMatrix = glTFNode.matrix;\n if (matrix) {\n matrix = math.mulMat4(matrix, localMatrix, math.mat4());\n } else {\n matrix = localMatrix;\n }\n }\n\n if (glTFNode.translation) {\n localMatrix = math.translationMat4v(glTFNode.translation);\n if (matrix) {\n matrix = math.mulMat4(matrix, localMatrix, localMatrix);\n } else {\n matrix = localMatrix;\n }\n }\n\n if (glTFNode.rotation) {\n localMatrix = math.quaternionToMat4(glTFNode.rotation);\n if (matrix) {\n matrix = math.mulMat4(matrix, localMatrix, localMatrix);\n } else {\n matrix = localMatrix;\n }\n }\n\n if (glTFNode.scale) {\n localMatrix = math.scalingMat4v(glTFNode.scale);\n if (matrix) {\n matrix = math.mulMat4(matrix, localMatrix, localMatrix);\n } else {\n matrix = localMatrix;\n }\n }\n\n const gltfMeshId = glTFNode.mesh;\n\n if (gltfMeshId !== undefined) {\n\n const meshInfo = gltf.meshes[gltfMeshId];\n\n if (meshInfo) {\n\n const numPrimitivesInMesh = meshInfo.primitives.length;\n\n if (numPrimitivesInMesh > 0) {\n\n for (let i = 0; i < numPrimitivesInMesh; i++) {\n\n const primitiveInfo = meshInfo.primitives[i];\n\n const geometryHash = createPrimitiveGeometryHash(primitiveInfo);\n\n let xktGeometryId = ctx.createXKTGeometryIds[geometryHash];\n\n if ((!ctx.reuseGeometries) || !xktGeometryId) {\n\n xktGeometryId = \"geometry-\" + ctx.nextMeshId++\n\n const geometryArrays = {};\n\n parsePrimitiveGeometry(ctx, primitiveInfo, geometryArrays);\n\n const colors = geometryArrays.colors;\n\n let colorsCompressed;\n\n if (geometryArrays.colors) {\n colorsCompressed = [];\n for (let j = 0, lenj = colors.length; j < lenj; j += 4) {\n colorsCompressed.push(colors[j + 0]);\n colorsCompressed.push(colors[j + 1]);\n colorsCompressed.push(colors[j + 2]);\n colorsCompressed.push(255);\n }\n }\n\n xktModel.createGeometry({\n geometryId: xktGeometryId,\n primitiveType: geometryArrays.primitive,\n positions: geometryArrays.positions,\n normals: ctx.includeNormals ? geometryArrays.normals : null,\n colorsCompressed: colorsCompressed,\n indices: geometryArrays.indices\n });\n\n ctx.stats.numGeometries++;\n ctx.stats.numVertices += geometryArrays.positions ? geometryArrays.positions.length / 3 : 0;\n ctx.stats.numNormals += (ctx.includeNormals && geometryArrays.normals) ? geometryArrays.normals.length / 3 : 0;\n ctx.stats.numTriangles += geometryArrays.indices ? geometryArrays.indices.length / 3 : 0;\n\n ctx.createXKTGeometryIds[geometryHash] = xktGeometryId;\n } else {\n// Geometry reused\n }\n\n const materialIndex = primitiveInfo.material;\n const materialInfo = (materialIndex !== null && materialIndex !== undefined) ? gltf.materials[materialIndex] : null;\n const color = materialInfo ? materialInfo._materialData.color : new Float32Array([1.0, 1.0, 1.0, 1.0]);\n const opacity = materialInfo ? materialInfo._materialData.opacity : 1.0;\n const metallic = materialInfo ? materialInfo._materialData.metallic : 0.0;\n const roughness = materialInfo ? materialInfo._materialData.roughness : 1.0;\n\n const xktMeshId = \"mesh-\" + ctx.nextMeshId++;\n\n xktModel.createMesh({\n meshId: xktMeshId,\n geometryId: xktGeometryId,\n matrix: matrix ? matrix.slice() : math.identityMat4(),\n color: color,\n opacity: opacity,\n metallic: metallic,\n roughness: roughness\n });\n\n deferredMeshIds.push(xktMeshId);\n }\n }\n }\n }\n\n\n if (glTFNode.children) {\n const children = glTFNode.children;\n for (let i = 0, len = children.length; i < len; i++) {\n const childNodeIdx = children[i];\n const childGLTFNode = gltf.nodes[childNodeIdx];\n if (!childGLTFNode) {\n console.warn('Node not found: ' + i);\n continue;\n }\n parseNode(ctx, childGLTFNode, depth + 1, matrix);\n }\n }\n\n // Post-order visit scene node\n\n const nodeName = glTFNode.name;\n if (((nodeName !== undefined && nodeName !== null) || depth === 0) && deferredMeshIds.length > 0) {\n if (nodeName === undefined || nodeName === null) {\n ctx.log(`[parseGLTFJSONIntoXKTModel] Warning: 'name' properties not found on glTF scene nodes - will randomly-generate object IDs in XKT`);\n }\n let xktEntityId = nodeName; // Fall back on generated ID when `name` not found on glTF scene node(s)\n if (xktEntityId === undefined || xktEntityId === null) {\n if (xktModel.entities[xktEntityId]) {\n ctx.error(\"Two or more glTF nodes found with same 'name' attribute: '\" + nodeName + \"'\");\n }\n while (!xktEntityId || xktModel.entities[xktEntityId]) {\n xktEntityId = \"entity-\" + ctx.nextId++;\n }\n }\n if (ctx.metaModelCorrections) { // Merging meshes into XKTObjects that map to metaobjects\n const rootMetaObject = ctx.metaModelCorrections.eachChildRoot[xktEntityId];\n if (rootMetaObject) {\n const rootMetaObjectStats = ctx.metaModelCorrections.eachRootStats[rootMetaObject.id];\n rootMetaObjectStats.countChildren++;\n if (rootMetaObjectStats.countChildren >= rootMetaObjectStats.numChildren) {\n xktModel.createEntity({\n entityId: rootMetaObject.id,\n meshIds: deferredMeshIds\n });\n ctx.stats.numObjects++;\n deferredMeshIds = [];\n }\n } else {\n const metaObject = ctx.metaModelCorrections.metaObjectsMap[xktEntityId];\n if (metaObject) {\n xktModel.createEntity({\n entityId: xktEntityId,\n meshIds: deferredMeshIds\n });\n ctx.stats.numObjects++;\n deferredMeshIds = [];\n }\n }\n } else { // Create an XKTObject from the meshes at each named glTF node, don't care about metaobjects\n xktModel.createEntity({\n entityId: xktEntityId,\n meshIds: deferredMeshIds\n });\n ctx.stats.numObjects++;\n deferredMeshIds = [];\n }\n }\n}\n\nfunction createPrimitiveGeometryHash(primitiveInfo) {\n const attributes = primitiveInfo.attributes;\n if (!attributes) {\n return \"empty\";\n }\n const mode = primitiveInfo.mode;\n const material = primitiveInfo.material;\n const indices = primitiveInfo.indices;\n const positions = primitiveInfo.attributes.POSITION;\n const normals = primitiveInfo.attributes.NORMAL;\n const colors = primitiveInfo.attributes.COLOR_0;\n const uv = primitiveInfo.attributes.TEXCOORD_0;\n return [\n mode,\n // material,\n (indices !== null && indices !== undefined) ? indices : \"-\",\n (positions !== null && positions !== undefined) ? positions : \"-\",\n (normals !== null && normals !== undefined) ? normals : \"-\",\n (colors !== null && colors !== undefined) ? colors : \"-\",\n (uv !== null && uv !== undefined) ? uv : \"-\"\n ].join(\";\");\n}\n\nfunction parsePrimitiveGeometry(ctx, primitiveInfo, geometryArrays) {\n const attributes = primitiveInfo.attributes;\n if (!attributes) {\n return;\n }\n switch (primitiveInfo.mode) {\n case 0: // POINTS\n geometryArrays.primitive = \"points\";\n break;\n case 1: // LINES\n geometryArrays.primitive = \"lines\";\n break;\n case 2: // LINE_LOOP\n // TODO: convert\n geometryArrays.primitive = \"lines\";\n break;\n case 3: // LINE_STRIP\n // TODO: convert\n geometryArrays.primitive = \"lines\";\n break;\n case 4: // TRIANGLES\n geometryArrays.primitive = \"triangles\";\n break;\n case 5: // TRIANGLE_STRIP\n // TODO: convert\n console.log(\"TRIANGLE_STRIP\");\n geometryArrays.primitive = \"triangles\";\n break;\n case 6: // TRIANGLE_FAN\n // TODO: convert\n console.log(\"TRIANGLE_FAN\");\n geometryArrays.primitive = \"triangles\";\n break;\n default:\n geometryArrays.primitive = \"triangles\";\n }\n const accessors = ctx.gltf.accessors;\n const indicesIndex = primitiveInfo.indices;\n if (indicesIndex !== null && indicesIndex !== undefined) {\n const accessorInfo = accessors[indicesIndex];\n geometryArrays.indices = parseAccessorTypedArray(ctx, accessorInfo);\n }\n const positionsIndex = attributes.POSITION;\n if (positionsIndex !== null && positionsIndex !== undefined) {\n const accessorInfo = accessors[positionsIndex];\n geometryArrays.positions = parseAccessorTypedArray(ctx, accessorInfo);\n }\n const normalsIndex = attributes.NORMAL;\n if (normalsIndex !== null && normalsIndex !== undefined) {\n const accessorInfo = accessors[normalsIndex];\n geometryArrays.normals = parseAccessorTypedArray(ctx, accessorInfo);\n }\n const colorsIndex = attributes.COLOR_0;\n if (colorsIndex !== null && colorsIndex !== undefined) {\n const accessorInfo = accessors[colorsIndex];\n geometryArrays.colors = parseAccessorTypedArray(ctx, accessorInfo);\n }\n}\n\nfunction parseAccessorTypedArray(ctx, accessorInfo) {\n const bufferView = ctx.gltf.bufferViews[accessorInfo.bufferView];\n const itemSize = WEBGL_TYPE_SIZES[accessorInfo.type];\n const TypedArray = WEBGL_COMPONENT_TYPES[accessorInfo.componentType];\n const elementBytes = TypedArray.BYTES_PER_ELEMENT; // For VEC3: itemSize is 3, elementBytes is 4, itemBytes is 12.\n const itemBytes = elementBytes * itemSize;\n if (accessorInfo.byteStride && accessorInfo.byteStride !== itemBytes) { // The buffer is not interleaved if the stride is the item size in bytes.\n throw new Error(\"interleaved buffer!\"); // TODO\n } else {\n return new TypedArray(bufferView._buffer, accessorInfo.byteOffset || 0, accessorInfo.count * itemSize);\n }\n}\n\nexport {parseGLTFJSONIntoXKTModel};\n","/**\n * @desc Parses IFC STEP file data into an {@link XKTModel}.\n *\n * This function uses [web-ifc](https://github.com/tomvandig/web-ifc) to parse the IFC, which relies on a\n * WASM file to do the parsing.\n *\n * Depending on how we use this function, we may need to provide it with a path to the directory where that WASM file is stored.\n *\n * This function is tested with web-ifc version 0.0.34.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then load an IFC model into it.\n *\n * ````javascript\n * import {XKTModel, parseIFCIntoXKTModel, writeXKTModelToArrayBuffer} from \"xeokit-convert.es.js\";\n *\n * import * as WebIFC from \"web-ifc-api.js\";\n *\n * utils.loadArraybuffer(\"rac_advanced_sample_project.ifc\", async (data) => {\n *\n * const xktModel = new XKTModel();\n *\n * parseIFCIntoXKTModel({\n * WebIFC,\n * data,\n * xktModel,\n * wasmPath: \"../dist/\",\n * autoNormals: true,\n * log: (msg) => { console.log(msg); }\n * }).then(()=>{\n * xktModel.finalize();\n * },\n * (msg) => {\n * console.error(msg);\n * });\n * });\n * ````\n *\n * @param {Object} params Parsing params.\n * @param {Object} params.WebIFC The WebIFC library. We pass this in as an external dependency, in order to give the\n * caller the choice of whether to use the Browser or NodeJS version.\n * @param {ArrayBuffer} [params.data] IFC file data.\n * @param {XKTModel} [params.xktModel] XKTModel to parse into.\n * @param {Boolean} [params.autoNormals=true] When true, the parser will ignore the IFC geometry normals, and the IFC\n * data will rely on the xeokit ````Viewer```` to automatically generate them. This has the limitation that the\n * normals will be face-aligned, and therefore the ````Viewer```` will only be able to render a flat-shaded representation\n * of the IFC model. This is ````true```` by default, because IFC models tend to look acceptable with flat-shading,\n * and we always want to minimize IFC model size wherever possible.\n * @param {String[]} [params.includeTypes] Option to only convert objects of these types.\n * @param {String[]} [params.excludeTypes] Option to never convert objects of these types.\n * @param {String} params.wasmPath Path to ````web-ifc.wasm````, required by this function.\n * @param {Object} [params.stats={}] Collects statistics.\n * @param {function} [params.log] Logging callback.\n * @returns {Promise} Resolves when IFC has been parsed.\n */\nfunction parseIFCIntoXKTModel({\n WebIFC,\n data,\n xktModel,\n autoNormals = true,\n includeTypes,\n excludeTypes,\n wasmPath,\n stats = {},\n log\n }) {\n\n if (log) {\n log(\"Using parser: parseIFCIntoXKTModel\");\n }\n\n return new Promise(function (resolve, reject) {\n\n if (!data) {\n reject(\"Argument expected: data\");\n return;\n }\n\n if (!xktModel) {\n reject(\"Argument expected: xktModel\");\n return;\n }\n\n if (!wasmPath) {\n reject(\"Argument expected: wasmPath\");\n return;\n }\n\n const ifcAPI = new WebIFC.IfcAPI();\n\n if (wasmPath) {\n ifcAPI.SetWasmPath(wasmPath);\n }\n\n ifcAPI.Init().then(() => {\n\n const dataArray = new Uint8Array(data);\n\n const modelID = ifcAPI.OpenModel(dataArray);\n\n stats.sourceFormat = \"IFC\";\n stats.schemaVersion = \"\";\n stats.title = \"\";\n stats.author = \"\";\n stats.created = \"\";\n stats.numMetaObjects = 0;\n stats.numPropertySets = 0;\n stats.numObjects = 0;\n stats.numGeometries = 0;\n stats.numTriangles = 0;\n stats.numVertices = 0;\n\n const ctx = {\n WebIFC,\n modelID,\n ifcAPI,\n xktModel,\n autoNormals,\n log: (log || function (msg) {\n }),\n nextId: 0,\n stats\n };\n\n if (includeTypes) {\n ctx.includeTypes = {};\n for (let i = 0, len = includeTypes.length; i < len; i++) {\n ctx.includeTypes[includeTypes[i]] = true;\n }\n }\n\n if (excludeTypes) {\n ctx.excludeTypes = {};\n for (let i = 0, len = excludeTypes.length; i < len; i++) {\n ctx.excludeTypes[excludeTypes[i]] = true;\n }\n }\n\n const lines = ctx.ifcAPI.GetLineIDsWithType(modelID, WebIFC.IFCPROJECT);\n const ifcProjectId = lines.get(0);\n const ifcProject = ctx.ifcAPI.GetLine(modelID, ifcProjectId);\n\n ctx.xktModel.schema = \"\";\n ctx.xktModel.modelId = \"\" + modelID;\n ctx.xktModel.projectId = \"\" + ifcProjectId;\n\n parseMetadata(ctx);\n parseGeometry(ctx);\n parsePropertySets(ctx);\n\n resolve();\n\n }).catch((e) => {\n\n reject(e);\n })\n });\n}\n\nfunction parsePropertySets(ctx) {\n\n const lines = ctx.ifcAPI.GetLineIDsWithType(ctx.modelID, ctx.WebIFC.IFCRELDEFINESBYPROPERTIES);\n\n for (let i = 0; i < lines.size(); i++) {\n\n let relID = lines.get(i);\n\n let rel = ctx.ifcAPI.GetLine(ctx.modelID, relID, true);\n\n if (rel) {\n\n const relatingPropertyDefinition = rel.RelatingPropertyDefinition;\n if (!relatingPropertyDefinition) {\n continue;\n }\n\n const propertySetId = relatingPropertyDefinition.GlobalId.value;\n\n const relatedObjects = rel.RelatedObjects;\n if (relatedObjects) {\n for (let i = 0, len = relatedObjects.length; i < len; i++) {\n const relatedObject = relatedObjects[i];\n const metaObjectId = relatedObject.GlobalId.value;\n const metaObject = ctx.xktModel.metaObjects[metaObjectId];\n if (metaObject) {\n if (!metaObject.propertySetIds) {\n metaObject.propertySetIds = [];\n }\n metaObject.propertySetIds.push(propertySetId);\n }\n }\n }\n\n const props = relatingPropertyDefinition.HasProperties;\n if (props && props.length > 0) {\n const propertySetType = \"Default\";\n const propertySetName = relatingPropertyDefinition.Name.value;\n const properties = [];\n for (let i = 0, len = props.length; i < len; i++) {\n const prop = props[i];\n const name = prop.Name;\n const nominalValue = prop.NominalValue;\n if (name && nominalValue) {\n const property = {\n name: name.value,\n type: nominalValue.type,\n value: nominalValue.value,\n valueType: nominalValue.valueType\n };\n if (prop.Description) {\n property.description = prop.Description.value;\n } else if (nominalValue.description) {\n property.description = nominalValue.description;\n }\n properties.push(property);\n }\n }\n ctx.xktModel.createPropertySet({propertySetId, propertySetType, propertySetName, properties});\n ctx.stats.numPropertySets++;\n }\n }\n }\n}\n\nfunction parseMetadata(ctx) {\n\n const lines = ctx.ifcAPI.GetLineIDsWithType(ctx.modelID, ctx.WebIFC.IFCPROJECT);\n const ifcProjectId = lines.get(0);\n const ifcProject = ctx.ifcAPI.GetLine(ctx.modelID, ifcProjectId);\n\n parseSpatialChildren(ctx, ifcProject);\n}\n\nfunction parseSpatialChildren(ctx, ifcElement, parentMetaObjectId) {\n\n const metaObjectType = ifcElement.__proto__.constructor.name;\n\n if (ctx.includeTypes && (!ctx.includeTypes[metaObjectType])) {\n return;\n }\n\n if (ctx.excludeTypes && ctx.excludeTypes[metaObjectType]) {\n return;\n }\n\n createMetaObject(ctx, ifcElement, parentMetaObjectId);\n\n const metaObjectId = ifcElement.GlobalId.value;\n\n parseRelatedItemsOfType(\n ctx,\n ifcElement.expressID,\n 'RelatingObject',\n 'RelatedObjects',\n ctx.WebIFC.IFCRELAGGREGATES,\n metaObjectId);\n\n parseRelatedItemsOfType(\n ctx,\n ifcElement.expressID,\n 'RelatingStructure',\n 'RelatedElements',\n ctx.WebIFC.IFCRELCONTAINEDINSPATIALSTRUCTURE,\n metaObjectId);\n}\n\nfunction createMetaObject(ctx, ifcElement, parentMetaObjectId) {\n\n const metaObjectId = ifcElement.GlobalId.value;\n const propertySetIds = null;\n const metaObjectType = ifcElement.__proto__.constructor.name;\n const metaObjectName = (ifcElement.Name && ifcElement.Name.value !== \"\") ? ifcElement.Name.value : metaObjectType;\n\n ctx.xktModel.createMetaObject({metaObjectId, propertySetIds, metaObjectType, metaObjectName, parentMetaObjectId});\n ctx.stats.numMetaObjects++;\n}\n\nfunction parseRelatedItemsOfType(ctx, id, relation, related, type, parentMetaObjectId) {\n\n const lines = ctx.ifcAPI.GetLineIDsWithType(ctx.modelID, type);\n\n for (let i = 0; i < lines.size(); i++) {\n\n const relID = lines.get(i);\n const rel = ctx.ifcAPI.GetLine(ctx.modelID, relID);\n const relatedItems = rel[relation];\n\n let foundElement = false;\n\n if (Array.isArray(relatedItems)) {\n const values = relatedItems.map((item) => item.value);\n foundElement = values.includes(id);\n\n } else {\n foundElement = (relatedItems.value === id);\n }\n\n if (foundElement) {\n\n const element = rel[related];\n\n if (!Array.isArray(element)) {\n\n const ifcElement = ctx.ifcAPI.GetLine(ctx.modelID, element.value);\n\n parseSpatialChildren(ctx, ifcElement, parentMetaObjectId);\n\n } else {\n\n element.forEach((element2) => {\n\n const ifcElement = ctx.ifcAPI.GetLine(ctx.modelID, element2.value);\n\n parseSpatialChildren(ctx, ifcElement, parentMetaObjectId);\n });\n }\n }\n }\n}\n\nfunction parseGeometry(ctx) {\n\n // Parses the geometry and materials in the IFC, creates\n // XKTEntity, XKTMesh and XKTGeometry components within the XKTModel.\n\n const flatMeshes = ctx.ifcAPI.LoadAllGeometry(ctx.modelID);\n\n for (let i = 0, len = flatMeshes.size(); i < len; i++) {\n const flatMesh = flatMeshes.get(i);\n createObject(ctx, flatMesh);\n }\n\n // LoadAllGeometry does not return IFCSpace meshes\n // here is a workaround\n\n const lines = ctx.ifcAPI.GetLineIDsWithType(ctx.modelID, ctx.WebIFC.IFCSPACE);\n for (let j = 0, len = lines.size(); j < len; j++) {\n const ifcSpaceId = lines.get(j);\n const flatMesh = ctx.ifcAPI.GetFlatMesh(ctx.modelID, ifcSpaceId);\n createObject(ctx, flatMesh);\n }\n}\n\nfunction createObject(ctx, flatMesh) {\n\n const flatMeshExpressID = flatMesh.expressID;\n const placedGeometries = flatMesh.geometries;\n\n const meshIds = [];\n\n const properties = ctx.ifcAPI.GetLine(ctx.modelID, flatMeshExpressID);\n const entityId = properties.GlobalId.value;\n\n const metaObjectId = entityId;\n const metaObject = ctx.xktModel.metaObjects[metaObjectId];\n\n if (ctx.includeTypes && (!metaObject || (!ctx.includeTypes[metaObject.metaObjectType]))) {\n return;\n }\n\n if (ctx.excludeTypes && (!metaObject || ctx.excludeTypes[metaObject.metaObjectType])) {\n console.log(\"excluding: \" + metaObjectId)\n return;\n }\n\n for (let j = 0, lenj = placedGeometries.size(); j < lenj; j++) {\n\n const placedGeometry = placedGeometries.get(j);\n const geometryId = \"\" + placedGeometry.geometryExpressID;\n\n if (!ctx.xktModel.geometries[geometryId]) {\n\n const geometry = ctx.ifcAPI.GetGeometry(ctx.modelID, placedGeometry.geometryExpressID);\n const vertexData = ctx.ifcAPI.GetVertexArray(geometry.GetVertexData(), geometry.GetVertexDataSize());\n const indices = ctx.ifcAPI.GetIndexArray(geometry.GetIndexData(), geometry.GetIndexDataSize());\n\n // De-interleave vertex arrays\n\n const positions = [];\n const normals = [];\n\n for (let k = 0, lenk = vertexData.length / 6; k < lenk; k++) {\n positions.push(vertexData[k * 6 + 0]);\n positions.push(vertexData[k * 6 + 1]);\n positions.push(vertexData[k * 6 + 2]);\n }\n\n if (!ctx.autoNormals) {\n for (let k = 0, lenk = vertexData.length / 6; k < lenk; k++) {\n normals.push(vertexData[k * 6 + 3]);\n normals.push(vertexData[k * 6 + 4]);\n normals.push(vertexData[k * 6 + 5]);\n }\n }\n\n ctx.xktModel.createGeometry({\n geometryId: geometryId,\n primitiveType: \"triangles\",\n positions: positions,\n normals: ctx.autoNormals ? null : normals,\n indices: indices\n });\n\n ctx.stats.numGeometries++;\n ctx.stats.numVertices += (positions.length / 3);\n ctx.stats.numTriangles += (indices.length / 3);\n }\n\n const meshId = (\"mesh\" + ctx.nextId++);\n\n ctx.xktModel.createMesh({\n meshId: meshId,\n geometryId: geometryId,\n matrix: placedGeometry.flatTransformation,\n color: [placedGeometry.color.x, placedGeometry.color.y, placedGeometry.color.z],\n opacity: placedGeometry.color.w\n });\n\n meshIds.push(meshId);\n }\n\n if (meshIds.length > 0) {\n ctx.xktModel.createEntity({\n entityId: entityId,\n meshIds: meshIds\n });\n ctx.stats.numObjects++;\n }\n}\n\nexport {parseIFCIntoXKTModel};\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@loaders.gl/las\");","import {parse} from '@loaders.gl/core';\nimport {LASLoader} from '@loaders.gl/las';\n\nimport {math} from \"../lib/math.js\";\n\nconst MAX_VERTICES = 500000; // TODO: Rough estimate\n\n/**\n * @desc Parses LAS and LAZ point cloud data into an {@link XKTModel}.\n *\n * This parser handles both the LASER file format (LAS) and its compressed version (LAZ),\n * a public format for the interchange of 3-dimensional point cloud data data, developed\n * for LIDAR mapping purposes.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then load an LAZ point cloud model into it.\n *\n * ````javascript\n * utils.loadArraybuffer(\"./models/laz/autzen.laz\", async (data) => {\n *\n * const xktModel = new XKTModel();\n *\n * await parseLASIntoXKTModel({\n * data,\n * xktModel,\n * rotateX: true,\n * log: (msg) => { console.log(msg); }\n * }).then(()=>{\n * xktModel.finalize();\n * },\n * (msg) => {\n * console.error(msg);\n * });\n * });\n * ````\n *\n * @param {Object} params Parsing params.\n * @param {ArrayBuffer} params.data LAS/LAZ file data.\n * @param {XKTModel} params.xktModel XKTModel to parse into.\n * @param {boolean} [params.center=false] Set true to center the LAS point positions to [0,0,0]. This is applied before the transformation matrix, if specified.\n * @param {Boolean} [params.transform] 4x4 transformation matrix to transform point positions. Use this to rotate, translate and scale them if neccessary.\n * @param {Number|String} [params.colorDepth=8] Whether colors encoded using 8 or 16 bits. Can be set to 'auto'. LAS specification recommends 16 bits.\n * @param {Boolean} [params.fp64=false] Configures if LASLoaderPlugin assumes that LAS positions are stored in 64-bit floats instead of 32-bit.\n * @param {Number} [params.skip=1] Read one from every n points.\n * @param {Object} [params.stats] Collects statistics.\n * @param {function} [params.log] Logging callback.\n * @returns {Promise} Resolves when LAS has been parsed.\n */\nfunction parseLASIntoXKTModel({\n data,\n xktModel,\n center = false,\n transform = null,\n colorDepth = \"auto\",\n fp64 = false,\n skip = 1,\n stats,\n log = () => {\n }\n }) {\n\n if (log) {\n log(\"Using parser: parseLASIntoXKTModel\");\n }\n\n return new Promise(function (resolve, reject) {\n\n if (!data) {\n reject(\"Argument expected: data\");\n return;\n }\n\n if (!xktModel) {\n reject(\"Argument expected: xktModel\");\n return;\n }\n\n log(\"Converting LAZ/LAS\");\n\n log(`center: ${center}`);\n if (transform) {\n log(`transform: [${transform}]`);\n }\n log(`colorDepth: ${colorDepth}`);\n log(`fp64: ${fp64}`);\n log(`skip: ${skip}`);\n\n parse(data, LASLoader, {\n las: {\n colorDepth,\n fp64\n }\n }).then((parsedData) => {\n\n const attributes = parsedData.attributes;\n\n const loaderData = parsedData.loaderData;\n const pointsFormatId = loaderData.pointsFormatId !== undefined ? loaderData.pointsFormatId : -1;\n\n if (!attributes.POSITION) {\n log(\"No positions found in file (expected for all LAS point formats)\");\n return;\n }\n\n let readAttributes = {};\n\n switch (pointsFormatId) {\n case 0:\n if (!attributes.intensity) {\n log(\"No intensities found in file (expected for LAS point format 0)\");\n return;\n }\n\n readAttributes = readIntensities(attributes.POSITION, attributes.intensity);\n break;\n case 1:\n if (!attributes.intensity) {\n log(\"No intensities found in file (expected for LAS point format 1)\");\n return;\n }\n readAttributes = readIntensities(attributes.POSITION, attributes.intensity);\n break;\n case 2:\n if (!attributes.intensity) {\n log(\"No intensities found in file (expected for LAS point format 2)\");\n return;\n }\n\n readAttributes = readColorsAndIntensities(attributes.POSITION, attributes.COLOR_0, attributes.intensity);\n break;\n case 3:\n if (!attributes.intensity) {\n log(\"No intensities found in file (expected for LAS point format 3)\");\n return;\n }\n readAttributes = readColorsAndIntensities(attributes.POSITION, attributes.COLOR_0, attributes.intensity);\n break;\n }\n\n const pointsChunks = chunkArray(readPositions(readAttributes.positions), MAX_VERTICES * 3);\n const colorsChunks = chunkArray(readAttributes.colors, MAX_VERTICES * 4);\n\n const meshIds = [];\n\n for (let j = 0, lenj = pointsChunks.length; j < lenj; j++) {\n\n const geometryId = `geometry-${j}`;\n const meshId = `mesh-${j}`;\n\n meshIds.push(meshId);\n\n xktModel.createGeometry({\n geometryId: geometryId,\n primitiveType: \"points\",\n positions: pointsChunks[j],\n colorsCompressed: colorsChunks[j]\n });\n\n xktModel.createMesh({\n meshId,\n geometryId\n });\n }\n\n const entityId = math.createUUID();\n\n xktModel.createEntity({\n entityId,\n meshIds\n });\n\n const rootMetaObjectId = math.createUUID();\n\n xktModel.createMetaObject({\n metaObjectId: rootMetaObjectId,\n metaObjectType: \"Model\",\n metaObjectName: \"Model\"\n });\n\n xktModel.createMetaObject({\n metaObjectId: entityId,\n metaObjectType: \"PointCloud\",\n metaObjectName: \"PointCloud (LAZ)\",\n parentMetaObjectId: rootMetaObjectId\n });\n\n if (stats) {\n stats.sourceFormat = \"LAS\";\n stats.schemaVersion = \"\";\n stats.title = \"\";\n stats.author = \"\";\n stats.created = \"\";\n stats.numMetaObjects = 2;\n stats.numPropertySets = 0;\n stats.numObjects = 1;\n stats.numGeometries = 1;\n stats.numVertices = readAttributes.positions.length / 3;\n }\n\n resolve();\n\n }, (errMsg) => {\n reject(errMsg);\n });\n });\n\n function readPositions(positionsValue) {\n if (positionsValue) {\n if (center) {\n const centerPos = math.vec3();\n const numPoints = positionsValue.length;\n for (let i = 0, len = positionsValue.length; i < len; i += 3) {\n centerPos[0] += positionsValue[i + 0];\n centerPos[1] += positionsValue[i + 1];\n centerPos[2] += positionsValue[i + 2];\n }\n centerPos[0] /= numPoints;\n centerPos[1] /= numPoints;\n centerPos[2] /= numPoints;\n for (let i = 0, len = positionsValue.length; i < len; i += 3) {\n positionsValue[i + 0] -= centerPos[0];\n positionsValue[i + 1] -= centerPos[1];\n positionsValue[i + 2] -= centerPos[2];\n }\n }\n if (transform) {\n const mat = math.mat4(transform);\n const pos = math.vec3();\n for (let i = 0, len = positionsValue.length; i < len; i += 3) {\n pos[0] = positionsValue[i + 0];\n pos[1] = positionsValue[i + 1];\n pos[2] = positionsValue[i + 2];\n math.transformPoint3(mat, pos, pos);\n positionsValue[i + 0] = pos[0];\n positionsValue[i + 1] = pos[1];\n positionsValue[i + 2] = pos[2];\n }\n }\n }\n return positionsValue;\n }\n\n function readColorsAndIntensities(attributesPosition, attributesColor, attributesIntensity) {\n const positionsValue = attributesPosition.value;\n const colors = attributesColor.value;\n const colorSize = attributesColor.size;\n const intensities = attributesIntensity.value;\n const colorsCompressedSize = intensities.length * 4;\n const positions = [];\n const colorsCompressed = new Uint8Array(colorsCompressedSize / skip);\n let count = skip;\n for (let i = 0, j = 0, k = 0, l = 0, m = 0, n=0,len = intensities.length; i < len; i++, k += colorSize, j += 4, l += 3) {\n if (count <= 0) {\n colorsCompressed[m++] = colors[k + 0];\n colorsCompressed[m++] = colors[k + 1];\n colorsCompressed[m++] = colors[k + 2];\n colorsCompressed[m++] = Math.round((intensities[i] / 65536) * 255);\n positions[n++] = positionsValue[l + 0];\n positions[n++] = positionsValue[l + 1];\n positions[n++] = positionsValue[l + 2];\n count = skip;\n } else {\n count--;\n }\n }\n return {\n positions,\n colors: colorsCompressed\n };\n }\n\n function readIntensities(attributesPosition, attributesIntensity) {\n const positionsValue = attributesPosition.value;\n const intensities = attributesIntensity.intensity;\n const colorsCompressedSize = intensities.length * 4;\n const positions = [];\n const colorsCompressed = new Uint8Array(colorsCompressedSize / skip);\n let count = skip;\n for (let i = 0, j = 0, k = 0, l = 0, m = 0, n = 0, len = intensities.length; i < len; i++, k += 3, j += 4, l += 3) {\n if (count <= 0) {\n colorsCompressed[m++] = 0;\n colorsCompressed[m++] = 0;\n colorsCompressed[m++] = 0;\n colorsCompressed[m++] = Math.round((intensities[i] / 65536) * 255);\n positions[n++] = positionsValue[l + 0];\n positions[n++] = positionsValue[l + 1];\n positions[n++] = positionsValue[l + 2];\n count = skip;\n } else {\n count--;\n }\n }\n return {\n positions,\n colors: colorsCompressed\n };\n }\n\n function chunkArray(array, chunkSize) {\n if (chunkSize >= array.length) {\n return [array]; // One chunk\n }\n let result = [];\n for (let i = 0; i < array.length; i += chunkSize) {\n result.push(array.slice(i, i + chunkSize));\n }\n return result;\n }\n\n}\n\nexport {parseLASIntoXKTModel};","/**\n * @desc Parses JSON metamodel into an {@link XKTModel}.\n *\n * @param {Object} params Parsing parameters.\n * @param {JSON} params.metaModelData Metamodel data.\n * @param {String[]} [params.excludeTypes] Types to exclude from parsing.\n * @param {String[]} [params.includeTypes] Types to include in parsing.\n * @param {XKTModel} params.xktModel XKTModel to parse into.\n * @param {function} [params.log] Logging callback.\n @returns {Promise} Resolves when JSON has been parsed.\n */\nfunction parseMetaModelIntoXKTModel({metaModelData, xktModel, includeTypes, excludeTypes, log}) {\n\n if (log) {\n log(\"Using parser: parseMetaModelIntoXKTModel\");\n }\n\n return new Promise(function (resolve, reject) {\n\n const metaObjects = metaModelData.metaObjects || [];\n const propertySets = metaModelData.propertySets || [];\n\n xktModel.modelId = metaModelData.revisionId || \"\"; // HACK\n xktModel.projectId = metaModelData.projectId || \"\";\n xktModel.revisionId = metaModelData.revisionId || \"\";\n xktModel.author = metaModelData.author || \"\";\n xktModel.createdAt = metaModelData.createdAt || \"\";\n xktModel.creatingApplication = metaModelData.creatingApplication || \"\";\n xktModel.schema = metaModelData.schema || \"\";\n\n for (let i = 0, len = propertySets.length; i < len; i++) {\n\n const propertySet = propertySets[i];\n\n xktModel.createPropertySet({\n propertySetId: propertySet.id,\n propertySetName: propertySet.name,\n propertySetType: propertySet.type,\n properties: propertySet.properties\n });\n }\n\n let includeTypesMap;\n if (includeTypes) {\n includeTypesMap = {};\n for (let i = 0, len = includeTypes.length; i < len; i++) {\n includeTypesMap[includeTypes[i]] = true;\n }\n }\n\n let excludeTypesMap;\n if (excludeTypes) {\n excludeTypesMap = {};\n for (let i = 0, len = excludeTypes.length; i < len; i++) {\n excludeTypesMap[excludeTypes[i]] = true;\n }\n }\n\n const metaObjectsMap = {};\n\n for (let i = 0, len = metaObjects.length; i < len; i++) {\n const newObject = metaObjects[i];\n metaObjectsMap[newObject.id] = newObject;\n }\n\n let countMetaObjects = 0;\n\n for (let i = 0, len = metaObjects.length; i < len; i++) {\n\n const metaObject = metaObjects[i];\n const type = metaObject.type;\n\n if (excludeTypesMap && excludeTypesMap[type]) {\n continue;\n }\n\n if (includeTypesMap && !includeTypesMap[type]) {\n continue;\n }\n\n if (metaObject.parent !== undefined && metaObject.parent !== null) {\n const metaObjectParent = metaObjectsMap[metaObject.parent];\n if (metaObject.type === metaObjectParent.type) { // Don't create redundant sub-objects\n continue\n }\n }\n\n const propertySetIds = [];\n if (metaObject.propertySetIds) {\n for (let j = 0, lenj = metaObject.propertySetIds.length; j < lenj; j++) {\n const propertySetId = metaObject.propertySetIds[j];\n if (propertySetId !== undefined && propertySetId !== null && propertySetId !== \"\") {\n propertySetIds.push(propertySetId);\n }\n }\n }\n if (metaObject.propertySetId !== undefined && metaObject.propertySetId !== null && metaObject.propertySetId !== \"\") {\n propertySetIds.push(metaObject.propertySetId);\n }\n\n xktModel.createMetaObject({\n metaObjectId: metaObject.id,\n metaObjectType: metaObject.type,\n metaObjectName: metaObject.name,\n parentMetaObjectId: metaObject.parent,\n propertySetIds: propertySetIds.length > 0 ? propertySetIds : null\n });\n\n countMetaObjects++;\n }\n\n if (log) {\n log(\"Converted meta objects: \" + countMetaObjects);\n }\n\n resolve();\n });\n}\n\nexport {parseMetaModelIntoXKTModel};\n","/**\n * @desc Parses PCD point cloud data into an {@link XKTModel}.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then load an LAZ point cloud model into it.\n *\n * ````javascript\n * utils.loadArraybuffer(\"\"./models/pcd/ism_test_cat.pcd\"\", async (data) => {\n *\n * const xktModel = new XKTModel();\n *\n * await parsePCDIntoXKTModel({\n * data,\n * xktModel,\n * log: (msg) => { console.log(msg); }\n * }).then(()=>{\n * xktModel.finalize();\n * },\n * (msg) => {\n * console.error(msg);\n * });\n * });\n * ````\n *\n * @param {Object} params Parsing params.\n * @param {ArrayBuffer} params.data PCD file data.\n * @param {Boolean} [params.littleEndian=true] Whether PCD binary data is Little-Endian or Big-Endian.\n * @param {XKTModel} params.xktModel XKTModel to parse into.\n * @param {Object} [params.stats] Collects statistics.\n * @param {function} [params.log] Logging callback.\n @returns {Promise} Resolves when PCD has been parsed.\n */\nfunction parsePCDIntoXKTModel({data, xktModel, littleEndian = true, stats, log}) {\n\n if (log) {\n log(\"Using parser: parsePCDIntoXKTModel\");\n }\n\n return new Promise(function(resolve, reject) {\n\n const textData = decodeText(new Uint8Array(data));\n\n const header = parseHeader(textData);\n\n const positions = [];\n const normals = [];\n const colors = [];\n\n if (header.data === 'ascii') {\n\n const offset = header.offset;\n const data = textData.substr(header.headerLen);\n const lines = data.split('\\n');\n\n for (let i = 0, l = lines.length; i < l; i++) {\n\n if (lines[i] === '') {\n continue;\n }\n\n const line = lines[i].split(' ');\n\n if (offset.x !== undefined) {\n positions.push(parseFloat(line[offset.x]));\n positions.push(parseFloat(line[offset.y]));\n positions.push(parseFloat(line[offset.z]));\n }\n\n if (offset.rgb !== undefined) {\n const rgb = parseFloat(line[offset.rgb]);\n const r = (rgb >> 16) & 0x0000ff;\n const g = (rgb >> 8) & 0x0000ff;\n const b = (rgb >> 0) & 0x0000ff;\n colors.push(r, g, b, 255);\n } else {\n colors.push(255);\n colors.push(255);\n colors.push(255);\n }\n }\n }\n\n if (header.data === 'binary_compressed') {\n\n const sizes = new Uint32Array(data.slice(header.headerLen, header.headerLen + 8));\n const compressedSize = sizes[0];\n const decompressedSize = sizes[1];\n const decompressed = decompressLZF(new Uint8Array(data, header.headerLen + 8, compressedSize), decompressedSize);\n const dataview = new DataView(decompressed.buffer);\n const offset = header.offset;\n\n for (let i = 0; i < header.points; i++) {\n\n if (offset.x !== undefined) {\n positions.push(dataview.getFloat32((header.points * offset.x) + header.size[0] * i, littleEndian));\n positions.push(dataview.getFloat32((header.points * offset.y) + header.size[1] * i, littleEndian));\n positions.push(dataview.getFloat32((header.points * offset.z) + header.size[2] * i, littleEndian));\n }\n\n if (offset.rgb !== undefined) {\n colors.push(dataview.getUint8((header.points * offset.rgb) + header.size[3] * i + 0));\n colors.push(dataview.getUint8((header.points * offset.rgb) + header.size[3] * i + 1));\n colors.push(dataview.getUint8((header.points * offset.rgb) + header.size[3] * i + 2));\n // colors.push(255);\n } else {\n colors.push(1);\n colors.push(1);\n colors.push(1);\n }\n }\n }\n\n if (header.data === 'binary') {\n\n const dataview = new DataView(data, header.headerLen);\n const offset = header.offset;\n\n for (let i = 0, row = 0; i < header.points; i++, row += header.rowSize) {\n if (offset.x !== undefined) {\n positions.push(dataview.getFloat32(row + offset.x, littleEndian));\n positions.push(dataview.getFloat32(row + offset.y, littleEndian));\n positions.push(dataview.getFloat32(row + offset.z, littleEndian));\n }\n\n if (offset.rgb !== undefined) {\n colors.push(dataview.getUint8(row + offset.rgb + 2));\n colors.push(dataview.getUint8(row + offset.rgb + 1));\n colors.push(dataview.getUint8(row + offset.rgb + 0));\n } else {\n colors.push(255);\n colors.push(255);\n colors.push(255);\n }\n }\n }\n\n xktModel.createGeometry({\n geometryId: \"pointsGeometry\",\n primitiveType: \"points\",\n positions: positions,\n colors: colors && colors.length > 0 ? colors : null\n });\n\n xktModel.createMesh({\n meshId: \"pointsMesh\",\n geometryId: \"pointsGeometry\"\n });\n\n xktModel.createEntity({\n entityId: \"geometries\",\n meshIds: [\"pointsMesh\"]\n });\n\n if (log) {\n log(\"Converted drawable objects: 1\");\n log(\"Converted geometries: 1\");\n log(\"Converted vertices: \" + positions.length / 3);\n }\n\n if (stats) {\n stats.sourceFormat = \"PCD\";\n stats.schemaVersion = \"\";\n stats.title = \"\";\n stats.author = \"\";\n stats.created = \"\";\n stats.numObjects = 1;\n stats.numGeometries = 1;\n stats.numVertices = positions.length / 3;\n }\n\n resolve();\n });\n}\n\nfunction parseHeader(data) {\n const header = {};\n const result1 = data.search(/[\\r\\n]DATA\\s(\\S*)\\s/i);\n const result2 = /[\\r\\n]DATA\\s(\\S*)\\s/i.exec(data.substr(result1 - 1));\n header.data = result2[1];\n header.headerLen = result2[0].length + result1;\n header.str = data.substr(0, header.headerLen);\n header.str = header.str.replace(/\\#.*/gi, ''); // Strip comments\n header.version = /VERSION (.*)/i.exec(header.str); // Parse\n header.fields = /FIELDS (.*)/i.exec(header.str);\n header.size = /SIZE (.*)/i.exec(header.str);\n header.type = /TYPE (.*)/i.exec(header.str);\n header.count = /COUNT (.*)/i.exec(header.str);\n header.width = /WIDTH (.*)/i.exec(header.str);\n header.height = /HEIGHT (.*)/i.exec(header.str);\n header.viewpoint = /VIEWPOINT (.*)/i.exec(header.str);\n header.points = /POINTS (.*)/i.exec(header.str);\n if (header.version !== null) {\n header.version = parseFloat(header.version[1]);\n }\n if (header.fields !== null) {\n header.fields = header.fields[1].split(' ');\n }\n if (header.type !== null) {\n header.type = header.type[1].split(' ');\n }\n if (header.width !== null) {\n header.width = parseInt(header.width[1]);\n }\n if (header.height !== null) {\n header.height = parseInt(header.height[1]);\n }\n if (header.viewpoint !== null) {\n header.viewpoint = header.viewpoint[1];\n }\n if (header.points !== null) {\n header.points = parseInt(header.points[1], 10);\n }\n if (header.points === null) {\n header.points = header.width * header.height;\n }\n if (header.size !== null) {\n header.size = header.size[1].split(' ').map(function (x) {\n return parseInt(x, 10);\n });\n }\n if (header.count !== null) {\n header.count = header.count[1].split(' ').map(function (x) {\n return parseInt(x, 10);\n });\n } else {\n header.count = [];\n for (let i = 0, l = header.fields.length; i < l; i++) {\n header.count.push(1);\n }\n }\n header.offset = {};\n let sizeSum = 0;\n for (let i = 0, l = header.fields.length; i < l; i++) {\n if (header.data === 'ascii') {\n header.offset[header.fields[i]] = i;\n } else {\n header.offset[header.fields[i]] = sizeSum;\n sizeSum += header.size[i] * header.count[i];\n }\n }\n header.rowSize = sizeSum; // For binary only\n return header;\n}\n\nfunction decodeText(array) {\n if (typeof TextDecoder !== 'undefined') {\n return new TextDecoder().decode(array);\n }\n let s = '';\n for (let i = 0, il = array.length; i < il; i++) {\n s += String.fromCharCode(array[i]);\n }\n try {\n return decodeURIComponent(escape(s));\n } catch (e) {\n return s;\n }\n}\n\nfunction decompressLZF(inData, outLength) { // https://gitlab.com/taketwo/three-pcd-loader/blob/master/decompress-lzf.js\n const inLength = inData.length;\n const outData = new Uint8Array(outLength);\n let inPtr = 0;\n let outPtr = 0;\n let ctrl;\n let len;\n let ref;\n do {\n ctrl = inData[inPtr++];\n if (ctrl < (1 << 5)) {\n ctrl++;\n if (outPtr + ctrl > outLength) throw new Error('Output buffer is not large enough');\n if (inPtr + ctrl > inLength) throw new Error('Invalid compressed data');\n do {\n outData[outPtr++] = inData[inPtr++];\n } while (--ctrl);\n } else {\n len = ctrl >> 5;\n ref = outPtr - ((ctrl & 0x1f) << 8) - 1;\n if (inPtr >= inLength) throw new Error('Invalid compressed data');\n if (len === 7) {\n len += inData[inPtr++];\n if (inPtr >= inLength) throw new Error('Invalid compressed data');\n }\n ref -= inData[inPtr++];\n if (outPtr + len + 2 > outLength) throw new Error('Output buffer is not large enough');\n if (ref < 0) throw new Error('Invalid compressed data');\n if (ref >= outPtr) throw new Error('Invalid compressed data');\n do {\n outData[outPtr++] = outData[ref++];\n } while (--len + 2);\n }\n } while (inPtr < inLength);\n return outData;\n}\n\nexport {parsePCDIntoXKTModel};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@loaders.gl/ply\");","import {parse} from '@loaders.gl/core';\nimport {PLYLoader} from '@loaders.gl/ply';\n\n/**\n * @desc Parses PLY file data into an {@link XKTModel}.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then load a PLY model into it.\n *\n * ````javascript\n * utils.loadArraybuffer(\"./models/ply/test.ply\", async (data) => {\n *\n * const xktModel = new XKTModel();\n *\n * parsePLYIntoXKTModel({data, xktModel}).then(()=>{\n * xktModel.finalize();\n * },\n * (msg) => {\n * console.error(msg);\n * });\n * });\n * ````\n *\n * @param {Object} params Parsing params.\n * @param {ArrayBuffer} params.data PLY file data.\n * @param {XKTModel} params.xktModel XKTModel to parse into.\n * @param {Object} [params.stats] Collects statistics.\n * @param {function} [params.log] Logging callback.\n @returns {Promise} Resolves when PLY has been parsed.\n */\nasync function parsePLYIntoXKTModel({data, xktModel, stats, log}) {\n\n if (log) {\n log(\"Using parser: parsePLYIntoXKTModel\");\n }\n\n if (!data) {\n throw \"Argument expected: data\";\n }\n\n if (!xktModel) {\n throw \"Argument expected: xktModel\";\n }\n\n let parsedData;\n try {\n parsedData = await parse(data, PLYLoader);\n } catch (e) {\n if (log) {\n log(\"Error: \" + e);\n }\n return;\n }\n\n const attributes = parsedData.attributes;\n const hasColors = !!attributes.COLOR_0;\n\n if (hasColors) {\n const colorsValue = hasColors ? attributes.COLOR_0.value : null;\n const colorsCompressed = [];\n for (let i = 0, len = colorsValue.length; i < len; i += 4) {\n colorsCompressed.push(colorsValue[i]);\n colorsCompressed.push(colorsValue[i + 1]);\n colorsCompressed.push(colorsValue[i + 2]);\n }\n xktModel.createGeometry({\n geometryId: \"plyGeometry\",\n primitiveType: \"triangles\",\n positions: attributes.POSITION.value,\n indices: parsedData.indices ? parsedData.indices.value : [],\n colorsCompressed: colorsCompressed\n });\n } else {\n xktModel.createGeometry({\n geometryId: \"plyGeometry\",\n primitiveType: \"triangles\",\n positions: attributes.POSITION.value,\n indices: parsedData.indices ? parsedData.indices.value : []\n });\n }\n\n xktModel.createMesh({\n meshId: \"plyMesh\",\n geometryId: \"plyGeometry\",\n color: (!hasColors) ? [1, 1, 1] : null\n });\n\n xktModel.createEntity({\n entityId: \"ply\",\n meshIds: [\"plyMesh\"]\n });\n\n if (stats) {\n stats.sourceFormat = \"PLY\";\n stats.schemaVersion = \"\";\n stats.title = \"\";\n stats.author = \"\";\n stats.created = \"\";\n stats.numMetaObjects = 2;\n stats.numPropertySets = 0;\n stats.numObjects = 1;\n stats.numGeometries = 1;\n stats.numVertices = attributes.POSITION.value.length / 3;\n }\n}\n\nexport {parsePLYIntoXKTModel};\n","import {faceToVertexNormals} from \"../lib/faceToVertexNormals.js\";\nimport {math} from \"../lib/math.js\";\n\n/**\n * @desc Parses STL file data into an {@link XKTModel}.\n *\n * * Supports binary and ASCII STL formats.\n * * Option to create a separate {@link XKTEntity} for each group of faces that share the same vertex colors.\n * * Option to smooth face-aligned normals loaded from STL.\n * * Option to reduce XKT file size by ignoring STL normals and relying on xeokit to auto-generate them.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then load an STL model into it.\n *\n * ````javascript\n * utils.loadArraybuffer(\"./models/stl/binary/spurGear.stl\", async (data) => {\n *\n * const xktModel = new XKTModel();\n *\n * parseSTLIntoXKTModel({data, xktModel});\n *\n * xktModel.finalize();\n * });\n * ````\n *\n * @param {Object} params Parsing params.\n * @param {ArrayBuffer|String} [params.data] STL file data. Can be binary or string.\n * @param {Boolean} [params.autoNormals=false] When true, the parser will ignore the STL geometry normals, and the STL\n * data will rely on the xeokit ````Viewer```` to automatically generate them. This has the limitation that the\n * normals will be face-aligned, and therefore the ````Viewer```` will only be able to render a flat-shaded representation\n * of the STL.\n * Overrides ````smoothNormals```` when ````true````. This ignores the normals in the STL, and loads no\n * normals from the STL into the {@link XKTModel}, resulting in the XKT file storing no normals for the STL model. The\n * xeokit-sdk will then automatically generate the normals within its shaders. The disadvantages are that auto-normals\n * may slow rendering down a little bit, and that the normals can only be face-aligned (and thus rendered using flat\n * shading). The advantages, however, are a smaller XKT file size, and the ability to apply certain geometry optimizations\n * during parsing, such as removing duplicated STL vertex positions, that are not possible when normals are loaded\n * for the STL vertices.\n * @param {Boolean} [params.smoothNormals=true] When true, automatically converts face-oriented STL normals to vertex normals, for a smooth appearance. Ignored if ````autoNormals```` is ````true````.\n * @param {Number} [params.smoothNormalsAngleThreshold=20] This is the threshold angle between normals of adjacent triangles, below which their shared wireframe edge is not drawn.\n * @param {Boolean} [params.splitMeshes=true] When true, creates a separate {@link XKTEntity} for each group of faces that share the same vertex colors. Only works with binary STL (ie. when ````data```` is an ArrayBuffer).\n * @param {XKTModel} [params.xktModel] XKTModel to parse into.\n * @param {Object} [params.stats] Collects statistics.\n * @param {function} [params.log] Logging callback.\n @returns {Promise} Resolves when STL has been parsed.\n */\nasync function parseSTLIntoXKTModel({\n data,\n splitMeshes,\n autoNormals,\n smoothNormals,\n smoothNormalsAngleThreshold,\n xktModel,\n stats,\n log\n }) {\n\n if (log) {\n log(\"Using parser: parseSTLIntoXKTModel\");\n }\n\n return new Promise(function (resolve, reject) {\n\n if (!data) {\n reject(\"Argument expected: data\");\n return;\n }\n\n if (!xktModel) {\n reject(\"Argument expected: xktModel\");\n return;\n }\n\n const rootMetaObjectId = math.createUUID();\n\n const rootMetaObject = xktModel.createMetaObject({\n metaObjectId: rootMetaObjectId,\n metaObjectType: \"Model\",\n metaObjectName: \"Model\"\n });\n\n const ctx = {\n data,\n splitMeshes,\n autoNormals,\n smoothNormals,\n smoothNormalsAngleThreshold,\n xktModel,\n rootMetaObject,\n nextId: 0,\n log: (log || function (msg) {\n }),\n stats: {\n numObjects: 0,\n numGeometries: 0,\n numTriangles: 0,\n numVertices: 0\n }\n };\n\n const binData = ensureBinary(data);\n\n if (isBinary(binData)) {\n parseBinary(ctx, binData);\n } else {\n parseASCII(ctx, ensureString(data));\n }\n\n if (stats) {\n stats.sourceFormat = \"STL\";\n stats.schemaVersion = \"\";\n stats.title = \"\";\n stats.author = \"\";\n stats.created = \"\";\n stats.numMetaObjects = 2;\n stats.numPropertySets = 0;\n stats.numObjects = 1;\n stats.numGeometries = 1;\n stats.numTriangles = ctx.stats.numTriangles;\n stats.numVertices = ctx.stats.numVertices;\n }\n\n resolve();\n });\n}\n\nfunction isBinary(data) {\n const reader = new DataView(data);\n const numFaces = reader.getUint32(80, true);\n const faceSize = (32 / 8 * 3) + ((32 / 8 * 3) * 3) + (16 / 8);\n const numExpectedBytes = 80 + (32 / 8) + (numFaces * faceSize);\n if (numExpectedBytes === reader.byteLength) {\n return true;\n }\n const solid = [115, 111, 108, 105, 100];\n for (let i = 0; i < 5; i++) {\n if (solid[i] !== reader.getUint8(i, false)) {\n return true;\n }\n }\n return false;\n}\n\nfunction parseBinary(ctx, data) {\n const reader = new DataView(data);\n const faces = reader.getUint32(80, true);\n let r;\n let g;\n let b;\n let hasColors = false;\n let colors;\n let defaultR;\n let defaultG;\n let defaultB;\n let lastR = null;\n let lastG = null;\n let lastB = null;\n let newMesh = false;\n let alpha;\n for (let index = 0; index < 80 - 10; index++) {\n if ((reader.getUint32(index, false) === 0x434F4C4F /*COLO*/) &&\n (reader.getUint8(index + 4) === 0x52 /*'R'*/) &&\n (reader.getUint8(index + 5) === 0x3D /*'='*/)) {\n hasColors = true;\n colors = [];\n defaultR = reader.getUint8(index + 6) / 255;\n defaultG = reader.getUint8(index + 7) / 255;\n defaultB = reader.getUint8(index + 8) / 255;\n alpha = reader.getUint8(index + 9) / 255;\n }\n }\n let dataOffset = 84;\n let faceLength = 12 * 4 + 2;\n let positions = [];\n let normals = [];\n let splitMeshes = ctx.splitMeshes;\n for (let face = 0; face < faces; face++) {\n let start = dataOffset + face * faceLength;\n let normalX = reader.getFloat32(start, true);\n let normalY = reader.getFloat32(start + 4, true);\n let normalZ = reader.getFloat32(start + 8, true);\n if (hasColors) {\n let packedColor = reader.getUint16(start + 48, true);\n if ((packedColor & 0x8000) === 0) {\n r = (packedColor & 0x1F) / 31;\n g = ((packedColor >> 5) & 0x1F) / 31;\n b = ((packedColor >> 10) & 0x1F) / 31;\n } else {\n r = defaultR;\n g = defaultG;\n b = defaultB;\n }\n if (splitMeshes && r !== lastR || g !== lastG || b !== lastB) {\n if (lastR !== null) {\n newMesh = true;\n }\n lastR = r;\n lastG = g;\n lastB = b;\n }\n }\n for (let i = 1; i <= 3; i++) {\n let vertexstart = start + i * 12;\n positions.push(reader.getFloat32(vertexstart, true));\n positions.push(reader.getFloat32(vertexstart + 4, true));\n positions.push(reader.getFloat32(vertexstart + 8, true));\n if (!ctx.autoNormals) {\n normals.push(normalX, normalY, normalZ);\n }\n if (hasColors) {\n colors.push(r, g, b, 1); // TODO: handle alpha\n }\n }\n if (splitMeshes && newMesh) {\n addMesh(ctx, positions, normals, colors);\n positions = [];\n normals = [];\n colors = colors ? [] : null;\n newMesh = false;\n }\n }\n if (positions.length > 0) {\n addMesh(ctx, positions, normals, colors);\n }\n}\n\nfunction parseASCII(ctx, data) {\n const faceRegex = /facet([\\s\\S]*?)endfacet/g;\n let faceCounter = 0;\n const floatRegex = /[\\s]+([+-]?(?:\\d+.\\d+|\\d+.|\\d+|.\\d+)(?:[eE][+-]?\\d+)?)/.source;\n const vertexRegex = new RegExp('vertex' + floatRegex + floatRegex + floatRegex, 'g');\n const normalRegex = new RegExp('normal' + floatRegex + floatRegex + floatRegex, 'g');\n const positions = [];\n const normals = [];\n const colors = null;\n let normalx;\n let normaly;\n let normalz;\n let result;\n let verticesPerFace;\n let normalsPerFace;\n let text;\n while ((result = faceRegex.exec(data)) !== null) {\n verticesPerFace = 0;\n normalsPerFace = 0;\n text = result[0];\n while ((result = normalRegex.exec(text)) !== null) {\n normalx = parseFloat(result[1]);\n normaly = parseFloat(result[2]);\n normalz = parseFloat(result[3]);\n normalsPerFace++;\n }\n while ((result = vertexRegex.exec(text)) !== null) {\n positions.push(parseFloat(result[1]), parseFloat(result[2]), parseFloat(result[3]));\n normals.push(normalx, normaly, normalz);\n verticesPerFace++;\n }\n if (normalsPerFace !== 1) {\n ctx.log(\"Error in normal of face \" + faceCounter);\n return -1;\n }\n if (verticesPerFace !== 3) {\n ctx.log(\"Error in positions of face \" + faceCounter);\n return -1;\n }\n faceCounter++;\n }\n addMesh(ctx, positions, normals, colors);\n}\n\nlet nextGeometryId = 0;\n\nfunction addMesh(ctx, positions, normals, colors) {\n\n const indices = new Int32Array(positions.length / 3);\n for (let ni = 0, len = indices.length; ni < len; ni++) {\n indices[ni] = ni;\n }\n\n normals = normals && normals.length > 0 ? normals : null;\n colors = colors && colors.length > 0 ? colors : null;\n\n if (!ctx.autoNormals && ctx.smoothNormals) {\n faceToVertexNormals(positions, normals, {smoothNormalsAngleThreshold: ctx.smoothNormalsAngleThreshold});\n }\n\n const geometryId = \"\" + nextGeometryId++;\n const meshId = \"\" + nextGeometryId++;\n const entityId = \"\" + nextGeometryId++;\n\n ctx.xktModel.createGeometry({\n geometryId: geometryId,\n primitiveType: \"triangles\",\n positions: positions,\n normals: (!ctx.autoNormals) ? normals : null,\n colors: colors,\n indices: indices\n });\n\n ctx.xktModel.createMesh({\n meshId: meshId,\n geometryId: geometryId,\n color: colors ? null : [1, 1, 1],\n metallic: 0.9,\n roughness: 0.1\n });\n\n ctx.xktModel.createEntity({\n entityId: entityId,\n meshIds: [meshId]\n });\n\n ctx.xktModel.createMetaObject({\n metaObjectId: entityId,\n metaObjectType: \"Default\",\n metaObjectName: \"STL Mesh\",\n parentMetaObjectId: ctx.rootMetaObject.metaObjectId\n });\n\n ctx.stats.numGeometries++;\n ctx.stats.numObjects++;\n ctx.stats.numVertices += positions.length / 3;\n ctx.stats.numTriangles += indices.length / 3;\n}\n\nfunction ensureString(buffer) {\n if (typeof buffer !== 'string') {\n return decodeText(new Uint8Array(buffer));\n }\n return buffer;\n}\n\nfunction ensureBinary(buffer) {\n if (typeof buffer === 'string') {\n const arrayBuffer = new Uint8Array(buffer.length);\n for (let i = 0; i < buffer.length; i++) {\n arrayBuffer[i] = buffer.charCodeAt(i) & 0xff; // implicitly assumes little-endian\n }\n return arrayBuffer.buffer || arrayBuffer;\n } else {\n return buffer;\n }\n}\n\nfunction decodeText(array) {\n if (typeof TextDecoder !== 'undefined') {\n return new TextDecoder().decode(array);\n }\n let s = '';\n for (let i = 0, il = array.length; i < il; i++) {\n s += String.fromCharCode(array[i]); // Implicitly assumes little-endian.\n }\n return decodeURIComponent(escape(s));\n}\n\nexport {parseSTLIntoXKTModel};\n","import {math} from \"./math.js\";\n\n/**\n * Converts surface-perpendicular face normals to vertex normals. Assumes that the mesh contains disjoint triangles\n * that don't share vertex array elements. Works by finding groups of vertices that have the same location and\n * averaging their normal vectors.\n *\n * @returns {{positions: Array, normals: *}}\n * @private\n */\nfunction faceToVertexNormals(positions, normals, options = {}) {\n const smoothNormalsAngleThreshold = options.smoothNormalsAngleThreshold || 20;\n const vertexMap = {};\n const vertexNormals = [];\n const vertexNormalAccum = {};\n let acc;\n let vx;\n let vy;\n let vz;\n let key;\n const precisionPoints = 4; // number of decimal points, e.g. 4 for epsilon of 0.0001\n const precision = 10 ** precisionPoints;\n let posi;\n let i;\n let j;\n let len;\n let a;\n let b;\n let c;\n\n for (i = 0, len = positions.length; i < len; i += 3) {\n\n posi = i / 3;\n\n vx = positions[i];\n vy = positions[i + 1];\n vz = positions[i + 2];\n\n key = `${Math.round(vx * precision)}_${Math.round(vy * precision)}_${Math.round(vz * precision)}`;\n\n if (vertexMap[key] === undefined) {\n vertexMap[key] = [posi];\n } else {\n vertexMap[key].push(posi);\n }\n\n const normal = math.normalizeVec3([normals[i], normals[i + 1], normals[i + 2]]);\n\n vertexNormals[posi] = normal;\n\n acc = math.vec4([normal[0], normal[1], normal[2], 1]);\n\n vertexNormalAccum[posi] = acc;\n }\n\n for (key in vertexMap) {\n\n if (vertexMap.hasOwnProperty(key)) {\n\n const vertices = vertexMap[key];\n const numVerts = vertices.length;\n\n for (i = 0; i < numVerts; i++) {\n\n const ii = vertices[i];\n\n acc = vertexNormalAccum[ii];\n\n for (j = 0; j < numVerts; j++) {\n\n if (i === j) {\n continue;\n }\n\n const jj = vertices[j];\n\n a = vertexNormals[ii];\n b = vertexNormals[jj];\n\n const angle = Math.abs(math.angleVec3(a, b) / math.DEGTORAD);\n\n if (angle < smoothNormalsAngleThreshold) {\n\n acc[0] += b[0];\n acc[1] += b[1];\n acc[2] += b[2];\n acc[3] += 1.0;\n }\n }\n }\n }\n }\n\n for (i = 0, len = normals.length; i < len; i += 3) {\n\n acc = vertexNormalAccum[i / 3];\n\n normals[i + 0] = acc[0] / acc[3];\n normals[i + 1] = acc[1] / acc[3];\n normals[i + 2] = acc[2] / acc[3];\n\n }\n}\n\nexport {faceToVertexNormals};","/**\n * @desc Creates box-shaped triangle mesh geometry arrays.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then create an {@link XKTMesh} with a box-shaped {@link XKTGeometry}.\n *\n * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#geometry_builders_buildBoxGeometry)]\n *\n * ````javascript\n * const xktModel = new XKTModel();\n *\n * const box = buildBoxGeometry({\n * primitiveType: \"triangles\" // or \"lines\"\n * center: [0,0,0],\n * xSize: 1, // Half-size on each axis\n * ySize: 1,\n * zSize: 1\n * });\n *\n * const xktGeometry = xktModel.createGeometry({\n * geometryId: \"boxGeometry\",\n * primitiveType: box.primitiveType,\n * positions: box.positions,\n * normals: box.normals,\n * indices: box.indices\n * });\n *\n * const xktMesh = xktModel.createMesh({\n * meshId: \"redBoxMesh\",\n * geometryId: \"boxGeometry\",\n * position: [-4, -6, -4],\n * scale: [1, 3, 1],\n * rotation: [0, 0, 0],\n * color: [1, 0, 0],\n * opacity: 1\n * });\n *\n * const xktEntity = xktModel.createEntity({\n * entityId: \"redBox\",\n * meshIds: [\"redBoxMesh\"]\n * });\n *\n * xktModel.finalize();\n * ````\n *\n * @function buildBoxGeometry\n * @param {*} [cfg] Configs\n * @param {Number[]} [cfg.center] 3D point indicating the center position.\n * @param {Number} [cfg.xSize=1.0] Half-size on the X-axis.\n * @param {Number} [cfg.ySize=1.0] Half-size on the Y-axis.\n * @param {Number} [cfg.zSize=1.0] Half-size on the Z-axis.\n * @returns {Object} Geometry arrays for {@link XKTModel#createGeometry} or {@link XKTModel#createMesh}.\n */\nfunction buildBoxGeometry(cfg = {}) {\n\n let xSize = cfg.xSize || 1;\n if (xSize < 0) {\n console.error(\"negative xSize not allowed - will invert\");\n xSize *= -1;\n }\n\n let ySize = cfg.ySize || 1;\n if (ySize < 0) {\n console.error(\"negative ySize not allowed - will invert\");\n ySize *= -1;\n }\n\n let zSize = cfg.zSize || 1;\n if (zSize < 0) {\n console.error(\"negative zSize not allowed - will invert\");\n zSize *= -1;\n }\n\n const center = cfg.center;\n const centerX = center ? center[0] : 0;\n const centerY = center ? center[1] : 0;\n const centerZ = center ? center[2] : 0;\n\n const xmin = -xSize + centerX;\n const ymin = -ySize + centerY;\n const zmin = -zSize + centerZ;\n const xmax = xSize + centerX;\n const ymax = ySize + centerY;\n const zmax = zSize + centerZ;\n\n return {\n\n primitiveType: \"triangles\",\n\n // The vertices - eight for our cube, each\n // one spanning three array elements for X,Y and Z\n\n positions: [\n\n // v0-v1-v2-v3 front\n xmax, ymax, zmax,\n xmin, ymax, zmax,\n xmin, ymin, zmax,\n xmax, ymin, zmax,\n\n // v0-v3-v4-v1 right\n xmax, ymax, zmax,\n xmax, ymin, zmax,\n xmax, ymin, zmin,\n xmax, ymax, zmin,\n\n // v0-v1-v6-v1 top\n xmax, ymax, zmax,\n xmax, ymax, zmin,\n xmin, ymax, zmin,\n xmin, ymax, zmax,\n\n // v1-v6-v7-v2 left\n xmin, ymax, zmax,\n xmin, ymax, zmin,\n xmin, ymin, zmin,\n xmin, ymin, zmax,\n\n // v7-v4-v3-v2 bottom\n xmin, ymin, zmin,\n xmax, ymin, zmin,\n xmax, ymin, zmax,\n xmin, ymin, zmax,\n\n // v4-v7-v6-v1 back\n xmax, ymin, zmin,\n xmin, ymin, zmin,\n xmin, ymax, zmin,\n xmax, ymax, zmin\n ],\n\n // Normal vectors, one for each vertex\n normals: [\n\n // v0-v1-v2-v3 front\n 0, 0, 1,\n 0, 0, 1,\n 0, 0, 1,\n 0, 0, 1,\n\n // v0-v3-v4-v5 right\n 1, 0, 0,\n 1, 0, 0,\n 1, 0, 0,\n 1, 0, 0,\n\n // v0-v5-v6-v1 top\n 0, 1, 0,\n 0, 1, 0,\n 0, 1, 0,\n 0, 1, 0,\n\n // v1-v6-v7-v2 left\n -1, 0, 0,\n -1, 0, 0,\n -1, 0, 0,\n -1, 0, 0,\n\n // v7-v4-v3-v2 bottom\n 0, -1, 0,\n 0, -1, 0,\n 0, -1, 0,\n 0, -1, 0,\n\n // v4-v7-v6-v5 back\n 0, 0, -1,\n 0, 0, -1,\n 0, 0, -1,\n 0, 0, -1\n ],\n\n // UV coords\n uv: [\n\n // v0-v1-v2-v3 front\n 1, 0,\n 0, 0,\n 0, 1,\n 1, 1,\n\n // v0-v3-v4-v1 right\n 0, 0,\n 0, 1,\n 1, 1,\n 1, 0,\n\n // v0-v1-v6-v1 top\n 1, 1,\n 1, 0,\n 0, 0,\n 0, 1,\n\n // v1-v6-v7-v2 left\n 1, 0,\n 0, 0,\n 0, 1,\n 1, 1,\n\n // v7-v4-v3-v2 bottom\n 0, 1,\n 1, 1,\n 1, 0,\n 0, 0,\n\n // v4-v7-v6-v1 back\n 0, 1,\n 1, 1,\n 1, 0,\n 0, 0\n ],\n\n // Indices - these organise the\n // positions and uv texture coordinates\n // into geometric primitives in accordance\n // with the \"primitive\" parameter,\n // in this case a set of three indices\n // for each triangle.\n //\n // Note that each triangle is specified\n // in counter-clockwise winding order.\n //\n // You can specify them in clockwise\n // order if you configure the Modes\n // node's frontFace flag as \"cw\", instead of\n // the default \"ccw\".\n indices: [\n 0, 1, 2,\n 0, 2, 3,\n // front\n 4, 5, 6,\n 4, 6, 7,\n // right\n 8, 9, 10,\n 8, 10, 11,\n // top\n 12, 13, 14,\n 12, 14, 15,\n // left\n 16, 17, 18,\n 16, 18, 19,\n // bottom\n 20, 21, 22,\n 20, 22, 23\n ]\n };\n}\n\nexport {buildBoxGeometry};\n","/**\n * @desc Creates box-shaped line segment geometry arrays.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then create an {@link XKTMesh} with a box-shaped {@link XKTGeometry}.\n *\n * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#geometry_builders_buildBoxLinesGeometry)]\n *\n * ````javascript\n * const xktModel = new XKTModel();\n *\n * const box = buildBoxLinesGeometry({\n * center: [0,0,0],\n * xSize: 1, // Half-size on each axis\n * ySize: 1,\n * zSize: 1\n * });\n *\n * const xktGeometry = xktModel.createGeometry({\n * geometryId: \"boxGeometry\",\n * primitiveType: box.primitiveType, // \"lines\"\n * positions: box.positions,\n * normals: box.normals,\n * indices: box.indices\n * });\n *\n * const xktMesh = xktModel.createMesh({\n * meshId: \"redBoxMesh\",\n * geometryId: \"boxGeometry\",\n * position: [-4, -6, -4],\n * scale: [1, 3, 1],\n * rotation: [0, 0, 0],\n * color: [1, 0, 0],\n * opacity: 1\n * });\n *\n * const xktEntity = xktModel.createEntity({\n * entityId: \"redBox\",\n * meshIds: [\"redBoxMesh\"]\n * });\n *\n * xktModel.finalize();\n * ````\n *\n * @function buildBoxLinesGeometry\n * @param {*} [cfg] Configs\n * @param {Number[]} [cfg.center] 3D point indicating the center position.\n * @param {Number} [cfg.xSize=1.0] Half-size on the X-axis.\n * @param {Number} [cfg.ySize=1.0] Half-size on the Y-axis.\n * @param {Number} [cfg.zSize=1.0] Half-size on the Z-axis.\n * @returns {Object} Geometry arrays for {@link XKTModel#createGeometry} or {@link XKTModel#createMesh}.\n */\nfunction buildBoxLinesGeometry(cfg = {}) {\n\n let xSize = cfg.xSize || 1;\n if (xSize < 0) {\n console.error(\"negative xSize not allowed - will invert\");\n xSize *= -1;\n }\n\n let ySize = cfg.ySize || 1;\n if (ySize < 0) {\n console.error(\"negative ySize not allowed - will invert\");\n ySize *= -1;\n }\n\n let zSize = cfg.zSize || 1;\n if (zSize < 0) {\n console.error(\"negative zSize not allowed - will invert\");\n zSize *= -1;\n }\n\n const center = cfg.center;\n const centerX = center ? center[0] : 0;\n const centerY = center ? center[1] : 0;\n const centerZ = center ? center[2] : 0;\n\n const xmin = -xSize + centerX;\n const ymin = -ySize + centerY;\n const zmin = -zSize + centerZ;\n const xmax = xSize + centerX;\n const ymax = ySize + centerY;\n const zmax = zSize + centerZ;\n\n return {\n primitiveType: \"lines\",\n positions: [\n xmin, ymin, zmin,\n xmin, ymin, zmax,\n xmin, ymax, zmin,\n xmin, ymax, zmax,\n xmax, ymin, zmin,\n xmax, ymin, zmax,\n xmax, ymax, zmin,\n xmax, ymax, zmax\n ],\n indices: [\n 0, 1,\n 1, 3,\n 3, 2,\n 2, 0,\n 4, 5,\n 5, 7,\n 7, 6,\n 6, 4,\n 0, 4,\n 1, 5,\n 2, 6,\n 3, 7\n ]\n }\n}\n\nexport {buildBoxLinesGeometry};\n","/**\n * @desc Creates cylinder-shaped geometry arrays.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then create an {@link XKTMesh} with a cylinder-shaped {@link XKTGeometry}.\n *\n * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#geometry_builders_buildCylinderGeometry)]\n *\n * ````javascript\n * const xktModel = new XKTModel();\n *\n * const cylinder = buildCylinderGeometry({\n * center: [0,0,0],\n * radiusTop: 2.0,\n * radiusBottom: 2.0,\n * height: 5.0,\n * radialSegments: 20,\n * heightSegments: 1,\n * openEnded: false\n * });\n *\n * const xktGeometry = xktModel.createGeometry({\n * geometryId: \"cylinderGeometry\",\n * primitiveType: cylinder.primitiveType,\n * positions: cylinder.positions,\n * normals: cylinder.normals,\n * indices: cylinder.indices\n * });\n *\n * const xktMesh = xktModel.createMesh({\n * meshId: \"redCylinderMesh\",\n * geometryId: \"cylinderGeometry\",\n * position: [-4, -6, -4],\n * scale: [1, 3, 1],\n * rotation: [0, 0, 0],\n * color: [1, 0, 0],\n * opacity: 1\n * });\n *\n * const xktEntity = xktModel.createEntity({\n * entityId: \"redCylinder\",\n * meshIds: [\"redCylinderMesh\"]\n * });\n *\n * xktModel.finalize();\n * ````\n *\n * @function buildCylinderGeometry\n * @param {*} [cfg] Configs\n * @param {Number[]} [cfg.center] 3D point indicating the center position.\n * @param {Number} [cfg.radiusTop=1] Radius of top.\n * @param {Number} [cfg.radiusBottom=1] Radius of bottom.\n * @param {Number} [cfg.height=1] Height.\n * @param {Number} [cfg.radialSegments=60] Number of horizontal segments.\n * @param {Number} [cfg.heightSegments=1] Number of vertical segments.\n * @param {Boolean} [cfg.openEnded=false] Whether or not the cylinder has solid caps on the ends.\n * @returns {Object} Geometry arrays for {@link XKTModel#createGeometry} or {@link XKTModel#createMesh}.\n */\nfunction buildCylinderGeometry(cfg = {}) {\n\n let radiusTop = cfg.radiusTop || 1;\n if (radiusTop < 0) {\n console.error(\"negative radiusTop not allowed - will invert\");\n radiusTop *= -1;\n }\n\n let radiusBottom = cfg.radiusBottom || 1;\n if (radiusBottom < 0) {\n console.error(\"negative radiusBottom not allowed - will invert\");\n radiusBottom *= -1;\n }\n\n let height = cfg.height || 1;\n if (height < 0) {\n console.error(\"negative height not allowed - will invert\");\n height *= -1;\n }\n\n let radialSegments = cfg.radialSegments || 32;\n if (radialSegments < 0) {\n console.error(\"negative radialSegments not allowed - will invert\");\n radialSegments *= -1;\n }\n if (radialSegments < 3) {\n radialSegments = 3;\n }\n\n let heightSegments = cfg.heightSegments || 1;\n if (heightSegments < 0) {\n console.error(\"negative heightSegments not allowed - will invert\");\n heightSegments *= -1;\n }\n if (heightSegments < 1) {\n heightSegments = 1;\n }\n\n const openEnded = !!cfg.openEnded;\n\n let center = cfg.center;\n const centerX = center ? center[0] : 0;\n const centerY = center ? center[1] : 0;\n const centerZ = center ? center[2] : 0;\n\n const heightHalf = height / 2;\n const heightLength = height / heightSegments;\n const radialAngle = (2.0 * Math.PI / radialSegments);\n const radialLength = 1.0 / radialSegments;\n //var nextRadius = this._radiusBottom;\n const radiusChange = (radiusTop - radiusBottom) / heightSegments;\n\n const positions = [];\n const normals = [];\n const uvs = [];\n const indices = [];\n\n let h;\n let i;\n\n let x;\n let z;\n\n let currentRadius;\n let currentHeight;\n\n let first;\n let second;\n\n let startIndex;\n let tu;\n let tv;\n\n // create vertices\n const normalY = (90.0 - (Math.atan(height / (radiusBottom - radiusTop))) * 180 / Math.PI) / 90.0;\n\n for (h = 0; h <= heightSegments; h++) {\n currentRadius = radiusTop - h * radiusChange;\n currentHeight = heightHalf - h * heightLength;\n\n for (i = 0; i <= radialSegments; i++) {\n x = Math.sin(i * radialAngle);\n z = Math.cos(i * radialAngle);\n\n normals.push(currentRadius * x);\n normals.push(normalY); //todo\n normals.push(currentRadius * z);\n\n uvs.push((i * radialLength));\n uvs.push(h * 1 / heightSegments);\n\n positions.push((currentRadius * x) + centerX);\n positions.push((currentHeight) + centerY);\n positions.push((currentRadius * z) + centerZ);\n }\n }\n\n // create faces\n for (h = 0; h < heightSegments; h++) {\n for (i = 0; i <= radialSegments; i++) {\n\n first = h * (radialSegments + 1) + i;\n second = first + radialSegments;\n\n indices.push(first);\n indices.push(second);\n indices.push(second + 1);\n\n indices.push(first);\n indices.push(second + 1);\n indices.push(first + 1);\n }\n }\n\n // create top cap\n if (!openEnded && radiusTop > 0) {\n startIndex = (positions.length / 3);\n\n // top center\n normals.push(0.0);\n normals.push(1.0);\n normals.push(0.0);\n\n uvs.push(0.5);\n uvs.push(0.5);\n\n positions.push(0 + centerX);\n positions.push(heightHalf + centerY);\n positions.push(0 + centerZ);\n\n // top triangle fan\n for (i = 0; i <= radialSegments; i++) {\n x = Math.sin(i * radialAngle);\n z = Math.cos(i * radialAngle);\n tu = (0.5 * Math.sin(i * radialAngle)) + 0.5;\n tv = (0.5 * Math.cos(i * radialAngle)) + 0.5;\n\n normals.push(radiusTop * x);\n normals.push(1.0);\n normals.push(radiusTop * z);\n\n uvs.push(tu);\n uvs.push(tv);\n\n positions.push((radiusTop * x) + centerX);\n positions.push((heightHalf) + centerY);\n positions.push((radiusTop * z) + centerZ);\n }\n\n for (i = 0; i < radialSegments; i++) {\n center = startIndex;\n first = startIndex + 1 + i;\n\n indices.push(first);\n indices.push(first + 1);\n indices.push(center);\n }\n }\n\n // create bottom cap\n if (!openEnded && radiusBottom > 0) {\n\n startIndex = (positions.length / 3);\n\n // top center\n normals.push(0.0);\n normals.push(-1.0);\n normals.push(0.0);\n\n uvs.push(0.5);\n uvs.push(0.5);\n\n positions.push(0 + centerX);\n positions.push(0 - heightHalf + centerY);\n positions.push(0 + centerZ);\n\n // top triangle fan\n for (i = 0; i <= radialSegments; i++) {\n\n x = Math.sin(i * radialAngle);\n z = Math.cos(i * radialAngle);\n\n tu = (0.5 * Math.sin(i * radialAngle)) + 0.5;\n tv = (0.5 * Math.cos(i * radialAngle)) + 0.5;\n\n normals.push(radiusBottom * x);\n normals.push(-1.0);\n normals.push(radiusBottom * z);\n\n uvs.push(tu);\n uvs.push(tv);\n\n positions.push((radiusBottom * x) + centerX);\n positions.push((0 - heightHalf) + centerY);\n positions.push((radiusBottom * z) + centerZ);\n }\n\n for (i = 0; i < radialSegments; i++) {\n\n center = startIndex;\n first = startIndex + 1 + i;\n\n indices.push(center);\n indices.push(first + 1);\n indices.push(first);\n }\n }\n\n return {\n primitiveType: \"triangles\",\n positions: positions,\n normals: normals,\n uv: uvs,\n uvs: uvs,\n indices: indices\n };\n}\n\n\nexport {buildCylinderGeometry};\n","/**\n * @desc Creates grid-shaped geometry arrays..\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then create an {@link XKTMesh} with a grid-shaped {@link XKTGeometry}.\n *\n * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#geometry_builders_buildGridGeometry)]\n *\n * ````javascript\n * const xktModel = new XKTModel();\n *\n * const grid = buildGridGeometry({\n * size: 1000,\n * divisions: 500\n * });\n *\n * const xktGeometry = xktModel.createGeometry({\n * geometryId: \"gridGeometry\",\n * primitiveType: grid.primitiveType, // Will be \"lines\"\n * positions: grid.positions,\n * indices: grid.indices\n * });\n *\n * const xktMesh = xktModel.createMesh({\n * meshId: \"redGridMesh\",\n * geometryId: \"gridGeometry\",\n * position: [-4, -6, -4],\n * scale: [1, 3, 1],\n * rotation: [0, 0, 0],\n * color: [1, 0, 0],\n * opacity: 1\n * });\n *\n * const xktEntity = xktModel.createEntity({\n * entityId: \"redGrid\",\n * meshIds: [\"redGridMesh\"]\n * });\n *\n * xktModel.finalize();\n * ````\n *\n * @function buildGridGeometry\n * @param {*} [cfg] Configs\n * @param {Number} [cfg.size=1] Dimension on the X and Z-axis.\n * @param {Number} [cfg.divisions=1] Number of divisions on X and Z axis..\n * @returns {Object} Geometry arrays for {@link XKTModel#createGeometry} or {@link XKTModel#createMesh}.\n */\nfunction buildGridGeometry(cfg = {}) {\n\n let size = cfg.size || 1;\n if (size < 0) {\n console.error(\"negative size not allowed - will invert\");\n size *= -1;\n }\n\n let divisions = cfg.divisions || 1;\n if (divisions < 0) {\n console.error(\"negative divisions not allowed - will invert\");\n divisions *= -1;\n }\n if (divisions < 1) {\n divisions = 1;\n }\n\n size = size || 10;\n divisions = divisions || 10;\n\n const step = size / divisions;\n const halfSize = size / 2;\n\n const positions = [];\n const indices = [];\n let l = 0;\n\n for (let i = 0, j = 0, k = -halfSize; i <= divisions; i++, k += step) {\n\n positions.push(-halfSize);\n positions.push(0);\n positions.push(k);\n\n positions.push(halfSize);\n positions.push(0);\n positions.push(k);\n\n positions.push(k);\n positions.push(0);\n positions.push(-halfSize);\n\n positions.push(k);\n positions.push(0);\n positions.push(halfSize);\n\n indices.push(l++);\n indices.push(l++);\n indices.push(l++);\n indices.push(l++);\n }\n\n return {\n primitiveType: \"lines\",\n positions: positions,\n indices: indices\n };\n}\n\n\nexport {buildGridGeometry};\n","/**\n * @desc Creates plane-shaped geometry arrays.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then create an {@link XKTMesh} with a plane-shaped {@link XKTGeometry}.\n *\n * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#geometry_builders_buildPlaneGeometry)]\n *\n * ````javascript\n * const xktModel = new XKTModel();\n *\n * const plane = buildPlaneGeometry({\n * center: [0,0,0],\n * xSize: 2,\n * zSize: 2,\n * xSegments: 10,\n * zSegments: 10\n * });\n *\n * const xktGeometry = xktModel.createGeometry({\n * geometryId: \"planeGeometry\",\n * primitiveType: plane.primitiveType, // Will be \"triangles\"\n * positions: plane.positions,\n * normals: plane.normals,\n * indices: plane.indices\n * });\n *\n * const xktMesh = xktModel.createMesh({\n * meshId: \"redPlaneMesh\",\n * geometryId: \"planeGeometry\",\n * position: [-4, -6, -4],\n * scale: [1, 3, 1],\n * rotation: [0, 0, 0],\n * color: [1, 0, 0],\n * opacity: 1\n * });\n *\n * const xktEntity = xktModel.createEntity({\n * entityId: \"redPlane\",\n * meshIds: [\"redPlaneMesh\"]\n * });\n *\n * xktModel.finalize();\n * ````\n *\n * @function buildPlaneGeometry\n * @param {*} [cfg] Configs\n * @param {Number[]} [cfg.center] 3D point indicating the center position.\n * @param {Number} [cfg.xSize=1] Dimension on the X-axis.\n * @param {Number} [cfg.zSize=1] Dimension on the Z-axis.\n * @param {Number} [cfg.xSegments=1] Number of segments on the X-axis.\n * @param {Number} [cfg.zSegments=1] Number of segments on the Z-axis.\n * @returns {Object} Geometry arrays for {@link XKTModel#createGeometry} or {@link XKTModel#createMesh}.\n */\nfunction buildPlaneGeometry(cfg = {}) {\n\n let xSize = cfg.xSize || 1;\n if (xSize < 0) {\n console.error(\"negative xSize not allowed - will invert\");\n xSize *= -1;\n }\n\n let zSize = cfg.zSize || 1;\n if (zSize < 0) {\n console.error(\"negative zSize not allowed - will invert\");\n zSize *= -1;\n }\n\n let xSegments = cfg.xSegments || 1;\n if (xSegments < 0) {\n console.error(\"negative xSegments not allowed - will invert\");\n xSegments *= -1;\n }\n if (xSegments < 1) {\n xSegments = 1;\n }\n\n let zSegments = cfg.xSegments || 1;\n if (zSegments < 0) {\n console.error(\"negative zSegments not allowed - will invert\");\n zSegments *= -1;\n }\n if (zSegments < 1) {\n zSegments = 1;\n }\n\n const center = cfg.center;\n const centerX = center ? center[0] : 0;\n const centerY = center ? center[1] : 0;\n const centerZ = center ? center[2] : 0;\n\n const halfWidth = xSize / 2;\n const halfHeight = zSize / 2;\n\n const planeX = Math.floor(xSegments) || 1;\n const planeZ = Math.floor(zSegments) || 1;\n\n const planeX1 = planeX + 1;\n const planeZ1 = planeZ + 1;\n\n const segmentWidth = xSize / planeX;\n const segmentHeight = zSize / planeZ;\n\n const positions = new Float32Array(planeX1 * planeZ1 * 3);\n const normals = new Float32Array(planeX1 * planeZ1 * 3);\n const uvs = new Float32Array(planeX1 * planeZ1 * 2);\n\n let offset = 0;\n let offset2 = 0;\n\n let iz;\n let ix;\n let x;\n let a;\n let b;\n let c;\n let d;\n\n for (iz = 0; iz < planeZ1; iz++) {\n\n const z = iz * segmentHeight - halfHeight;\n\n for (ix = 0; ix < planeX1; ix++) {\n\n x = ix * segmentWidth - halfWidth;\n\n positions[offset] = x + centerX;\n positions[offset + 1] = centerY;\n positions[offset + 2] = -z + centerZ;\n\n normals[offset + 2] = -1;\n\n uvs[offset2] = (ix) / planeX;\n uvs[offset2 + 1] = ((planeZ - iz) / planeZ);\n\n offset += 3;\n offset2 += 2;\n }\n }\n\n offset = 0;\n\n const indices = new ((positions.length / 3) > 65535 ? Uint32Array : Uint16Array)(planeX * planeZ * 6);\n\n for (iz = 0; iz < planeZ; iz++) {\n\n for (ix = 0; ix < planeX; ix++) {\n\n a = ix + planeX1 * iz;\n b = ix + planeX1 * (iz + 1);\n c = (ix + 1) + planeX1 * (iz + 1);\n d = (ix + 1) + planeX1 * iz;\n\n indices[offset] = d;\n indices[offset + 1] = b;\n indices[offset + 2] = a;\n\n indices[offset + 3] = d;\n indices[offset + 4] = c;\n indices[offset + 5] = b;\n\n offset += 6;\n }\n }\n\n return {\n primitiveType: \"triangles\",\n positions: positions,\n normals: normals,\n uv: uvs,\n uvs: uvs,\n indices: indices\n };\n}\n\nexport {buildPlaneGeometry};\n","/**\n * @desc Creates sphere-shaped geometry arrays.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then create an {@link XKTMesh} with a sphere-shaped {@link XKTGeometry}.\n *\n * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#geometry_builders_buildSphereGeometry)]\n *\n * ````javascript\n * const xktModel = new XKTModel();\n *\n * const sphere = buildSphereGeometry({\n * center: [0,0,0],\n * radius: 1.5,\n * heightSegments: 60,\n * widthSegments: 60\n * });\n *\n * const xktGeometry = xktModel.createGeometry({\n * geometryId: \"sphereGeometry\",\n * primitiveType: sphere.primitiveType, // Will be \"triangles\"\n * positions: sphere.positions,\n * normals: sphere.normals,\n * indices: sphere.indices\n * });\n *\n * const xktMesh = xktModel.createMesh({\n * meshId: \"redSphereMesh\",\n * geometryId: \"sphereGeometry\",\n * position: [-4, -6, -4],\n * scale: [1, 3, 1],\n * rotation: [0, 0, 0],\n * color: [1, 0, 0],\n * opacity: 1\n * });\n *\n *const xktEntity = xktModel.createEntity({\n * entityId: \"redSphere\",\n * meshIds: [\"redSphereMesh\"]\n * });\n *\n * xktModel.finalize();\n * ````\n *\n * @function buildSphereGeometry\n * @param {*} [cfg] Configs\n * @param {Number[]} [cfg.center] 3D point indicating the center position.\n * @param {Number} [cfg.radius=1] Radius.\n * @param {Number} [cfg.heightSegments=24] Number of latitudinal bands.\n * @param {Number} [cfg.widthSegments=18] Number of longitudinal bands.\n * @returns {Object} Geometry arrays for {@link XKTModel#createGeometry} or {@link XKTModel#createMesh}.\n */\nfunction buildSphereGeometry(cfg = {}) {\n\n const lod = cfg.lod || 1;\n\n const centerX = cfg.center ? cfg.center[0] : 0;\n const centerY = cfg.center ? cfg.center[1] : 0;\n const centerZ = cfg.center ? cfg.center[2] : 0;\n\n let radius = cfg.radius || 1;\n if (radius < 0) {\n console.error(\"negative radius not allowed - will invert\");\n radius *= -1;\n }\n\n let heightSegments = cfg.heightSegments || 18;\n if (heightSegments < 0) {\n console.error(\"negative heightSegments not allowed - will invert\");\n heightSegments *= -1;\n }\n heightSegments = Math.floor(lod * heightSegments);\n if (heightSegments < 18) {\n heightSegments = 18;\n }\n\n let widthSegments = cfg.widthSegments || 18;\n if (widthSegments < 0) {\n console.error(\"negative widthSegments not allowed - will invert\");\n widthSegments *= -1;\n }\n widthSegments = Math.floor(lod * widthSegments);\n if (widthSegments < 18) {\n widthSegments = 18;\n }\n\n const positions = [];\n const normals = [];\n const uvs = [];\n const indices = [];\n\n let i;\n let j;\n\n let theta;\n let sinTheta;\n let cosTheta;\n\n let phi;\n let sinPhi;\n let cosPhi;\n\n let x;\n let y;\n let z;\n\n let u;\n let v;\n\n let first;\n let second;\n\n for (i = 0; i <= heightSegments; i++) {\n\n theta = i * Math.PI / heightSegments;\n sinTheta = Math.sin(theta);\n cosTheta = Math.cos(theta);\n\n for (j = 0; j <= widthSegments; j++) {\n\n phi = j * 2 * Math.PI / widthSegments;\n sinPhi = Math.sin(phi);\n cosPhi = Math.cos(phi);\n\n x = cosPhi * sinTheta;\n y = cosTheta;\n z = sinPhi * sinTheta;\n u = 1.0 - j / widthSegments;\n v = i / heightSegments;\n\n normals.push(x);\n normals.push(y);\n normals.push(z);\n\n uvs.push(u);\n uvs.push(v);\n\n positions.push(centerX + radius * x);\n positions.push(centerY + radius * y);\n positions.push(centerZ + radius * z);\n }\n }\n\n for (i = 0; i < heightSegments; i++) {\n for (j = 0; j < widthSegments; j++) {\n\n first = (i * (widthSegments + 1)) + j;\n second = first + widthSegments + 1;\n\n indices.push(first + 1);\n indices.push(second + 1);\n indices.push(second);\n indices.push(first + 1);\n indices.push(second);\n indices.push(first);\n }\n }\n\n return {\n primitiveType: \"triangles\",\n positions: positions,\n normals: normals,\n uv: uvs,\n uvs: uvs,\n indices: indices\n };\n}\n\nexport {buildSphereGeometry};\n","import {math} from '../lib/math.js';\n\n/**\n * @desc Creates torus-shaped geometry arrays.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then create an {@link XKTMesh} with a torus-shaped {@link XKTGeometry}.\n *\n * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#geometry_builders_buildTorusGeometry)]\n *\n * ````javascript\n * const xktModel = new XKTModel();\n *\n * const torus = buildTorusGeometry({\n * center: [0,0,0],\n * radius: 1.0,\n * tube: 0.5,\n * radialSegments: 32,\n * tubeSegments: 24,\n * arc: Math.PI * 2.0\n * });\n *\n * const xktGeometry = xktModel.createGeometry({\n * geometryId: \"torusGeometry\",\n * primitiveType: torus.primitiveType, // Will be \"triangles\"\n * positions: torus.positions,\n * normals: torus.normals,\n * indices: torus.indices\n * });\n *\n * const xktMesh = xktModel.createMesh({\n * meshId: \"redTorusMesh\",\n * geometryId: \"torusGeometry\",\n * position: [-4, -6, -4],\n * scale: [1, 3, 1],\n * rotation: [0, 0, 0],\n * color: [1, 0, 0],\n * opacity: 1\n * });\n *\n * const xktEntity = xktModel.createEntity({\n * entityId: \"redTorus\",\n * meshIds: [\"redTorusMesh\"]\n * });\n *\n * xktModel.finalize();\n * ````\n *\n * @function buildTorusGeometry\n * @param {*} [cfg] Configs\n * @param {Number[]} [cfg.center] 3D point indicating the center position.\n * @param {Number} [cfg.radius=1] The overall radius.\n * @param {Number} [cfg.tube=0.3] The tube radius.\n * @param {Number} [cfg.radialSegments=32] The number of radial segments.\n * @param {Number} [cfg.tubeSegments=24] The number of tubular segments.\n * @param {Number} [cfg.arc=Math.PI*0.5] The length of the arc in radians, where Math.PI*2 is a closed torus.\n * @returns {Object} Geometry arrays for {@link XKTModel#createGeometry} or {@link XKTModel#createMesh}.\n */\nfunction buildTorusGeometry(cfg = {}) {\n\n let radius = cfg.radius || 1;\n if (radius < 0) {\n console.error(\"negative radius not allowed - will invert\");\n radius *= -1;\n }\n radius *= 0.5;\n\n let tube = cfg.tube || 0.3;\n if (tube < 0) {\n console.error(\"negative tube not allowed - will invert\");\n tube *= -1;\n }\n\n let radialSegments = cfg.radialSegments || 32;\n if (radialSegments < 0) {\n console.error(\"negative radialSegments not allowed - will invert\");\n radialSegments *= -1;\n }\n if (radialSegments < 4) {\n radialSegments = 4;\n }\n\n let tubeSegments = cfg.tubeSegments || 24;\n if (tubeSegments < 0) {\n console.error(\"negative tubeSegments not allowed - will invert\");\n tubeSegments *= -1;\n }\n if (tubeSegments < 4) {\n tubeSegments = 4;\n }\n\n let arc = cfg.arc || Math.PI * 2;\n if (arc < 0) {\n console.warn(\"negative arc not allowed - will invert\");\n arc *= -1;\n }\n if (arc > 360) {\n arc = 360;\n }\n\n const center = cfg.center;\n let centerX = center ? center[0] : 0;\n let centerY = center ? center[1] : 0;\n const centerZ = center ? center[2] : 0;\n\n const positions = [];\n const normals = [];\n const uvs = [];\n const indices = [];\n\n let u;\n let v;\n let x;\n let y;\n let z;\n let vec;\n\n let i;\n let j;\n\n for (j = 0; j <= tubeSegments; j++) {\n for (i = 0; i <= radialSegments; i++) {\n\n u = i / radialSegments * arc;\n v = 0.785398 + (j / tubeSegments * Math.PI * 2);\n\n centerX = radius * Math.cos(u);\n centerY = radius * Math.sin(u);\n\n x = (radius + tube * Math.cos(v)) * Math.cos(u);\n y = (radius + tube * Math.cos(v)) * Math.sin(u);\n z = tube * Math.sin(v);\n\n positions.push(x + centerX);\n positions.push(y + centerY);\n positions.push(z + centerZ);\n\n uvs.push(1 - (i / radialSegments));\n uvs.push((j / tubeSegments));\n\n vec = math.normalizeVec3(math.subVec3([x, y, z], [centerX, centerY, centerZ], []), []);\n\n normals.push(vec[0]);\n normals.push(vec[1]);\n normals.push(vec[2]);\n }\n }\n\n let a;\n let b;\n let c;\n let d;\n\n for (j = 1; j <= tubeSegments; j++) {\n for (i = 1; i <= radialSegments; i++) {\n\n a = (radialSegments + 1) * j + i - 1;\n b = (radialSegments + 1) * (j - 1) + i - 1;\n c = (radialSegments + 1) * (j - 1) + i;\n d = (radialSegments + 1) * j + i;\n\n indices.push(a);\n indices.push(b);\n indices.push(c);\n\n indices.push(c);\n indices.push(d);\n indices.push(a);\n }\n }\n\n return {\n primitiveType: \"triangles\",\n positions: positions,\n normals: normals,\n uv: uvs,\n uvs: uvs,\n indices: indices\n };\n}\n\nexport {buildTorusGeometry};\n","const letters = {\n ' ': {width: 16, points: []},\n '!': {\n width: 10, points: [\n [5, 21],\n [5, 7],\n [-1, -1],\n [5, 2],\n [4, 1],\n [5, 0],\n [6, 1],\n [5, 2]\n ]\n },\n '\"': {\n width: 16, points: [\n [4, 21],\n [4, 14],\n [-1, -1],\n [12, 21],\n [12, 14]\n ]\n },\n '#': {\n width: 21, points: [\n [11, 25],\n [4, -7],\n [-1, -1],\n [17, 25],\n [10, -7],\n [-1, -1],\n [4, 12],\n [18, 12],\n [-1, -1],\n [3, 6],\n [17, 6]\n ]\n },\n '$': {\n width: 20, points: [\n [8, 25],\n [8, -4],\n [-1, -1],\n [12, 25],\n [12, -4],\n [-1, -1],\n [17, 18],\n [15, 20],\n [12, 21],\n [8, 21],\n [5, 20],\n [3, 18],\n [3, 16],\n [4, 14],\n [5, 13],\n [7, 12],\n [13, 10],\n [15, 9],\n [16, 8],\n [17, 6],\n [17, 3],\n [15, 1],\n [12, 0],\n [8, 0],\n [5, 1],\n [3, 3]\n ]\n },\n '%': {\n width: 24, points: [\n [21, 21],\n [3, 0],\n [-1, -1],\n [8, 21],\n [10, 19],\n [10, 17],\n [9, 15],\n [7, 14],\n [5, 14],\n [3, 16],\n [3, 18],\n [4, 20],\n [6, 21],\n [8, 21],\n [10, 20],\n [13, 19],\n [16, 19],\n [19, 20],\n [21, 21],\n [-1, -1],\n [17, 7],\n [15, 6],\n [14, 4],\n [14, 2],\n [16, 0],\n [18, 0],\n [20, 1],\n [21, 3],\n [21, 5],\n [19, 7],\n [17, 7]\n ]\n },\n '&': {\n width: 26, points: [\n [23, 12],\n [23, 13],\n [22, 14],\n [21, 14],\n [20, 13],\n [19, 11],\n [17, 6],\n [15, 3],\n [13, 1],\n [11, 0],\n [7, 0],\n [5, 1],\n [4, 2],\n [3, 4],\n [3, 6],\n [4, 8],\n [5, 9],\n [12, 13],\n [13, 14],\n [14, 16],\n [14, 18],\n [13, 20],\n [11, 21],\n [9, 20],\n [8, 18],\n [8, 16],\n [9, 13],\n [11, 10],\n [16, 3],\n [18, 1],\n [20, 0],\n [22, 0],\n [23, 1],\n [23, 2]\n ]\n },\n '\\'': {\n width: 10, points: [\n [5, 19],\n [4, 20],\n [5, 21],\n [6, 20],\n [6, 18],\n [5, 16],\n [4, 15]\n ]\n },\n '(': {\n width: 14, points: [\n [11, 25],\n [9, 23],\n [7, 20],\n [5, 16],\n [4, 11],\n [4, 7],\n [5, 2],\n [7, -2],\n [9, -5],\n [11, -7]\n ]\n },\n ')': {\n width: 14, points: [\n [3, 25],\n [5, 23],\n [7, 20],\n [9, 16],\n [10, 11],\n [10, 7],\n [9, 2],\n [7, -2],\n [5, -5],\n [3, -7]\n ]\n },\n '*': {\n width: 16, points: [\n [8, 21],\n [8, 9],\n [-1, -1],\n [3, 18],\n [13, 12],\n [-1, -1],\n [13, 18],\n [3, 12]\n ]\n },\n '+': {\n width: 26, points: [\n [13, 18],\n [13, 0],\n [-1, -1],\n [4, 9],\n [22, 9]\n ]\n },\n ',': {\n width: 10, points: [\n [6, 1],\n [5, 0],\n [4, 1],\n [5, 2],\n [6, 1],\n [6, -1],\n [5, -3],\n [4, -4]\n ]\n },\n '-': {\n width: 26, points: [\n [4, 9],\n [22, 9]\n ]\n },\n '.': {\n width: 10, points: [\n [5, 2],\n [4, 1],\n [5, 0],\n [6, 1],\n [5, 2]\n ]\n },\n '/': {\n width: 22, points: [\n [20, 25],\n [2, -7]\n ]\n },\n '0': {\n width: 20, points: [\n [9, 21],\n [6, 20],\n [4, 17],\n [3, 12],\n [3, 9],\n [4, 4],\n [6, 1],\n [9, 0],\n [11, 0],\n [14, 1],\n [16, 4],\n [17, 9],\n [17, 12],\n [16, 17],\n [14, 20],\n [11, 21],\n [9, 21]\n ]\n },\n '1': {\n width: 20, points: [\n [6, 17],\n [8, 18],\n [11, 21],\n [11, 0]\n ]\n },\n '2': {\n width: 20, points: [\n [4, 16],\n [4, 17],\n [5, 19],\n [6, 20],\n [8, 21],\n [12, 21],\n [14, 20],\n [15, 19],\n [16, 17],\n [16, 15],\n [15, 13],\n [13, 10],\n [3, 0],\n [17, 0]\n ]\n },\n '3': {\n width: 20, points: [\n [5, 21],\n [16, 21],\n [10, 13],\n [13, 13],\n [15, 12],\n [16, 11],\n [17, 8],\n [17, 6],\n [16, 3],\n [14, 1],\n [11, 0],\n [8, 0],\n [5, 1],\n [4, 2],\n [3, 4]\n ]\n },\n '4': {\n width: 20, points: [\n [13, 21],\n [3, 7],\n [18, 7],\n [-1, -1],\n [13, 21],\n [13, 0]\n ]\n },\n '5': {\n width: 20, points: [\n [15, 21],\n [5, 21],\n [4, 12],\n [5, 13],\n [8, 14],\n [11, 14],\n [14, 13],\n [16, 11],\n [17, 8],\n [17, 6],\n [16, 3],\n [14, 1],\n [11, 0],\n [8, 0],\n [5, 1],\n [4, 2],\n [3, 4]\n ]\n },\n '6': {\n width: 20, points: [\n [16, 18],\n [15, 20],\n [12, 21],\n [10, 21],\n [7, 20],\n [5, 17],\n [4, 12],\n [4, 7],\n [5, 3],\n [7, 1],\n [10, 0],\n [11, 0],\n [14, 1],\n [16, 3],\n [17, 6],\n [17, 7],\n [16, 10],\n [14, 12],\n [11, 13],\n [10, 13],\n [7, 12],\n [5, 10],\n [4, 7]\n ]\n },\n '7': {\n width: 20, points: [\n [17, 21],\n [7, 0],\n [-1, -1],\n [3, 21],\n [17, 21]\n ]\n },\n '8': {\n width: 20, points: [\n [8, 21],\n [5, 20],\n [4, 18],\n [4, 16],\n [5, 14],\n [7, 13],\n [11, 12],\n [14, 11],\n [16, 9],\n [17, 7],\n [17, 4],\n [16, 2],\n [15, 1],\n [12, 0],\n [8, 0],\n [5, 1],\n [4, 2],\n [3, 4],\n [3, 7],\n [4, 9],\n [6, 11],\n [9, 12],\n [13, 13],\n [15, 14],\n [16, 16],\n [16, 18],\n [15, 20],\n [12, 21],\n [8, 21]\n ]\n },\n '9': {\n width: 20, points: [\n [16, 14],\n [15, 11],\n [13, 9],\n [10, 8],\n [9, 8],\n [6, 9],\n [4, 11],\n [3, 14],\n [3, 15],\n [4, 18],\n [6, 20],\n [9, 21],\n [10, 21],\n [13, 20],\n [15, 18],\n [16, 14],\n [16, 9],\n [15, 4],\n [13, 1],\n [10, 0],\n [8, 0],\n [5, 1],\n [4, 3]\n ]\n },\n ':': {\n width: 10, points: [\n [5, 14],\n [4, 13],\n [5, 12],\n [6, 13],\n [5, 14],\n [-1, -1],\n [5, 2],\n [4, 1],\n [5, 0],\n [6, 1],\n [5, 2]\n ]\n },\n ';': {\n width: 10, points: [\n [5, 14],\n [4, 13],\n [5, 12],\n [6, 13],\n [5, 14],\n [-1, -1],\n [6, 1],\n [5, 0],\n [4, 1],\n [5, 2],\n [6, 1],\n [6, -1],\n [5, -3],\n [4, -4]\n ]\n },\n '<': {\n width: 24, points: [\n [20, 18],\n [4, 9],\n [20, 0]\n ]\n },\n '=': {\n width: 26, points: [\n [4, 12],\n [22, 12],\n [-1, -1],\n [4, 6],\n [22, 6]\n ]\n },\n '>': {\n width: 24, points: [\n [4, 18],\n [20, 9],\n [4, 0]\n ]\n },\n '?': {\n width: 18, points: [\n [3, 16],\n [3, 17],\n [4, 19],\n [5, 20],\n [7, 21],\n [11, 21],\n [13, 20],\n [14, 19],\n [15, 17],\n [15, 15],\n [14, 13],\n [13, 12],\n [9, 10],\n [9, 7],\n [-1, -1],\n [9, 2],\n [8, 1],\n [9, 0],\n [10, 1],\n [9, 2]\n ]\n },\n '@': {\n width: 27, points: [\n [18, 13],\n [17, 15],\n [15, 16],\n [12, 16],\n [10, 15],\n [9, 14],\n [8, 11],\n [8, 8],\n [9, 6],\n [11, 5],\n [14, 5],\n [16, 6],\n [17, 8],\n [-1, -1],\n [12, 16],\n [10, 14],\n [9, 11],\n [9, 8],\n [10, 6],\n [11, 5],\n [-1, -1],\n [18, 16],\n [17, 8],\n [17, 6],\n [19, 5],\n [21, 5],\n [23, 7],\n [24, 10],\n [24, 12],\n [23, 15],\n [22, 17],\n [20, 19],\n [18, 20],\n [15, 21],\n [12, 21],\n [9, 20],\n [7, 19],\n [5, 17],\n [4, 15],\n [3, 12],\n [3, 9],\n [4, 6],\n [5, 4],\n [7, 2],\n [9, 1],\n [12, 0],\n [15, 0],\n [18, 1],\n [20, 2],\n [21, 3],\n [-1, -1],\n [19, 16],\n [18, 8],\n [18, 6],\n [19, 5]\n ]\n },\n 'A': {\n width: 18, points: [\n [9, 21],\n [1, 0],\n [-1, -1],\n [9, 21],\n [17, 0],\n [-1, -1],\n [4, 7],\n [14, 7]\n ]\n },\n 'B': {\n width: 21, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [4, 21],\n [13, 21],\n [16, 20],\n [17, 19],\n [18, 17],\n [18, 15],\n [17, 13],\n [16, 12],\n [13, 11],\n [-1, -1],\n [4, 11],\n [13, 11],\n [16, 10],\n [17, 9],\n [18, 7],\n [18, 4],\n [17, 2],\n [16, 1],\n [13, 0],\n [4, 0]\n ]\n },\n 'C': {\n width: 21, points: [\n [18, 16],\n [17, 18],\n [15, 20],\n [13, 21],\n [9, 21],\n [7, 20],\n [5, 18],\n [4, 16],\n [3, 13],\n [3, 8],\n [4, 5],\n [5, 3],\n [7, 1],\n [9, 0],\n [13, 0],\n [15, 1],\n [17, 3],\n [18, 5]\n ]\n },\n 'D': {\n width: 21, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [4, 21],\n [11, 21],\n [14, 20],\n [16, 18],\n [17, 16],\n [18, 13],\n [18, 8],\n [17, 5],\n [16, 3],\n [14, 1],\n [11, 0],\n [4, 0]\n ]\n },\n 'E': {\n width: 19, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [4, 21],\n [17, 21],\n [-1, -1],\n [4, 11],\n [12, 11],\n [-1, -1],\n [4, 0],\n [17, 0]\n ]\n },\n 'F': {\n width: 18, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [4, 21],\n [17, 21],\n [-1, -1],\n [4, 11],\n [12, 11]\n ]\n },\n 'G': {\n width: 21, points: [\n [18, 16],\n [17, 18],\n [15, 20],\n [13, 21],\n [9, 21],\n [7, 20],\n [5, 18],\n [4, 16],\n [3, 13],\n [3, 8],\n [4, 5],\n [5, 3],\n [7, 1],\n [9, 0],\n [13, 0],\n [15, 1],\n [17, 3],\n [18, 5],\n [18, 8],\n [-1, -1],\n [13, 8],\n [18, 8]\n ]\n },\n 'H': {\n width: 22, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [18, 21],\n [18, 0],\n [-1, -1],\n [4, 11],\n [18, 11]\n ]\n },\n 'I': {\n width: 8, points: [\n [4, 21],\n [4, 0]\n ]\n },\n 'J': {\n width: 16, points: [\n [12, 21],\n [12, 5],\n [11, 2],\n [10, 1],\n [8, 0],\n [6, 0],\n [4, 1],\n [3, 2],\n [2, 5],\n [2, 7]\n ]\n },\n 'K': {\n width: 21, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [18, 21],\n [4, 7],\n [-1, -1],\n [9, 12],\n [18, 0]\n ]\n },\n 'L': {\n width: 17, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [4, 0],\n [16, 0]\n ]\n },\n 'M': {\n width: 24, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [4, 21],\n [12, 0],\n [-1, -1],\n [20, 21],\n [12, 0],\n [-1, -1],\n [20, 21],\n [20, 0]\n ]\n },\n 'N': {\n width: 22, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [4, 21],\n [18, 0],\n [-1, -1],\n [18, 21],\n [18, 0]\n ]\n },\n 'O': {\n width: 22, points: [\n [9, 21],\n [7, 20],\n [5, 18],\n [4, 16],\n [3, 13],\n [3, 8],\n [4, 5],\n [5, 3],\n [7, 1],\n [9, 0],\n [13, 0],\n [15, 1],\n [17, 3],\n [18, 5],\n [19, 8],\n [19, 13],\n [18, 16],\n [17, 18],\n [15, 20],\n [13, 21],\n [9, 21]\n ]\n },\n 'P': {\n width: 21, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [4, 21],\n [13, 21],\n [16, 20],\n [17, 19],\n [18, 17],\n [18, 14],\n [17, 12],\n [16, 11],\n [13, 10],\n [4, 10]\n ]\n },\n 'Q': {\n width: 22, points: [\n [9, 21],\n [7, 20],\n [5, 18],\n [4, 16],\n [3, 13],\n [3, 8],\n [4, 5],\n [5, 3],\n [7, 1],\n [9, 0],\n [13, 0],\n [15, 1],\n [17, 3],\n [18, 5],\n [19, 8],\n [19, 13],\n [18, 16],\n [17, 18],\n [15, 20],\n [13, 21],\n [9, 21],\n [-1, -1],\n [12, 4],\n [18, -2]\n ]\n },\n 'R': {\n width: 21, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [4, 21],\n [13, 21],\n [16, 20],\n [17, 19],\n [18, 17],\n [18, 15],\n [17, 13],\n [16, 12],\n [13, 11],\n [4, 11],\n [-1, -1],\n [11, 11],\n [18, 0]\n ]\n },\n 'S': {\n width: 20, points: [\n [17, 18],\n [15, 20],\n [12, 21],\n [8, 21],\n [5, 20],\n [3, 18],\n [3, 16],\n [4, 14],\n [5, 13],\n [7, 12],\n [13, 10],\n [15, 9],\n [16, 8],\n [17, 6],\n [17, 3],\n [15, 1],\n [12, 0],\n [8, 0],\n [5, 1],\n [3, 3]\n ]\n },\n 'T': {\n width: 16, points: [\n [8, 21],\n [8, 0],\n [-1, -1],\n [1, 21],\n [15, 21]\n ]\n },\n 'U': {\n width: 22, points: [\n [4, 21],\n [4, 6],\n [5, 3],\n [7, 1],\n [10, 0],\n [12, 0],\n [15, 1],\n [17, 3],\n [18, 6],\n [18, 21]\n ]\n },\n 'V': {\n width: 18, points: [\n [1, 21],\n [9, 0],\n [-1, -1],\n [17, 21],\n [9, 0]\n ]\n },\n 'W': {\n width: 24, points: [\n [2, 21],\n [7, 0],\n [-1, -1],\n [12, 21],\n [7, 0],\n [-1, -1],\n [12, 21],\n [17, 0],\n [-1, -1],\n [22, 21],\n [17, 0]\n ]\n },\n 'X': {\n width: 20, points: [\n [3, 21],\n [17, 0],\n [-1, -1],\n [17, 21],\n [3, 0]\n ]\n },\n 'Y': {\n width: 18, points: [\n [1, 21],\n [9, 11],\n [9, 0],\n [-1, -1],\n [17, 21],\n [9, 11]\n ]\n },\n 'Z': {\n width: 20, points: [\n [17, 21],\n [3, 0],\n [-1, -1],\n [3, 21],\n [17, 21],\n [-1, -1],\n [3, 0],\n [17, 0]\n ]\n },\n '[': {\n width: 14, points: [\n [4, 25],\n [4, -7],\n [-1, -1],\n [5, 25],\n [5, -7],\n [-1, -1],\n [4, 25],\n [11, 25],\n [-1, -1],\n [4, -7],\n [11, -7]\n ]\n },\n '\\\\': {\n width: 14, points: [\n [0, 21],\n [14, -3]\n ]\n },\n ']': {\n width: 14, points: [\n [9, 25],\n [9, -7],\n [-1, -1],\n [10, 25],\n [10, -7],\n [-1, -1],\n [3, 25],\n [10, 25],\n [-1, -1],\n [3, -7],\n [10, -7]\n ]\n },\n '^': {\n width: 16, points: [\n [6, 15],\n [8, 18],\n [10, 15],\n [-1, -1],\n [3, 12],\n [8, 17],\n [13, 12],\n [-1, -1],\n [8, 17],\n [8, 0]\n ]\n },\n '_': {\n width: 16, points: [\n [0, -2],\n [16, -2]\n ]\n },\n '`': {\n width: 10, points: [\n [6, 21],\n [5, 20],\n [4, 18],\n [4, 16],\n [5, 15],\n [6, 16],\n [5, 17]\n ]\n },\n 'a': {\n width: 19, points: [\n [15, 14],\n [15, 0],\n [-1, -1],\n [15, 11],\n [13, 13],\n [11, 14],\n [8, 14],\n [6, 13],\n [4, 11],\n [3, 8],\n [3, 6],\n [4, 3],\n [6, 1],\n [8, 0],\n [11, 0],\n [13, 1],\n [15, 3]\n ]\n },\n 'b': {\n width: 19, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [4, 11],\n [6, 13],\n [8, 14],\n [11, 14],\n [13, 13],\n [15, 11],\n [16, 8],\n [16, 6],\n [15, 3],\n [13, 1],\n [11, 0],\n [8, 0],\n [6, 1],\n [4, 3]\n ]\n },\n 'c': {\n width: 18, points: [\n [15, 11],\n [13, 13],\n [11, 14],\n [8, 14],\n [6, 13],\n [4, 11],\n [3, 8],\n [3, 6],\n [4, 3],\n [6, 1],\n [8, 0],\n [11, 0],\n [13, 1],\n [15, 3]\n ]\n },\n 'd': {\n width: 19, points: [\n [15, 21],\n [15, 0],\n [-1, -1],\n [15, 11],\n [13, 13],\n [11, 14],\n [8, 14],\n [6, 13],\n [4, 11],\n [3, 8],\n [3, 6],\n [4, 3],\n [6, 1],\n [8, 0],\n [11, 0],\n [13, 1],\n [15, 3]\n ]\n },\n 'e': {\n width: 18, points: [\n [3, 8],\n [15, 8],\n [15, 10],\n [14, 12],\n [13, 13],\n [11, 14],\n [8, 14],\n [6, 13],\n [4, 11],\n [3, 8],\n [3, 6],\n [4, 3],\n [6, 1],\n [8, 0],\n [11, 0],\n [13, 1],\n [15, 3]\n ]\n },\n 'f': {\n width: 12, points: [\n [10, 21],\n [8, 21],\n [6, 20],\n [5, 17],\n [5, 0],\n [-1, -1],\n [2, 14],\n [9, 14]\n ]\n },\n 'g': {\n width: 19, points: [\n [15, 14],\n [15, -2],\n [14, -5],\n [13, -6],\n [11, -7],\n [8, -7],\n [6, -6],\n [-1, -1],\n [15, 11],\n [13, 13],\n [11, 14],\n [8, 14],\n [6, 13],\n [4, 11],\n [3, 8],\n [3, 6],\n [4, 3],\n [6, 1],\n [8, 0],\n [11, 0],\n [13, 1],\n [15, 3]\n ]\n },\n 'h': {\n width: 19, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [4, 10],\n [7, 13],\n [9, 14],\n [12, 14],\n [14, 13],\n [15, 10],\n [15, 0]\n ]\n },\n 'i': {\n width: 8, points: [\n [3, 21],\n [4, 20],\n [5, 21],\n [4, 22],\n [3, 21],\n [-1, -1],\n [4, 14],\n [4, 0]\n ]\n },\n 'j': {\n width: 10, points: [\n [5, 21],\n [6, 20],\n [7, 21],\n [6, 22],\n [5, 21],\n [-1, -1],\n [6, 14],\n [6, -3],\n [5, -6],\n [3, -7],\n [1, -7]\n ]\n },\n 'k': {\n width: 17, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [14, 14],\n [4, 4],\n [-1, -1],\n [8, 8],\n [15, 0]\n ]\n },\n 'l': {\n width: 8, points: [\n [4, 21],\n [4, 0]\n ]\n },\n 'm': {\n width: 30, points: [\n [4, 14],\n [4, 0],\n [-1, -1],\n [4, 10],\n [7, 13],\n [9, 14],\n [12, 14],\n [14, 13],\n [15, 10],\n [15, 0],\n [-1, -1],\n [15, 10],\n [18, 13],\n [20, 14],\n [23, 14],\n [25, 13],\n [26, 10],\n [26, 0]\n ]\n },\n 'n': {\n width: 19, points: [\n [4, 14],\n [4, 0],\n [-1, -1],\n [4, 10],\n [7, 13],\n [9, 14],\n [12, 14],\n [14, 13],\n [15, 10],\n [15, 0]\n ]\n },\n 'o': {\n width: 19, points: [\n [8, 14],\n [6, 13],\n [4, 11],\n [3, 8],\n [3, 6],\n [4, 3],\n [6, 1],\n [8, 0],\n [11, 0],\n [13, 1],\n [15, 3],\n [16, 6],\n [16, 8],\n [15, 11],\n [13, 13],\n [11, 14],\n [8, 14]\n ]\n },\n 'p': {\n width: 19, points: [\n [4, 14],\n [4, -7],\n [-1, -1],\n [4, 11],\n [6, 13],\n [8, 14],\n [11, 14],\n [13, 13],\n [15, 11],\n [16, 8],\n [16, 6],\n [15, 3],\n [13, 1],\n [11, 0],\n [8, 0],\n [6, 1],\n [4, 3]\n ]\n },\n 'q': {\n width: 19, points: [\n [15, 14],\n [15, -7],\n [-1, -1],\n [15, 11],\n [13, 13],\n [11, 14],\n [8, 14],\n [6, 13],\n [4, 11],\n [3, 8],\n [3, 6],\n [4, 3],\n [6, 1],\n [8, 0],\n [11, 0],\n [13, 1],\n [15, 3]\n ]\n },\n 'r': {\n width: 13, points: [\n [4, 14],\n [4, 0],\n [-1, -1],\n [4, 8],\n [5, 11],\n [7, 13],\n [9, 14],\n [12, 14]\n ]\n },\n 's': {\n width: 17, points: [\n [14, 11],\n [13, 13],\n [10, 14],\n [7, 14],\n [4, 13],\n [3, 11],\n [4, 9],\n [6, 8],\n [11, 7],\n [13, 6],\n [14, 4],\n [14, 3],\n [13, 1],\n [10, 0],\n [7, 0],\n [4, 1],\n [3, 3]\n ]\n },\n 't': {\n width: 12, points: [\n [5, 21],\n [5, 4],\n [6, 1],\n [8, 0],\n [10, 0],\n [-1, -1],\n [2, 14],\n [9, 14]\n ]\n },\n 'u': {\n width: 19, points: [\n [4, 14],\n [4, 4],\n [5, 1],\n [7, 0],\n [10, 0],\n [12, 1],\n [15, 4],\n [-1, -1],\n [15, 14],\n [15, 0]\n ]\n },\n 'v': {\n width: 16, points: [\n [2, 14],\n [8, 0],\n [-1, -1],\n [14, 14],\n [8, 0]\n ]\n },\n 'w': {\n width: 22, points: [\n [3, 14],\n [7, 0],\n [-1, -1],\n [11, 14],\n [7, 0],\n [-1, -1],\n [11, 14],\n [15, 0],\n [-1, -1],\n [19, 14],\n [15, 0]\n ]\n },\n 'x': {\n width: 17, points: [\n [3, 14],\n [14, 0],\n [-1, -1],\n [14, 14],\n [3, 0]\n ]\n },\n 'y': {\n width: 16, points: [\n [2, 14],\n [8, 0],\n [-1, -1],\n [14, 14],\n [8, 0],\n [6, -4],\n [4, -6],\n [2, -7],\n [1, -7]\n ]\n },\n 'z': {\n width: 17, points: [\n [14, 14],\n [3, 0],\n [-1, -1],\n [3, 14],\n [14, 14],\n [-1, -1],\n [3, 0],\n [14, 0]\n ]\n },\n '{': {\n width: 14, points: [\n [9, 25],\n [7, 24],\n [6, 23],\n [5, 21],\n [5, 19],\n [6, 17],\n [7, 16],\n [8, 14],\n [8, 12],\n [6, 10],\n [-1, -1],\n [7, 24],\n [6, 22],\n [6, 20],\n [7, 18],\n [8, 17],\n [9, 15],\n [9, 13],\n [8, 11],\n [4, 9],\n [8, 7],\n [9, 5],\n [9, 3],\n [8, 1],\n [7, 0],\n [6, -2],\n [6, -4],\n [7, -6],\n [-1, -1],\n [6, 8],\n [8, 6],\n [8, 4],\n [7, 2],\n [6, 1],\n [5, -1],\n [5, -3],\n [6, -5],\n [7, -6],\n [9, -7]\n ]\n },\n '|': {\n width: 8, points: [\n [4, 25],\n [4, -7]\n ]\n },\n '}': {\n width: 14, points: [\n [5, 25],\n [7, 24],\n [8, 23],\n [9, 21],\n [9, 19],\n [8, 17],\n [7, 16],\n [6, 14],\n [6, 12],\n [8, 10],\n [-1, -1],\n [7, 24],\n [8, 22],\n [8, 20],\n [7, 18],\n [6, 17],\n [5, 15],\n [5, 13],\n [6, 11],\n [10, 9],\n [6, 7],\n [5, 5],\n [5, 3],\n [6, 1],\n [7, 0],\n [8, -2],\n [8, -4],\n [7, -6],\n [-1, -1],\n [8, 8],\n [6, 6],\n [6, 4],\n [7, 2],\n [8, 1],\n [9, -1],\n [9, -3],\n [8, -5],\n [7, -6],\n [5, -7]\n ]\n },\n '~': {\n width: 24, points: [\n [3, 6],\n [3, 8],\n [4, 11],\n [6, 12],\n [8, 12],\n [10, 11],\n [14, 8],\n [16, 7],\n [18, 7],\n [20, 8],\n [21, 10],\n [-1, -1],\n [3, 8],\n [4, 10],\n [6, 11],\n [8, 11],\n [10, 10],\n [14, 7],\n [16, 6],\n [18, 6],\n [20, 7],\n [21, 10],\n [21, 12]\n ]\n }\n};\n\n/**\n * @desc Creates wireframe text-shaped geometry arrays.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then create an {@link XKTMesh} with a text-shaped {@link XKTGeometry}.\n *\n * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#geometry_builders_buildVectorTextGeometry)]\n *\n * ````javascript\n * const xktModel = new XKTModel();\n *\n * const text = buildVectorTextGeometry({\n * origin: [0,0,0],\n * text: \"On the other side of the screen, it all looked so easy\"\n * });\n *\n * const xktGeometry = xktModel.createGeometry({\n * geometryId: \"textGeometry\",\n * primitiveType: text.primitiveType, // Will be \"lines\"\n * positions: text.positions,\n * indices: text.indices\n * });\n *\n * const xktMesh = xktModel.createMesh({\n * meshId: \"redTextMesh\",\n * geometryId: \"textGeometry\",\n * position: [-4, -6, -4],\n * scale: [1, 3, 1],\n * rotation: [0, 0, 0],\n * color: [1, 0, 0],\n * opacity: 1\n * });\n *\n * const xktEntity = xktModel.createEntity({\n * entityId: \"redText\",\n * meshIds: [\"redTextMesh\"]\n * });\n *\n * xktModel.finalize();\n * ````\n *\n * @function buildVectorTextGeometry\n * @param {*} [cfg] Configs\n * @param {Number[]} [cfg.center] 3D point indicating the center position.\n * @param {Number[]} [cfg.origin] 3D point indicating the top left corner.\n * @param {Number} [cfg.size=1] Size of each character.\n * @param {String} [cfg.text=\"\"] The text.\n * @returns {Object} Geometry arrays for {@link XKTModel#createGeometry} or {@link XKTModel#createMesh}.\n */\nfunction buildVectorTextGeometry(cfg = {}) {\n\n var origin = cfg.origin || [0, 0, 0];\n var xOrigin = origin[0];\n var yOrigin = origin[1];\n var zOrigin = origin[2];\n var size = cfg.size || 1;\n\n var positions = [];\n var indices = [];\n var text = (\"\" + cfg.text).trim();\n var lines = (text || \"\").split(\"\\n\");\n var countVerts = 0;\n var y = 0;\n var x;\n var str;\n var len;\n var c;\n var mag = 1.0 / 25.0;\n var penUp;\n var p1;\n var p2;\n var needLine;\n var pointsLen;\n var a;\n\n for (var iLine = 0; iLine < lines.length; iLine++) {\n\n x = 0;\n str = lines[iLine];\n len = str.length;\n\n for (var i = 0; i < len; i++) {\n\n c = letters[str.charAt(i)];\n\n if (c === '\\n') {\n //alert(\"newline\");\n }\n\n if (!c) {\n continue;\n }\n\n penUp = 1;\n p1 = -1;\n p2 = -1;\n needLine = false;\n\n pointsLen = c.points.length;\n\n for (var j = 0; j < pointsLen; j++) {\n a = c.points[j];\n\n if (a[0] === -1 && a[1] === -1) {\n penUp = 1;\n needLine = false;\n continue;\n }\n\n positions.push((x + (a[0] * size) * mag) + xOrigin);\n positions.push((y + (a[1] * size) * mag) + yOrigin);\n positions.push(0 + zOrigin);\n\n if (p1 === -1) {\n p1 = countVerts;\n } else if (p2 === -1) {\n p2 = countVerts;\n } else {\n p1 = p2;\n p2 = countVerts;\n }\n countVerts++;\n\n if (penUp) {\n penUp = false;\n\n } else {\n indices.push(p1);\n indices.push(p2);\n }\n\n needLine = true;\n }\n x += c.width * mag * size;\n\n }\n y -= 35 * mag * size;\n }\n\n return {\n primitiveType: \"lines\",\n positions: positions,\n indices: indices\n };\n}\n\n\nexport {buildVectorTextGeometry}\n","/**\n * @private\n * @param buf\n * @returns {ArrayBuffer}\n */\nexport function toArrayBuffer(buf) {\n const ab = new ArrayBuffer(buf.length);\n const view = new Uint8Array(ab);\n for (let i = 0; i < buf.length; ++i) {\n view[i] = buf[i];\n }\n return ab;\n}","import {XKT_INFO} from \"./XKT_INFO.js\";\nimport {XKTModel} from \"./XKTModel/XKTModel.js\";\nimport {parseCityJSONIntoXKTModel} from \"./parsers/parseCityJSONIntoXKTModel.js\";\nimport {parseGLTFIntoXKTModel} from \"./parsers/parseGLTFIntoXKTModel.js\";\nimport {parseIFCIntoXKTModel} from \"./parsers/parseIFCIntoXKTModel.js\";\nimport {parseLASIntoXKTModel} from \"./parsers/parseLASIntoXKTModel.js\";\nimport {parsePCDIntoXKTModel} from \"./parsers/parsePCDIntoXKTModel.js\";\nimport {parsePLYIntoXKTModel} from \"./parsers/parsePLYIntoXKTModel.js\";\nimport {parseSTLIntoXKTModel} from \"./parsers/parseSTLIntoXKTModel.js\";\nimport {writeXKTModelToArrayBuffer} from \"./XKTModel/writeXKTModelToArrayBuffer.js\";\n\nimport {toArrayBuffer} from \"./XKTModel/lib/toArraybuffer\";\nimport {parseGLTFJSONIntoXKTModel} from \"./parsers/parseGLTFJSONIntoXKTModel\";\n\nconst fs = require('fs');\n\n/**\n * Converts model files into xeokit's native XKT format.\n *\n * Supported source formats are: IFC, CityJSON, glTF, LAZ and LAS.\n *\n * **Only bundled in xeokit-convert.cjs.js.**\n *\n * ## Usage\n *\n * ````javascript\n * const convert2xkt = require(\"@xeokit/xeokit-convert/dist/convert2xkt.cjs.js\");\n * const fs = require('fs');\n *\n * convert2xkt({\n * sourceData: fs.readFileSync(\"rme_advanced_sample_project.ifc\"),\n * outputXKT: (xtkArrayBuffer) => {\n * fs.writeFileSync(\"rme_advanced_sample_project.ifc.xkt\", xtkArrayBuffer);\n * }\n * }).then(() => {\n * console.log(\"Converted.\");\n * }, (errMsg) => {\n * console.error(\"Conversion failed: \" + errMsg)\n * });\n ````\n * @param {Object} params Conversion parameters.\n * @param {Object} params.WebIFC The WebIFC library. We pass this in as an external dependency, in order to give the\n * caller the choice of whether to use the Browser or NodeJS version.\n * @param {*} [params.configs] Configurations.\n * @param {String} [params.source] Path to source file. Alternative to ````sourceData````.\n * @param {ArrayBuffer|JSON} [params.sourceData] Source file data. Alternative to ````source````.\n * @param {String} [params.sourceFormat] Format of source file/data. Always needed with ````sourceData````, but not normally needed with ````source````, because convert2xkt will determine the format automatically from the file extension of ````source````.\n * @param {String} [params.metaModelDataStr] Source file data. Overrides metadata from ````metaModelSource````, ````sourceData```` and ````source````.\n * @param {String} [params.metaModelSource] Path to source metaModel file. Overrides metadata from ````sourceData```` and ````source````. Overridden by ````metaModelData````.\n * @param {String} [params.output] Path to destination XKT file. Directories on this path are automatically created if not existing.\n * @param {Function} [params.outputXKTModel] Callback to collect the ````XKTModel```` that is internally build by this method.\n * @param {Function} [params.outputXKT] Callback to collect XKT file data.\n * @param {String[]} [params.includeTypes] Option to only convert objects of these types.\n * @param {String[]} [params.excludeTypes] Option to never convert objects of these types.\n * @param {Object} [stats] Collects conversion statistics. Statistics are attached to this object if provided.\n * @param {Function} [params.outputStats] Callback to collect statistics.\n * @param {Boolean} [params.rotateX=false] Whether to rotate the model 90 degrees about the X axis to make the Y axis \"up\", if necessary. Applies to CityJSON and LAS/LAZ models.\n * @param {Boolean} [params.reuseGeometries=true] When true, will enable geometry reuse within the XKT. When false,\n * will automatically \"expand\" all reused geometries into duplicate copies. This has the drawback of increasing the XKT\n * file size (~10-30% for typical models), but can make the model more responsive in the xeokit Viewer, especially if the model\n * has excessive geometry reuse. An example of excessive geometry reuse would be when a model (eg. glTF) has 4000 geometries that are\n * shared amongst 2000 objects, ie. a large number of geometries with a low amount of reuse, which can present a\n * pathological performance case for xeokit's underlying graphics APIs (WebGL, WebGPU etc).\n * @param {Boolean} [params.includeTextures=true] Whether to convert textures. Only works for ````glTF```` models.\n * @param {Boolean} [params.includeNormals=true] Whether to convert normals. When false, the parser will ignore\n * geometry normals, and the modelwill rely on the xeokit ````Viewer```` to automatically generate them. This has\n * the limitation that the normals will be face-aligned, and therefore the ````Viewer```` will only be able to render\n * a flat-shaded non-PBR representation of the model.\n * @param {Number} [params.minTileSize=200] Minimum RTC coordinate tile size. Set this to a value between 100 and 10000,\n * depending on how far from the coordinate origin the model's vertex positions are; specify larger tile sizes when close\n * to the origin, and smaller sizes when distant. This compensates for decreasing precision as floats get bigger.\n * @param {Function} [params.log] Logging callback.\n * @return {Promise}\n */\nfunction convert2xkt({\n WebIFC,\n configs,\n source,\n sourceData,\n sourceFormat,\n metaModelSource,\n metaModelDataStr,\n output,\n outputXKTModel,\n outputXKT,\n includeTypes,\n excludeTypes,\n reuseGeometries = true,\n minTileSize = 200,\n stats = {},\n outputStats,\n rotateX = false,\n includeTextures = true,\n includeNormals = true,\n log = function (msg) {\n }\n }) {\n\n stats.sourceFormat = \"\";\n stats.schemaVersion = \"\";\n stats.title = \"\";\n stats.author = \"\";\n stats.created = \"\";\n stats.numMetaObjects = 0;\n stats.numPropertySets = 0;\n stats.numTriangles = 0;\n stats.numVertices = 0;\n stats.numNormals = 0;\n stats.numUVs = 0;\n stats.numTextures = 0;\n stats.numTextureSets = 0;\n stats.numObjects = 0;\n stats.numGeometries = 0;\n stats.sourceSize = 0;\n stats.xktSize = 0;\n stats.texturesSize = 0;\n stats.xktVersion = \"\";\n stats.compressionRatio = 0;\n stats.conversionTime = 0;\n stats.aabb = null;\n\n return new Promise(function (resolve, reject) {\n const _log = log;\n log = (msg) => {\n _log(`[convert2xkt] ${msg}`)\n }\n\n if (!source && !sourceData) {\n reject(\"Argument expected: source or sourceData\");\n return;\n }\n\n if (!sourceFormat && sourceData) {\n reject(\"Argument expected: sourceFormat is required with sourceData\");\n return;\n }\n\n if (!output && !outputXKTModel && !outputXKT) {\n reject(\"Argument expected: output, outputXKTModel or outputXKT\");\n return;\n }\n\n if (source) {\n log('Reading input file: ' + source);\n }\n\n const startTime = new Date();\n\n const sourceConfigs = configs.sourceConfigs || {};\n const ext = sourceFormat || source.split('.').pop();\n let fileTypeConfigs = sourceConfigs[ext];\n\n if (!fileTypeConfigs) {\n log(`[WARNING] Could not find configs sourceConfigs entry for source format \"${ext}\". This is derived from the source file name extension. Will use internal default configs.`);\n fileTypeConfigs = {};\n }\n function overrideOption(option1, option2) {\n if (option1 !== undefined) {\n return option1;\n }\n return option2;\n }\n\n if (!sourceData) {\n try {\n sourceData = fs.readFileSync(source);\n } catch (err) {\n reject(err);\n return;\n }\n }\n\n const sourceFileSizeBytes = sourceData.byteLength;\n\n log(\"Input file size: \" + (sourceFileSizeBytes / 1000).toFixed(2) + \" kB\");\n\n if (!metaModelDataStr && metaModelSource) {\n log('Reading input metadata file: ' + metaModelSource);\n try {\n metaModelDataStr = fs.readFileSync(metaModelSource);\n } catch (err) {\n reject(err);\n return;\n }\n }\n\n let metaModelJSON;\n\n if (metaModelDataStr) {\n try {\n metaModelJSON = JSON.parse(metaModelDataStr);\n } catch (e) {\n log(`Error parsing metadata JSON: ${e}`);\n }\n }\n\n minTileSize = overrideOption(fileTypeConfigs.minTileSize, minTileSize);\n rotateX = overrideOption(fileTypeConfigs.rotateX, rotateX);\n reuseGeometries = overrideOption(fileTypeConfigs.reuseGeometries, reuseGeometries);\n includeTextures = overrideOption(fileTypeConfigs.includeTextures, includeTextures);\n includeNormals = overrideOption(fileTypeConfigs.includeNormals, includeNormals);\n includeTypes = overrideOption(fileTypeConfigs.includeTypes, includeTypes);\n excludeTypes = overrideOption(fileTypeConfigs.excludeTypes, excludeTypes);\n\n if (reuseGeometries === false) {\n log(\"Geometry reuse is disabled\");\n }\n\n const xktModel = new XKTModel({\n minTileSize\n });\n\n switch (ext) {\n case \"json\":\n convert(parseCityJSONIntoXKTModel, {\n data: JSON.parse(sourceData),\n xktModel,\n stats,\n rotateX,\n center: fileTypeConfigs.center,\n transform: fileTypeConfigs.transform,\n log\n });\n break;\n\n case \"glb\":\n sourceData = toArrayBuffer(sourceData);\n convert(parseGLTFIntoXKTModel, {\n data: sourceData,\n reuseGeometries,\n includeTextures,\n includeNormals,\n metaModelData: metaModelJSON,\n xktModel,\n stats,\n log\n });\n break;\n\n case \"gltf\":\n const gltfJSON = JSON.parse(sourceData);\n const gltfBasePath = source ? getBasePath(source) : \"\";\n convert(parseGLTFJSONIntoXKTModel, {\n baseUri: gltfBasePath,\n data: gltfJSON,\n reuseGeometries,\n includeTextures,\n includeNormals,\n metaModelData: metaModelJSON,\n xktModel,\n getAttachment: async (name) => {\n const filePath = gltfBasePath + name;\n log(`Reading attachment file: ${filePath}`);\n const buffer = fs.readFileSync(filePath);\n const arrayBuf = toArrayBuffer(buffer);\n return arrayBuf;\n },\n stats,\n log\n });\n break;\n\n case \"ifc\":\n convert(parseIFCIntoXKTModel, {\n WebIFC,\n data: sourceData,\n xktModel,\n wasmPath: \"./\",\n includeTypes,\n excludeTypes,\n stats,\n log\n });\n break;\n\n case \"laz\":\n convert(parseLASIntoXKTModel, {\n data: sourceData,\n xktModel,\n stats,\n fp64: fileTypeConfigs.fp64,\n colorDepth: fileTypeConfigs.colorDepth,\n center: fileTypeConfigs.center,\n transform: fileTypeConfigs.transform,\n skip: overrideOption(fileTypeConfigs.skip, 1),\n log\n });\n break;\n\n case \"las\":\n convert(parseLASIntoXKTModel, {\n data: sourceData,\n xktModel,\n stats,\n fp64: fileTypeConfigs.fp64,\n colorDepth: fileTypeConfigs.colorDepth,\n center: fileTypeConfigs.center,\n transform: fileTypeConfigs.transform,\n skip: overrideOption(fileTypeConfigs.skip, 1),\n log\n });\n break;\n\n case \"pcd\":\n convert(parsePCDIntoXKTModel, {\n data: sourceData,\n xktModel,\n stats,\n log\n });\n break;\n\n case \"ply\":\n convert(parsePLYIntoXKTModel, {\n data: sourceData,\n xktModel,\n stats,\n log\n });\n break;\n\n case \"stl\":\n convert(parseSTLIntoXKTModel, {\n data: sourceData,\n xktModel,\n stats,\n log\n });\n break;\n\n default:\n reject(`Error: unsupported source format: \"${ext}\".`);\n return;\n }\n\n function convert(parser, converterParams) {\n\n parser(converterParams).then(() => {\n\n if (!metaModelJSON) {\n xktModel.createDefaultMetaObjects();\n }\n\n log(\"Input file parsed OK. Building XKT document...\");\n\n xktModel.finalize().then(() => {\n\n log(\"XKT document built OK. Writing to XKT file...\");\n\n const xktArrayBuffer = writeXKTModelToArrayBuffer(xktModel, metaModelJSON, stats, {zip: true});\n\n const xktContent = Buffer.from(xktArrayBuffer);\n\n const targetFileSizeBytes = xktArrayBuffer.byteLength;\n\n stats.minTileSize = minTileSize || 200;\n stats.sourceSize = (sourceFileSizeBytes / 1000).toFixed(2);\n stats.xktSize = (targetFileSizeBytes / 1000).toFixed(2);\n stats.xktVersion = XKT_INFO.xktVersion;\n stats.compressionRatio = (sourceFileSizeBytes / targetFileSizeBytes).toFixed(2);\n stats.conversionTime = ((new Date() - startTime) / 1000.0).toFixed(2);\n stats.aabb = xktModel.aabb;\n log(`Converted to: XKT v${stats.xktVersion}`);\n if (includeTypes) {\n log(\"Include types: \" + (includeTypes ? includeTypes : \"(include all)\"));\n }\n if (excludeTypes) {\n log(\"Exclude types: \" + (excludeTypes ? excludeTypes : \"(exclude none)\"));\n }\n log(\"XKT size: \" + stats.xktSize + \" kB\");\n log(\"XKT textures size: \" + (stats.texturesSize / 1000).toFixed(2) + \"kB\");\n log(\"Compression ratio: \" + stats.compressionRatio);\n log(\"Conversion time: \" + stats.conversionTime + \" s\");\n log(\"Converted metaobjects: \" + stats.numMetaObjects);\n log(\"Converted property sets: \" + stats.numPropertySets);\n log(\"Converted drawable objects: \" + stats.numObjects);\n log(\"Converted geometries: \" + stats.numGeometries);\n log(\"Converted textures: \" + stats.numTextures);\n log(\"Converted textureSets: \" + stats.numTextureSets);\n log(\"Converted triangles: \" + stats.numTriangles);\n log(\"Converted vertices: \" + stats.numVertices);\n log(\"Converted UVs: \" + stats.numUVs);\n log(\"Converted normals: \" + stats.numNormals);\n log(\"minTileSize: \" + stats.minTileSize);\n\n if (output) {\n const outputDir = getBasePath(output).trim();\n if (outputDir !== \"\" && !fs.existsSync(outputDir)) {\n fs.mkdirSync(outputDir, {recursive: true});\n }\n log('Writing XKT file: ' + output);\n fs.writeFileSync(output, xktContent);\n }\n\n if (outputXKTModel) {\n outputXKTModel(xktModel);\n }\n\n if (outputXKT) {\n outputXKT(xktContent);\n }\n\n if (outputStats) {\n outputStats(stats);\n }\n\n resolve();\n });\n }, (err) => {\n reject(err);\n });\n }\n });\n}\n\nfunction getBasePath(src) {\n const i = src.lastIndexOf(\"/\");\n return (i !== 0) ? src.substring(0, i + 1) : \"\";\n}\n\nexport {convert2xkt};","import '@loaders.gl/polyfills';\nimport {installFilePolyfills} from '@loaders.gl/polyfills';\n\ninstallFilePolyfills();\n\nexport * from \"./src/index.js\";\nexport {convert2xkt} from \"./src/convert2xkt.js\"; // convert2xkt is only bundled for Node.js\n"],"names":["root","factory","exports","module","define","amd","global","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","p","mat","mat2","mat3","xyz","tempVec3","vec","translate","scale","XKT_INFO","xktVersion","RepeatWrapping","ClampToEdgeWrapping","MirroredRepeatWrapping","NearestFilter","NearestMipMapNearestFilter","NearestMipmapNearestFilter","NearestMipmapLinearFilter","NearestMipMapLinearFilter","LinearFilter","LinearMipmapNearestFilter","LinearMipMapNearestFilter","LinearMipmapLinearFilter","LinearMipMapLinearFilter","GIFMediaType","JPEGMediaType","PNGMediaType","FloatArrayType","Float64Array","tempMat1","tempMat2","tempVec4","math","MIN_DOUBLE","Number","MAX_SAFE_INTEGER","MAX_DOUBLE","DEGTORAD","RADTODEG","vec2","values","vec3","vec4","mat3ToMat4","mat4","arguments","length","mat4ToMat3","createUUID","lut","i","toString","d0","Math","random","d1","d2","d3","concat","clamp","min","max","fmod","a","b","console","error","negateVec4","v","dest","addVec4","u","addVec4Scalar","s","addVec3","addVec3Scalar","subVec4","subVec3","subVec2","subVec4Scalar","subScalarVec4","mulVec4","mulVec4Scalar","mulVec3Scalar","mulVec2Scalar","divVec3","divVec4","divScalarVec3","divVec3Scalar","divVec4Scalar","divScalarVec4","dotVec4","cross3Vec4","u0","u1","u2","v0","v1","v2","cross3Vec3","x","y","z","x2","y2","z2","sqLenVec4","lenVec4","sqrt","dotVec3","dotVec2","sqLenVec3","sqLenVec2","lenVec3","distVec3","w","lenVec2","distVec2","rcpVec3","normalizeVec4","f","normalizeVec3","normalizeVec2","angleVec3","theta","acos","vec3FromMat4Scale","m","vecToArray","trunc","round","len","Array","slice","xyzArrayToObject","arr","xyzObjectToArray","arry","dupMat4","mat4To3","m4s","setMat4ToZeroes","setMat4ToOnes","diagonalMat4v","diagonalMat4c","diagonalMat4s","identityMat4","identityMat3","isIdentityMat4","negateMat4","addMat4","addMat4Scalar","addScalarMat4","subMat4","subMat4Scalar","subScalarMat4","mulMat4","a00","a01","a02","a03","a10","a11","a12","a13","a20","a21","a22","a23","a30","a31","a32","a33","b00","b01","b02","b03","b10","b11","b12","b13","b20","b21","b22","b23","b30","b31","b32","b33","mulMat3","mulMat4Scalar","mulMat4v4","v3","transposeMat4","m4","m14","m8","m13","m12","m9","transposeMat3","determinantMat4","inverseMat4","b04","b05","b06","b07","b08","b09","invDet","traceMat4","translationMat4v","translationMat3v","translationMat4c","translationMat4s","translateMat4v","translateMat4c","OLDtranslateMat4c","m15","m3","m7","m11","rotationMat4v","anglerad","axis","xy","yz","zx","xs","ys","zs","ax","sin","c","cos","q","rotationMat4c","scalingMat4v","scalingMat3v","scalingMat4c","scaleMat4c","scaleMat4v","scalingMat4s","rotationTranslationMat4","xx","xz","yy","zz","wx","wy","wz","mat4ToEuler","order","m21","m22","m23","m31","m32","m33","asin","abs","atan2","composeMat4","position","quaternion","quaternionToRotationMat4","decomposeMat4","matrix","sx","sy","sz","set","invSX","invSY","invSZ","mat4ToQuaternion","this","lookAtMat4v","pos","target","up","z0","z1","x0","x1","y0","y1","posx","posy","posz","upx","upy","upz","targetx","targety","targetz","lookAtMat4c","orthoMat4c","left","right","bottom","top","near","far","rl","tb","fn","frustumMat4v","fmin","fmax","fmin4","fmax4","t","tempMat20","tempMat21","tempMat22","frustumMat4","perspectiveMat4","fovyrad","aspectratio","znear","zfar","pmin","pmax","tan","transformPoint3","transformPoint4","transformPoints3","points","points2","p0","p1","p2","pi","result","m0","m1","m2","m5","m6","m10","transformPositions3","transformPositions4","transformVec3","transformVec4","rotateVec3X","rotateVec3Y","rotateVec3Z","projectVec4","unprojectVec3","viewMat","projMat","lerpVec3","t1","t2","flatten","leni","j","lenj","item","push","identityQuaternion","eulerToQuaternion","euler","c1","c2","c3","s1","s2","s3","trace","vec3PairToQuaternion","norm_u_norm_v","real_part","normalizeQuaternion","angleAxisToQuaternion","angleAxis","halfAngle","fsin","quaternionToEuler","mulQuaternions","p3","q0","q1","q2","q3","vec3ApplyQuaternion","qx","qy","qz","qw","ix","iy","iz","iw","quaternionToMat4","tx","ty","tz","twx","twy","twz","txx","txy","txz","tyy","tyz","tzz","conjugateQuaternion","inverseQuaternion","quaternionToAngleAxis","angle","AABB3","AABB2","OBB3","OBB2","Sphere3","transformOBB3","containsAABB3","aabb1","aabb2","getAABB3Diag","aabb","getAABB3DiagPoint","diagVec","xneg","xpos","yneg","ypos","zneg","zpos","getAABB3Center","getAABB2Center","collapseAABB3","AABB3ToOBB3","obb","positions3ToAABB3","positions","positionsDecodeMatrix","xmin","ymin","zmin","xmax","ymax","zmax","decompressPosition","OBB3ToAABB3","points3ToAABB3","points3ToSphere3","sphere","numPoints","dist","radius","positions3ToSphere3","tempVec3a","tempVec3b","lenPositions","numPositions","OBB3ToSphere3","point","lenPoints","getSphere3Center","expandAABB3","expandAABB3Point3","triangleNormal","normal","p1x","p1y","p1z","p2x","p2y","p2z","p3x","p3y","p3z","mag","octEncodeVec3","array","xfunc","yfunc","tempx","tempy","Int8Array","octDecodeVec2","oct","dot","uniquePositions","indicesLookup","indicesReverseLookup","weldedIndices","faces","numFaces","compa","compb","compc","cb","ab","cross","inverseNormal","geometryCompression","quantizePositions","quantizedPositions","maxInt","xMultiplier","yMultiplier","zMultiplier","verify","num","floor","compressPosition","multiplier","Float32Array","createPositionsDecodeMatrix","xwid","ywid","zwid","transformAndOctEncodeNormals","modelNormalMatrix","normals","lenNormals","compressedNormals","lenCompressedNormals","best","currentCos","bestCos","localNormal","worldNormal","octEncodeNormals","buildEdgeIndices","Uint16Array","indices","edgeThreshold","vx","vy","vz","positionsMap","precision","pow","lenUniquePositions","weldVertices","numIndices","ia","ib","ic","face","buildFaces","edge1","edge2","index1","index2","edge","normal1","normal2","edgeIndices","thresholdDot","edges","largeIndex","faceIndex","face1","face2","dot2","Uint32Array","isTriangleMeshSolid","vertexIndexMapping","compareIndexPositions","posA","posB","newIndices","sort","uniqueVertexIndex","a2","b2","temp","compareEdges","e1","e2","sameEdgeCount","XKTMesh","_createClass","cfg","_classCallCheck","meshId","meshIndex","geometry","color","metallic","roughness","opacity","textureSet","entity","XKTGeometry","geometryId","primitiveType","geometryIndex","numInstances","positionsQuantized","normalsOctEncoded","colorsCompressed","uvs","uvsCompressed","solid","XKTEntity","entityId","meshes","entityIndex","hasReusedGeometries","XKTTile","entities","KDNode","XKTMetaObject","metaObjectId","propertySetIds","metaObjectType","metaObjectName","parentMetaObjectId","XKTPropertySet","propertySetId","propertySetType","propertySetName","properties","XKTTexture","textureId","textureIndex","imageData","channel","width","height","src","compressed","mediaType","minFilter","magFilter","wrapS","wrapT","wrapR","XKTTextureSet","textureSetId","textureSetIndex","materialType","materialIndex","colorTexture","metallicRoughnessTexture","normalsTexture","emissiveTexture","occlusionTexture","_regeneratorRuntime","Op","hasOwn","desc","$Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","makeInvokeMethod","tryCatch","arg","type","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","Gp","defineIteratorMethods","forEach","method","_invoke","AsyncIterator","PromiseImpl","invoke","resolve","reject","record","_typeof","__await","then","unwrapped","previousPromise","callInvokeWithMethodAndArg","state","Error","done","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","methodName","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","doneResult","displayName","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","val","object","reverse","pop","skipTempReset","prev","charAt","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","asyncGeneratorStep","gen","_next","_throw","_defineProperties","props","descriptor","input","hint","prim","toPrimitive","res","String","_toPrimitive","tempVec4a","tempVec4b","tempMat4","tempMat4b","kdTreeDimLength","TEXTURE_ENCODING_OPTIONS","useSRGB","qualityLevel","encodeUASTC","mipmaps","XKTModel","instance","Constructor","modelId","projectId","revisionId","author","createdAt","creatingApplication","schema","minTileSize","propertySets","propertySetsList","metaObjects","metaObjectsList","reusedGeometriesDecodeMatrix","geometries","geometriesList","textures","texturesList","textureSets","textureSetsList","meshesList","entitiesList","tilesList","finalized","protoProps","_finalize","params","propertySet","metaObject","_rootMetaObject","fileExt","split","texture","colorTextureId","metallicRoughnessTextureId","normalsTextureId","emissiveTextureId","occlusionTextureId","triangles","lines","line_strip","colors","xktGeometryCfg","uv","Uint8Array","mergedPositions","mergedIndices","mergeVertices","rotation","mesh","meshIds","meshIdIdx","meshIdLen","warn","createMetaObject","_callee","rootKDNode","_context","log","_removeUnusedTextures","_compressTextures","_bakeSingleUseGeometryPositions","_bakeAndOctEncodeNormals","_createEntityAABBs","_createKDTree","_createTilesFromKDTree","_createReusedGeometriesDecodeMatrix","_flagSolidGeometries","args","apply","_this","countTextures","_loop","encodingOptions","load","ImageLoader","image","encode","KTX2BasisWriter","encodedData","encodedImageData","entityAABB","_insertEntityIntoKDTree","kdNode","nodeAABB","dim","aabbLeft","aabbRight","_createTilesFromKDNode","_createTileFromEntities","tileAABB","tileCenter","tileCenterNeg","rtcAABB","reused","k","lenk","tile","reusedGeometriesAABB","countReusedGeometries","numGeometries","maxNumPositions","maxNumIndices","XKT_VERSION","NUM_TEXTURE_ATTRIBUTES","NUM_MATERIAL_ATTRIBUTES","writeXKTModelToArrayBuffer","xktModel","metaModelJSON","stats","options","data","metaModelDataStr","numPropertySets","numMetaObjects","numTextures","numTextureSets","numMeshes","numEntities","numTiles","lenColors","lenUVs","lenIndices","lenEdgeIndices","lenMatrices","lenTextures","xktTexture","byteLength","numCompressedTextures","metadata","textureData","eachTextureDataPortion","eachTextureAttributes","eachTextureSetTextures","Int32Array","matrices","eachGeometryPrimitiveType","eachGeometryPositionsPortion","eachGeometryNormalsPortion","eachGeometryColorsPortion","eachGeometryUVsPortion","eachGeometryIndicesPortion","eachGeometryEdgeIndicesPortion","eachMeshGeometriesPortion","eachMeshMatricesPortion","eachMeshTextureSet","eachMeshMaterialAttributes","eachEntityId","eachEntityMeshesPortion","eachTileAABB","eachTileEntitiesPortion","countPositions","countNormals","countColors","countUVs","countIndices","countEdgeIndices","id","propertySetsIndex","propertySetJSON","metaObjectsIndex","metaObjectJSON","parent","external","portionIdx","textureAttrIdx","eachTextureSetTexturesIndex","countEntityMeshesPortion","eachMeshMaterialAttributesIndex","matricesIndex","tileIndex","tileEntities","numTileEntities","entityMeshes","numEntityMeshes","tileAABBIndex","getModelData","deflatedData","deflate","buffer","zip","pako","deflateJSON","JSON","stringify","replace","chr","charCodeAt","substr","deflateData","texturesSize","arrayBuffer","elements","indexData","dataLen","elementsize","indexBuf","dataArray","offset","element","toArrayBuffer","createArrayBuffer","strings","earcut","holeIndices","minX","minY","maxX","maxY","invSize","hasHoles","outerLen","outerNode","linkedList","list","queue","steiner","getLeftmost","compareX","eliminateHole","filterPoints","eliminateHoles","earcutLinked","start","end","clockwise","last","signedArea","insertNode","equals","removeNode","again","area","ear","pass","zOrder","prevZ","nextZ","e","tail","numMerges","pSize","qSize","inSize","sortLinked","indexCurve","isEarHashed","isEar","cureLocalIntersections","splitEarcut","pointInTriangle","minTX","minTY","maxTX","maxTY","minZ","maxZ","n","intersects","locallyInside","isValidDiagonal","splitPolygon","hole","hx","hy","mx","my","tanMin","Infinity","sectorContainsSector","findHoleBridge","leftmost","ay","bx","by","cx","cy","px","py","intersectsPolygon","inside","middleInside","o1","sign","o2","o3","o4","onSegment","Node","an","bp","sum","deviation","polygonArea","trianglesArea","vertices","holes","dimensions","holeIndex","tempVec2a","tempVec3c","parseCityJSONIntoXKTModel","_ref","_ref$center","center","_ref$transform","transform","_ref$stats","vertices2","copyVertices","cityJSONTransform","vertex","transformVertices","centerVertices","customTransformVertices","sourceFormat","schemaVersion","version","title","created","numTriangles","numVertices","numObjects","rootMetaObjectId","modelMetaObjectId","ctx","msg","nextId","cityObjects","CityObjects","objectId","parseCityObject","parseCityJSON","centerPos","cityObject","parents","objectMaterial","surfaceMaterials","appearance","materials","geometryMaterial","material","themeIds","theme","surfaceMaterial","parseGeometrySurfacesWithOwnMaterials","parseGeometrySurfacesWithSharedMaterial","createEntity","parseSurfacesWithOwnMaterials","boundaries","shells","solids","surfaces","surface","diffuseColor","transparency","sharedIndices","geometryCfg","newFace","extractLocalIndices","_toConsumableArray","pList","getNormalOfPositions","pv","to2D","unshift","tr","createGeometry","createMesh","parseSurfacesWithSharedMaterial","primitiveCfg","boundary","newBoundary","index","includes","vertexIndex","indexOf","nexti","_p","_n","re","x3","tmp2","y3","utils","isString","parseGLTFIntoXKTModel","baseUri","metaModelData","_ref$includeTextures","includeTextures","_ref$includeNormals","includeNormals","getAttachment","numNormals","numUVs","parse","GLTFLoader","gltfData","metaModelCorrections","getMetaModelCorrections","geometryCreated","parseTexture","parseTextures","_textureSetId","parseTextureSet","_attributes","parseMaterialAttributes","parseMaterials","scene","scenes","nodes","countMeshUsage","parseNode","parseScene","parseDefaultScene","errMsg","eachRootStats","eachChildRoot","metaObjectsMap","metaObjectParent","rootMetaObject","numChildren","countChildren","source","sampler","createTexture","flipY","_textureId","textureSetCfg","normalTexture","normalTextureId","metallicPBR","pbrMetallicRoughness","baseColorTexture","extensions","specularPBR","specularTexture","specularColorTexture","createTextureSet","materialAttributes","diffuseFactor","common","technique","blinn","phong","lambert","diffuse","transparent","baseColorFactor","metallicFactor","roughnessFactor","node","instances","children","childNode","deferredMeshIds","depth","localMatrix","translation","numPrimitives","primitives","primitive","_xktGeometryId","xktGeometryId","mode","attributes","POSITION","NORMAL","COLOR_0","TEXCOORD_0","xktMeshId","meshCfg","nodeName","xktEntityId","rootMetaObjectStats","atob2","atob","Buffer","from","WEBGL_COMPONENT_TYPES","Int16Array","WEBGL_TYPE_SIZES","parseGLTFJSONIntoXKTModel","reuseGeometries","gltf","createXKTGeometryIds","nextMeshId","buffers","all","map","bufferInfo","_arrayBuffer","_buffer","uri","dataUriRegexResult","match","isBase64","decodeURIComponent","ArrayBuffer","view","parseArrayBuffer","parseBuffer","parseBuffers","bufferViewsInfo","bufferViews","parseBufferView","parseBufferViews","freeBuffers","materialsInfo","materialInfo","parseMaterial","_materialData","defaultSceneInfo","sceneInfo","glTFNode","bufferViewInfo","_typedArray","byteOffset","gltfMeshId","meshInfo","numPrimitivesInMesh","primitiveInfo","geometryHash","createPrimitiveGeometryHash","geometryArrays","parsePrimitiveGeometry","childNodeIdx","childGLTFNode","join","accessors","indicesIndex","accessorInfo","parseAccessorTypedArray","positionsIndex","normalsIndex","colorsIndex","bufferView","itemSize","TypedArray","componentType","itemBytes","BYTES_PER_ELEMENT","byteStride","count","parseIFCIntoXKTModel","WebIFC","_ref$autoNormals","autoNormals","includeTypes","excludeTypes","wasmPath","ifcAPI","IfcAPI","SetWasmPath","Init","modelID","OpenModel","ifcProjectId","GetLineIDsWithType","IFCPROJECT","GetLine","ifcProject","parseSpatialChildren","parseMetadata","flatMeshes","LoadAllGeometry","size","createObject","IFCSPACE","ifcSpaceId","flatMesh","GetFlatMesh","parseGeometry","IFCRELDEFINESBYPROPERTIES","relID","rel","relatingPropertyDefinition","RelatingPropertyDefinition","GlobalId","relatedObjects","RelatedObjects","HasProperties","Name","nominalValue","NominalValue","property","valueType","Description","description","createPropertySet","parsePropertySets","ifcElement","parseRelatedItemsOfType","expressID","IFCRELAGGREGATES","IFCRELCONTAINEDINSPATIALSTRUCTURE","relation","related","relatedItems","isArray","element2","flatMeshExpressID","placedGeometries","placedGeometry","geometryExpressID","GetGeometry","vertexData","GetVertexArray","GetVertexData","GetVertexDataSize","GetIndexArray","GetIndexData","GetIndexDataSize","flatTransformation","MAX_VERTICES","parseLASIntoXKTModel","_ref$colorDepth","colorDepth","_ref$fp","fp64","_ref$skip","skip","_ref$log","LASLoader","las","parsedData","loaderData","pointsFormatId","readAttributes","intensity","readIntensities","readColorsAndIntensities","pointsChunks","chunkArray","positionsValue","readPositions","colorsChunks","attributesPosition","attributesColor","attributesIntensity","colorSize","intensities","colorsCompressedSize","l","chunkSize","parseMetaModelIntoXKTModel","includeTypesMap","excludeTypesMap","newObject","countMetaObjects","parsePCDIntoXKTModel","_ref$littleEndian","littleEndian","textData","TextDecoder","decode","il","fromCharCode","escape","decodeText","header","result1","search","result2","exec","headerLen","str","fields","viewpoint","parseFloat","parseInt","sizeSum","rowSize","parseHeader","line","rgb","g","sizes","compressedSize","decompressedSize","decompressed","inData","outLength","ctrl","ref","inLength","outData","inPtr","outPtr","decompressLZF","dataview","DataView","getFloat32","getUint8","row","parsePLYIntoXKTModel","_x","_parsePLYIntoXKTModel","hasColors","colorsValue","PLYLoader","t0","parseSTLIntoXKTModel","_parseSTLIntoXKTModel","splitMeshes","smoothNormals","smoothNormalsAngleThreshold","binData","ensureBinary","isBinary","parseBinary","parseASCII","reader","getUint32","defaultR","defaultG","defaultB","lastR","lastG","lastB","newMesh","normalX","normalY","normalZ","packedColor","getUint16","vertexstart","addMesh","normalx","normaly","normalz","verticesPerFace","normalsPerFace","text","faceRegex","faceCounter","floatRegex","vertexRegex","RegExp","normalRegex","nextGeometryId","ni","acc","posi","vertexMap","vertexNormals","vertexNormalAccum","numVerts","ii","jj","faceToVertexNormals","buildBoxGeometry","xSize","ySize","zSize","centerX","centerY","centerZ","buildBoxLinesGeometry","buildCylinderGeometry","radiusTop","radiusBottom","radialSegments","heightSegments","h","currentRadius","currentHeight","first","second","startIndex","tu","tv","openEnded","heightHalf","heightLength","radialAngle","PI","radialLength","radiusChange","atan","buildGridGeometry","divisions","step","halfSize","buildPlaneGeometry","xSegments","zSegments","halfWidth","halfHeight","planeX","planeZ","planeX1","planeZ1","segmentWidth","segmentHeight","offset2","buildSphereGeometry","lod","widthSegments","sinTheta","cosTheta","phi","sinPhi","buildTorusGeometry","tube","tubeSegments","arc","letters","buildVectorTextGeometry","penUp","pointsLen","origin","xOrigin","yOrigin","zOrigin","trim","countVerts","iLine","buf","fs","convert2xkt","configs","sourceData","metaModelSource","output","outputXKTModel","outputXKT","_ref$reuseGeometries","_ref$minTileSize","outputStats","_ref$rotateX","rotateX","sourceSize","xktSize","compressionRatio","conversionTime","_log","startTime","Date","sourceConfigs","ext","fileTypeConfigs","readFileSync","sourceFileSizeBytes","toFixed","overrideOption","_getAttachment","convert","gltfJSON","gltfBasePath","getBasePath","filePath","arrayBuf","option1","option2","parser","converterParams","createDefaultMetaObjects","finalize","xktArrayBuffer","xktContent","targetFileSizeBytes","outputDir","existsSync","mkdirSync","recursive","writeFileSync","lastIndexOf","substring","installFilePolyfills"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"xeokit-convert.cjs.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,QAAQ,sCCTXH,EAAOD,QAAUK,QAAQ,QCCrBC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaT,QAGrB,IAAIC,EAASK,EAAyBE,GAAY,CAGjDR,QAAS,CAAC,GAOX,OAHAW,EAAoBH,GAAUP,EAAQA,EAAOD,QAASO,GAG/CN,EAAOD,OACf,CCrBAO,EAAoBK,EAAI,CAACZ,EAASa,KACjC,IAAI,IAAIC,KAAOD,EACXN,EAAoBQ,EAAEF,EAAYC,KAASP,EAAoBQ,EAAEf,EAASc,IAC5EE,OAAOC,eAAejB,EAASc,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDP,EAAoBQ,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFd,EAAoBkB,EAAKzB,IACH,oBAAX0B,QAA0BA,OAAOC,aAC1CX,OAAOC,eAAejB,EAAS0B,OAAOC,YAAa,CAAEC,MAAO,WAE7DZ,OAAOC,eAAejB,EAAS,aAAc,CAAE4B,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inition","webpack://convert2xkt/external commonjs \"fs\"","webpack://convert2xkt/webpack/bootstrap","webpack://convert2xkt/webpack/runtime/define property getters","webpack://convert2xkt/webpack/runtime/hasOwnProperty shorthand","webpack://convert2xkt/webpack/runtime/make namespace object","webpack://convert2xkt/external commonjs \"@loaders.gl/polyfills\"","webpack://convert2xkt/./src/XKT_INFO.js","webpack://convert2xkt/./src/lib/math.js","webpack://convert2xkt/./src/XKTModel/lib/geometryCompression.js","webpack://convert2xkt/./src/constants.js","webpack://convert2xkt/./src/XKTModel/lib/buildEdgeIndices.js","webpack://convert2xkt/./src/XKTModel/lib/isTriangleMeshSolid.js","webpack://convert2xkt/./src/XKTModel/XKTMesh.js","webpack://convert2xkt/./src/XKTModel/XKTGeometry.js","webpack://convert2xkt/./src/XKTModel/XKTEntity.js","webpack://convert2xkt/./src/XKTModel/XKTTile.js","webpack://convert2xkt/./src/XKTModel/KDNode.js","webpack://convert2xkt/./src/XKTModel/XKTMetaObject.js","webpack://convert2xkt/./src/XKTModel/XKTPropertySet.js","webpack://convert2xkt/./src/XKTModel/XKTTexture.js","webpack://convert2xkt/./src/XKTModel/XKTTextureSet.js","webpack://convert2xkt/external commonjs \"@loaders.gl/core\"","webpack://convert2xkt/external commonjs \"@loaders.gl/textures\"","webpack://convert2xkt/external commonjs \"@loaders.gl/images\"","webpack://convert2xkt/./src/XKTModel/XKTModel.js","webpack://convert2xkt/./src/lib/mergeVertices.js","webpack://convert2xkt/external commonjs \"pako\"","webpack://convert2xkt/./src/XKTModel/writeXKTModelToArrayBuffer.js","webpack://convert2xkt/./src/lib/earcut.js","webpack://convert2xkt/./src/parsers/parseCityJSONIntoXKTModel.js","webpack://convert2xkt/./src/XKTModel/lib/utils.js","webpack://convert2xkt/external commonjs \"@loaders.gl/gltf\"","webpack://convert2xkt/./src/parsers/parseGLTFIntoXKTModel.js","webpack://convert2xkt/./src/parsers/parseGLTFJSONIntoXKTModel.js","webpack://convert2xkt/./src/parsers/parseIFCIntoXKTModel.js","webpack://convert2xkt/external commonjs \"@loaders.gl/las\"","webpack://convert2xkt/./src/parsers/parseLASIntoXKTModel.js","webpack://convert2xkt/./src/parsers/parseMetaModelIntoXKTModel.js","webpack://convert2xkt/./src/parsers/parsePCDIntoXKTModel.js","webpack://convert2xkt/external commonjs \"@loaders.gl/ply\"","webpack://convert2xkt/./src/parsers/parsePLYIntoXKTModel.js","webpack://convert2xkt/./src/parsers/parseSTLIntoXKTModel.js","webpack://convert2xkt/./src/lib/faceToVertexNormals.js","webpack://convert2xkt/./src/geometryBuilders/buildBoxGeometry.js","webpack://convert2xkt/./src/geometryBuilders/buildBoxLinesGeometry.js","webpack://convert2xkt/./src/geometryBuilders/buildCylinderGeometry.js","webpack://convert2xkt/./src/geometryBuilders/buildGridGeometry.js","webpack://convert2xkt/./src/geometryBuilders/buildPlaneGeometry.js","webpack://convert2xkt/./src/geometryBuilders/buildSphereGeometry.js","webpack://convert2xkt/./src/geometryBuilders/buildTorusGeometry.js","webpack://convert2xkt/./src/geometryBuilders/buildVectorTextGeometry.js","webpack://convert2xkt/./src/XKTModel/lib/toArraybuffer.js","webpack://convert2xkt/./src/convert2xkt.js","webpack://convert2xkt/./index.dist.node.js"],"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[\"convert2xkt\"] = factory();\n\telse\n\t\troot[\"convert2xkt\"] = factory();\n})(global, () => {\nreturn ","module.exports = require(\"fs\");","// 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](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\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};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@loaders.gl/polyfills\");","/**\n * @desc Provides info on the XKT generated by xeokit-convert.\n */\nconst XKT_INFO = {\n\n /**\n * The XKT version generated by xeokit-convert.\n *\n * This is the XKT version that's modeled by {@link XKTModel}, serialized\n * by {@link writeXKTModelToArrayBuffer}, and written by {@link convert2xkt}.\n *\n * * Current XKT version: **10**\n * * [XKT format specs](https://github.com/xeokit/xeokit-convert/blob/main/specs/index.md)\n *\n * @property xktVersion\n * @type {number}\n */\n xktVersion: 10\n};\n\nexport {XKT_INFO};","// Some temporary vars to help avoid garbage collection\n\nconst doublePrecision = true;\nconst FloatArrayType = doublePrecision ? Float64Array : Float32Array;\n\nconst tempMat1 = new FloatArrayType(16);\nconst tempMat2 = new FloatArrayType(16);\nconst tempVec4 = new FloatArrayType(4);\n\n/**\n * @private\n */\nconst math = {\n\n MIN_DOUBLE: -Number.MAX_SAFE_INTEGER,\n MAX_DOUBLE: Number.MAX_SAFE_INTEGER,\n\n /**\n * The number of radiians in a degree (0.0174532925).\n * @property DEGTORAD\n * @type {Number}\n */\n DEGTORAD: 0.0174532925,\n\n /**\n * The number of degrees in a radian.\n * @property RADTODEG\n * @type {Number}\n */\n RADTODEG: 57.295779513,\n\n /**\n * Returns a new, uninitialized two-element vector.\n * @method vec2\n * @param [values] Initial values.\n * @static\n * @returns {Number[]}\n */\n vec2(values) {\n return new FloatArrayType(values || 2);\n },\n\n /**\n * Returns a new, uninitialized three-element vector.\n * @method vec3\n * @param [values] Initial values.\n * @static\n * @returns {Number[]}\n */\n vec3(values) {\n return new FloatArrayType(values || 3);\n },\n\n /**\n * Returns a new, uninitialized four-element vector.\n * @method vec4\n * @param [values] Initial values.\n * @static\n * @returns {Number[]}\n */\n vec4(values) {\n return new FloatArrayType(values || 4);\n },\n\n /**\n * Returns a new, uninitialized 3x3 matrix.\n * @method mat3\n * @param [values] Initial values.\n * @static\n * @returns {Number[]}\n */\n mat3(values) {\n return new FloatArrayType(values || 9);\n },\n\n /**\n * Converts a 3x3 matrix to 4x4\n * @method mat3ToMat4\n * @param mat3 3x3 matrix.\n * @param mat4 4x4 matrix\n * @static\n * @returns {Number[]}\n */\n mat3ToMat4(mat3, mat4 = new FloatArrayType(16)) {\n mat4[0] = mat3[0];\n mat4[1] = mat3[1];\n mat4[2] = mat3[2];\n mat4[3] = 0;\n mat4[4] = mat3[3];\n mat4[5] = mat3[4];\n mat4[6] = mat3[5];\n mat4[7] = 0;\n mat4[8] = mat3[6];\n mat4[9] = mat3[7];\n mat4[10] = mat3[8];\n mat4[11] = 0;\n mat4[12] = 0;\n mat4[13] = 0;\n mat4[14] = 0;\n mat4[15] = 1;\n return mat4;\n },\n\n /**\n * Returns a new, uninitialized 4x4 matrix.\n * @method mat4\n * @param [values] Initial values.\n * @static\n * @returns {Number[]}\n */\n mat4(values) {\n return new FloatArrayType(values || 16);\n },\n\n /**\n * Converts a 4x4 matrix to 3x3\n * @method mat4ToMat3\n * @param mat4 4x4 matrix.\n * @param mat3 3x3 matrix\n * @static\n * @returns {Number[]}\n */\n mat4ToMat3(mat4, mat3) { // TODO\n //return new FloatArrayType(values || 9);\n },\n\n /**\n * Returns a new UUID.\n * @method createUUID\n * @static\n * @return string The new UUID\n */\n createUUID: ((() => {\n const self = {};\n const lut = [];\n for (let i = 0; i < 256; i++) {\n lut[i] = (i < 16 ? '0' : '') + (i).toString(16);\n }\n return () => {\n const d0 = Math.random() * 0xffffffff | 0;\n const d1 = Math.random() * 0xffffffff | 0;\n const d2 = Math.random() * 0xffffffff | 0;\n const d3 = Math.random() * 0xffffffff | 0;\n return `${lut[d0 & 0xff] + lut[d0 >> 8 & 0xff] + lut[d0 >> 16 & 0xff] + lut[d0 >> 24 & 0xff]}-${lut[d1 & 0xff]}${lut[d1 >> 8 & 0xff]}-${lut[d1 >> 16 & 0x0f | 0x40]}${lut[d1 >> 24 & 0xff]}-${lut[d2 & 0x3f | 0x80]}${lut[d2 >> 8 & 0xff]}-${lut[d2 >> 16 & 0xff]}${lut[d2 >> 24 & 0xff]}${lut[d3 & 0xff]}${lut[d3 >> 8 & 0xff]}${lut[d3 >> 16 & 0xff]}${lut[d3 >> 24 & 0xff]}`;\n };\n }))(),\n\n /**\n * Clamps a value to the given range.\n * @param {Number} value Value to clamp.\n * @param {Number} min Lower bound.\n * @param {Number} max Upper bound.\n * @returns {Number} Clamped result.\n */\n clamp(value, min, max) {\n return Math.max(min, Math.min(max, value));\n },\n\n /**\n * Floating-point modulus\n * @method fmod\n * @static\n * @param {Number} a\n * @param {Number} b\n * @returns {*}\n */\n fmod(a, b) {\n if (a < b) {\n console.error(\"math.fmod : Attempting to find modulus within negative range - would be infinite loop - ignoring\");\n return a;\n }\n while (b <= a) {\n a -= b;\n }\n return a;\n },\n\n /**\n * Negates a four-element vector.\n * @method negateVec4\n * @static\n * @param {Array(Number)} v Vector to negate\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, v otherwise\n */\n negateVec4(v, dest) {\n if (!dest) {\n dest = v;\n }\n dest[0] = -v[0];\n dest[1] = -v[1];\n dest[2] = -v[2];\n dest[3] = -v[3];\n return dest;\n },\n\n /**\n * Adds one four-element vector to another.\n * @method addVec4\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Second vector\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, u otherwise\n */\n addVec4(u, v, dest) {\n if (!dest) {\n dest = u;\n }\n dest[0] = u[0] + v[0];\n dest[1] = u[1] + v[1];\n dest[2] = u[2] + v[2];\n dest[3] = u[3] + v[3];\n return dest;\n },\n\n /**\n * Adds a scalar value to each element of a four-element vector.\n * @method addVec4Scalar\n * @static\n * @param {Array(Number)} v The vector\n * @param {Number} s The scalar\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, v otherwise\n */\n addVec4Scalar(v, s, dest) {\n if (!dest) {\n dest = v;\n }\n dest[0] = v[0] + s;\n dest[1] = v[1] + s;\n dest[2] = v[2] + s;\n dest[3] = v[3] + s;\n return dest;\n },\n\n /**\n * Adds one three-element vector to another.\n * @method addVec3\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Second vector\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, u otherwise\n */\n addVec3(u, v, dest) {\n if (!dest) {\n dest = u;\n }\n dest[0] = u[0] + v[0];\n dest[1] = u[1] + v[1];\n dest[2] = u[2] + v[2];\n return dest;\n },\n\n /**\n * Adds a scalar value to each element of a three-element vector.\n * @method addVec4Scalar\n * @static\n * @param {Array(Number)} v The vector\n * @param {Number} s The scalar\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, v otherwise\n */\n addVec3Scalar(v, s, dest) {\n if (!dest) {\n dest = v;\n }\n dest[0] = v[0] + s;\n dest[1] = v[1] + s;\n dest[2] = v[2] + s;\n return dest;\n },\n\n /**\n * Subtracts one four-element vector from another.\n * @method subVec4\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Vector to subtract\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, u otherwise\n */\n subVec4(u, v, dest) {\n if (!dest) {\n dest = u;\n }\n dest[0] = u[0] - v[0];\n dest[1] = u[1] - v[1];\n dest[2] = u[2] - v[2];\n dest[3] = u[3] - v[3];\n return dest;\n },\n\n /**\n * Subtracts one three-element vector from another.\n * @method subVec3\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Vector to subtract\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, u otherwise\n */\n subVec3(u, v, dest) {\n if (!dest) {\n dest = u;\n }\n dest[0] = u[0] - v[0];\n dest[1] = u[1] - v[1];\n dest[2] = u[2] - v[2];\n return dest;\n },\n\n /**\n * Subtracts one two-element vector from another.\n * @method subVec2\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Vector to subtract\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, u otherwise\n */\n subVec2(u, v, dest) {\n if (!dest) {\n dest = u;\n }\n dest[0] = u[0] - v[0];\n dest[1] = u[1] - v[1];\n return dest;\n },\n\n /**\n * Subtracts a scalar value from each element of a four-element vector.\n * @method subVec4Scalar\n * @static\n * @param {Array(Number)} v The vector\n * @param {Number} s The scalar\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, v otherwise\n */\n subVec4Scalar(v, s, dest) {\n if (!dest) {\n dest = v;\n }\n dest[0] = v[0] - s;\n dest[1] = v[1] - s;\n dest[2] = v[2] - s;\n dest[3] = v[3] - s;\n return dest;\n },\n\n /**\n * Sets each element of a 4-element vector to a scalar value minus the value of that element.\n * @method subScalarVec4\n * @static\n * @param {Array(Number)} v The vector\n * @param {Number} s The scalar\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, v otherwise\n */\n subScalarVec4(v, s, dest) {\n if (!dest) {\n dest = v;\n }\n dest[0] = s - v[0];\n dest[1] = s - v[1];\n dest[2] = s - v[2];\n dest[3] = s - v[3];\n return dest;\n },\n\n /**\n * Multiplies one three-element vector by another.\n * @method mulVec3\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Second vector\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, u otherwise\n */\n mulVec4(u, v, dest) {\n if (!dest) {\n dest = u;\n }\n dest[0] = u[0] * v[0];\n dest[1] = u[1] * v[1];\n dest[2] = u[2] * v[2];\n dest[3] = u[3] * v[3];\n return dest;\n },\n\n /**\n * Multiplies each element of a four-element vector by a scalar.\n * @method mulVec34calar\n * @static\n * @param {Array(Number)} v The vector\n * @param {Number} s The scalar\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, v otherwise\n */\n mulVec4Scalar(v, s, dest) {\n if (!dest) {\n dest = v;\n }\n dest[0] = v[0] * s;\n dest[1] = v[1] * s;\n dest[2] = v[2] * s;\n dest[3] = v[3] * s;\n return dest;\n },\n\n /**\n * Multiplies each element of a three-element vector by a scalar.\n * @method mulVec3Scalar\n * @static\n * @param {Array(Number)} v The vector\n * @param {Number} s The scalar\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, v otherwise\n */\n mulVec3Scalar(v, s, dest) {\n if (!dest) {\n dest = v;\n }\n dest[0] = v[0] * s;\n dest[1] = v[1] * s;\n dest[2] = v[2] * s;\n return dest;\n },\n\n /**\n * Multiplies each element of a two-element vector by a scalar.\n * @method mulVec2Scalar\n * @static\n * @param {Array(Number)} v The vector\n * @param {Number} s The scalar\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, v otherwise\n */\n mulVec2Scalar(v, s, dest) {\n if (!dest) {\n dest = v;\n }\n dest[0] = v[0] * s;\n dest[1] = v[1] * s;\n return dest;\n },\n\n /**\n * Divides one three-element vector by another.\n * @method divVec3\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Second vector\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, u otherwise\n */\n divVec3(u, v, dest) {\n if (!dest) {\n dest = u;\n }\n dest[0] = u[0] / v[0];\n dest[1] = u[1] / v[1];\n dest[2] = u[2] / v[2];\n return dest;\n },\n\n /**\n * Divides one four-element vector by another.\n * @method divVec4\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Second vector\n * @param {Array(Number)} [dest] Destination vector\n * @return {Array(Number)} dest if specified, u otherwise\n */\n divVec4(u, v, dest) {\n if (!dest) {\n dest = u;\n }\n dest[0] = u[0] / v[0];\n dest[1] = u[1] / v[1];\n dest[2] = u[2] / v[2];\n dest[3] = u[3] / v[3];\n return dest;\n },\n\n /**\n * Divides a scalar by a three-element vector, returning a new vector.\n * @method divScalarVec3\n * @static\n * @param v vec3\n * @param s scalar\n * @param dest vec3 - optional destination\n * @return [] dest if specified, v otherwise\n */\n divScalarVec3(s, v, dest) {\n if (!dest) {\n dest = v;\n }\n dest[0] = s / v[0];\n dest[1] = s / v[1];\n dest[2] = s / v[2];\n return dest;\n },\n\n /**\n * Divides a three-element vector by a scalar.\n * @method divVec3Scalar\n * @static\n * @param v vec3\n * @param s scalar\n * @param dest vec3 - optional destination\n * @return [] dest if specified, v otherwise\n */\n divVec3Scalar(v, s, dest) {\n if (!dest) {\n dest = v;\n }\n dest[0] = v[0] / s;\n dest[1] = v[1] / s;\n dest[2] = v[2] / s;\n return dest;\n },\n\n /**\n * Divides a four-element vector by a scalar.\n * @method divVec4Scalar\n * @static\n * @param v vec4\n * @param s scalar\n * @param dest vec4 - optional destination\n * @return [] dest if specified, v otherwise\n */\n divVec4Scalar(v, s, dest) {\n if (!dest) {\n dest = v;\n }\n dest[0] = v[0] / s;\n dest[1] = v[1] / s;\n dest[2] = v[2] / s;\n dest[3] = v[3] / s;\n return dest;\n },\n\n\n /**\n * Divides a scalar by a four-element vector, returning a new vector.\n * @method divScalarVec4\n * @static\n * @param s scalar\n * @param v vec4\n * @param dest vec4 - optional destination\n * @return [] dest if specified, v otherwise\n */\n divScalarVec4(s, v, dest) {\n if (!dest) {\n dest = v;\n }\n dest[0] = s / v[0];\n dest[1] = s / v[1];\n dest[2] = s / v[2];\n dest[3] = s / v[3];\n return dest;\n },\n\n /**\n * Returns the dot product of two four-element vectors.\n * @method dotVec4\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Second vector\n * @return The dot product\n */\n dotVec4(u, v) {\n return (u[0] * v[0] + u[1] * v[1] + u[2] * v[2] + u[3] * v[3]);\n },\n\n /**\n * Returns the cross product of two four-element vectors.\n * @method cross3Vec4\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Second vector\n * @return The cross product\n */\n cross3Vec4(u, v) {\n const u0 = u[0];\n const u1 = u[1];\n const u2 = u[2];\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n return [\n u1 * v2 - u2 * v1,\n u2 * v0 - u0 * v2,\n u0 * v1 - u1 * v0,\n 0.0];\n },\n\n /**\n * Returns the cross product of two three-element vectors.\n * @method cross3Vec3\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Second vector\n * @return The cross product\n */\n cross3Vec3(u, v, dest) {\n if (!dest) {\n dest = u;\n }\n const x = u[0];\n const y = u[1];\n const z = u[2];\n const x2 = v[0];\n const y2 = v[1];\n const z2 = v[2];\n dest[0] = y * z2 - z * y2;\n dest[1] = z * x2 - x * z2;\n dest[2] = x * y2 - y * x2;\n return dest;\n },\n\n\n sqLenVec4(v) { // TODO\n return math.dotVec4(v, v);\n },\n\n /**\n * Returns the length of a four-element vector.\n * @method lenVec4\n * @static\n * @param {Array(Number)} v The vector\n * @return The length\n */\n lenVec4(v) {\n return Math.sqrt(math.sqLenVec4(v));\n },\n\n /**\n * Returns the dot product of two three-element vectors.\n * @method dotVec3\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Second vector\n * @return The dot product\n */\n dotVec3(u, v) {\n return (u[0] * v[0] + u[1] * v[1] + u[2] * v[2]);\n },\n\n /**\n * Returns the dot product of two two-element vectors.\n * @method dotVec4\n * @static\n * @param {Array(Number)} u First vector\n * @param {Array(Number)} v Second vector\n * @return The dot product\n */\n dotVec2(u, v) {\n return (u[0] * v[0] + u[1] * v[1]);\n },\n\n\n sqLenVec3(v) {\n return math.dotVec3(v, v);\n },\n\n\n sqLenVec2(v) {\n return math.dotVec2(v, v);\n },\n\n /**\n * Returns the length of a three-element vector.\n * @method lenVec3\n * @static\n * @param {Array(Number)} v The vector\n * @return The length\n */\n lenVec3(v) {\n return Math.sqrt(math.sqLenVec3(v));\n },\n\n distVec3: ((() => {\n const vec = new FloatArrayType(3);\n return (v, w) => math.lenVec3(math.subVec3(v, w, vec));\n }))(),\n\n /**\n * Returns the length of a two-element vector.\n * @method lenVec2\n * @static\n * @param {Array(Number)} v The vector\n * @return The length\n */\n lenVec2(v) {\n return Math.sqrt(math.sqLenVec2(v));\n },\n\n distVec2: ((() => {\n const vec = new FloatArrayType(2);\n return (v, w) => math.lenVec2(math.subVec2(v, w, vec));\n }))(),\n\n /**\n * @method rcpVec3\n * @static\n * @param v vec3\n * @param dest vec3 - optional destination\n * @return [] dest if specified, v otherwise\n *\n */\n rcpVec3(v, dest) {\n return math.divScalarVec3(1.0, v, dest);\n },\n\n /**\n * Normalizes a four-element vector\n * @method normalizeVec4\n * @static\n * @param v vec4\n * @param dest vec4 - optional destination\n * @return [] dest if specified, v otherwise\n *\n */\n normalizeVec4(v, dest) {\n const f = 1.0 / math.lenVec4(v);\n return math.mulVec4Scalar(v, f, dest);\n },\n\n /**\n * Normalizes a three-element vector\n * @method normalizeVec4\n * @static\n */\n normalizeVec3(v, dest) {\n const f = 1.0 / math.lenVec3(v);\n return math.mulVec3Scalar(v, f, dest);\n },\n\n /**\n * Normalizes a two-element vector\n * @method normalizeVec2\n * @static\n */\n normalizeVec2(v, dest) {\n const f = 1.0 / math.lenVec2(v);\n return math.mulVec2Scalar(v, f, dest);\n },\n\n /**\n * Gets the angle between two vectors\n * @method angleVec3\n * @param v\n * @param w\n * @returns {number}\n */\n angleVec3(v, w) {\n let theta = math.dotVec3(v, w) / (Math.sqrt(math.sqLenVec3(v) * math.sqLenVec3(w)));\n theta = theta < -1 ? -1 : (theta > 1 ? 1 : theta); // Clamp to handle numerical problems\n return Math.acos(theta);\n },\n\n /**\n * Creates a three-element vector from the rotation part of a sixteen-element matrix.\n * @param m\n * @param dest\n */\n vec3FromMat4Scale: ((() => {\n\n const tempVec3 = new FloatArrayType(3);\n\n return (m, dest) => {\n\n tempVec3[0] = m[0];\n tempVec3[1] = m[1];\n tempVec3[2] = m[2];\n\n dest[0] = math.lenVec3(tempVec3);\n\n tempVec3[0] = m[4];\n tempVec3[1] = m[5];\n tempVec3[2] = m[6];\n\n dest[1] = math.lenVec3(tempVec3);\n\n tempVec3[0] = m[8];\n tempVec3[1] = m[9];\n tempVec3[2] = m[10];\n\n dest[2] = math.lenVec3(tempVec3);\n\n return dest;\n };\n }))(),\n\n /**\n * Converts an n-element vector to a JSON-serializable\n * array with values rounded to two decimal places.\n */\n vecToArray: ((() => {\n function trunc(v) {\n return Math.round(v * 100000) / 100000\n }\n\n return v => {\n v = Array.prototype.slice.call(v);\n for (let i = 0, len = v.length; i < len; i++) {\n v[i] = trunc(v[i]);\n }\n return v;\n };\n }))(),\n\n /**\n * Converts a 3-element vector from an array to an object of the form ````{x:999, y:999, z:999}````.\n * @param arr\n * @returns {{x: *, y: *, z: *}}\n */\n xyzArrayToObject(arr) {\n return {\"x\": arr[0], \"y\": arr[1], \"z\": arr[2]};\n },\n\n /**\n * Converts a 3-element vector object of the form ````{x:999, y:999, z:999}```` to an array.\n * @param xyz\n * @param [arry]\n * @returns {*[]}\n */\n xyzObjectToArray(xyz, arry) {\n arry = arry || new FloatArrayType(3);\n arry[0] = xyz.x;\n arry[1] = xyz.y;\n arry[2] = xyz.z;\n return arry;\n },\n\n /**\n * Duplicates a 4x4 identity matrix.\n * @method dupMat4\n * @static\n */\n dupMat4(m) {\n return m.slice(0, 16);\n },\n\n /**\n * Extracts a 3x3 matrix from a 4x4 matrix.\n * @method mat4To3\n * @static\n */\n mat4To3(m) {\n return [\n m[0], m[1], m[2],\n m[4], m[5], m[6],\n m[8], m[9], m[10]\n ];\n },\n\n /**\n * Returns a 4x4 matrix with each element set to the given scalar value.\n * @method m4s\n * @static\n */\n m4s(s) {\n return [\n s, s, s, s,\n s, s, s, s,\n s, s, s, s,\n s, s, s, s\n ];\n },\n\n /**\n * Returns a 4x4 matrix with each element set to zero.\n * @method setMat4ToZeroes\n * @static\n */\n setMat4ToZeroes() {\n return math.m4s(0.0);\n },\n\n /**\n * Returns a 4x4 matrix with each element set to 1.0.\n * @method setMat4ToOnes\n * @static\n */\n setMat4ToOnes() {\n return math.m4s(1.0);\n },\n\n /**\n * Returns a 4x4 matrix with each element set to 1.0.\n * @method setMat4ToOnes\n * @static\n */\n diagonalMat4v(v) {\n return new FloatArrayType([\n v[0], 0.0, 0.0, 0.0,\n 0.0, v[1], 0.0, 0.0,\n 0.0, 0.0, v[2], 0.0,\n 0.0, 0.0, 0.0, v[3]\n ]);\n },\n\n /**\n * Returns a 4x4 matrix with diagonal elements set to the given vector.\n * @method diagonalMat4c\n * @static\n */\n diagonalMat4c(x, y, z, w) {\n return math.diagonalMat4v([x, y, z, w]);\n },\n\n /**\n * Returns a 4x4 matrix with diagonal elements set to the given scalar.\n * @method diagonalMat4s\n * @static\n */\n diagonalMat4s(s) {\n return math.diagonalMat4c(s, s, s, s);\n },\n\n /**\n * Returns a 4x4 identity matrix.\n * @method identityMat4\n * @static\n */\n identityMat4(mat = new FloatArrayType(16)) {\n mat[0] = 1.0;\n mat[1] = 0.0;\n mat[2] = 0.0;\n mat[3] = 0.0;\n\n mat[4] = 0.0;\n mat[5] = 1.0;\n mat[6] = 0.0;\n mat[7] = 0.0;\n\n mat[8] = 0.0;\n mat[9] = 0.0;\n mat[10] = 1.0;\n mat[11] = 0.0;\n\n mat[12] = 0.0;\n mat[13] = 0.0;\n mat[14] = 0.0;\n mat[15] = 1.0;\n\n return mat;\n },\n\n /**\n * Returns a 3x3 identity matrix.\n * @method identityMat3\n * @static\n */\n identityMat3(mat = new FloatArrayType(9)) {\n mat[0] = 1.0;\n mat[1] = 0.0;\n mat[2] = 0.0;\n\n mat[3] = 0.0;\n mat[4] = 1.0;\n mat[5] = 0.0;\n\n mat[6] = 0.0;\n mat[7] = 0.0;\n mat[8] = 1.0;\n\n return mat;\n },\n\n /**\n * Tests if the given 4x4 matrix is the identity matrix.\n * @method isIdentityMat4\n * @static\n */\n isIdentityMat4(m) {\n if (m[0] !== 1.0 || m[1] !== 0.0 || m[2] !== 0.0 || m[3] !== 0.0 ||\n m[4] !== 0.0 || m[5] !== 1.0 || m[6] !== 0.0 || m[7] !== 0.0 ||\n m[8] !== 0.0 || m[9] !== 0.0 || m[10] !== 1.0 || m[11] !== 0.0 ||\n m[12] !== 0.0 || m[13] !== 0.0 || m[14] !== 0.0 || m[15] !== 1.0) {\n return false;\n }\n return true;\n },\n\n /**\n * Negates the given 4x4 matrix.\n * @method negateMat4\n * @static\n */\n negateMat4(m, dest) {\n if (!dest) {\n dest = m;\n }\n dest[0] = -m[0];\n dest[1] = -m[1];\n dest[2] = -m[2];\n dest[3] = -m[3];\n dest[4] = -m[4];\n dest[5] = -m[5];\n dest[6] = -m[6];\n dest[7] = -m[7];\n dest[8] = -m[8];\n dest[9] = -m[9];\n dest[10] = -m[10];\n dest[11] = -m[11];\n dest[12] = -m[12];\n dest[13] = -m[13];\n dest[14] = -m[14];\n dest[15] = -m[15];\n return dest;\n },\n\n /**\n * Adds the given 4x4 matrices together.\n * @method addMat4\n * @static\n */\n addMat4(a, b, dest) {\n if (!dest) {\n dest = a;\n }\n dest[0] = a[0] + b[0];\n dest[1] = a[1] + b[1];\n dest[2] = a[2] + b[2];\n dest[3] = a[3] + b[3];\n dest[4] = a[4] + b[4];\n dest[5] = a[5] + b[5];\n dest[6] = a[6] + b[6];\n dest[7] = a[7] + b[7];\n dest[8] = a[8] + b[8];\n dest[9] = a[9] + b[9];\n dest[10] = a[10] + b[10];\n dest[11] = a[11] + b[11];\n dest[12] = a[12] + b[12];\n dest[13] = a[13] + b[13];\n dest[14] = a[14] + b[14];\n dest[15] = a[15] + b[15];\n return dest;\n },\n\n /**\n * Adds the given scalar to each element of the given 4x4 matrix.\n * @method addMat4Scalar\n * @static\n */\n addMat4Scalar(m, s, dest) {\n if (!dest) {\n dest = m;\n }\n dest[0] = m[0] + s;\n dest[1] = m[1] + s;\n dest[2] = m[2] + s;\n dest[3] = m[3] + s;\n dest[4] = m[4] + s;\n dest[5] = m[5] + s;\n dest[6] = m[6] + s;\n dest[7] = m[7] + s;\n dest[8] = m[8] + s;\n dest[9] = m[9] + s;\n dest[10] = m[10] + s;\n dest[11] = m[11] + s;\n dest[12] = m[12] + s;\n dest[13] = m[13] + s;\n dest[14] = m[14] + s;\n dest[15] = m[15] + s;\n return dest;\n },\n\n /**\n * Adds the given scalar to each element of the given 4x4 matrix.\n * @method addScalarMat4\n * @static\n */\n addScalarMat4(s, m, dest) {\n return math.addMat4Scalar(m, s, dest);\n },\n\n /**\n * Subtracts the second 4x4 matrix from the first.\n * @method subMat4\n * @static\n */\n subMat4(a, b, dest) {\n if (!dest) {\n dest = a;\n }\n dest[0] = a[0] - b[0];\n dest[1] = a[1] - b[1];\n dest[2] = a[2] - b[2];\n dest[3] = a[3] - b[3];\n dest[4] = a[4] - b[4];\n dest[5] = a[5] - b[5];\n dest[6] = a[6] - b[6];\n dest[7] = a[7] - b[7];\n dest[8] = a[8] - b[8];\n dest[9] = a[9] - b[9];\n dest[10] = a[10] - b[10];\n dest[11] = a[11] - b[11];\n dest[12] = a[12] - b[12];\n dest[13] = a[13] - b[13];\n dest[14] = a[14] - b[14];\n dest[15] = a[15] - b[15];\n return dest;\n },\n\n /**\n * Subtracts the given scalar from each element of the given 4x4 matrix.\n * @method subMat4Scalar\n * @static\n */\n subMat4Scalar(m, s, dest) {\n if (!dest) {\n dest = m;\n }\n dest[0] = m[0] - s;\n dest[1] = m[1] - s;\n dest[2] = m[2] - s;\n dest[3] = m[3] - s;\n dest[4] = m[4] - s;\n dest[5] = m[5] - s;\n dest[6] = m[6] - s;\n dest[7] = m[7] - s;\n dest[8] = m[8] - s;\n dest[9] = m[9] - s;\n dest[10] = m[10] - s;\n dest[11] = m[11] - s;\n dest[12] = m[12] - s;\n dest[13] = m[13] - s;\n dest[14] = m[14] - s;\n dest[15] = m[15] - s;\n return dest;\n },\n\n /**\n * Subtracts the given scalar from each element of the given 4x4 matrix.\n * @method subScalarMat4\n * @static\n */\n subScalarMat4(s, m, dest) {\n if (!dest) {\n dest = m;\n }\n dest[0] = s - m[0];\n dest[1] = s - m[1];\n dest[2] = s - m[2];\n dest[3] = s - m[3];\n dest[4] = s - m[4];\n dest[5] = s - m[5];\n dest[6] = s - m[6];\n dest[7] = s - m[7];\n dest[8] = s - m[8];\n dest[9] = s - m[9];\n dest[10] = s - m[10];\n dest[11] = s - m[11];\n dest[12] = s - m[12];\n dest[13] = s - m[13];\n dest[14] = s - m[14];\n dest[15] = s - m[15];\n return dest;\n },\n\n /**\n * Multiplies the two given 4x4 matrix by each other.\n * @method mulMat4\n * @static\n */\n mulMat4(a, b, dest) {\n if (!dest) {\n dest = a;\n }\n\n // Cache the matrix values (makes for huge speed increases!)\n const a00 = a[0];\n\n const a01 = a[1];\n const a02 = a[2];\n const a03 = a[3];\n const a10 = a[4];\n const a11 = a[5];\n const a12 = a[6];\n const a13 = a[7];\n const a20 = a[8];\n const a21 = a[9];\n const a22 = a[10];\n const a23 = a[11];\n const a30 = a[12];\n const a31 = a[13];\n const a32 = a[14];\n const a33 = a[15];\n const b00 = b[0];\n const b01 = b[1];\n const b02 = b[2];\n const b03 = b[3];\n const b10 = b[4];\n const b11 = b[5];\n const b12 = b[6];\n const b13 = b[7];\n const b20 = b[8];\n const b21 = b[9];\n const b22 = b[10];\n const b23 = b[11];\n const b30 = b[12];\n const b31 = b[13];\n const b32 = b[14];\n const b33 = b[15];\n\n dest[0] = b00 * a00 + b01 * a10 + b02 * a20 + b03 * a30;\n dest[1] = b00 * a01 + b01 * a11 + b02 * a21 + b03 * a31;\n dest[2] = b00 * a02 + b01 * a12 + b02 * a22 + b03 * a32;\n dest[3] = b00 * a03 + b01 * a13 + b02 * a23 + b03 * a33;\n dest[4] = b10 * a00 + b11 * a10 + b12 * a20 + b13 * a30;\n dest[5] = b10 * a01 + b11 * a11 + b12 * a21 + b13 * a31;\n dest[6] = b10 * a02 + b11 * a12 + b12 * a22 + b13 * a32;\n dest[7] = b10 * a03 + b11 * a13 + b12 * a23 + b13 * a33;\n dest[8] = b20 * a00 + b21 * a10 + b22 * a20 + b23 * a30;\n dest[9] = b20 * a01 + b21 * a11 + b22 * a21 + b23 * a31;\n dest[10] = b20 * a02 + b21 * a12 + b22 * a22 + b23 * a32;\n dest[11] = b20 * a03 + b21 * a13 + b22 * a23 + b23 * a33;\n dest[12] = b30 * a00 + b31 * a10 + b32 * a20 + b33 * a30;\n dest[13] = b30 * a01 + b31 * a11 + b32 * a21 + b33 * a31;\n dest[14] = b30 * a02 + b31 * a12 + b32 * a22 + b33 * a32;\n dest[15] = b30 * a03 + b31 * a13 + b32 * a23 + b33 * a33;\n\n return dest;\n },\n\n /**\n * Multiplies the two given 3x3 matrices by each other.\n * @method mulMat4\n * @static\n */\n mulMat3(a, b, dest) {\n if (!dest) {\n dest = new FloatArrayType(9);\n }\n\n const a11 = a[0];\n const a12 = a[3];\n const a13 = a[6];\n const a21 = a[1];\n const a22 = a[4];\n const a23 = a[7];\n const a31 = a[2];\n const a32 = a[5];\n const a33 = a[8];\n const b11 = b[0];\n const b12 = b[3];\n const b13 = b[6];\n const b21 = b[1];\n const b22 = b[4];\n const b23 = b[7];\n const b31 = b[2];\n const b32 = b[5];\n const b33 = b[8];\n\n dest[0] = a11 * b11 + a12 * b21 + a13 * b31;\n dest[3] = a11 * b12 + a12 * b22 + a13 * b32;\n dest[6] = a11 * b13 + a12 * b23 + a13 * b33;\n\n dest[1] = a21 * b11 + a22 * b21 + a23 * b31;\n dest[4] = a21 * b12 + a22 * b22 + a23 * b32;\n dest[7] = a21 * b13 + a22 * b23 + a23 * b33;\n\n dest[2] = a31 * b11 + a32 * b21 + a33 * b31;\n dest[5] = a31 * b12 + a32 * b22 + a33 * b32;\n dest[8] = a31 * b13 + a32 * b23 + a33 * b33;\n\n return dest;\n },\n\n /**\n * Multiplies each element of the given 4x4 matrix by the given scalar.\n * @method mulMat4Scalar\n * @static\n */\n mulMat4Scalar(m, s, dest) {\n if (!dest) {\n dest = m;\n }\n dest[0] = m[0] * s;\n dest[1] = m[1] * s;\n dest[2] = m[2] * s;\n dest[3] = m[3] * s;\n dest[4] = m[4] * s;\n dest[5] = m[5] * s;\n dest[6] = m[6] * s;\n dest[7] = m[7] * s;\n dest[8] = m[8] * s;\n dest[9] = m[9] * s;\n dest[10] = m[10] * s;\n dest[11] = m[11] * s;\n dest[12] = m[12] * s;\n dest[13] = m[13] * s;\n dest[14] = m[14] * s;\n dest[15] = m[15] * s;\n return dest;\n },\n\n /**\n * Multiplies the given 4x4 matrix by the given four-element vector.\n * @method mulMat4v4\n * @static\n */\n mulMat4v4(m, v, dest = math.vec4()) {\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n const v3 = v[3];\n dest[0] = m[0] * v0 + m[4] * v1 + m[8] * v2 + m[12] * v3;\n dest[1] = m[1] * v0 + m[5] * v1 + m[9] * v2 + m[13] * v3;\n dest[2] = m[2] * v0 + m[6] * v1 + m[10] * v2 + m[14] * v3;\n dest[3] = m[3] * v0 + m[7] * v1 + m[11] * v2 + m[15] * v3;\n return dest;\n },\n\n /**\n * Transposes the given 4x4 matrix.\n * @method transposeMat4\n * @static\n */\n transposeMat4(mat, dest) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n const m4 = mat[4];\n\n const m14 = mat[14];\n const m8 = mat[8];\n const m13 = mat[13];\n const m12 = mat[12];\n const m9 = mat[9];\n if (!dest || mat === dest) {\n const a01 = mat[1];\n const a02 = mat[2];\n const a03 = mat[3];\n const a12 = mat[6];\n const a13 = mat[7];\n const a23 = mat[11];\n mat[1] = m4;\n mat[2] = m8;\n mat[3] = m12;\n mat[4] = a01;\n mat[6] = m9;\n mat[7] = m13;\n mat[8] = a02;\n mat[9] = a12;\n mat[11] = m14;\n mat[12] = a03;\n mat[13] = a13;\n mat[14] = a23;\n return mat;\n }\n dest[0] = mat[0];\n dest[1] = m4;\n dest[2] = m8;\n dest[3] = m12;\n dest[4] = mat[1];\n dest[5] = mat[5];\n dest[6] = m9;\n dest[7] = m13;\n dest[8] = mat[2];\n dest[9] = mat[6];\n dest[10] = mat[10];\n dest[11] = m14;\n dest[12] = mat[3];\n dest[13] = mat[7];\n dest[14] = mat[11];\n dest[15] = mat[15];\n return dest;\n },\n\n /**\n * Transposes the given 3x3 matrix.\n *\n * @method transposeMat3\n * @static\n */\n transposeMat3(mat, dest) {\n if (dest === mat) {\n const a01 = mat[1];\n const a02 = mat[2];\n const a12 = mat[5];\n dest[1] = mat[3];\n dest[2] = mat[6];\n dest[3] = a01;\n dest[5] = mat[7];\n dest[6] = a02;\n dest[7] = a12;\n } else {\n dest[0] = mat[0];\n dest[1] = mat[3];\n dest[2] = mat[6];\n dest[3] = mat[1];\n dest[4] = mat[4];\n dest[5] = mat[7];\n dest[6] = mat[2];\n dest[7] = mat[5];\n dest[8] = mat[8];\n }\n return dest;\n },\n\n /**\n * Returns the determinant of the given 4x4 matrix.\n * @method determinantMat4\n * @static\n */\n determinantMat4(mat) {\n // Cache the matrix values (makes for huge speed increases!)\n const a00 = mat[0];\n\n const a01 = mat[1];\n const a02 = mat[2];\n const a03 = mat[3];\n const a10 = mat[4];\n const a11 = mat[5];\n const a12 = mat[6];\n const a13 = mat[7];\n const a20 = mat[8];\n const a21 = mat[9];\n const a22 = mat[10];\n const a23 = mat[11];\n const a30 = mat[12];\n const a31 = mat[13];\n const a32 = mat[14];\n const a33 = mat[15];\n return a30 * a21 * a12 * a03 - a20 * a31 * a12 * a03 - a30 * a11 * a22 * a03 + a10 * a31 * a22 * a03 +\n a20 * a11 * a32 * a03 - a10 * a21 * a32 * a03 - a30 * a21 * a02 * a13 + a20 * a31 * a02 * a13 +\n a30 * a01 * a22 * a13 - a00 * a31 * a22 * a13 - a20 * a01 * a32 * a13 + a00 * a21 * a32 * a13 +\n a30 * a11 * a02 * a23 - a10 * a31 * a02 * a23 - a30 * a01 * a12 * a23 + a00 * a31 * a12 * a23 +\n a10 * a01 * a32 * a23 - a00 * a11 * a32 * a23 - a20 * a11 * a02 * a33 + a10 * a21 * a02 * a33 +\n a20 * a01 * a12 * a33 - a00 * a21 * a12 * a33 - a10 * a01 * a22 * a33 + a00 * a11 * a22 * a33;\n },\n\n /**\n * Returns the inverse of the given 4x4 matrix.\n * @method inverseMat4\n * @static\n */\n inverseMat4(mat, dest) {\n if (!dest) {\n dest = mat;\n }\n\n // Cache the matrix values (makes for huge speed increases!)\n const a00 = mat[0];\n\n const a01 = mat[1];\n const a02 = mat[2];\n const a03 = mat[3];\n const a10 = mat[4];\n const a11 = mat[5];\n const a12 = mat[6];\n const a13 = mat[7];\n const a20 = mat[8];\n const a21 = mat[9];\n const a22 = mat[10];\n const a23 = mat[11];\n const a30 = mat[12];\n const a31 = mat[13];\n const a32 = mat[14];\n const a33 = mat[15];\n const b00 = a00 * a11 - a01 * a10;\n const b01 = a00 * a12 - a02 * a10;\n const b02 = a00 * a13 - a03 * a10;\n const b03 = a01 * a12 - a02 * a11;\n const b04 = a01 * a13 - a03 * a11;\n const b05 = a02 * a13 - a03 * a12;\n const b06 = a20 * a31 - a21 * a30;\n const b07 = a20 * a32 - a22 * a30;\n const b08 = a20 * a33 - a23 * a30;\n const b09 = a21 * a32 - a22 * a31;\n const b10 = a21 * a33 - a23 * a31;\n const b11 = a22 * a33 - a23 * a32;\n\n // Calculate the determinant (inlined to avoid double-caching)\n const invDet = 1 / (b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06);\n\n dest[0] = (a11 * b11 - a12 * b10 + a13 * b09) * invDet;\n dest[1] = (-a01 * b11 + a02 * b10 - a03 * b09) * invDet;\n dest[2] = (a31 * b05 - a32 * b04 + a33 * b03) * invDet;\n dest[3] = (-a21 * b05 + a22 * b04 - a23 * b03) * invDet;\n dest[4] = (-a10 * b11 + a12 * b08 - a13 * b07) * invDet;\n dest[5] = (a00 * b11 - a02 * b08 + a03 * b07) * invDet;\n dest[6] = (-a30 * b05 + a32 * b02 - a33 * b01) * invDet;\n dest[7] = (a20 * b05 - a22 * b02 + a23 * b01) * invDet;\n dest[8] = (a10 * b10 - a11 * b08 + a13 * b06) * invDet;\n dest[9] = (-a00 * b10 + a01 * b08 - a03 * b06) * invDet;\n dest[10] = (a30 * b04 - a31 * b02 + a33 * b00) * invDet;\n dest[11] = (-a20 * b04 + a21 * b02 - a23 * b00) * invDet;\n dest[12] = (-a10 * b09 + a11 * b07 - a12 * b06) * invDet;\n dest[13] = (a00 * b09 - a01 * b07 + a02 * b06) * invDet;\n dest[14] = (-a30 * b03 + a31 * b01 - a32 * b00) * invDet;\n dest[15] = (a20 * b03 - a21 * b01 + a22 * b00) * invDet;\n\n return dest;\n },\n\n /**\n * Returns the trace of the given 4x4 matrix.\n * @method traceMat4\n * @static\n */\n traceMat4(m) {\n return (m[0] + m[5] + m[10] + m[15]);\n },\n\n /**\n * Returns 4x4 translation matrix.\n * @method translationMat4\n * @static\n */\n translationMat4v(v, dest) {\n const m = dest || math.identityMat4();\n m[12] = v[0];\n m[13] = v[1];\n m[14] = v[2];\n return m;\n },\n\n /**\n * Returns 3x3 translation matrix.\n * @method translationMat3\n * @static\n */\n translationMat3v(v, dest) {\n const m = dest || math.identityMat3();\n m[6] = v[0];\n m[7] = v[1];\n return m;\n },\n\n /**\n * Returns 4x4 translation matrix.\n * @method translationMat4c\n * @static\n */\n translationMat4c: ((() => {\n const xyz = new FloatArrayType(3);\n return (x, y, z, dest) => {\n xyz[0] = x;\n xyz[1] = y;\n xyz[2] = z;\n return math.translationMat4v(xyz, dest);\n };\n }))(),\n\n /**\n * Returns 4x4 translation matrix.\n * @method translationMat4s\n * @static\n */\n translationMat4s(s, dest) {\n return math.translationMat4c(s, s, s, dest);\n },\n\n /**\n * Efficiently post-concatenates a translation to the given matrix.\n * @param v\n * @param m\n */\n translateMat4v(xyz, m) {\n return math.translateMat4c(xyz[0], xyz[1], xyz[2], m);\n },\n\n /**\n * Efficiently post-concatenates a translation to the given matrix.\n * @param x\n * @param y\n * @param z\n * @param m\n */\n OLDtranslateMat4c(x, y, z, m) {\n\n const m12 = m[12];\n m[0] += m12 * x;\n m[4] += m12 * y;\n m[8] += m12 * z;\n\n const m13 = m[13];\n m[1] += m13 * x;\n m[5] += m13 * y;\n m[9] += m13 * z;\n\n const m14 = m[14];\n m[2] += m14 * x;\n m[6] += m14 * y;\n m[10] += m14 * z;\n\n const m15 = m[15];\n m[3] += m15 * x;\n m[7] += m15 * y;\n m[11] += m15 * z;\n\n return m;\n },\n\n translateMat4c(x, y, z, m) {\n\n const m3 = m[3];\n m[0] += m3 * x;\n m[1] += m3 * y;\n m[2] += m3 * z;\n\n const m7 = m[7];\n m[4] += m7 * x;\n m[5] += m7 * y;\n m[6] += m7 * z;\n\n const m11 = m[11];\n m[8] += m11 * x;\n m[9] += m11 * y;\n m[10] += m11 * z;\n\n const m15 = m[15];\n m[12] += m15 * x;\n m[13] += m15 * y;\n m[14] += m15 * z;\n\n return m;\n },\n /**\n * Returns 4x4 rotation matrix.\n * @method rotationMat4v\n * @static\n */\n rotationMat4v(anglerad, axis, m) {\n const ax = math.normalizeVec4([axis[0], axis[1], axis[2], 0.0], []);\n const s = Math.sin(anglerad);\n const c = Math.cos(anglerad);\n const q = 1.0 - c;\n\n const x = ax[0];\n const y = ax[1];\n const z = ax[2];\n\n let xy;\n let yz;\n let zx;\n let xs;\n let ys;\n let zs;\n\n //xx = x * x; used once\n //yy = y * y; used once\n //zz = z * z; used once\n xy = x * y;\n yz = y * z;\n zx = z * x;\n xs = x * s;\n ys = y * s;\n zs = z * s;\n\n m = m || math.mat4();\n\n m[0] = (q * x * x) + c;\n m[1] = (q * xy) + zs;\n m[2] = (q * zx) - ys;\n m[3] = 0.0;\n\n m[4] = (q * xy) - zs;\n m[5] = (q * y * y) + c;\n m[6] = (q * yz) + xs;\n m[7] = 0.0;\n\n m[8] = (q * zx) + ys;\n m[9] = (q * yz) - xs;\n m[10] = (q * z * z) + c;\n m[11] = 0.0;\n\n m[12] = 0.0;\n m[13] = 0.0;\n m[14] = 0.0;\n m[15] = 1.0;\n\n return m;\n },\n\n /**\n * Returns 4x4 rotation matrix.\n * @method rotationMat4c\n * @static\n */\n rotationMat4c(anglerad, x, y, z, mat) {\n return math.rotationMat4v(anglerad, [x, y, z], mat);\n },\n\n /**\n * Returns 4x4 scale matrix.\n * @method scalingMat4v\n * @static\n */\n scalingMat4v(v, m = math.identityMat4()) {\n m[0] = v[0];\n m[5] = v[1];\n m[10] = v[2];\n return m;\n },\n\n /**\n * Returns 3x3 scale matrix.\n * @method scalingMat3v\n * @static\n */\n scalingMat3v(v, m = math.identityMat3()) {\n m[0] = v[0];\n m[4] = v[1];\n return m;\n },\n\n /**\n * Returns 4x4 scale matrix.\n * @method scalingMat4c\n * @static\n */\n scalingMat4c: ((() => {\n const xyz = new FloatArrayType(3);\n return (x, y, z, dest) => {\n xyz[0] = x;\n xyz[1] = y;\n xyz[2] = z;\n return math.scalingMat4v(xyz, dest);\n };\n }))(),\n\n /**\n * Efficiently post-concatenates a scaling to the given matrix.\n * @method scaleMat4c\n * @param x\n * @param y\n * @param z\n * @param m\n */\n scaleMat4c(x, y, z, m) {\n\n m[0] *= x;\n m[4] *= y;\n m[8] *= z;\n\n m[1] *= x;\n m[5] *= y;\n m[9] *= z;\n\n m[2] *= x;\n m[6] *= y;\n m[10] *= z;\n\n m[3] *= x;\n m[7] *= y;\n m[11] *= z;\n return m;\n },\n\n /**\n * Efficiently post-concatenates a scaling to the given matrix.\n * @method scaleMat4c\n * @param xyz\n * @param m\n */\n scaleMat4v(xyz, m) {\n\n const x = xyz[0];\n const y = xyz[1];\n const z = xyz[2];\n\n m[0] *= x;\n m[4] *= y;\n m[8] *= z;\n m[1] *= x;\n m[5] *= y;\n m[9] *= z;\n m[2] *= x;\n m[6] *= y;\n m[10] *= z;\n m[3] *= x;\n m[7] *= y;\n m[11] *= z;\n\n return m;\n },\n\n /**\n * Returns 4x4 scale matrix.\n * @method scalingMat4s\n * @static\n */\n scalingMat4s(s) {\n return math.scalingMat4c(s, s, s);\n },\n\n /**\n * Creates a matrix from a quaternion rotation and vector translation\n *\n * @param {Number[]} q Rotation quaternion\n * @param {Number[]} v Translation vector\n * @param {Number[]} dest Destination matrix\n * @returns {Number[]} dest\n */\n rotationTranslationMat4(q, v, dest = math.mat4()) {\n const x = q[0];\n const y = q[1];\n const z = q[2];\n const w = q[3];\n\n const x2 = x + x;\n const y2 = y + y;\n const z2 = z + z;\n const xx = x * x2;\n const xy = x * y2;\n const xz = x * z2;\n const yy = y * y2;\n const yz = y * z2;\n const zz = z * z2;\n const wx = w * x2;\n const wy = w * y2;\n const wz = w * z2;\n\n dest[0] = 1 - (yy + zz);\n dest[1] = xy + wz;\n dest[2] = xz - wy;\n dest[3] = 0;\n dest[4] = xy - wz;\n dest[5] = 1 - (xx + zz);\n dest[6] = yz + wx;\n dest[7] = 0;\n dest[8] = xz + wy;\n dest[9] = yz - wx;\n dest[10] = 1 - (xx + yy);\n dest[11] = 0;\n dest[12] = v[0];\n dest[13] = v[1];\n dest[14] = v[2];\n dest[15] = 1;\n\n return dest;\n },\n\n /**\n * Gets Euler angles from a 4x4 matrix.\n *\n * @param {Number[]} mat The 4x4 matrix.\n * @param {String} order Desired Euler angle order: \"XYZ\", \"YXZ\", \"ZXY\" etc.\n * @param {Number[]} [dest] Destination Euler angles, created by default.\n * @returns {Number[]} The Euler angles.\n */\n mat4ToEuler(mat, order, dest = math.vec4()) {\n const clamp = math.clamp;\n\n // Assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\n const m11 = mat[0];\n\n const m12 = mat[4];\n const m13 = mat[8];\n const m21 = mat[1];\n const m22 = mat[5];\n const m23 = mat[9];\n const m31 = mat[2];\n const m32 = mat[6];\n const m33 = mat[10];\n\n if (order === 'XYZ') {\n\n dest[1] = Math.asin(clamp(m13, -1, 1));\n\n if (Math.abs(m13) < 0.99999) {\n dest[0] = Math.atan2(-m23, m33);\n dest[2] = Math.atan2(-m12, m11);\n } else {\n dest[0] = Math.atan2(m32, m22);\n dest[2] = 0;\n\n }\n\n } else if (order === 'YXZ') {\n\n dest[0] = Math.asin(-clamp(m23, -1, 1));\n\n if (Math.abs(m23) < 0.99999) {\n dest[1] = Math.atan2(m13, m33);\n dest[2] = Math.atan2(m21, m22);\n } else {\n dest[1] = Math.atan2(-m31, m11);\n dest[2] = 0;\n }\n\n } else if (order === 'ZXY') {\n\n dest[0] = Math.asin(clamp(m32, -1, 1));\n\n if (Math.abs(m32) < 0.99999) {\n dest[1] = Math.atan2(-m31, m33);\n dest[2] = Math.atan2(-m12, m22);\n } else {\n dest[1] = 0;\n dest[2] = Math.atan2(m21, m11);\n }\n\n } else if (order === 'ZYX') {\n\n dest[1] = Math.asin(-clamp(m31, -1, 1));\n\n if (Math.abs(m31) < 0.99999) {\n dest[0] = Math.atan2(m32, m33);\n dest[2] = Math.atan2(m21, m11);\n } else {\n dest[0] = 0;\n dest[2] = Math.atan2(-m12, m22);\n }\n\n } else if (order === 'YZX') {\n\n dest[2] = Math.asin(clamp(m21, -1, 1));\n\n if (Math.abs(m21) < 0.99999) {\n dest[0] = Math.atan2(-m23, m22);\n dest[1] = Math.atan2(-m31, m11);\n } else {\n dest[0] = 0;\n dest[1] = Math.atan2(m13, m33);\n }\n\n } else if (order === 'XZY') {\n\n dest[2] = Math.asin(-clamp(m12, -1, 1));\n\n if (Math.abs(m12) < 0.99999) {\n dest[0] = Math.atan2(m32, m22);\n dest[1] = Math.atan2(m13, m11);\n } else {\n dest[0] = Math.atan2(-m23, m33);\n dest[1] = 0;\n }\n }\n\n return dest;\n },\n\n composeMat4(position, quaternion, scale, mat = math.mat4()) {\n math.quaternionToRotationMat4(quaternion, mat);\n math.scaleMat4v(scale, mat);\n math.translateMat4v(position, mat);\n\n return mat;\n },\n\n decomposeMat4: (() => {\n\n const vec = new FloatArrayType(3);\n const matrix = new FloatArrayType(16);\n\n return function decompose(mat, position, quaternion, scale) {\n\n vec[0] = mat[0];\n vec[1] = mat[1];\n vec[2] = mat[2];\n\n let sx = math.lenVec3(vec);\n\n vec[0] = mat[4];\n vec[1] = mat[5];\n vec[2] = mat[6];\n\n const sy = math.lenVec3(vec);\n\n vec[8] = mat[8];\n vec[9] = mat[9];\n vec[10] = mat[10];\n\n const sz = math.lenVec3(vec);\n\n // if determine is negative, we need to invert one scale\n const det = math.determinantMat4(mat);\n\n if (det < 0) {\n sx = -sx;\n }\n\n position[0] = mat[12];\n position[1] = mat[13];\n position[2] = mat[14];\n\n // scale the rotation part\n matrix.set(mat);\n\n const invSX = 1 / sx;\n const invSY = 1 / sy;\n const invSZ = 1 / sz;\n\n matrix[0] *= invSX;\n matrix[1] *= invSX;\n matrix[2] *= invSX;\n\n matrix[4] *= invSY;\n matrix[5] *= invSY;\n matrix[6] *= invSY;\n\n matrix[8] *= invSZ;\n matrix[9] *= invSZ;\n matrix[10] *= invSZ;\n\n math.mat4ToQuaternion(matrix, quaternion);\n\n scale[0] = sx;\n scale[1] = sy;\n scale[2] = sz;\n\n return this;\n\n };\n\n })(),\n\n /**\n * Returns a 4x4 'lookat' viewing transform matrix.\n * @method lookAtMat4v\n * @param pos vec3 position of the viewer\n * @param target vec3 point the viewer is looking at\n * @param up vec3 pointing \"up\"\n * @param dest mat4 Optional, mat4 matrix will be written into\n *\n * @return {mat4} dest if specified, a new mat4 otherwise\n */\n lookAtMat4v(pos, target, up, dest) {\n if (!dest) {\n dest = math.mat4();\n }\n\n const posx = pos[0];\n const posy = pos[1];\n const posz = pos[2];\n const upx = up[0];\n const upy = up[1];\n const upz = up[2];\n const targetx = target[0];\n const targety = target[1];\n const targetz = target[2];\n\n if (posx === targetx && posy === targety && posz === targetz) {\n return math.identityMat4();\n }\n\n let z0;\n let z1;\n let z2;\n let x0;\n let x1;\n let x2;\n let y0;\n let y1;\n let y2;\n let len;\n\n //vec3.direction(eye, center, z);\n z0 = posx - targetx;\n z1 = posy - targety;\n z2 = posz - targetz;\n\n // normalize (no check needed for 0 because of early return)\n len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n\n //vec3.normalize(vec3.cross(up, z, x));\n x0 = upy * z2 - upz * z1;\n x1 = upz * z0 - upx * z2;\n x2 = upx * z1 - upy * z0;\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\n if (!len) {\n x0 = 0;\n x1 = 0;\n x2 = 0;\n } else {\n len = 1 / len;\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n //vec3.normalize(vec3.cross(z, x, y));\n y0 = z1 * x2 - z2 * x1;\n y1 = z2 * x0 - z0 * x2;\n y2 = z0 * x1 - z1 * x0;\n\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\n if (!len) {\n y0 = 0;\n y1 = 0;\n y2 = 0;\n } else {\n len = 1 / len;\n y0 *= len;\n y1 *= len;\n y2 *= len;\n }\n\n dest[0] = x0;\n dest[1] = y0;\n dest[2] = z0;\n dest[3] = 0;\n dest[4] = x1;\n dest[5] = y1;\n dest[6] = z1;\n dest[7] = 0;\n dest[8] = x2;\n dest[9] = y2;\n dest[10] = z2;\n dest[11] = 0;\n dest[12] = -(x0 * posx + x1 * posy + x2 * posz);\n dest[13] = -(y0 * posx + y1 * posy + y2 * posz);\n dest[14] = -(z0 * posx + z1 * posy + z2 * posz);\n dest[15] = 1;\n\n return dest;\n },\n\n /**\n * Returns a 4x4 'lookat' viewing transform matrix.\n * @method lookAtMat4c\n * @static\n */\n lookAtMat4c(posx, posy, posz, targetx, targety, targetz, upx, upy, upz) {\n return math.lookAtMat4v([posx, posy, posz], [targetx, targety, targetz], [upx, upy, upz], []);\n },\n\n /**\n * Returns a 4x4 orthographic projection matrix.\n * @method orthoMat4c\n * @static\n */\n orthoMat4c(left, right, bottom, top, near, far, dest) {\n if (!dest) {\n dest = math.mat4();\n }\n const rl = (right - left);\n const tb = (top - bottom);\n const fn = (far - near);\n\n dest[0] = 2.0 / rl;\n dest[1] = 0.0;\n dest[2] = 0.0;\n dest[3] = 0.0;\n\n dest[4] = 0.0;\n dest[5] = 2.0 / tb;\n dest[6] = 0.0;\n dest[7] = 0.0;\n\n dest[8] = 0.0;\n dest[9] = 0.0;\n dest[10] = -2.0 / fn;\n dest[11] = 0.0;\n\n dest[12] = -(left + right) / rl;\n dest[13] = -(top + bottom) / tb;\n dest[14] = -(far + near) / fn;\n dest[15] = 1.0;\n\n return dest;\n },\n\n /**\n * Returns a 4x4 perspective projection matrix.\n * @method frustumMat4v\n * @static\n */\n frustumMat4v(fmin, fmax, m) {\n if (!m) {\n m = math.mat4();\n }\n\n const fmin4 = [fmin[0], fmin[1], fmin[2], 0.0];\n const fmax4 = [fmax[0], fmax[1], fmax[2], 0.0];\n\n math.addVec4(fmax4, fmin4, tempMat1);\n math.subVec4(fmax4, fmin4, tempMat2);\n\n const t = 2.0 * fmin4[2];\n\n const tempMat20 = tempMat2[0];\n const tempMat21 = tempMat2[1];\n const tempMat22 = tempMat2[2];\n\n m[0] = t / tempMat20;\n m[1] = 0.0;\n m[2] = 0.0;\n m[3] = 0.0;\n\n m[4] = 0.0;\n m[5] = t / tempMat21;\n m[6] = 0.0;\n m[7] = 0.0;\n\n m[8] = tempMat1[0] / tempMat20;\n m[9] = tempMat1[1] / tempMat21;\n m[10] = -tempMat1[2] / tempMat22;\n m[11] = -1.0;\n\n m[12] = 0.0;\n m[13] = 0.0;\n m[14] = -t * fmax4[2] / tempMat22;\n m[15] = 0.0;\n\n return m;\n },\n\n /**\n * Returns a 4x4 perspective projection matrix.\n * @method frustumMat4v\n * @static\n */\n frustumMat4(left, right, bottom, top, near, far, dest) {\n if (!dest) {\n dest = math.mat4();\n }\n const rl = (right - left);\n const tb = (top - bottom);\n const fn = (far - near);\n dest[0] = (near * 2) / rl;\n dest[1] = 0;\n dest[2] = 0;\n dest[3] = 0;\n dest[4] = 0;\n dest[5] = (near * 2) / tb;\n dest[6] = 0;\n dest[7] = 0;\n dest[8] = (right + left) / rl;\n dest[9] = (top + bottom) / tb;\n dest[10] = -(far + near) / fn;\n dest[11] = -1;\n dest[12] = 0;\n dest[13] = 0;\n dest[14] = -(far * near * 2) / fn;\n dest[15] = 0;\n return dest;\n },\n\n /**\n * Returns a 4x4 perspective projection matrix.\n * @method perspectiveMat4v\n * @static\n */\n perspectiveMat4(fovyrad, aspectratio, znear, zfar, m) {\n const pmin = [];\n const pmax = [];\n\n pmin[2] = znear;\n pmax[2] = zfar;\n\n pmax[1] = pmin[2] * Math.tan(fovyrad / 2.0);\n pmin[1] = -pmax[1];\n\n pmax[0] = pmax[1] * aspectratio;\n pmin[0] = -pmax[0];\n\n return math.frustumMat4v(pmin, pmax, m);\n },\n\n /**\n * Transforms a three-element position by a 4x4 matrix.\n * @method transformPoint3\n * @static\n */\n transformPoint3(m, p, dest = math.vec3()) {\n\n const x = p[0];\n const y = p[1];\n const z = p[2];\n\n dest[0] = (m[0] * x) + (m[4] * y) + (m[8] * z) + m[12];\n dest[1] = (m[1] * x) + (m[5] * y) + (m[9] * z) + m[13];\n dest[2] = (m[2] * x) + (m[6] * y) + (m[10] * z) + m[14];\n\n return dest;\n },\n\n /**\n * Transforms a homogeneous coordinate by a 4x4 matrix.\n * @method transformPoint3\n * @static\n */\n transformPoint4(m, v, dest = math.vec4()) {\n dest[0] = m[0] * v[0] + m[4] * v[1] + m[8] * v[2] + m[12] * v[3];\n dest[1] = m[1] * v[0] + m[5] * v[1] + m[9] * v[2] + m[13] * v[3];\n dest[2] = m[2] * v[0] + m[6] * v[1] + m[10] * v[2] + m[14] * v[3];\n dest[3] = m[3] * v[0] + m[7] * v[1] + m[11] * v[2] + m[15] * v[3];\n\n return dest;\n },\n\n\n /**\n * Transforms an array of three-element positions by a 4x4 matrix.\n * @method transformPoints3\n * @static\n */\n transformPoints3(m, points, points2) {\n const result = points2 || [];\n const len = points.length;\n let p0;\n let p1;\n let p2;\n let pi;\n\n // cache values\n const m0 = m[0];\n\n const m1 = m[1];\n const m2 = m[2];\n const m3 = m[3];\n const m4 = m[4];\n const m5 = m[5];\n const m6 = m[6];\n const m7 = m[7];\n const m8 = m[8];\n const m9 = m[9];\n const m10 = m[10];\n const m11 = m[11];\n const m12 = m[12];\n const m13 = m[13];\n const m14 = m[14];\n const m15 = m[15];\n\n let r;\n\n for (let i = 0; i < len; ++i) {\n\n // cache values\n pi = points[i];\n\n p0 = pi[0];\n p1 = pi[1];\n p2 = pi[2];\n\n r = result[i] || (result[i] = [0, 0, 0]);\n\n r[0] = (m0 * p0) + (m4 * p1) + (m8 * p2) + m12;\n r[1] = (m1 * p0) + (m5 * p1) + (m9 * p2) + m13;\n r[2] = (m2 * p0) + (m6 * p1) + (m10 * p2) + m14;\n r[3] = (m3 * p0) + (m7 * p1) + (m11 * p2) + m15;\n }\n\n result.length = len;\n\n return result;\n },\n\n /**\n * Transforms an array of positions by a 4x4 matrix.\n * @method transformPositions3\n * @static\n */\n transformPositions3(m, p, p2 = p) {\n let i;\n const len = p.length;\n\n let x;\n let y;\n let z;\n\n const m0 = m[0];\n const m1 = m[1];\n const m2 = m[2];\n const m3 = m[3];\n const m4 = m[4];\n const m5 = m[5];\n const m6 = m[6];\n const m7 = m[7];\n const m8 = m[8];\n const m9 = m[9];\n const m10 = m[10];\n const m11 = m[11];\n const m12 = m[12];\n const m13 = m[13];\n const m14 = m[14];\n const m15 = m[15];\n\n for (i = 0; i < len; i += 3) {\n\n x = p[i + 0];\n y = p[i + 1];\n z = p[i + 2];\n\n p2[i + 0] = (m0 * x) + (m4 * y) + (m8 * z) + m12;\n p2[i + 1] = (m1 * x) + (m5 * y) + (m9 * z) + m13;\n p2[i + 2] = (m2 * x) + (m6 * y) + (m10 * z) + m14;\n p2[i + 3] = (m3 * x) + (m7 * y) + (m11 * z) + m15;\n }\n\n return p2;\n },\n\n /**\n * Transforms an array of positions by a 4x4 matrix.\n * @method transformPositions4\n * @static\n */\n transformPositions4(m, p, p2 = p) {\n let i;\n const len = p.length;\n\n let x;\n let y;\n let z;\n\n const m0 = m[0];\n const m1 = m[1];\n const m2 = m[2];\n const m3 = m[3];\n const m4 = m[4];\n const m5 = m[5];\n const m6 = m[6];\n const m7 = m[7];\n const m8 = m[8];\n const m9 = m[9];\n const m10 = m[10];\n const m11 = m[11];\n const m12 = m[12];\n const m13 = m[13];\n const m14 = m[14];\n const m15 = m[15];\n\n for (i = 0; i < len; i += 4) {\n\n x = p[i + 0];\n y = p[i + 1];\n z = p[i + 2];\n\n p2[i + 0] = (m0 * x) + (m4 * y) + (m8 * z) + m12;\n p2[i + 1] = (m1 * x) + (m5 * y) + (m9 * z) + m13;\n p2[i + 2] = (m2 * x) + (m6 * y) + (m10 * z) + m14;\n p2[i + 3] = (m3 * x) + (m7 * y) + (m11 * z) + m15;\n }\n\n return p2;\n },\n\n /**\n * Transforms a three-element vector by a 4x4 matrix.\n * @method transformVec3\n * @static\n */\n transformVec3(m, v, dest) {\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n dest = dest || this.vec3();\n dest[0] = (m[0] * v0) + (m[4] * v1) + (m[8] * v2);\n dest[1] = (m[1] * v0) + (m[5] * v1) + (m[9] * v2);\n dest[2] = (m[2] * v0) + (m[6] * v1) + (m[10] * v2);\n return dest;\n },\n\n /**\n * Transforms a four-element vector by a 4x4 matrix.\n * @method transformVec4\n * @static\n */\n transformVec4(m, v, dest) {\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n const v3 = v[3];\n dest = dest || math.vec4();\n dest[0] = m[0] * v0 + m[4] * v1 + m[8] * v2 + m[12] * v3;\n dest[1] = m[1] * v0 + m[5] * v1 + m[9] * v2 + m[13] * v3;\n dest[2] = m[2] * v0 + m[6] * v1 + m[10] * v2 + m[14] * v3;\n dest[3] = m[3] * v0 + m[7] * v1 + m[11] * v2 + m[15] * v3;\n return dest;\n },\n\n /**\n * Rotate a 3D vector around the x-axis\n *\n * @method rotateVec3X\n * @param {Number[]} a The vec3 point to rotate\n * @param {Number[]} b The origin of the rotation\n * @param {Number} c The angle of rotation\n * @param {Number[]} dest The receiving vec3\n * @returns {Number[]} dest\n * @static\n */\n rotateVec3X(a, b, c, dest) {\n const p = [];\n const r = [];\n\n //Translate point to the origin\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2];\n\n //perform rotation\n r[0] = p[0];\n r[1] = p[1] * Math.cos(c) - p[2] * Math.sin(c);\n r[2] = p[1] * Math.sin(c) + p[2] * Math.cos(c);\n\n //translate to correct position\n dest[0] = r[0] + b[0];\n dest[1] = r[1] + b[1];\n dest[2] = r[2] + b[2];\n\n return dest;\n },\n\n /**\n * Rotate a 3D vector around the y-axis\n *\n * @method rotateVec3Y\n * @param {Number[]} a The vec3 point to rotate\n * @param {Number[]} b The origin of the rotation\n * @param {Number} c The angle of rotation\n * @param {Number[]} dest The receiving vec3\n * @returns {Number[]} dest\n * @static\n */\n rotateVec3Y(a, b, c, dest) {\n const p = [];\n const r = [];\n\n //Translate point to the origin\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2];\n\n //perform rotation\n r[0] = p[2] * Math.sin(c) + p[0] * Math.cos(c);\n r[1] = p[1];\n r[2] = p[2] * Math.cos(c) - p[0] * Math.sin(c);\n\n //translate to correct position\n dest[0] = r[0] + b[0];\n dest[1] = r[1] + b[1];\n dest[2] = r[2] + b[2];\n\n return dest;\n },\n\n /**\n * Rotate a 3D vector around the z-axis\n *\n * @method rotateVec3Z\n * @param {Number[]} a The vec3 point to rotate\n * @param {Number[]} b The origin of the rotation\n * @param {Number} c The angle of rotation\n * @param {Number[]} dest The receiving vec3\n * @returns {Number[]} dest\n * @static\n */\n rotateVec3Z(a, b, c, dest) {\n const p = [];\n const r = [];\n\n //Translate point to the origin\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2];\n\n //perform rotation\n r[0] = p[0] * Math.cos(c) - p[1] * Math.sin(c);\n r[1] = p[0] * Math.sin(c) + p[1] * Math.cos(c);\n r[2] = p[2];\n\n //translate to correct position\n dest[0] = r[0] + b[0];\n dest[1] = r[1] + b[1];\n dest[2] = r[2] + b[2];\n\n return dest;\n },\n\n /**\n * Transforms a four-element vector by a 4x4 projection matrix.\n *\n * @method projectVec4\n * @param {Number[]} p 3D View-space coordinate\n * @param {Number[]} q 2D Projected coordinate\n * @returns {Number[]} 2D Projected coordinate\n * @static\n */\n projectVec4(p, q) {\n const f = 1.0 / p[3];\n q = q || math.vec2();\n q[0] = v[0] * f;\n q[1] = v[1] * f;\n return q;\n },\n\n /**\n * Unprojects a three-element vector.\n *\n * @method unprojectVec3\n * @param {Number[]} p 3D Projected coordinate\n * @param {Number[]} viewMat View matrix\n * @returns {Number[]} projMat Projection matrix\n * @static\n */\n unprojectVec3: ((() => {\n const mat = new FloatArrayType(16);\n const mat2 = new FloatArrayType(16);\n const mat3 = new FloatArrayType(16);\n return function (p, viewMat, projMat, q) {\n return this.transformVec3(this.mulMat4(this.inverseMat4(viewMat, mat), this.inverseMat4(projMat, mat2), mat3), p, q)\n };\n }))(),\n\n /**\n * Linearly interpolates between two 3D vectors.\n * @method lerpVec3\n * @static\n */\n lerpVec3(t, t1, t2, p1, p2, dest) {\n const result = dest || math.vec3();\n const f = (t - t1) / (t2 - t1);\n result[0] = p1[0] + (f * (p2[0] - p1[0]));\n result[1] = p1[1] + (f * (p2[1] - p1[1]));\n result[2] = p1[2] + (f * (p2[2] - p1[2]));\n return result;\n },\n\n\n /**\n * Flattens a two-dimensional array into a one-dimensional array.\n *\n * @method flatten\n * @static\n * @param {Array of Arrays} a A 2D array\n * @returns Flattened 1D array\n */\n flatten(a) {\n\n const result = [];\n\n let i;\n let leni;\n let j;\n let lenj;\n let item;\n\n for (i = 0, leni = a.length; i < leni; i++) {\n item = a[i];\n for (j = 0, lenj = item.length; j < lenj; j++) {\n result.push(item[j]);\n }\n }\n\n return result;\n },\n\n\n identityQuaternion(dest = math.vec4()) {\n dest[0] = 0.0;\n dest[1] = 0.0;\n dest[2] = 0.0;\n dest[3] = 1.0;\n return dest;\n },\n\n /**\n * Initializes a quaternion from Euler angles.\n *\n * @param {Number[]} euler The Euler angles.\n * @param {String} order Euler angle order: \"XYZ\", \"YXZ\", \"ZXY\" etc.\n * @param {Number[]} [dest] Destination quaternion, created by default.\n * @returns {Number[]} The quaternion.\n */\n eulerToQuaternion(euler, order, dest = math.vec4()) {\n // http://www.mathworks.com/matlabcentral/fileexchange/\n // \t20696-function-to-convert-between-dcm-euler-angles-quaternions-and-euler-vectors/\n //\tcontent/SpinCalc.m\n\n const a = (euler[0] * math.DEGTORAD) / 2;\n const b = (euler[1] * math.DEGTORAD) / 2;\n const c = (euler[2] * math.DEGTORAD) / 2;\n\n const c1 = Math.cos(a);\n const c2 = Math.cos(b);\n const c3 = Math.cos(c);\n const s1 = Math.sin(a);\n const s2 = Math.sin(b);\n const s3 = Math.sin(c);\n\n if (order === 'XYZ') {\n\n dest[0] = s1 * c2 * c3 + c1 * s2 * s3;\n dest[1] = c1 * s2 * c3 - s1 * c2 * s3;\n dest[2] = c1 * c2 * s3 + s1 * s2 * c3;\n dest[3] = c1 * c2 * c3 - s1 * s2 * s3;\n\n } else if (order === 'YXZ') {\n\n dest[0] = s1 * c2 * c3 + c1 * s2 * s3;\n dest[1] = c1 * s2 * c3 - s1 * c2 * s3;\n dest[2] = c1 * c2 * s3 - s1 * s2 * c3;\n dest[3] = c1 * c2 * c3 + s1 * s2 * s3;\n\n } else if (order === 'ZXY') {\n\n dest[0] = s1 * c2 * c3 - c1 * s2 * s3;\n dest[1] = c1 * s2 * c3 + s1 * c2 * s3;\n dest[2] = c1 * c2 * s3 + s1 * s2 * c3;\n dest[3] = c1 * c2 * c3 - s1 * s2 * s3;\n\n } else if (order === 'ZYX') {\n\n dest[0] = s1 * c2 * c3 - c1 * s2 * s3;\n dest[1] = c1 * s2 * c3 + s1 * c2 * s3;\n dest[2] = c1 * c2 * s3 - s1 * s2 * c3;\n dest[3] = c1 * c2 * c3 + s1 * s2 * s3;\n\n } else if (order === 'YZX') {\n\n dest[0] = s1 * c2 * c3 + c1 * s2 * s3;\n dest[1] = c1 * s2 * c3 + s1 * c2 * s3;\n dest[2] = c1 * c2 * s3 - s1 * s2 * c3;\n dest[3] = c1 * c2 * c3 - s1 * s2 * s3;\n\n } else if (order === 'XZY') {\n\n dest[0] = s1 * c2 * c3 - c1 * s2 * s3;\n dest[1] = c1 * s2 * c3 - s1 * c2 * s3;\n dest[2] = c1 * c2 * s3 + s1 * s2 * c3;\n dest[3] = c1 * c2 * c3 + s1 * s2 * s3;\n }\n\n return dest;\n },\n\n mat4ToQuaternion(m, dest = math.vec4()) {\n // http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm\n\n // Assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\n const m11 = m[0];\n const m12 = m[4];\n const m13 = m[8];\n const m21 = m[1];\n const m22 = m[5];\n const m23 = m[9];\n const m31 = m[2];\n const m32 = m[6];\n const m33 = m[10];\n let s;\n\n const trace = m11 + m22 + m33;\n\n if (trace > 0) {\n\n s = 0.5 / Math.sqrt(trace + 1.0);\n\n dest[3] = 0.25 / s;\n dest[0] = (m32 - m23) * s;\n dest[1] = (m13 - m31) * s;\n dest[2] = (m21 - m12) * s;\n\n } else if (m11 > m22 && m11 > m33) {\n\n s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\n\n dest[3] = (m32 - m23) / s;\n dest[0] = 0.25 * s;\n dest[1] = (m12 + m21) / s;\n dest[2] = (m13 + m31) / s;\n\n } else if (m22 > m33) {\n\n s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\n\n dest[3] = (m13 - m31) / s;\n dest[0] = (m12 + m21) / s;\n dest[1] = 0.25 * s;\n dest[2] = (m23 + m32) / s;\n\n } else {\n\n s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\n\n dest[3] = (m21 - m12) / s;\n dest[0] = (m13 + m31) / s;\n dest[1] = (m23 + m32) / s;\n dest[2] = 0.25 * s;\n }\n\n return dest;\n },\n\n vec3PairToQuaternion(u, v, dest = math.vec4()) {\n const norm_u_norm_v = Math.sqrt(math.dotVec3(u, u) * math.dotVec3(v, v));\n let real_part = norm_u_norm_v + math.dotVec3(u, v);\n\n if (real_part < 0.00000001 * norm_u_norm_v) {\n\n // If u and v are exactly opposite, rotate 180 degrees\n // around an arbitrary orthogonal axis. Axis normalisation\n // can happen later, when we normalise the quaternion.\n\n real_part = 0.0;\n\n if (Math.abs(u[0]) > Math.abs(u[2])) {\n\n dest[0] = -u[1];\n dest[1] = u[0];\n dest[2] = 0;\n\n } else {\n dest[0] = 0;\n dest[1] = -u[2];\n dest[2] = u[1]\n }\n\n } else {\n\n // Otherwise, build quaternion the standard way.\n math.cross3Vec3(u, v, dest);\n }\n\n dest[3] = real_part;\n\n return math.normalizeQuaternion(dest);\n },\n\n angleAxisToQuaternion(angleAxis, dest = math.vec4()) {\n const halfAngle = angleAxis[3] / 2.0;\n const fsin = Math.sin(halfAngle);\n dest[0] = fsin * angleAxis[0];\n dest[1] = fsin * angleAxis[1];\n dest[2] = fsin * angleAxis[2];\n dest[3] = Math.cos(halfAngle);\n return dest;\n },\n\n quaternionToEuler: ((() => {\n const mat = new FloatArrayType(16);\n return (q, order, dest) => {\n dest = dest || math.vec3();\n math.quaternionToRotationMat4(q, mat);\n math.mat4ToEuler(mat, order, dest);\n return dest;\n };\n }))(),\n\n mulQuaternions(p, q, dest = math.vec4()) {\n const p0 = p[0];\n const p1 = p[1];\n const p2 = p[2];\n const p3 = p[3];\n const q0 = q[0];\n const q1 = q[1];\n const q2 = q[2];\n const q3 = q[3];\n dest[0] = p3 * q0 + p0 * q3 + p1 * q2 - p2 * q1;\n dest[1] = p3 * q1 + p1 * q3 + p2 * q0 - p0 * q2;\n dest[2] = p3 * q2 + p2 * q3 + p0 * q1 - p1 * q0;\n dest[3] = p3 * q3 - p0 * q0 - p1 * q1 - p2 * q2;\n return dest;\n },\n\n vec3ApplyQuaternion(q, vec, dest = math.vec3()) {\n const x = vec[0];\n const y = vec[1];\n const z = vec[2];\n\n const qx = q[0];\n const qy = q[1];\n const qz = q[2];\n const qw = q[3];\n\n // calculate quat * vector\n\n const ix = qw * x + qy * z - qz * y;\n const iy = qw * y + qz * x - qx * z;\n const iz = qw * z + qx * y - qy * x;\n const iw = -qx * x - qy * y - qz * z;\n\n // calculate result * inverse quat\n\n dest[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n dest[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n dest[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n\n return dest;\n },\n\n quaternionToMat4(q, dest) {\n\n dest = math.identityMat4(dest);\n\n const q0 = q[0]; //x\n const q1 = q[1]; //y\n const q2 = q[2]; //z\n const q3 = q[3]; //w\n\n const tx = 2.0 * q0;\n const ty = 2.0 * q1;\n const tz = 2.0 * q2;\n\n const twx = tx * q3;\n const twy = ty * q3;\n const twz = tz * q3;\n\n const txx = tx * q0;\n const txy = ty * q0;\n const txz = tz * q0;\n\n const tyy = ty * q1;\n const tyz = tz * q1;\n const tzz = tz * q2;\n\n dest[0] = 1.0 - (tyy + tzz);\n dest[1] = txy + twz;\n dest[2] = txz - twy;\n\n dest[4] = txy - twz;\n dest[5] = 1.0 - (txx + tzz);\n dest[6] = tyz + twx;\n\n dest[8] = txz + twy;\n dest[9] = tyz - twx;\n\n dest[10] = 1.0 - (txx + tyy);\n\n return dest;\n },\n\n quaternionToRotationMat4(q, m) {\n const x = q[0];\n const y = q[1];\n const z = q[2];\n const w = q[3];\n\n const x2 = x + x;\n const y2 = y + y;\n const z2 = z + z;\n const xx = x * x2;\n const xy = x * y2;\n const xz = x * z2;\n const yy = y * y2;\n const yz = y * z2;\n const zz = z * z2;\n const wx = w * x2;\n const wy = w * y2;\n const wz = w * z2;\n\n m[0] = 1 - (yy + zz);\n m[4] = xy - wz;\n m[8] = xz + wy;\n\n m[1] = xy + wz;\n m[5] = 1 - (xx + zz);\n m[9] = yz - wx;\n\n m[2] = xz - wy;\n m[6] = yz + wx;\n m[10] = 1 - (xx + yy);\n\n // last column\n m[3] = 0;\n m[7] = 0;\n m[11] = 0;\n\n // bottom row\n m[12] = 0;\n m[13] = 0;\n m[14] = 0;\n m[15] = 1;\n\n return m;\n },\n\n normalizeQuaternion(q, dest = q) {\n const len = math.lenVec4([q[0], q[1], q[2], q[3]]);\n dest[0] = q[0] / len;\n dest[1] = q[1] / len;\n dest[2] = q[2] / len;\n dest[3] = q[3] / len;\n return dest;\n },\n\n conjugateQuaternion(q, dest = q) {\n dest[0] = -q[0];\n dest[1] = -q[1];\n dest[2] = -q[2];\n dest[3] = q[3];\n return dest;\n },\n\n inverseQuaternion(q, dest) {\n return math.normalizeQuaternion(math.conjugateQuaternion(q, dest));\n },\n\n quaternionToAngleAxis(q, angleAxis = math.vec4()) {\n q = math.normalizeQuaternion(q, tempVec4);\n const q3 = q[3];\n const angle = 2 * Math.acos(q3);\n const s = Math.sqrt(1 - q3 * q3);\n if (s < 0.001) { // test to avoid divide by zero, s is always positive due to sqrt\n angleAxis[0] = q[0];\n angleAxis[1] = q[1];\n angleAxis[2] = q[2];\n } else {\n angleAxis[0] = q[0] / s;\n angleAxis[1] = q[1] / s;\n angleAxis[2] = q[2] / s;\n }\n angleAxis[3] = angle; // * 57.295779579;\n return angleAxis;\n },\n\n //------------------------------------------------------------------------------------------------------------------\n // Boundaries\n //------------------------------------------------------------------------------------------------------------------\n\n /**\n * Returns a new, uninitialized 3D axis-aligned bounding box.\n *\n * @private\n */\n AABB3(values) {\n return new FloatArrayType(values || 6);\n },\n\n /**\n * Returns a new, uninitialized 2D axis-aligned bounding box.\n *\n * @private\n */\n AABB2(values) {\n return new FloatArrayType(values || 4);\n },\n\n /**\n * Returns a new, uninitialized 3D oriented bounding box (OBB).\n *\n * @private\n */\n OBB3(values) {\n return new FloatArrayType(values || 32);\n },\n\n /**\n * Returns a new, uninitialized 2D oriented bounding box (OBB).\n *\n * @private\n */\n OBB2(values) {\n return new FloatArrayType(values || 16);\n },\n\n /** Returns a new 3D bounding sphere */\n Sphere3(x, y, z, r) {\n return new FloatArrayType([x, y, z, r]);\n },\n\n /**\n * Transforms an OBB3 by a 4x4 matrix.\n *\n * @private\n */\n transformOBB3(m, p, p2 = p) {\n let i;\n const len = p.length;\n\n let x;\n let y;\n let z;\n\n const m0 = m[0];\n const m1 = m[1];\n const m2 = m[2];\n const m3 = m[3];\n const m4 = m[4];\n const m5 = m[5];\n const m6 = m[6];\n const m7 = m[7];\n const m8 = m[8];\n const m9 = m[9];\n const m10 = m[10];\n const m11 = m[11];\n const m12 = m[12];\n const m13 = m[13];\n const m14 = m[14];\n const m15 = m[15];\n\n for (i = 0; i < len; i += 4) {\n\n x = p[i + 0];\n y = p[i + 1];\n z = p[i + 2];\n\n p2[i + 0] = (m0 * x) + (m4 * y) + (m8 * z) + m12;\n p2[i + 1] = (m1 * x) + (m5 * y) + (m9 * z) + m13;\n p2[i + 2] = (m2 * x) + (m6 * y) + (m10 * z) + m14;\n p2[i + 3] = (m3 * x) + (m7 * y) + (m11 * z) + m15;\n }\n\n return p2;\n },\n\n /** Returns true if the first AABB contains the second AABB.\n * @param aabb1\n * @param aabb2\n * @returns {boolean}\n */\n containsAABB3: function (aabb1, aabb2) {\n const result = (\n aabb1[0] <= aabb2[0] && aabb2[3] <= aabb1[3] &&\n aabb1[1] <= aabb2[1] && aabb2[4] <= aabb1[4] &&\n aabb1[2] <= aabb2[2] && aabb2[5] <= aabb1[5]);\n return result;\n },\n\n /**\n * Gets the diagonal size of an AABB3 given as minima and maxima.\n *\n * @private\n */\n getAABB3Diag: ((() => {\n\n const min = new FloatArrayType(3);\n const max = new FloatArrayType(3);\n const tempVec3 = new FloatArrayType(3);\n\n return aabb => {\n\n min[0] = aabb[0];\n min[1] = aabb[1];\n min[2] = aabb[2];\n\n max[0] = aabb[3];\n max[1] = aabb[4];\n max[2] = aabb[5];\n\n math.subVec3(max, min, tempVec3);\n\n return Math.abs(math.lenVec3(tempVec3));\n };\n }))(),\n\n /**\n * Get a diagonal boundary size that is symmetrical about the given point.\n *\n * @private\n */\n getAABB3DiagPoint: ((() => {\n\n const min = new FloatArrayType(3);\n const max = new FloatArrayType(3);\n const tempVec3 = new FloatArrayType(3);\n\n return (aabb, p) => {\n\n min[0] = aabb[0];\n min[1] = aabb[1];\n min[2] = aabb[2];\n\n max[0] = aabb[3];\n max[1] = aabb[4];\n max[2] = aabb[5];\n\n const diagVec = math.subVec3(max, min, tempVec3);\n\n const xneg = p[0] - aabb[0];\n const xpos = aabb[3] - p[0];\n const yneg = p[1] - aabb[1];\n const ypos = aabb[4] - p[1];\n const zneg = p[2] - aabb[2];\n const zpos = aabb[5] - p[2];\n\n diagVec[0] += (xneg > xpos) ? xneg : xpos;\n diagVec[1] += (yneg > ypos) ? yneg : ypos;\n diagVec[2] += (zneg > zpos) ? zneg : zpos;\n\n return Math.abs(math.lenVec3(diagVec));\n };\n }))(),\n\n /**\n * Gets the center of an AABB.\n *\n * @private\n */\n getAABB3Center(aabb, dest) {\n const r = dest || math.vec3();\n\n r[0] = (aabb[0] + aabb[3]) / 2;\n r[1] = (aabb[1] + aabb[4]) / 2;\n r[2] = (aabb[2] + aabb[5]) / 2;\n\n return r;\n },\n\n /**\n * Gets the center of a 2D AABB.\n *\n * @private\n */\n getAABB2Center(aabb, dest) {\n const r = dest || math.vec2();\n\n r[0] = (aabb[2] + aabb[0]) / 2;\n r[1] = (aabb[3] + aabb[1]) / 2;\n\n return r;\n },\n\n /**\n * Collapses a 3D axis-aligned boundary, ready to expand to fit 3D points.\n * Creates new AABB if none supplied.\n *\n * @private\n */\n collapseAABB3(aabb = math.AABB3()) {\n aabb[0] = math.MAX_DOUBLE;\n aabb[1] = math.MAX_DOUBLE;\n aabb[2] = math.MAX_DOUBLE;\n aabb[3] = -math.MAX_DOUBLE;\n aabb[4] = -math.MAX_DOUBLE;\n aabb[5] = -math.MAX_DOUBLE;\n\n return aabb;\n },\n\n /**\n * Converts an axis-aligned 3D boundary into an oriented boundary consisting of\n * an array of eight 3D positions, one for each corner of the boundary.\n *\n * @private\n */\n AABB3ToOBB3(aabb, obb = math.OBB3()) {\n obb[0] = aabb[0];\n obb[1] = aabb[1];\n obb[2] = aabb[2];\n obb[3] = 1;\n\n obb[4] = aabb[3];\n obb[5] = aabb[1];\n obb[6] = aabb[2];\n obb[7] = 1;\n\n obb[8] = aabb[3];\n obb[9] = aabb[4];\n obb[10] = aabb[2];\n obb[11] = 1;\n\n obb[12] = aabb[0];\n obb[13] = aabb[4];\n obb[14] = aabb[2];\n obb[15] = 1;\n\n obb[16] = aabb[0];\n obb[17] = aabb[1];\n obb[18] = aabb[5];\n obb[19] = 1;\n\n obb[20] = aabb[3];\n obb[21] = aabb[1];\n obb[22] = aabb[5];\n obb[23] = 1;\n\n obb[24] = aabb[3];\n obb[25] = aabb[4];\n obb[26] = aabb[5];\n obb[27] = 1;\n\n obb[28] = aabb[0];\n obb[29] = aabb[4];\n obb[30] = aabb[5];\n obb[31] = 1;\n\n return obb;\n },\n\n /**\n * Finds the minimum axis-aligned 3D boundary enclosing the homogeneous 3D points (x,y,z,w) given in a flattened array.\n *\n * @private\n */\n positions3ToAABB3: ((() => {\n\n const p = new FloatArrayType(3);\n\n return (positions, aabb, positionsDecodeMatrix) => {\n aabb = aabb || math.AABB3();\n\n let xmin = math.MAX_DOUBLE;\n let ymin = math.MAX_DOUBLE;\n let zmin = math.MAX_DOUBLE;\n let xmax = -math.MAX_DOUBLE;\n let ymax = -math.MAX_DOUBLE;\n let zmax = -math.MAX_DOUBLE;\n\n let x;\n let y;\n let z;\n\n for (let i = 0, len = positions.length; i < len; i += 3) {\n\n if (positionsDecodeMatrix) {\n\n p[0] = positions[i + 0];\n p[1] = positions[i + 1];\n p[2] = positions[i + 2];\n\n math.decompressPosition(p, positionsDecodeMatrix, p);\n\n x = p[0];\n y = p[1];\n z = p[2];\n\n } else {\n x = positions[i + 0];\n y = positions[i + 1];\n z = positions[i + 2];\n }\n\n if (x < xmin) {\n xmin = x;\n }\n\n if (y < ymin) {\n ymin = y;\n }\n\n if (z < zmin) {\n zmin = z;\n }\n\n if (x > xmax) {\n xmax = x;\n }\n\n if (y > ymax) {\n ymax = y;\n }\n\n if (z > zmax) {\n zmax = z;\n }\n }\n\n aabb[0] = xmin;\n aabb[1] = ymin;\n aabb[2] = zmin;\n aabb[3] = xmax;\n aabb[4] = ymax;\n aabb[5] = zmax;\n\n return aabb;\n };\n }))(),\n\n /**\n * Finds the minimum axis-aligned 3D boundary enclosing the homogeneous 3D points (x,y,z,w) given in a flattened array.\n *\n * @private\n */\n OBB3ToAABB3(obb, aabb = math.AABB3()) {\n let xmin = math.MAX_DOUBLE;\n let ymin = math.MAX_DOUBLE;\n let zmin = math.MAX_DOUBLE;\n let xmax = -math.MAX_DOUBLE;\n let ymax = -math.MAX_DOUBLE;\n let zmax = -math.MAX_DOUBLE;\n\n let x;\n let y;\n let z;\n\n for (let i = 0, len = obb.length; i < len; i += 4) {\n\n x = obb[i + 0];\n y = obb[i + 1];\n z = obb[i + 2];\n\n if (x < xmin) {\n xmin = x;\n }\n\n if (y < ymin) {\n ymin = y;\n }\n\n if (z < zmin) {\n zmin = z;\n }\n\n if (x > xmax) {\n xmax = x;\n }\n\n if (y > ymax) {\n ymax = y;\n }\n\n if (z > zmax) {\n zmax = z;\n }\n }\n\n aabb[0] = xmin;\n aabb[1] = ymin;\n aabb[2] = zmin;\n aabb[3] = xmax;\n aabb[4] = ymax;\n aabb[5] = zmax;\n\n return aabb;\n },\n\n /**\n * Finds the minimum axis-aligned 3D boundary enclosing the given 3D points.\n *\n * @private\n */\n points3ToAABB3(points, aabb = math.AABB3()) {\n let xmin = math.MAX_DOUBLE;\n let ymin = math.MAX_DOUBLE;\n let zmin = math.MAX_DOUBLE;\n let xmax = -math.MAX_DOUBLE;\n let ymax = -math.MAX_DOUBLE;\n let zmax = -math.MAX_DOUBLE;\n\n let x;\n let y;\n let z;\n\n for (let i = 0, len = points.length; i < len; i++) {\n\n x = points[i][0];\n y = points[i][1];\n z = points[i][2];\n\n if (x < xmin) {\n xmin = x;\n }\n\n if (y < ymin) {\n ymin = y;\n }\n\n if (z < zmin) {\n zmin = z;\n }\n\n if (x > xmax) {\n xmax = x;\n }\n\n if (y > ymax) {\n ymax = y;\n }\n\n if (z > zmax) {\n zmax = z;\n }\n }\n\n aabb[0] = xmin;\n aabb[1] = ymin;\n aabb[2] = zmin;\n aabb[3] = xmax;\n aabb[4] = ymax;\n aabb[5] = zmax;\n\n return aabb;\n },\n\n /**\n * Finds the minimum boundary sphere enclosing the given 3D points.\n *\n * @private\n */\n points3ToSphere3: ((() => {\n\n const tempVec3 = new FloatArrayType(3);\n\n return (points, sphere) => {\n\n sphere = sphere || math.vec4();\n\n let x = 0;\n let y = 0;\n let z = 0;\n\n let i;\n const numPoints = points.length;\n\n for (i = 0; i < numPoints; i++) {\n x += points[i][0];\n y += points[i][1];\n z += points[i][2];\n }\n\n sphere[0] = x / numPoints;\n sphere[1] = y / numPoints;\n sphere[2] = z / numPoints;\n\n let radius = 0;\n let dist;\n\n for (i = 0; i < numPoints; i++) {\n\n dist = Math.abs(math.lenVec3(math.subVec3(points[i], sphere, tempVec3)));\n\n if (dist > radius) {\n radius = dist;\n }\n }\n\n sphere[3] = radius;\n\n return sphere;\n };\n }))(),\n\n /**\n * Finds the minimum boundary sphere enclosing the given 3D positions.\n *\n * @private\n */\n positions3ToSphere3: ((() => {\n\n const tempVec3a = new FloatArrayType(3);\n const tempVec3b = new FloatArrayType(3);\n\n return (positions, sphere) => {\n\n sphere = sphere || math.vec4();\n\n let x = 0;\n let y = 0;\n let z = 0;\n\n let i;\n const lenPositions = positions.length;\n let radius = 0;\n\n for (i = 0; i < lenPositions; i += 3) {\n x += positions[i];\n y += positions[i + 1];\n z += positions[i + 2];\n }\n\n const numPositions = lenPositions / 3;\n\n sphere[0] = x / numPositions;\n sphere[1] = y / numPositions;\n sphere[2] = z / numPositions;\n\n let dist;\n\n for (i = 0; i < lenPositions; i += 3) {\n\n tempVec3a[0] = positions[i];\n tempVec3a[1] = positions[i + 1];\n tempVec3a[2] = positions[i + 2];\n\n dist = Math.abs(math.lenVec3(math.subVec3(tempVec3a, sphere, tempVec3b)));\n\n if (dist > radius) {\n radius = dist;\n }\n }\n\n sphere[3] = radius;\n\n return sphere;\n };\n }))(),\n\n /**\n * Finds the minimum boundary sphere enclosing the given 3D points.\n *\n * @private\n */\n OBB3ToSphere3: ((() => {\n\n const point = new FloatArrayType(3);\n const tempVec3 = new FloatArrayType(3);\n\n return (points, sphere) => {\n\n sphere = sphere || math.vec4();\n\n let x = 0;\n let y = 0;\n let z = 0;\n\n let i;\n const lenPoints = points.length;\n const numPoints = lenPoints / 4;\n\n for (i = 0; i < lenPoints; i += 4) {\n x += points[i + 0];\n y += points[i + 1];\n z += points[i + 2];\n }\n\n sphere[0] = x / numPoints;\n sphere[1] = y / numPoints;\n sphere[2] = z / numPoints;\n\n let radius = 0;\n let dist;\n\n for (i = 0; i < lenPoints; i += 4) {\n\n point[0] = points[i + 0];\n point[1] = points[i + 1];\n point[2] = points[i + 2];\n\n dist = Math.abs(math.lenVec3(math.subVec3(point, sphere, tempVec3)));\n\n if (dist > radius) {\n radius = dist;\n }\n }\n\n sphere[3] = radius;\n\n return sphere;\n };\n }))(),\n\n /**\n * Gets the center of a bounding sphere.\n *\n * @private\n */\n getSphere3Center(sphere, dest = math.vec3()) {\n dest[0] = sphere[0];\n dest[1] = sphere[1];\n dest[2] = sphere[2];\n\n return dest;\n },\n\n /**\n * Expands the first axis-aligned 3D boundary to enclose the second, if required.\n *\n * @private\n */\n expandAABB3(aabb1, aabb2) {\n\n if (aabb1[0] > aabb2[0]) {\n aabb1[0] = aabb2[0];\n }\n\n if (aabb1[1] > aabb2[1]) {\n aabb1[1] = aabb2[1];\n }\n\n if (aabb1[2] > aabb2[2]) {\n aabb1[2] = aabb2[2];\n }\n\n if (aabb1[3] < aabb2[3]) {\n aabb1[3] = aabb2[3];\n }\n\n if (aabb1[4] < aabb2[4]) {\n aabb1[4] = aabb2[4];\n }\n\n if (aabb1[5] < aabb2[5]) {\n aabb1[5] = aabb2[5];\n }\n\n return aabb1;\n },\n\n /**\n * Expands an axis-aligned 3D boundary to enclose the given point, if needed.\n *\n * @private\n */\n expandAABB3Point3(aabb, p) {\n\n if (aabb[0] > p[0]) {\n aabb[0] = p[0];\n }\n\n if (aabb[1] > p[1]) {\n aabb[1] = p[1];\n }\n\n if (aabb[2] > p[2]) {\n aabb[2] = p[2];\n }\n\n if (aabb[3] < p[0]) {\n aabb[3] = p[0];\n }\n\n if (aabb[4] < p[1]) {\n aabb[4] = p[1];\n }\n\n if (aabb[5] < p[2]) {\n aabb[5] = p[2];\n }\n\n return aabb;\n },\n\n /**\n * Calculates the normal vector of a triangle.\n *\n * @private\n */\n triangleNormal(a, b, c, normal = math.vec3()) {\n const p1x = b[0] - a[0];\n const p1y = b[1] - a[1];\n const p1z = b[2] - a[2];\n\n const p2x = c[0] - a[0];\n const p2y = c[1] - a[1];\n const p2z = c[2] - a[2];\n\n const p3x = p1y * p2z - p1z * p2y;\n const p3y = p1z * p2x - p1x * p2z;\n const p3z = p1x * p2y - p1y * p2x;\n\n const mag = Math.sqrt(p3x * p3x + p3y * p3y + p3z * p3z);\n if (mag === 0) {\n normal[0] = 0;\n normal[1] = 0;\n normal[2] = 0;\n } else {\n normal[0] = p3x / mag;\n normal[1] = p3y / mag;\n normal[2] = p3z / mag;\n }\n\n return normal\n }\n};\n\nexport {math};","import {math} from \"../../lib/math.js\";\n\nfunction quantizePositions (positions, lenPositions, aabb, quantizedPositions) {\n const xmin = aabb[0];\n const ymin = aabb[1];\n const zmin = aabb[2];\n const xwid = aabb[3] - xmin;\n const ywid = aabb[4] - ymin;\n const zwid = aabb[5] - zmin;\n const maxInt = 65535;\n const xMultiplier = maxInt / xwid;\n const yMultiplier = maxInt / ywid;\n const zMultiplier = maxInt / zwid;\n const verify = (num) => num >= 0 ? num : 0;\n for (let i = 0; i < lenPositions; i += 3) {\n quantizedPositions[i + 0] = Math.max(0, Math.min(65535,Math.floor(verify(positions[i + 0] - xmin) * xMultiplier)));\n quantizedPositions[i + 1] = Math.max(0, Math.min(65535,Math.floor(verify(positions[i + 1] - ymin) * yMultiplier)));\n quantizedPositions[i + 2] = Math.max(0, Math.min(65535,Math.floor(verify(positions[i + 2] - zmin) * zMultiplier)));\n }\n}\n\nfunction compressPosition(p, aabb, q) {\n const multiplier = new Float32Array([\n aabb[3] !== aabb[0] ? 65535 / (aabb[3] - aabb[0]) : 0,\n aabb[4] !== aabb[1] ? 65535 / (aabb[4] - aabb[1]) : 0,\n aabb[5] !== aabb[2] ? 65535 / (aabb[5] - aabb[2]) : 0\n ]);\n q[0] = Math.max(0, Math.min(65535, Math.floor((p[0] - aabb[0]) * multiplier[0])));\n q[1] = Math.max(0, Math.min(65535, Math.floor((p[1] - aabb[1]) * multiplier[1])));\n q[2] = Math.max(0, Math.min(65535, Math.floor((p[2] - aabb[2]) * multiplier[2])));\n}\n\nvar createPositionsDecodeMatrix = (function () {\n const translate = math.mat4();\n const scale = math.mat4();\n return function (aabb, positionsDecodeMatrix) {\n positionsDecodeMatrix = positionsDecodeMatrix || math.mat4();\n const xmin = aabb[0];\n const ymin = aabb[1];\n const zmin = aabb[2];\n const xwid = aabb[3] - xmin;\n const ywid = aabb[4] - ymin;\n const zwid = aabb[5] - zmin;\n const maxInt = 65535;\n math.identityMat4(translate);\n math.translationMat4v(aabb, translate);\n math.identityMat4(scale);\n math.scalingMat4v([xwid / maxInt, ywid / maxInt, zwid / maxInt], scale);\n math.mulMat4(translate, scale, positionsDecodeMatrix);\n return positionsDecodeMatrix;\n };\n})();\n\nfunction transformAndOctEncodeNormals(modelNormalMatrix, normals, lenNormals, compressedNormals, lenCompressedNormals) {\n // http://jcgt.org/published/0003/02/01/\n let oct, dec, best, currentCos, bestCos;\n let i, ei;\n let localNormal = math.vec3();\n let worldNormal = math.vec3();\n for (i = 0; i < lenNormals; i += 3) {\n localNormal[0] = normals[i];\n localNormal[1] = normals[i + 1];\n localNormal[2] = normals[i + 2];\n\n math.transformVec3(modelNormalMatrix, localNormal, worldNormal);\n math.normalizeVec3(worldNormal, worldNormal);\n\n // Test various combinations of ceil and floor to minimize rounding errors\n best = oct = octEncodeVec3(worldNormal, 0, \"floor\", \"floor\");\n dec = octDecodeVec2(oct);\n currentCos = bestCos = dot(worldNormal, 0, dec);\n oct = octEncodeVec3(worldNormal, 0, \"ceil\", \"floor\");\n dec = octDecodeVec2(oct);\n currentCos = dot(worldNormal, 0, dec);\n if (currentCos > bestCos) {\n best = oct;\n bestCos = currentCos;\n }\n oct = octEncodeVec3(worldNormal, 0, \"floor\", \"ceil\");\n dec = octDecodeVec2(oct);\n currentCos = dot(worldNormal, 0, dec);\n if (currentCos > bestCos) {\n best = oct;\n bestCos = currentCos;\n }\n oct = octEncodeVec3(worldNormal, 0, \"ceil\", \"ceil\");\n dec = octDecodeVec2(oct);\n currentCos = dot(worldNormal, 0, dec);\n if (currentCos > bestCos) {\n best = oct;\n bestCos = currentCos;\n }\n compressedNormals[lenCompressedNormals + i + 0] = best[0];\n compressedNormals[lenCompressedNormals + i + 1] = best[1];\n compressedNormals[lenCompressedNormals + i + 2] = 0.0; // Unused\n }\n lenCompressedNormals += lenNormals;\n return lenCompressedNormals;\n}\n\nfunction octEncodeNormals(normals, lenNormals, compressedNormals, lenCompressedNormals) { // http://jcgt.org/published/0003/02/01/\n let oct, dec, best, currentCos, bestCos;\n for (let i = 0; i < lenNormals; i += 3) {\n // Test various combinations of ceil and floor to minimize rounding errors\n best = oct = octEncodeVec3(normals, i, \"floor\", \"floor\");\n dec = octDecodeVec2(oct);\n currentCos = bestCos = dot(normals, i, dec);\n oct = octEncodeVec3(normals, i, \"ceil\", \"floor\");\n dec = octDecodeVec2(oct);\n currentCos = dot(normals, i, dec);\n if (currentCos > bestCos) {\n best = oct;\n bestCos = currentCos;\n }\n oct = octEncodeVec3(normals, i, \"floor\", \"ceil\");\n dec = octDecodeVec2(oct);\n currentCos = dot(normals, i, dec);\n if (currentCos > bestCos) {\n best = oct;\n bestCos = currentCos;\n }\n oct = octEncodeVec3(normals, i, \"ceil\", \"ceil\");\n dec = octDecodeVec2(oct);\n currentCos = dot(normals, i, dec);\n if (currentCos > bestCos) {\n best = oct;\n bestCos = currentCos;\n }\n compressedNormals[lenCompressedNormals + i + 0] = best[0];\n compressedNormals[lenCompressedNormals + i + 1] = best[1];\n compressedNormals[lenCompressedNormals + i + 2] = 0.0; // Unused\n }\n lenCompressedNormals += lenNormals;\n return lenCompressedNormals;\n}\n\n/**\n * @private\n */\nfunction octEncodeVec3(array, i, xfunc, yfunc) { // Oct-encode single normal vector in 2 bytes\n let x = array[i] / (Math.abs(array[i]) + Math.abs(array[i + 1]) + Math.abs(array[i + 2]));\n let y = array[i + 1] / (Math.abs(array[i]) + Math.abs(array[i + 1]) + Math.abs(array[i + 2]));\n if (array[i + 2] < 0) {\n let tempx = (1 - Math.abs(y)) * (x >= 0 ? 1 : -1);\n let tempy = (1 - Math.abs(x)) * (y >= 0 ? 1 : -1);\n x = tempx;\n y = tempy;\n }\n return new Int8Array([\n Math[xfunc](x * 127.5 + (x < 0 ? -1 : 0)),\n Math[yfunc](y * 127.5 + (y < 0 ? -1 : 0))\n ]);\n}\n\n/**\n * Decode an oct-encoded normal\n */\nfunction octDecodeVec2(oct) {\n let x = oct[0];\n let y = oct[1];\n x /= x < 0 ? 127 : 128;\n y /= y < 0 ? 127 : 128;\n const z = 1 - Math.abs(x) - Math.abs(y);\n if (z < 0) {\n x = (1 - Math.abs(y)) * (x >= 0 ? 1 : -1);\n y = (1 - Math.abs(x)) * (y >= 0 ? 1 : -1);\n }\n const length = Math.sqrt(x * x + y * y + z * z);\n return [\n x / length,\n y / length,\n z / length\n ];\n}\n\n/**\n * Dot product of a normal in an array against a candidate decoding\n * @private\n */\nfunction dot(array, i, vec3) {\n return array[i] * vec3[0] + array[i + 1] * vec3[1] + array[i + 2] * vec3[2];\n}\n\n/**\n * @private\n */\nconst geometryCompression = {\n quantizePositions,\n compressPosition,\n createPositionsDecodeMatrix,\n transformAndOctEncodeNormals,\n octEncodeNormals,\n};\n\nexport {geometryCompression}","/*----------------------------------------------------------------------------------------------------------------------\n * NOTE: The values of these constants must match those within xeokit-sdk\n *--------------------------------------------------------------------------------------------------------------------*/\n\n/**\n * Texture wrapping mode in which the texture repeats to infinity.\n */\nexport const RepeatWrapping = 1000;\n\n/**\n * Texture wrapping mode in which the last pixel of the texture stretches to the edge of the mesh.\n */\nexport const ClampToEdgeWrapping = 1001;\n\n/**\n * Texture wrapping mode in which the texture repeats to infinity, mirroring on each repeat.\n */\nexport const MirroredRepeatWrapping = 1002;\n\n/**\n * Texture magnification and minification filter that returns the nearest texel to the given sample coordinates.\n */\nexport const NearestFilter = 1003;\n\n/**\n * Texture minification filter that chooses the mipmap that most closely matches the size of the pixel being textured and returns the nearest texel to the given sample coordinates.\n */\nexport const NearestMipMapNearestFilter = 1004;\n\n/**\n * Texture minification filter that chooses the mipmap that most closely matches the size of the pixel being textured\n * and returns the nearest texel to the given sample coordinates.\n */\nexport const NearestMipmapNearestFilter = 1004;\n\n/**\n * Texture minification filter that chooses two mipmaps that most closely match the size of the pixel being textured\n * and returns the nearest texel to the center of the pixel at the given sample coordinates.\n */\nexport const NearestMipmapLinearFilter = 1005;\n\n/**\n * Texture minification filter that chooses two mipmaps that most closely match the size of the pixel being textured\n * and returns the nearest texel to the center of the pixel at the given sample coordinates.\n */\nexport const NearestMipMapLinearFilter = 1005;\n\n/**\n * Texture magnification and minification filter that returns the weighted average of the four nearest texels to the given sample coordinates.\n */\nexport const LinearFilter = 1006;\n\n/**\n * Texture minification filter that chooses the mipmap that most closely matches the size of the pixel being textured and\n * returns the weighted average of the four nearest texels to the given sample coordinates.\n */\nexport const LinearMipmapNearestFilter = 1007;\n\n/**\n * Texture minification filter that chooses the mipmap that most closely matches the size of the pixel being textured and\n * returns the weighted average of the four nearest texels to the given sample coordinates.\n */\nexport const LinearMipMapNearestFilter = 1007;\n\n/**\n * Texture minification filter that chooses two mipmaps that most closely match the size of the pixel being textured,\n * finds within each mipmap the weighted average of the nearest texel to the center of the pixel, then returns the\n * weighted average of those two values.\n */\nexport const LinearMipmapLinearFilter = 1008;\n\n/**\n * Texture minification filter that chooses two mipmaps that most closely match the size of the pixel being textured,\n * finds within each mipmap the weighted average of the nearest texel to the center of the pixel, then returns the\n * weighted average of those two values.\n */\nexport const LinearMipMapLinearFilter = 1008;\n\n/**\n * Media type for GIF images.\n */\nexport const GIFMediaType = 10000;\n\n/**\n * Media type for JPEG images.\n */\nexport const JPEGMediaType = 10001;\n\n/**\n * Media type for PNG images.\n */\nexport const PNGMediaType = 10002;","import {math} from \"../../lib/math.js\";\n\n/**\n * @private\n */\nconst buildEdgeIndices = (function () {\n\n const uniquePositions = [];\n const indicesLookup = [];\n const indicesReverseLookup = [];\n const weldedIndices = [];\n\n// TODO: Optimize with caching, but need to cater to both compressed and uncompressed positions\n\n const faces = [];\n let numFaces = 0;\n const compa = new Uint16Array(3);\n const compb = new Uint16Array(3);\n const compc = new Uint16Array(3);\n const a = math.vec3();\n const b = math.vec3();\n const c = math.vec3();\n const cb = math.vec3();\n const ab = math.vec3();\n const cross = math.vec3();\n const normal = math.vec3();\n const inverseNormal = math.vec3();\n\n function weldVertices(positions, indices) {\n const positionsMap = {}; // Hashmap for looking up vertices by position coordinates (and making sure they are unique)\n let vx;\n let vy;\n let vz;\n let key;\n const precisionPoints = 4; // number of decimal points, e.g. 4 for epsilon of 0.0001\n const precision = Math.pow(10, precisionPoints);\n let i;\n let len;\n let lenUniquePositions = 0;\n for (i = 0, len = positions.length; i < len; i += 3) {\n vx = positions[i];\n vy = positions[i + 1];\n vz = positions[i + 2];\n key = Math.round(vx * precision) + '_' + Math.round(vy * precision) + '_' + Math.round(vz * precision);\n if (positionsMap[key] === undefined) {\n positionsMap[key] = lenUniquePositions / 3;\n uniquePositions[lenUniquePositions++] = vx;\n uniquePositions[lenUniquePositions++] = vy;\n uniquePositions[lenUniquePositions++] = vz;\n }\n indicesLookup[i / 3] = positionsMap[key];\n }\n for (i = 0, len = indices.length; i < len; i++) {\n weldedIndices[i] = indicesLookup[indices[i]];\n indicesReverseLookup[weldedIndices[i]] = indices[i];\n }\n }\n\n function buildFaces(numIndices, positionsDecodeMatrix) {\n numFaces = 0;\n for (let i = 0, len = numIndices; i < len; i += 3) {\n const ia = ((weldedIndices[i]) * 3);\n const ib = ((weldedIndices[i + 1]) * 3);\n const ic = ((weldedIndices[i + 2]) * 3);\n if (positionsDecodeMatrix) {\n compa[0] = uniquePositions[ia];\n compa[1] = uniquePositions[ia + 1];\n compa[2] = uniquePositions[ia + 2];\n compb[0] = uniquePositions[ib];\n compb[1] = uniquePositions[ib + 1];\n compb[2] = uniquePositions[ib + 2];\n compc[0] = uniquePositions[ic];\n compc[1] = uniquePositions[ic + 1];\n compc[2] = uniquePositions[ic + 2];\n // Decode\n math.decompressPosition(compa, positionsDecodeMatrix, a);\n math.decompressPosition(compb, positionsDecodeMatrix, b);\n math.decompressPosition(compc, positionsDecodeMatrix, c);\n } else {\n a[0] = uniquePositions[ia];\n a[1] = uniquePositions[ia + 1];\n a[2] = uniquePositions[ia + 2];\n b[0] = uniquePositions[ib];\n b[1] = uniquePositions[ib + 1];\n b[2] = uniquePositions[ib + 2];\n c[0] = uniquePositions[ic];\n c[1] = uniquePositions[ic + 1];\n c[2] = uniquePositions[ic + 2];\n }\n math.subVec3(c, b, cb);\n math.subVec3(a, b, ab);\n math.cross3Vec3(cb, ab, cross);\n math.normalizeVec3(cross, normal);\n const face = faces[numFaces] || (faces[numFaces] = {normal: math.vec3()});\n face.normal[0] = normal[0];\n face.normal[1] = normal[1];\n face.normal[2] = normal[2];\n numFaces++;\n }\n }\n\n return function (positions, indices, positionsDecodeMatrix, edgeThreshold) {\n weldVertices(positions, indices);\n buildFaces(indices.length, positionsDecodeMatrix);\n const edgeIndices = [];\n const thresholdDot = Math.cos(math.DEGTORAD * edgeThreshold);\n const edges = {};\n let edge1;\n let edge2;\n let index1;\n let index2;\n let key;\n let largeIndex = false;\n let edge;\n let normal1;\n let normal2;\n let dot;\n let ia;\n let ib;\n for (let i = 0, len = indices.length; i < len; i += 3) {\n const faceIndex = i / 3;\n for (let j = 0; j < 3; j++) {\n edge1 = weldedIndices[i + j];\n edge2 = weldedIndices[i + ((j + 1) % 3)];\n index1 = Math.min(edge1, edge2);\n index2 = Math.max(edge1, edge2);\n key = index1 + ',' + index2;\n if (edges[key] === undefined) {\n edges[key] = {\n index1: index1,\n index2: index2,\n face1: faceIndex,\n face2: undefined,\n };\n } else {\n edges[key].face2 = faceIndex;\n }\n }\n }\n for (key in edges) {\n edge = edges[key];\n // an edge is only rendered if the angle (in degrees) between the face normals of the adjoining faces exceeds this value. default = 1 degree.\n if (edge.face2 !== undefined) {\n normal1 = faces[edge.face1].normal;\n normal2 = faces[edge.face2].normal;\n inverseNormal[0] = -normal2[0];\n inverseNormal[1] = -normal2[1];\n inverseNormal[2] = -normal2[2];\n dot = Math.abs(math.dotVec3(normal1, normal2));\n const dot2 = Math.abs(math.dotVec3(normal1, inverseNormal));\n if (dot > thresholdDot && dot2 > thresholdDot) {\n continue;\n }\n }\n ia = indicesReverseLookup[edge.index1];\n ib = indicesReverseLookup[edge.index2];\n if (!largeIndex && ia > 65535 || ib > 65535) {\n largeIndex = true;\n }\n edgeIndices.push(ia);\n edgeIndices.push(ib);\n }\n return (largeIndex) ? new Uint32Array(edgeIndices) : new Uint16Array(edgeIndices);\n };\n})();\n\n\nexport {buildEdgeIndices};","/**\n * Uses edge adjacency counts to identify if the given triangle mesh can be rendered with backface culling enabled.\n *\n * If all edges are connected to exactly two triangles, then the mesh will likely be a closed solid, and we can safely\n * render it with backface culling enabled.\n *\n * Otherwise, the mesh is a surface, and we must render it with backface culling disabled.\n *\n * @private\n */\nconst isTriangleMeshSolid = (indices, positions, vertexIndexMapping, edges) => {\n\n function compareIndexPositions(a, b)\n {\n let posA, posB;\n\n for (let i = 0; i < 3; i++) {\n posA = positions [a*3+i];\n posB = positions [b*3+i];\n\n if (posA !== posB) {\n return posB - posA;\n }\n }\n\n return 0;\n };\n\n // Group together indices corresponding to same position coordinates\n let newIndices = indices.slice ().sort (compareIndexPositions);\n\n // Calculate the mapping:\n // - from original index in indices array\n // - to indices-for-unique-positions\n let uniqueVertexIndex = null;\n\n for (let i = 0, len = newIndices.length; i < len; i++) {\n if (i == 0 || 0 != compareIndexPositions (\n newIndices[i],\n newIndices[i-1],\n )) {\n // different position\n uniqueVertexIndex = newIndices [i];\n }\n\n vertexIndexMapping [\n newIndices[i]\n ] = uniqueVertexIndex;\n }\n\n // Generate the list of edges\n for (let i = 0, len = indices.length; i < len; i += 3) {\n\n const a = vertexIndexMapping[indices[i]];\n const b = vertexIndexMapping[indices[i+1]];\n const c = vertexIndexMapping[indices[i+2]];\n\n let a2 = a;\n let b2 = b;\n let c2 = c;\n\n if (a > b && a > c) {\n if (b > c) {\n a2 = a;\n b2 = b;\n c2 = c;\n } else {\n a2 = a;\n b2 = c;\n c2 = b;\n }\n } else if (b > a && b > c) {\n if (a > c) {\n a2 = b;\n b2 = a;\n c2 = c;\n } else {\n a2 = b;\n b2 = c;\n c2 = a;\n }\n } else if (c > a && c > b) {\n if (a > b) {\n a2 = c;\n b2 = a;\n c2 = b;\n } else {\n a2 = c;\n b2 = b;\n c2 = a;\n }\n }\n\n edges[i+0] = [\n a2, b2\n ];\n edges[i+1] = [\n b2, c2\n ];\n\n if (a2 > c2) {\n const temp = c2;\n c2 = a2;\n a2 = temp;\n }\n\n edges[i+2] = [\n c2, a2\n ];\n }\n\n // Group semantically equivalent edgdes together\n function compareEdges (e1, e2) {\n let a, b;\n\n for (let i = 0; i < 2; i++) {\n a = e1[i];\n b = e2[i];\n\n if (b !== a) {\n return b - a;\n }\n }\n\n return 0;\n }\n\n edges = edges.slice(0, indices.length);\n\n edges.sort (compareEdges);\n\n // Make sure each edge is used exactly twice\n let sameEdgeCount = 0;\n\n for (let i = 0; i < edges.length; i++)\n {\n if (i === 0 || 0 !== compareEdges (\n edges[i], edges[i-1]\n )) {\n // different edge\n if (0 !== i && sameEdgeCount !== 2)\n {\n return false;\n }\n\n sameEdgeCount = 1;\n }\n else\n {\n // same edge\n sameEdgeCount++;\n }\n }\n\n if (edges.length > 0 && sameEdgeCount !== 2)\n {\n return false;\n }\n\n // Each edge is used exactly twice, this is a\n // watertight surface and hence a solid geometry.\n return true;\n};\n\nexport {isTriangleMeshSolid};","/**\n * Represents the usage of a {@link XKTGeometry} by an {@link XKTEntity}.\n *\n * * Created by {@link XKTModel#createEntity}\n * * Stored in {@link XKTEntity#meshes} and {@link XKTModel#meshesList}\n * * Has an {@link XKTGeometry}, and an optional {@link XKTTextureSet}, both of which it can share with other {@link XKTMesh}es\n * * Has {@link XKTMesh#color}, {@link XKTMesh#opacity}, {@link XKTMesh#metallic} and {@link XKTMesh#roughness} PBR attributes\n * @class XKTMesh\n */\nclass XKTMesh {\n\n /**\n * @private\n */\n constructor(cfg) {\n\n /**\n * Unique ID of this XKTMesh in {@link XKTModel#meshes}.\n *\n * @type {Number}\n */\n this.meshId = cfg.meshId;\n\n /**\n * Index of this XKTMesh in {@link XKTModel#meshesList};\n *\n * @type {Number}\n */\n this.meshIndex = cfg.meshIndex;\n\n /**\n * The 4x4 modeling transform matrix.\n *\n * Transform is relative to the center of the {@link XKTTile} that contains this XKTMesh's {@link XKTEntity},\n * which is given in {@link XKTMesh#entity}.\n *\n * When the ````XKTEntity```` shares its {@link XKTGeometry}s with other ````XKTEntity````s, this matrix is used\n * to transform this XKTMesh's XKTGeometry into World-space. When this XKTMesh does not share its ````XKTGeometry````,\n * then this matrix is ignored.\n *\n * @type {Number[]}\n */\n this.matrix = cfg.matrix;\n\n /**\n * The instanced {@link XKTGeometry}.\n *\n * @type {XKTGeometry}\n */\n this.geometry = cfg.geometry;\n\n /**\n * RGB color of this XKTMesh.\n *\n * @type {Float32Array}\n */\n this.color = cfg.color || new Float32Array([1, 1, 1]);\n\n /**\n * PBR metallness of this XKTMesh.\n *\n * @type {Number}\n */\n this.metallic = (cfg.metallic !== null && cfg.metallic !== undefined) ? cfg.metallic : 0;\n\n /**\n * PBR roughness of this XKTMesh.\n * The {@link XKTTextureSet} that defines the appearance of this XKTMesh.\n *\n * @type {Number}\n * @type {XKTTextureSet}\n */\n this.roughness = (cfg.roughness !== null && cfg.roughness !== undefined) ? cfg.roughness : 1;\n\n /**\n * Opacity of this XKTMesh.\n *\n * @type {Number}\n */\n this.opacity = (cfg.opacity !== undefined && cfg.opacity !== null) ? cfg.opacity : 1.0;\n\n /**\n * The {@link XKTTextureSet} that defines the appearance of this XKTMesh.\n *\n * @type {XKTTextureSet}\n */\n this.textureSet = cfg.textureSet;\n\n /**\n * The owner {@link XKTEntity}.\n *\n * Set by {@link XKTModel#createEntity}.\n *\n * @type {XKTEntity}\n */\n this.entity = null; // Set after instantiation, when the Entity is known\n }\n}\n\nexport {XKTMesh};","/**\n * An element of reusable geometry within an {@link XKTModel}.\n *\n * * Created by {@link XKTModel#createGeometry}\n * * Stored in {@link XKTModel#geometries} and {@link XKTModel#geometriesList}\n * * Referenced by {@link XKTMesh}s, which belong to {@link XKTEntity}s\n *\n * @class XKTGeometry\n */\nclass XKTGeometry {\n\n /**\n * @private\n * @param {*} cfg Configuration for the XKTGeometry.\n * @param {Number} cfg.geometryId Unique ID of the geometry in {@link XKTModel#geometries}.\n * @param {String} cfg.primitiveType Type of this geometry - \"triangles\", \"points\" or \"lines\" so far.\n * @param {Number} cfg.geometryIndex Index of this XKTGeometry in {@link XKTModel#geometriesList}.\n * @param {Float64Array} cfg.positions Non-quantized 3D vertex positions.\n * @param {Float32Array} cfg.normals Non-compressed vertex normals.\n * @param {Uint8Array} cfg.colorsCompressed Unsigned 8-bit integer RGBA vertex colors.\n * @param {Float32Array} cfg.uvs Non-compressed vertex UV coordinates.\n * @param {Uint32Array} cfg.indices Indices to organize the vertex positions and normals into triangles.\n * @param {Uint32Array} cfg.edgeIndices Indices to organize the vertex positions into edges.\n */\n constructor(cfg) {\n\n /**\n * Unique ID of this XKTGeometry in {@link XKTModel#geometries}.\n *\n * @type {Number}\n */\n this.geometryId = cfg.geometryId;\n\n /**\n * The type of primitive - \"triangles\" | \"points\" | \"lines\".\n *\n * @type {String}\n */\n this.primitiveType = cfg.primitiveType;\n\n /**\n * Index of this XKTGeometry in {@link XKTModel#geometriesList}.\n *\n * @type {Number}\n */\n this.geometryIndex = cfg.geometryIndex;\n\n /**\n * The number of {@link XKTMesh}s that reference this XKTGeometry.\n *\n * @type {Number}\n */\n this.numInstances = 0;\n\n /**\n * Non-quantized 3D vertex positions.\n *\n * Defined for all primitive types.\n *\n * @type {Float64Array}\n */\n this.positions = cfg.positions;\n\n /**\n * Quantized vertex positions.\n *\n * Defined for all primitive types.\n *\n * This array is later created from {@link XKTGeometry#positions} by {@link XKTModel#finalize}.\n *\n * @type {Uint16Array}\n */\n this.positionsQuantized = new Uint16Array(cfg.positions.length);\n\n /**\n * Non-compressed 3D vertex normals.\n *\n * Defined only for triangle primitives. Can be null if we want xeokit to auto-generate them. Ignored for points and lines.\n *\n * @type {Float32Array}\n */\n this.normals = cfg.normals;\n\n /**\n * Compressed vertex normals.\n *\n * Defined only for triangle primitives. Ignored for points and lines.\n *\n * This array is later created from {@link XKTGeometry#normals} by {@link XKTModel#finalize}.\n *\n * Will be null if {@link XKTGeometry#normals} is also null.\n *\n * @type {Int8Array}\n */\n this.normalsOctEncoded = null;\n\n /**\n * Compressed RGBA vertex colors.\n *\n * Defined only for point primitives. Ignored for triangles and lines.\n *\n * @type {Uint8Array}\n */\n this.colorsCompressed = cfg.colorsCompressed;\n\n /**\n * Non-compressed vertex UVs.\n *\n * @type {Float32Array}\n */\n this.uvs = cfg.uvs;\n\n /**\n * Compressed vertex UVs.\n *\n * @type {Uint16Array}\n */\n this.uvsCompressed = cfg.uvsCompressed;\n\n /**\n * Indices that organize the vertex positions and normals as triangles.\n *\n * Defined only for triangle and lines primitives. Ignored for points.\n *\n * @type {Uint32Array}\n */\n this.indices = cfg.indices;\n\n /**\n * Indices that organize the vertex positions as edges.\n *\n * Defined only for triangle primitives. Ignored for points and lines.\n *\n * @type {Uint32Array}\n */\n this.edgeIndices = cfg.edgeIndices;\n\n /**\n * When {@link XKTGeometry#primitiveType} is \"triangles\", this is ````true```` when this geometry is a watertight mesh.\n *\n * Defined only for triangle primitives. Ignored for points and lines.\n *\n * Set by {@link XKTModel#finalize}.\n *\n * @type {boolean}\n */\n this.solid = false;\n }\n\n /**\n * Convenience property that is ````true```` when {@link XKTGeometry#numInstances} is greater that one.\n * @returns {boolean}\n */\n get reused() {\n return (this.numInstances > 1);\n }\n}\n\nexport {XKTGeometry};","import {math} from \"../lib/math.js\";\n\n/**\n * An object within an {@link XKTModel}.\n *\n * * Created by {@link XKTModel#createEntity}\n * * Stored in {@link XKTModel#entities} and {@link XKTModel#entitiesList}\n * * Has one or more {@link XKTMesh}s, each having an {@link XKTGeometry}\n *\n * @class XKTEntity\n */\nclass XKTEntity {\n\n /**\n * @private\n * @param entityId\n * @param meshes\n */\n constructor(entityId, meshes) {\n\n /**\n * Unique ID of this ````XKTEntity```` in {@link XKTModel#entities}.\n *\n * For a BIM model, this will be an IFC product ID.\n *\n * We can also use {@link XKTModel#createMetaObject} to create an {@link XKTMetaObject} to specify metadata for\n * this ````XKTEntity````. To associate the {@link XKTMetaObject} with our {@link XKTEntity}, we give\n * {@link XKTMetaObject#metaObjectId} the same value as {@link XKTEntity#entityId}.\n *\n * @type {String}\n */\n this.entityId = entityId;\n\n /**\n * Index of this ````XKTEntity```` in {@link XKTModel#entitiesList}.\n *\n * Set by {@link XKTModel#finalize}.\n *\n * @type {Number}\n */\n this.entityIndex = null;\n\n /**\n * A list of {@link XKTMesh}s that indicate which {@link XKTGeometry}s are used by this Entity.\n *\n * @type {XKTMesh[]}\n */\n this.meshes = meshes;\n\n /**\n * World-space axis-aligned bounding box (AABB) that encloses the {@link XKTGeometry#positions} of\n * the {@link XKTGeometry}s that are used by this ````XKTEntity````.\n *\n * Set by {@link XKTModel#finalize}.\n *\n * @type {Float32Array}\n */\n this.aabb = math.AABB3();\n\n /**\n * Indicates if this ````XKTEntity```` shares {@link XKTGeometry}s with other {@link XKTEntity}'s.\n *\n * Set by {@link XKTModel#finalize}.\n *\n * Note that when an ````XKTEntity```` shares ````XKTGeometrys````, it shares **all** of its ````XKTGeometrys````. An ````XKTEntity````\n * never shares only some of its ````XKTGeometrys```` - it always shares either the whole set or none at all.\n *\n * @type {Boolean}\n */\n this.hasReusedGeometries = false;\n }\n}\n\nexport {XKTEntity};","/**\n * @desc A box-shaped 3D region within an {@link XKTModel} that contains {@link XKTEntity}s.\n *\n * * Created by {@link XKTModel#finalize}\n * * Stored in {@link XKTModel#tilesList}\n *\n * @class XKTTile\n */\nclass XKTTile {\n\n /**\n * Creates a new XKTTile.\n *\n * @private\n * @param aabb\n * @param entities\n */\n constructor(aabb, entities) {\n\n /**\n * Axis-aligned World-space bounding box that encloses the {@link XKTEntity}'s within this Tile.\n *\n * @type {Float64Array}\n */\n this.aabb = aabb;\n\n /**\n * The {@link XKTEntity}'s within this XKTTile.\n *\n * @type {XKTEntity[]}\n */\n this.entities = entities;\n }\n}\n\nexport {XKTTile};","/**\n * A kd-Tree node, used internally by {@link XKTModel}.\n *\n * @private\n */\nclass KDNode {\n\n /**\n * Create a KDNode with an axis-aligned 3D World-space boundary.\n */\n constructor(aabb) {\n\n /**\n * The axis-aligned 3D World-space boundary of this KDNode.\n *\n * @type {Float64Array}\n */\n this.aabb = aabb;\n\n /**\n * The {@link XKTEntity}s within this KDNode.\n */\n this.entities = null;\n\n /**\n * The left child KDNode.\n */\n this.left = null;\n\n /**\n * The right child KDNode.\n */\n this.right = null;\n }\n}\n\nexport {KDNode};","/**\n * A meta object within an {@link XKTModel}.\n *\n * These are plugged together into a parent-child hierarchy to represent structural\n * metadata for the {@link XKTModel}.\n *\n * The leaf XKTMetaObjects are usually associated with\n * an {@link XKTEntity}, which they do so by sharing the same ID,\n * ie. where {@link XKTMetaObject#metaObjectId} == {@link XKTEntity#entityId}.\n *\n * * Created by {@link XKTModel#createMetaObject}\n * * Stored in {@link XKTModel#metaObjects} and {@link XKTModel#metaObjectsList}\n * * Has an ID, a type, and a human-readable name\n * * May have a parent {@link XKTMetaObject}\n * * When no children, is usually associated with an {@link XKTEntity}\n *\n * @class XKTMetaObject\n */\nclass XKTMetaObject {\n\n /**\n * @private\n * @param metaObjectId\n * @param propertySetIds\n * @param metaObjectType\n * @param metaObjectName\n * @param parentMetaObjectId\n */\n constructor(metaObjectId, propertySetIds, metaObjectType, metaObjectName, parentMetaObjectId) {\n\n /**\n * Unique ID of this ````XKTMetaObject```` in {@link XKTModel#metaObjects}.\n *\n * For a BIM model, this will be an IFC product ID.\n *\n * If this is a leaf XKTMetaObject, where it is not a parent to any other XKTMetaObject,\n * then this will be equal to the ID of an {@link XKTEntity} in {@link XKTModel#entities},\n * ie. where {@link XKTMetaObject#metaObjectId} == {@link XKTEntity#entityId}.\n *\n * @type {String}\n */\n this.metaObjectId = metaObjectId;\n\n /**\n * Unique ID of one or more property sets that contains additional metadata about this\n * {@link XKTMetaObject}. The property sets can be stored in an external system, or\n * within the {@link XKTModel}, as {@link XKTPropertySet}s within {@link XKTModel#propertySets}.\n *\n * @type {String[]}\n */\n this.propertySetIds = propertySetIds;\n\n /**\n * Indicates the XKTMetaObject meta object type.\n *\n * This defaults to \"default\".\n *\n * @type {string}\n */\n this.metaObjectType = metaObjectType;\n\n /**\n * Indicates the XKTMetaObject meta object name.\n *\n * This defaults to {@link XKTMetaObject#metaObjectId}.\n *\n * @type {string}\n */\n this.metaObjectName = metaObjectName;\n\n /**\n * The parent XKTMetaObject, if any.\n *\n * Will be null if there is no parent.\n *\n * @type {String}\n */\n this.parentMetaObjectId = parentMetaObjectId;\n }\n}\n\nexport {XKTMetaObject};","/**\n * A property set within an {@link XKTModel}.\n *\n * These are shared among {@link XKTMetaObject}s.\n *\n * * Created by {@link XKTModel#createPropertySet}\n * * Stored in {@link XKTModel#propertySets} and {@link XKTModel#propertySetsList}\n * * Has an ID, a type, and a human-readable name\n *\n * @class XKTPropertySet\n */\nclass XKTPropertySet {\n\n /**\n * @private\n */\n constructor(propertySetId, propertySetType, propertySetName, properties) {\n\n /**\n * Unique ID of this ````XKTPropertySet```` in {@link XKTModel#propertySets}.\n *\n * @type {String}\n */\n this.propertySetId = propertySetId;\n\n /**\n * Indicates the ````XKTPropertySet````'s type.\n *\n * This defaults to \"default\".\n *\n * @type {string}\n */\n this.propertySetType = propertySetType;\n\n /**\n * Indicates the XKTPropertySet meta object name.\n *\n * This defaults to {@link XKTPropertySet#propertySetId}.\n *\n * @type {string}\n */\n this.propertySetName = propertySetName;\n\n /**\n * The properties within this ````XKTPropertySet````.\n *\n * @type {*[]}\n */\n this.properties = properties;\n }\n}\n\nexport {XKTPropertySet};","/**\n * A texture shared by {@link XKTTextureSet}s.\n *\n * * Created by {@link XKTModel#createTexture}\n * * Stored in {@link XKTTextureSet#textures}, {@link XKTModel#textures} and {@link XKTModel#texturesList}\n *\n * @class XKTTexture\n */\nimport {RepeatWrapping, LinearMipMapNearestFilter} from \"../constants\";\n\nclass XKTTexture {\n\n /**\n * @private\n */\n constructor(cfg) {\n\n /**\n * Unique ID of this XKTTexture in {@link XKTModel#textures}.\n *\n * @type {Number}\n */\n this.textureId = cfg.textureId;\n\n /**\n * Index of this XKTTexture in {@link XKTModel#texturesList};\n *\n * @type {Number}\n */\n this.textureIndex = cfg.textureIndex;\n\n /**\n * Texture image data.\n *\n * @type {Buffer}\n */\n this.imageData = cfg.imageData;\n\n /**\n * Which material channel this texture is applied to, as determined by its {@link XKTTextureSet}s.\n *\n * @type {Number}\n */\n this.channel = null;\n\n /**\n * Width of this XKTTexture.\n *\n * @type {Number}\n */\n this.width = cfg.width;\n\n /**\n * Height of this XKTTexture.\n *\n * @type {Number}\n */\n this.height = cfg.height;\n\n /**\n * Texture file source.\n *\n * @type {String}\n */\n this.src = cfg.src;\n\n /**\n * Whether this XKTTexture is to be compressed.\n *\n * @type {Boolean}\n */\n this.compressed = (!!cfg.compressed);\n\n /**\n * Media type of this XKTTexture.\n *\n * Supported values are {@link GIFMediaType}, {@link PNGMediaType} and {@link JPEGMediaType}.\n *\n * Ignored for compressed textures.\n *\n * @type {Number}\n */\n this.mediaType = cfg.mediaType;\n\n /**\n * How the texture is sampled when a texel covers less than one pixel. Supported values\n * are {@link LinearMipmapLinearFilter}, {@link LinearMipMapNearestFilter},\n * {@link NearestMipMapNearestFilter}, {@link NearestMipMapLinearFilter}\n * and {@link LinearMipMapLinearFilter}.\n *\n * Ignored for compressed textures.\n *\n * @type {Number}\n */\n this.minFilter = cfg.minFilter || LinearMipMapNearestFilter;\n\n /**\n * How the texture is sampled when a texel covers more than one pixel. Supported values\n * are {@link LinearFilter} and {@link NearestFilter}.\n *\n * Ignored for compressed textures.\n *\n * @type {Number}\n */\n this.magFilter = cfg.magFilter || LinearMipMapNearestFilter;\n\n /**\n * S wrapping mode.\n *\n * Supported values are {@link ClampToEdgeWrapping},\n * {@link MirroredRepeatWrapping} and {@link RepeatWrapping}.\n *\n * Ignored for compressed textures.\n *\n * @type {Number}\n */\n this.wrapS = cfg.wrapS || RepeatWrapping;\n\n /**\n * T wrapping mode.\n *\n * Supported values are {@link ClampToEdgeWrapping},\n * {@link MirroredRepeatWrapping} and {@link RepeatWrapping}.\n *\n * Ignored for compressed textures.\n *\n * @type {Number}\n */\n this.wrapT = cfg.wrapT || RepeatWrapping;\n\n /**\n * R wrapping mode.\n *\n * Ignored for compressed textures.\n *\n * Supported values are {@link ClampToEdgeWrapping},\n * {@link MirroredRepeatWrapping} and {@link RepeatWrapping}.\n *\n * @type {*|number}\n */\n this.wrapR = cfg.wrapR || RepeatWrapping\n }\n}\n\nexport {XKTTexture};","/**\n * A set of textures shared by {@link XKTMesh}es.\n *\n * * Created by {@link XKTModel#createTextureSet}\n * * Registered in {@link XKTMesh#material}, {@link XKTModel#materials} and {@link XKTModel#.textureSetsList}\n *\n * @class XKTMetalRoughMaterial\n */\nclass XKTTextureSet {\n\n /**\n * @private\n */\n constructor(cfg) {\n\n /**\n * Unique ID of this XKTTextureSet in {@link XKTModel#materials}.\n *\n * @type {Number}\n */\n this.textureSetId = cfg.textureSetId;\n\n /**\n * Index of this XKTTexture in {@link XKTModel#texturesList};\n *\n * @type {Number}\n */\n this.textureSetIndex = cfg.textureSetIndex;\n\n /**\n * Identifies the material type.\n *\n * @type {Number}\n */\n this.materialType = cfg.materialType;\n\n /**\n * Index of this XKTTextureSet in {@link XKTModel#meshesList};\n *\n * @type {Number}\n */\n this.materialIndex = cfg.materialIndex;\n\n /**\n * The number of {@link XKTMesh}s that reference this XKTTextureSet.\n *\n * @type {Number}\n */\n this.numInstances = 0;\n\n /**\n * RGBA {@link XKTTexture} containing base color in RGB and opacity in A.\n *\n * @type {XKTTexture}\n */\n this.colorTexture = cfg.colorTexture;\n\n /**\n * RGBA {@link XKTTexture} containing metallic and roughness factors in R and G.\n *\n * @type {XKTTexture}\n */\n this.metallicRoughnessTexture = cfg.metallicRoughnessTexture;\n\n /**\n * RGBA {@link XKTTexture} with surface normals in RGB.\n *\n * @type {XKTTexture}\n */\n this.normalsTexture = cfg.normalsTexture;\n\n /**\n * RGBA {@link XKTTexture} with emissive color in RGB.\n *\n * @type {XKTTexture}\n */\n this.emissiveTexture = cfg.emissiveTexture;\n\n /**\n * RGBA {@link XKTTexture} with ambient occlusion factors in RGB.\n *\n * @type {XKTTexture}\n */\n this.occlusionTexture = cfg.occlusionTexture;\n }\n}\n\nexport {XKTTextureSet};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@loaders.gl/core\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@loaders.gl/textures\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@loaders.gl/images\");","import {math} from \"../lib/math.js\";\nimport {geometryCompression} from \"./lib/geometryCompression.js\";\nimport {buildEdgeIndices} from \"./lib/buildEdgeIndices.js\";\nimport {isTriangleMeshSolid} from \"./lib/isTriangleMeshSolid.js\";\n\nimport {XKTMesh} from './XKTMesh.js';\nimport {XKTGeometry} from './XKTGeometry.js';\nimport {XKTEntity} from './XKTEntity.js';\nimport {XKTTile} from './XKTTile.js';\nimport {KDNode} from \"./KDNode.js\";\nimport {XKTMetaObject} from \"./XKTMetaObject.js\";\nimport {XKTPropertySet} from \"./XKTPropertySet.js\";\nimport {mergeVertices} from \"../lib/mergeVertices.js\";\nimport {XKT_INFO} from \"../XKT_INFO.js\";\nimport {XKTTexture} from \"./XKTTexture\";\nimport {XKTTextureSet} from \"./XKTTextureSet\";\nimport {encode} from \"@loaders.gl/core\";\nimport {KTX2BasisWriter} from \"@loaders.gl/textures\";\nimport {ImageLoader} from '@loaders.gl/images';\nimport {load} from '@loaders.gl/core';\n\nconst tempVec4a = math.vec4([0, 0, 0, 1]);\nconst tempVec4b = math.vec4([0, 0, 0, 1]);\n\nconst tempMat4 = math.mat4();\nconst tempMat4b = math.mat4();\n\nconst kdTreeDimLength = new Float64Array(3);\n\n// XKT texture types\n\nconst COLOR_TEXTURE = 0;\nconst METALLIC_ROUGHNESS_TEXTURE = 1;\nconst NORMALS_TEXTURE = 2;\nconst EMISSIVE_TEXTURE = 3;\nconst OCCLUSION_TEXTURE = 4;\n\n// KTX2 encoding options for each texture type\n\nconst TEXTURE_ENCODING_OPTIONS = {}\nTEXTURE_ENCODING_OPTIONS[COLOR_TEXTURE] = {\n useSRGB: true,\n qualityLevel: 50,\n encodeUASTC: true,\n mipmaps: true\n};\nTEXTURE_ENCODING_OPTIONS[EMISSIVE_TEXTURE] = {\n useSRGB: true,\n encodeUASTC: true,\n qualityLevel: 10,\n mipmaps: false\n};\nTEXTURE_ENCODING_OPTIONS[METALLIC_ROUGHNESS_TEXTURE] = {\n useSRGB: false,\n encodeUASTC: true,\n qualityLevel: 50,\n mipmaps: true // Needed for GGX roughness shading\n};\nTEXTURE_ENCODING_OPTIONS[NORMALS_TEXTURE] = {\n useSRGB: false,\n encodeUASTC: true,\n qualityLevel: 10,\n mipmaps: false\n};\nTEXTURE_ENCODING_OPTIONS[OCCLUSION_TEXTURE] = {\n useSRGB: false,\n encodeUASTC: true,\n qualityLevel: 10,\n mipmaps: false\n};\n\n/**\n * A document model that represents the contents of an .XKT file.\n *\n * * An XKTModel contains {@link XKTTile}s, which spatially subdivide the model into axis-aligned, box-shaped regions.\n * * Each {@link XKTTile} contains {@link XKTEntity}s, which represent the objects within its region.\n * * Each {@link XKTEntity} has {@link XKTMesh}s, which each have a {@link XKTGeometry}. Each {@link XKTGeometry} can be shared by multiple {@link XKTMesh}s.\n * * Import models into an XKTModel using {@link parseGLTFJSONIntoXKTModel}, {@link parseIFCIntoXKTModel}, {@link parseCityJSONIntoXKTModel} etc.\n * * Build an XKTModel programmatically using {@link XKTModel#createGeometry}, {@link XKTModel#createMesh} and {@link XKTModel#createEntity}.\n * * Serialize an XKTModel to an ArrayBuffer using {@link writeXKTModelToArrayBuffer}.\n *\n * ## Usage\n *\n * See [main docs page](/docs/#javascript-api) for usage examples.\n *\n * @class XKTModel\n */\nclass XKTModel {\n\n /**\n * Constructs a new XKTModel.\n *\n * @param {*} [cfg] Configuration\n * @param {Number} [cfg.edgeThreshold=10]\n * @param {Number} [cfg.minTileSize=500]\n */\n constructor(cfg = {}) {\n\n /**\n * The model's ID, if available.\n *\n * Will be \"default\" by default.\n *\n * @type {String}\n */\n this.modelId = cfg.modelId || \"default\";\n\n /**\n * The project ID, if available.\n *\n * Will be an empty string by default.\n *\n * @type {String}\n */\n this.projectId = cfg.projectId || \"\";\n\n /**\n * The revision ID, if available.\n *\n * Will be an empty string by default.\n *\n * @type {String}\n */\n this.revisionId = cfg.revisionId || \"\";\n\n /**\n * The model author, if available.\n *\n * Will be an empty string by default.\n *\n * @property author\n * @type {String}\n */\n this.author = cfg.author || \"\";\n\n /**\n * The date the model was created, if available.\n *\n * Will be an empty string by default.\n *\n * @property createdAt\n * @type {String}\n */\n this.createdAt = cfg.createdAt || \"\";\n\n /**\n * The application that created the model, if available.\n *\n * Will be an empty string by default.\n *\n * @property creatingApplication\n * @type {String}\n */\n this.creatingApplication = cfg.creatingApplication || \"\";\n\n /**\n * The model schema version, if available.\n *\n * In the case of IFC, this could be \"IFC2x3\" or \"IFC4\", for example.\n *\n * Will be an empty string by default.\n *\n * @property schema\n * @type {String}\n */\n this.schema = cfg.schema || \"\";\n\n /**\n * The XKT format version.\n *\n * @property xktVersion;\n * @type {number}\n */\n this.xktVersion = XKT_INFO.xktVersion;\n\n /**\n *\n * @type {Number|number}\n */\n this.edgeThreshold = cfg.edgeThreshold || 10;\n\n /**\n * Minimum diagonal size of the boundary of an {@link XKTTile}.\n *\n * @type {Number|number}\n */\n this.minTileSize = cfg.minTileSize || 500;\n\n /**\n * Map of {@link XKTPropertySet}s within this XKTModel, each mapped to {@link XKTPropertySet#propertySetId}.\n *\n * Created by {@link XKTModel#createPropertySet}.\n *\n * @type {{String:XKTPropertySet}}\n */\n this.propertySets = {};\n\n /**\n * {@link XKTPropertySet}s within this XKTModel.\n *\n * Each XKTPropertySet holds its position in this list in {@link XKTPropertySet#propertySetIndex}.\n *\n * Created by {@link XKTModel#finalize}.\n *\n * @type {XKTPropertySet[]}\n */\n this.propertySetsList = [];\n\n /**\n * Map of {@link XKTMetaObject}s within this XKTModel, each mapped to {@link XKTMetaObject#metaObjectId}.\n *\n * Created by {@link XKTModel#createMetaObject}.\n *\n * @type {{String:XKTMetaObject}}\n */\n this.metaObjects = {};\n\n /**\n * {@link XKTMetaObject}s within this XKTModel.\n *\n * Each XKTMetaObject holds its position in this list in {@link XKTMetaObject#metaObjectIndex}.\n *\n * Created by {@link XKTModel#finalize}.\n *\n * @type {XKTMetaObject[]}\n */\n this.metaObjectsList = [];\n\n /**\n * The positions of all shared {@link XKTGeometry}s are de-quantized using this singular\n * de-quantization matrix.\n *\n * This de-quantization matrix is generated from the collective Local-space boundary of the\n * positions of all shared {@link XKTGeometry}s.\n *\n * @type {Float32Array}\n */\n this.reusedGeometriesDecodeMatrix = new Float32Array(16);\n\n /**\n * Map of {@link XKTGeometry}s within this XKTModel, each mapped to {@link XKTGeometry#geometryId}.\n *\n * Created by {@link XKTModel#createGeometry}.\n *\n * @type {{Number:XKTGeometry}}\n */\n this.geometries = {};\n\n /**\n * List of {@link XKTGeometry}s within this XKTModel, in the order they were created.\n *\n * Each XKTGeometry holds its position in this list in {@link XKTGeometry#geometryIndex}.\n *\n * Created by {@link XKTModel#finalize}.\n *\n * @type {XKTGeometry[]}\n */\n this.geometriesList = [];\n\n /**\n * Map of {@link XKTTexture}s within this XKTModel, each mapped to {@link XKTTexture#textureId}.\n *\n * Created by {@link XKTModel#createTexture}.\n *\n * @type {{Number:XKTTexture}}\n */\n this.textures = {};\n\n /**\n * List of {@link XKTTexture}s within this XKTModel, in the order they were created.\n *\n * Each XKTTexture holds its position in this list in {@link XKTTexture#textureIndex}.\n *\n * Created by {@link XKTModel#finalize}.\n *\n * @type {XKTTexture[]}\n */\n this.texturesList = [];\n\n /**\n * Map of {@link XKTTextureSet}s within this XKTModel, each mapped to {@link XKTTextureSet#textureSetId}.\n *\n * Created by {@link XKTModel#createTextureSet}.\n *\n * @type {{Number:XKTTextureSet}}\n */\n this.textureSets = {};\n\n /**\n * List of {@link XKTTextureSet}s within this XKTModel, in the order they were created.\n *\n * Each XKTTextureSet holds its position in this list in {@link XKTTextureSet#textureSetIndex}.\n *\n * Created by {@link XKTModel#finalize}.\n *\n * @type {XKTTextureSet[]}\n */\n this.textureSetsList = [];\n\n /**\n * Map of {@link XKTMesh}s within this XKTModel, each mapped to {@link XKTMesh#meshId}.\n *\n * Created by {@link XKTModel#createMesh}.\n *\n * @type {{Number:XKTMesh}}\n */\n this.meshes = {};\n\n /**\n * List of {@link XKTMesh}s within this XKTModel, in the order they were created.\n *\n * Each XKTMesh holds its position in this list in {@link XKTMesh#meshIndex}.\n *\n * Created by {@link XKTModel#finalize}.\n *\n * @type {XKTMesh[]}\n */\n this.meshesList = [];\n\n /**\n * Map of {@link XKTEntity}s within this XKTModel, each mapped to {@link XKTEntity#entityId}.\n *\n * Created by {@link XKTModel#createEntity}.\n *\n * @type {{String:XKTEntity}}\n */\n this.entities = {};\n\n /**\n * {@link XKTEntity}s within this XKTModel.\n *\n * Each XKTEntity holds its position in this list in {@link XKTEntity#entityIndex}.\n *\n * Created by {@link XKTModel#finalize}.\n *\n * @type {XKTEntity[]}\n */\n this.entitiesList = [];\n\n /**\n * {@link XKTTile}s within this XKTModel.\n *\n * Created by {@link XKTModel#finalize}.\n *\n * @type {XKTTile[]}\n */\n this.tilesList = [];\n\n /**\n * The axis-aligned 3D World-space boundary of this XKTModel.\n *\n * Created by {@link XKTModel#finalize}.\n *\n * @type {Float64Array}\n */\n this.aabb = math.AABB3();\n\n /**\n * Indicates if this XKTModel has been finalized.\n *\n * Set ````true```` by {@link XKTModel#finalize}.\n *\n * @type {boolean}\n */\n this.finalized = false;\n }\n\n /**\n * Creates an {@link XKTPropertySet} within this XKTModel.\n *\n * Logs error and does nothing if this XKTModel has been finalized (see {@link XKTModel#finalized}).\n *\n * @param {*} params Method parameters.\n * @param {String} params.propertySetId Unique ID for the {@link XKTPropertySet}.\n * @param {String} [params.propertySetType=\"default\"] A meta type for the {@link XKTPropertySet}.\n * @param {String} [params.propertySetName] Human-readable name for the {@link XKTPropertySet}. Defaults to the ````propertySetId```` parameter.\n * @param {String[]} params.properties Properties for the {@link XKTPropertySet}.\n * @returns {XKTPropertySet} The new {@link XKTPropertySet}.\n */\n createPropertySet(params) {\n\n if (!params) {\n throw \"Parameters expected: params\";\n }\n\n if (params.propertySetId === null || params.propertySetId === undefined) {\n throw \"Parameter expected: params.propertySetId\";\n }\n\n if (params.properties === null || params.properties === undefined) {\n throw \"Parameter expected: params.properties\";\n }\n\n if (this.finalized) {\n console.error(\"XKTModel has been finalized, can't add more property sets\");\n return;\n }\n\n if (this.propertySets[params.propertySetId]) {\n // console.error(\"XKTPropertySet already exists with this ID: \" + params.propertySetId);\n return;\n }\n\n const propertySetId = params.propertySetId;\n const propertySetType = params.propertySetType || \"Default\";\n const propertySetName = params.propertySetName || params.propertySetId;\n const properties = params.properties || [];\n\n const propertySet = new XKTPropertySet(propertySetId, propertySetType, propertySetName, properties);\n\n this.propertySets[propertySetId] = propertySet;\n this.propertySetsList.push(propertySet);\n\n return propertySet;\n }\n\n /**\n * Creates an {@link XKTMetaObject} within this XKTModel.\n *\n * Logs error and does nothing if this XKTModel has been finalized (see {@link XKTModel#finalized}).\n *\n * @param {*} params Method parameters.\n * @param {String} params.metaObjectId Unique ID for the {@link XKTMetaObject}.\n * @param {String} params.propertySetIds ID of one or more property sets that contains additional metadata about\n * this {@link XKTMetaObject}. The property sets could be stored externally (ie not managed at all by the XKT file),\n * or could be {@link XKTPropertySet}s within {@link XKTModel#propertySets}.\n * @param {String} [params.metaObjectType=\"default\"] A meta type for the {@link XKTMetaObject}. Can be anything,\n * but is usually an IFC type, such as \"IfcSite\" or \"IfcWall\".\n * @param {String} [params.metaObjectName] Human-readable name for the {@link XKTMetaObject}. Defaults to the ````metaObjectId```` parameter.\n * @param {String} [params.parentMetaObjectId] ID of the parent {@link XKTMetaObject}, if any. Defaults to the ````metaObjectId```` parameter.\n * @returns {XKTMetaObject} The new {@link XKTMetaObject}.\n */\n createMetaObject(params) {\n\n if (!params) {\n throw \"Parameters expected: params\";\n }\n\n if (params.metaObjectId === null || params.metaObjectId === undefined) {\n throw \"Parameter expected: params.metaObjectId\";\n }\n\n if (this.finalized) {\n console.error(\"XKTModel has been finalized, can't add more meta objects\");\n return;\n }\n\n if (this.metaObjects[params.metaObjectId]) {\n // console.error(\"XKTMetaObject already exists with this ID: \" + params.metaObjectId);\n return;\n }\n\n const metaObjectId = params.metaObjectId;\n const propertySetIds = params.propertySetIds;\n const metaObjectType = params.metaObjectType || \"Default\";\n const metaObjectName = params.metaObjectName || params.metaObjectId;\n const parentMetaObjectId = params.parentMetaObjectId;\n\n const metaObject = new XKTMetaObject(metaObjectId, propertySetIds, metaObjectType, metaObjectName, parentMetaObjectId);\n\n this.metaObjects[metaObjectId] = metaObject;\n this.metaObjectsList.push(metaObject);\n\n if (!parentMetaObjectId) {\n if (!this._rootMetaObject) {\n this._rootMetaObject = metaObject;\n }\n }\n\n return metaObject;\n }\n\n /**\n * Creates an {@link XKTTexture} within this XKTModel.\n *\n * Registers the new {@link XKTTexture} in {@link XKTModel#textures} and {@link XKTModel#texturesList}.\n *\n * Logs error and does nothing if this XKTModel has been finalized (see {@link XKTModel#finalized}).\n *\n * @param {*} params Method parameters.\n * @param {Number} params.textureId Unique ID for the {@link XKTTexture}.\n * @param {String} [params.src] Source of an image file for the texture.\n * @param {Buffer} [params.imageData] Image data for the texture.\n * @param {Number} [params.mediaType] Media type (ie. MIME type) of ````imageData````. Supported values are {@link GIFMediaType}, {@link PNGMediaType} and {@link JPEGMediaType}.\n * @param {Number} [params.width] Texture width, used with ````imageData````. Ignored for compressed textures.\n * @param {Number} [params.height] Texture height, used with ````imageData````. Ignored for compressed textures.\n * @param {Boolean} [params.compressed=true] Whether to compress the texture.\n * @param {Number} [params.minFilter=LinearMipMapNearestFilter] How the texture is sampled when a texel covers less than one pixel. Supported\n * values are {@link LinearMipmapLinearFilter}, {@link LinearMipMapNearestFilter}, {@link NearestMipMapNearestFilter},\n * {@link NearestMipMapLinearFilter} and {@link LinearMipMapLinearFilter}. Ignored for compressed textures.\n * @param {Number} [params.magFilter=LinearMipMapNearestFilter] How the texture is sampled when a texel covers more than one pixel. Supported values\n * are {@link LinearFilter} and {@link NearestFilter}. Ignored for compressed textures.\n * @param {Number} [params.wrapS=RepeatWrapping] Wrap parameter for texture coordinate *S*. Supported values are {@link ClampToEdgeWrapping},\n * {@link MirroredRepeatWrapping} and {@link RepeatWrapping}. Ignored for compressed textures.\n * @param {Number} [params.wrapT=RepeatWrapping] Wrap parameter for texture coordinate *T*. Supported values are {@link ClampToEdgeWrapping},\n * {@link MirroredRepeatWrapping} and {@link RepeatWrapping}. Ignored for compressed textures.\n * {@param {Number} [params.wrapR=RepeatWrapping] Wrap parameter for texture coordinate *R*. Supported values are {@link ClampToEdgeWrapping},\n * {@link MirroredRepeatWrapping} and {@link RepeatWrapping}. Ignored for compressed textures.\n * @returns {XKTTexture} The new {@link XKTTexture}.\n */\n createTexture(params) {\n\n if (!params) {\n throw \"Parameters expected: params\";\n }\n\n if (params.textureId === null || params.textureId === undefined) {\n throw \"Parameter expected: params.textureId\";\n }\n\n if (!params.imageData && !params.src) {\n throw \"Parameter expected: params.imageData or params.src\";\n }\n\n if (this.finalized) {\n console.error(\"XKTModel has been finalized, can't add more textures\");\n return;\n }\n\n if (this.textures[params.textureId]) {\n console.error(\"XKTTexture already exists with this ID: \" + params.textureId);\n return;\n }\n\n if (params.src) {\n const fileExt = params.src.split('.').pop();\n if (fileExt !== \"jpg\" && fileExt !== \"jpeg\" && fileExt !== \"png\") {\n console.error(`XKTModel does not support image files with extension '${fileExt}' - won't create texture '${params.textureId}`);\n return;\n }\n }\n\n const textureId = params.textureId;\n\n const texture = new XKTTexture({\n textureId,\n imageData: params.imageData,\n mediaType: params.mediaType,\n minFilter: params.minFilter,\n magFilter: params.magFilter,\n wrapS: params.wrapS,\n wrapT: params.wrapT,\n wrapR: params.wrapR,\n width: params.width,\n height: params.height,\n compressed: (params.compressed !== false),\n src: params.src\n });\n\n this.textures[textureId] = texture;\n this.texturesList.push(texture);\n\n return texture;\n }\n\n /**\n * Creates an {@link XKTTextureSet} within this XKTModel.\n *\n * Registers the new {@link XKTTextureSet} in {@link XKTModel#textureSets} and {@link XKTModel#.textureSetsList}.\n *\n * Logs error and does nothing if this XKTModel has been finalized (see {@link XKTModel#finalized}).\n *\n * @param {*} params Method parameters.\n * @param {Number} params.textureSetId Unique ID for the {@link XKTTextureSet}.\n * @param {*} [params.colorTextureId] ID of *RGBA* base color {@link XKTTexture}, with color in *RGB* and alpha in *A*.\n * @param {*} [params.metallicRoughnessTextureId] ID of *RGBA* metal-roughness {@link XKTTexture}, with the metallic factor in *R*, and roughness factor in *G*.\n * @param {*} [params.normalsTextureId] ID of *RGBA* normal {@link XKTTexture}, with normal map vectors in *RGB*.\n * @param {*} [params.emissiveTextureId] ID of *RGBA* emissive {@link XKTTexture}, with emissive color in *RGB*.\n * @param {*} [params.occlusionTextureId] ID of *RGBA* occlusion {@link XKTTexture}, with occlusion factor in *R*.\n * @returns {XKTTextureSet} The new {@link XKTTextureSet}.\n */\n createTextureSet(params) {\n\n if (!params) {\n throw \"Parameters expected: params\";\n }\n\n if (params.textureSetId === null || params.textureSetId === undefined) {\n throw \"Parameter expected: params.textureSetId\";\n }\n\n if (this.finalized) {\n console.error(\"XKTModel has been finalized, can't add more textureSets\");\n return;\n }\n\n if (this.textureSets[params.textureSetId]) {\n console.error(\"XKTTextureSet already exists with this ID: \" + params.textureSetId);\n return;\n }\n\n let colorTexture;\n if (params.colorTextureId !== undefined && params.colorTextureId !== null) {\n colorTexture = this.textures[params.colorTextureId];\n if (!colorTexture) {\n console.error(`Texture not found: ${params.colorTextureId} - ensure that you create it first with createTexture()`);\n return;\n }\n colorTexture.channel = COLOR_TEXTURE;\n }\n\n let metallicRoughnessTexture;\n if (params.metallicRoughnessTextureId !== undefined && params.metallicRoughnessTextureId !== null) {\n metallicRoughnessTexture = this.textures[params.metallicRoughnessTextureId];\n if (!metallicRoughnessTexture) {\n console.error(`Texture not found: ${params.metallicRoughnessTextureId} - ensure that you create it first with createTexture()`);\n return;\n }\n metallicRoughnessTexture.channel = METALLIC_ROUGHNESS_TEXTURE;\n }\n\n let normalsTexture;\n if (params.normalsTextureId !== undefined && params.normalsTextureId !== null) {\n normalsTexture = this.textures[params.normalsTextureId];\n if (!normalsTexture) {\n console.error(`Texture not found: ${params.normalsTextureId} - ensure that you create it first with createTexture()`);\n return;\n }\n normalsTexture.channel = NORMALS_TEXTURE;\n }\n\n let emissiveTexture;\n if (params.emissiveTextureId !== undefined && params.emissiveTextureId !== null) {\n emissiveTexture = this.textures[params.emissiveTextureId];\n if (!emissiveTexture) {\n console.error(`Texture not found: ${params.emissiveTextureId} - ensure that you create it first with createTexture()`);\n return;\n }\n emissiveTexture.channel = EMISSIVE_TEXTURE;\n }\n\n let occlusionTexture;\n if (params.occlusionTextureId !== undefined && params.occlusionTextureId !== null) {\n occlusionTexture = this.textures[params.occlusionTextureId];\n if (!occlusionTexture) {\n console.error(`Texture not found: ${params.occlusionTextureId} - ensure that you create it first with createTexture()`);\n return;\n }\n occlusionTexture.channel = OCCLUSION_TEXTURE;\n }\n\n const textureSet = new XKTTextureSet({\n textureSetId: params.textureSetId,\n textureSetIndex: this.textureSetsList.length,\n colorTexture,\n metallicRoughnessTexture,\n normalsTexture,\n emissiveTexture,\n occlusionTexture\n });\n\n this.textureSets[params.textureSetId] = textureSet;\n this.textureSetsList.push(textureSet);\n\n return textureSet;\n }\n\n /**\n * Creates an {@link XKTGeometry} within this XKTModel.\n *\n * Registers the new {@link XKTGeometry} in {@link XKTModel#geometries} and {@link XKTModel#geometriesList}.\n *\n * Logs error and does nothing if this XKTModel has been finalized (see {@link XKTModel#finalized}).\n *\n * @param {*} params Method parameters.\n * @param {Number} params.geometryId Unique ID for the {@link XKTGeometry}.\n * @param {String} params.primitiveType The type of {@link XKTGeometry}: \"triangles\", \"lines\" or \"points\".\n * @param {Float64Array} params.positions Floating-point Local-space vertex positions for the {@link XKTGeometry}. Required for all primitive types.\n * @param {Number[]} [params.normals] Floating-point vertex normals for the {@link XKTGeometry}. Only used with triangles primitives. Ignored for points and lines.\n * @param {Number[]} [params.colors] Floating-point RGBA vertex colors for the {@link XKTGeometry}. Required for points primitives. Ignored for lines and triangles.\n * @param {Number[]} [params.colorsCompressed] Integer RGBA vertex colors for the {@link XKTGeometry}. Required for points primitives. Ignored for lines and triangles.\n * @param {Number[]} [params.uvs] Floating-point vertex UV coordinates for the {@link XKTGeometry}. Alias for ````uv````.\n * @param {Number[]} [params.uv] Floating-point vertex UV coordinates for the {@link XKTGeometry}. Alias for ````uvs````.\n * @param {Number[]} [params.colorsCompressed] Integer RGBA vertex colors for the {@link XKTGeometry}. Required for points primitives. Ignored for lines and triangles.\n * @param {Uint32Array} [params.indices] Indices for the {@link XKTGeometry}. Required for triangles and lines primitives. Ignored for points.\n * @param {Number} [params.edgeThreshold=10]\n * @returns {XKTGeometry} The new {@link XKTGeometry}.\n */\n createGeometry(params) {\n\n if (!params) {\n throw \"Parameters expected: params\";\n }\n\n if (params.geometryId === null || params.geometryId === undefined) {\n throw \"Parameter expected: params.geometryId\";\n }\n\n if (!params.primitiveType) {\n throw \"Parameter expected: params.primitiveType\";\n }\n\n if (!params.positions) {\n throw \"Parameter expected: params.positions\";\n }\n\n const triangles = params.primitiveType === \"triangles\";\n const points = params.primitiveType === \"points\";\n const lines = params.primitiveType === \"lines\";\n const line_strip = params.primitiveType === \"line-strip\";\n const triangle_strip = params.primitiveType === \"triangle-strip\";\n const triangle_fan = params.primitiveType === \"triangle-fan\";\n\n if (!triangles && !points && !lines && !line_strip) {\n throw \"Unsupported value for params.primitiveType: \"\n + params.primitiveType\n + \"' - supported values are 'triangles', 'points', 'lines', 'line-strip', 'triangle-strip' and 'triangle-fan\";\n }\n\n if (triangles) {\n if (!params.indices) {\n throw \"Parameter expected for 'triangles' primitive: params.indices\";\n }\n }\n\n if (points) {\n if (!params.colors && !params.colorsCompressed) {\n throw \"Parameter expected for 'points' primitive: params.colors or params.colorsCompressed\";\n }\n }\n\n if (lines) {\n if (!params.indices) {\n throw \"Parameter expected for 'lines' primitive: params.indices\";\n }\n }\n\n if (this.finalized) {\n console.error(\"XKTModel has been finalized, can't add more geometries\");\n return;\n }\n\n if (this.geometries[params.geometryId]) {\n console.error(\"XKTGeometry already exists with this ID: \" + params.geometryId);\n return;\n }\n\n const geometryId = params.geometryId;\n const primitiveType = params.primitiveType;\n const positions = new Float64Array(params.positions); // May modify in #finalize\n\n const xktGeometryCfg = {\n geometryId: geometryId,\n geometryIndex: this.geometriesList.length,\n primitiveType: primitiveType,\n positions: positions,\n uvs: params.uvs || params.uv\n }\n\n if (triangles) {\n if (params.normals) {\n xktGeometryCfg.normals = new Float32Array(params.normals);\n }\n xktGeometryCfg.indices = params.indices;\n }\n\n if (points) {\n if (params.colorsCompressed) {\n xktGeometryCfg.colorsCompressed = new Uint8Array(params.colorsCompressed);\n\n } else {\n const colors = params.colors;\n const colorsCompressed = new Uint8Array(colors.length);\n for (let i = 0, len = colors.length; i < len; i++) {\n colorsCompressed[i] = Math.floor(colors[i] * 255);\n }\n xktGeometryCfg.colorsCompressed = colorsCompressed;\n }\n }\n\n if (lines) {\n xktGeometryCfg.indices = params.indices;\n }\n\n if (triangles) {\n\n if (!params.normals && !params.uv && !params.uvs) {\n\n // Building models often duplicate positions to allow face-aligned vertex normals; when we're not\n // providing normals for a geometry, it becomes possible to merge duplicate vertex positions within it.\n\n // TODO: Make vertex merging also merge normals?\n\n const mergedPositions = [];\n const mergedIndices = [];\n mergeVertices(xktGeometryCfg.positions, xktGeometryCfg.indices, mergedPositions, mergedIndices);\n xktGeometryCfg.positions = new Float64Array(mergedPositions);\n xktGeometryCfg.indices = mergedIndices;\n }\n\n xktGeometryCfg.edgeIndices = buildEdgeIndices(xktGeometryCfg.positions, xktGeometryCfg.indices, null, params.edgeThreshold || this.edgeThreshold || 10);\n }\n\n const geometry = new XKTGeometry(xktGeometryCfg);\n\n this.geometries[geometryId] = geometry;\n this.geometriesList.push(geometry);\n\n return geometry;\n }\n\n /**\n * Creates an {@link XKTMesh} within this XKTModel.\n *\n * An {@link XKTMesh} can be owned by one {@link XKTEntity}, which can own multiple {@link XKTMesh}es.\n *\n * Registers the new {@link XKTMesh} in {@link XKTModel#meshes} and {@link XKTModel#meshesList}.\n *\n * @param {*} params Method parameters.\n * @param {Number} params.meshId Unique ID for the {@link XKTMesh}.\n * @param {Number} params.geometryId ID of an existing {@link XKTGeometry} in {@link XKTModel#geometries}.\n * @param {Number} [params.textureSetId] Unique ID of an {@link XKTTextureSet} in {@link XKTModel#textureSets}.\n * @param {Float32Array} params.color RGB color for the {@link XKTMesh}, with each color component in range [0..1].\n * @param {Number} [params.metallic=0] How metallic the {@link XKTMesh} is, in range [0..1]. A value of ````0```` indicates fully dielectric material, while ````1```` indicates fully metallic.\n * @param {Number} [params.roughness=1] How rough the {@link XKTMesh} is, in range [0..1]. A value of ````0```` indicates fully smooth, while ````1```` indicates fully rough.\n * @param {Number} params.opacity Opacity factor for the {@link XKTMesh}, in range [0..1].\n * @param {Float64Array} [params.matrix] Modeling matrix for the {@link XKTMesh}. Overrides ````position````, ````scale```` and ````rotation```` parameters.\n * @param {Number[]} [params.position=[0,0,0]] Position of the {@link XKTMesh}. Overridden by the ````matrix```` parameter.\n * @param {Number[]} [params.scale=[1,1,1]] Scale of the {@link XKTMesh}. Overridden by the ````matrix```` parameter.\n * @param {Number[]} [params.rotation=[0,0,0]] Rotation of the {@link XKTMesh} as Euler angles given in degrees, for each of the X, Y and Z axis. Overridden by the ````matrix```` parameter.\n * @returns {XKTMesh} The new {@link XKTMesh}.\n */\n createMesh(params) {\n\n if (params.meshId === null || params.meshId === undefined) {\n throw \"Parameter expected: params.meshId\";\n }\n\n if (params.geometryId === null || params.geometryId === undefined) {\n throw \"Parameter expected: params.geometryId\";\n }\n\n if (this.finalized) {\n throw \"XKTModel has been finalized, can't add more meshes\";\n }\n\n if (this.meshes[params.meshId]) {\n console.error(\"XKTMesh already exists with this ID: \" + params.meshId);\n return;\n }\n\n const geometry = this.geometries[params.geometryId];\n\n if (!geometry) {\n console.error(\"XKTGeometry not found: \" + params.geometryId);\n return;\n }\n\n geometry.numInstances++;\n\n let textureSet = null;\n if (params.textureSetId) {\n textureSet = this.textureSets[params.textureSetId];\n if (!textureSet) {\n console.error(\"XKTTextureSet not found: \" + params.textureSetId);\n return;\n }\n textureSet.numInstances++;\n }\n\n let matrix = params.matrix;\n\n if (!matrix) {\n\n const position = params.position;\n const scale = params.scale;\n const rotation = params.rotation;\n\n if (position || scale || rotation) {\n matrix = math.identityMat4();\n const quaternion = math.eulerToQuaternion(rotation || [0, 0, 0], \"XYZ\", math.identityQuaternion());\n math.composeMat4(position || [0, 0, 0], quaternion, scale || [1, 1, 1], matrix)\n\n } else {\n matrix = math.identityMat4();\n }\n }\n\n const meshIndex = this.meshesList.length;\n\n const mesh = new XKTMesh({\n meshId: params.meshId,\n meshIndex,\n matrix,\n geometry,\n color: params.color,\n metallic: params.metallic,\n roughness: params.roughness,\n opacity: params.opacity,\n textureSet\n });\n\n this.meshes[mesh.meshId] = mesh;\n this.meshesList.push(mesh);\n\n return mesh;\n }\n\n /**\n * Creates an {@link XKTEntity} within this XKTModel.\n *\n * Registers the new {@link XKTEntity} in {@link XKTModel#entities} and {@link XKTModel#entitiesList}.\n *\n * Logs error and does nothing if this XKTModel has been finalized (see {@link XKTModel#finalized}).\n *\n * @param {*} params Method parameters.\n * @param {String} params.entityId Unique ID for the {@link XKTEntity}.\n * @param {String[]} params.meshIds IDs of {@link XKTMesh}es used by the {@link XKTEntity}. Note that each {@link XKTMesh} can only be used by one {@link XKTEntity}.\n * @returns {XKTEntity} The new {@link XKTEntity}.\n */\n createEntity(params) {\n\n if (!params) {\n throw \"Parameters expected: params\";\n }\n\n if (params.entityId === null || params.entityId === undefined) {\n throw \"Parameter expected: params.entityId\";\n }\n\n if (!params.meshIds) {\n throw \"Parameter expected: params.meshIds\";\n }\n\n if (this.finalized) {\n console.error(\"XKTModel has been finalized, can't add more entities\");\n return;\n }\n\n if (params.meshIds.length === 0) {\n console.warn(\"XKTEntity has no meshes - won't create: \" + params.entityId);\n return;\n }\n\n let entityId = params.entityId;\n\n if (this.entities[entityId]) {\n while (this.entities[entityId]) {\n entityId = math.createUUID();\n }\n console.error(\"XKTEntity already exists with this ID: \" + params.entityId + \" - substituting random ID instead: \" + entityId);\n }\n\n const meshIds = params.meshIds;\n const meshes = [];\n\n for (let meshIdIdx = 0, meshIdLen = meshIds.length; meshIdIdx < meshIdLen; meshIdIdx++) {\n\n const meshId = meshIds[meshIdIdx];\n const mesh = this.meshes[meshId];\n\n if (!mesh) {\n console.error(\"XKTMesh found: \" + meshId);\n continue;\n }\n\n if (mesh.entity) {\n console.error(\"XKTMesh \" + meshId + \" already used by XKTEntity \" + mesh.entity.entityId);\n continue;\n }\n\n meshes.push(mesh);\n }\n\n const entity = new XKTEntity(entityId, meshes);\n\n for (let i = 0, len = meshes.length; i < len; i++) {\n const mesh = meshes[i];\n mesh.entity = entity;\n }\n\n this.entities[entityId] = entity;\n this.entitiesList.push(entity);\n\n return entity;\n }\n\n /**\n * Creates a default {@link XKTMetaObject} for each {@link XKTEntity} that does not already have one.\n */\n createDefaultMetaObjects() {\n\n for (let i = 0, len = this.entitiesList.length; i < len; i++) {\n\n const entity = this.entitiesList[i];\n const metaObjectId = entity.entityId;\n const metaObject = this.metaObjects[metaObjectId];\n\n if (!metaObject) {\n\n if (!this._rootMetaObject) {\n this._rootMetaObject = this.createMetaObject({\n metaObjectId: this.modelId,\n metaObjectType: \"Default\",\n metaObjectName: this.modelId\n });\n }\n\n this.createMetaObject({\n metaObjectId: metaObjectId,\n metaObjectType: \"Default\",\n metaObjectName: \"\" + metaObjectId,\n parentMetaObjectId: this._rootMetaObject.metaObjectId\n });\n }\n }\n }\n\n /**\n * Finalizes this XKTModel.\n *\n * After finalizing, we may then serialize the model to an array buffer using {@link writeXKTModelToArrayBuffer}.\n *\n * Logs error and does nothing if this XKTModel has already been finalized.\n *\n * Internally, this method:\n *\n * * for each {@link XKTEntity} that doesn't already have a {@link XKTMetaObject}, creates one with {@link XKTMetaObject#metaObjectType} set to \"default\"\n * * sets each {@link XKTEntity}'s {@link XKTEntity#hasReusedGeometries} true if it shares its {@link XKTGeometry}s with other {@link XKTEntity}s,\n * * creates each {@link XKTEntity}'s {@link XKTEntity#aabb},\n * * creates {@link XKTTile}s in {@link XKTModel#tilesList}, and\n * * sets {@link XKTModel#finalized} ````true````.\n */\n async finalize() {\n\n if (this.finalized) {\n console.log(\"XKTModel already finalized\");\n return;\n }\n\n this._removeUnusedTextures();\n\n await this._compressTextures();\n\n this._bakeSingleUseGeometryPositions();\n\n this._bakeAndOctEncodeNormals();\n\n this._createEntityAABBs();\n\n const rootKDNode = this._createKDTree();\n\n this.entitiesList = [];\n\n this._createTilesFromKDTree(rootKDNode);\n\n this._createReusedGeometriesDecodeMatrix();\n\n this._flagSolidGeometries();\n\n this.aabb.set(rootKDNode.aabb);\n\n this.finalized = true;\n }\n\n _removeUnusedTextures() {\n let texturesList = [];\n const textures = {};\n for (let i = 0, leni = this.texturesList.length; i < leni; i++) {\n const texture = this.texturesList[i];\n if (texture.channel !== null) {\n texture.textureIndex = texturesList.length;\n texturesList.push(texture);\n textures[texture.textureId] = texture;\n }\n }\n this.texturesList = texturesList;\n this.textures = textures;\n }\n\n _compressTextures() {\n let countTextures = this.texturesList.length;\n return new Promise((resolve) => {\n if (countTextures === 0) {\n resolve();\n return;\n }\n for (let i = 0, leni = this.texturesList.length; i < leni; i++) {\n const texture = this.texturesList[i];\n const encodingOptions = TEXTURE_ENCODING_OPTIONS[texture.channel] || {};\n\n if (texture.src) {\n\n // XKTTexture created with XKTModel#createTexture({ src: ... })\n\n const src = texture.src;\n const fileExt = src.split('.').pop();\n switch (fileExt) {\n case \"jpeg\":\n case \"jpg\":\n case \"png\":\n load(src, ImageLoader, {\n image: {\n type: \"data\"\n }\n }).then((imageData) => {\n if (texture.compressed) {\n encode(imageData, KTX2BasisWriter, encodingOptions).then((encodedData) => {\n const encodedImageData = new Uint8Array(encodedData);\n texture.imageData = encodedImageData;\n if (--countTextures <= 0) {\n resolve();\n }\n }).catch((err) => {\n console.error(\"[XKTModel.finalize] Failed to encode image: \" + err);\n if (--countTextures <= 0) {\n resolve();\n }\n });\n } else {\n texture.imageData = new Uint8Array(1);\n if (--countTextures <= 0) {\n resolve();\n }\n }\n }).catch((err) => {\n console.error(\"[XKTModel.finalize] Failed to load image: \" + err);\n if (--countTextures <= 0) {\n resolve();\n }\n });\n break;\n default:\n if (--countTextures <= 0) {\n resolve();\n }\n break;\n }\n }\n\n if (texture.imageData) {\n\n // XKTTexture created with XKTModel#createTexture({ imageData: ... })\n\n if (texture.compressed) {\n encode(texture.imageData, KTX2BasisWriter, encodingOptions)\n .then((encodedImageData) => {\n texture.imageData = new Uint8Array(encodedImageData);\n if (--countTextures <= 0) {\n resolve();\n }\n }).catch((err) => {\n console.error(\"[XKTModel.finalize] Failed to encode image: \" + err);\n if (--countTextures <= 0) {\n resolve();\n }\n });\n } else {\n texture.imageData = new Uint8Array(1);\n if (--countTextures <= 0) {\n resolve();\n }\n }\n }\n }\n });\n }\n\n _bakeSingleUseGeometryPositions() {\n\n for (let j = 0, lenj = this.meshesList.length; j < lenj; j++) {\n\n const mesh = this.meshesList[j];\n\n const geometry = mesh.geometry;\n\n if (geometry.numInstances === 1) {\n\n const matrix = mesh.matrix;\n\n if (matrix && (!math.isIdentityMat4(matrix))) {\n\n const positions = geometry.positions;\n\n for (let i = 0, len = positions.length; i < len; i += 3) {\n\n tempVec4a[0] = positions[i + 0];\n tempVec4a[1] = positions[i + 1];\n tempVec4a[2] = positions[i + 2];\n tempVec4a[3] = 1;\n\n math.transformPoint4(matrix, tempVec4a, tempVec4b);\n\n positions[i + 0] = tempVec4b[0];\n positions[i + 1] = tempVec4b[1];\n positions[i + 2] = tempVec4b[2];\n }\n }\n }\n }\n }\n\n _bakeAndOctEncodeNormals() {\n\n for (let i = 0, len = this.meshesList.length; i < len; i++) {\n\n const mesh = this.meshesList[i];\n const geometry = mesh.geometry;\n\n if (geometry.normals && !geometry.normalsOctEncoded) {\n\n geometry.normalsOctEncoded = new Int8Array(geometry.normals.length);\n\n if (geometry.numInstances > 1) {\n geometryCompression.octEncodeNormals(geometry.normals, geometry.normals.length, geometry.normalsOctEncoded, 0);\n\n } else {\n const modelNormalMatrix = math.inverseMat4(math.transposeMat4(mesh.matrix, tempMat4), tempMat4b);\n geometryCompression.transformAndOctEncodeNormals(modelNormalMatrix, geometry.normals, geometry.normals.length, geometry.normalsOctEncoded, 0);\n }\n }\n }\n }\n\n _createEntityAABBs() {\n\n for (let i = 0, len = this.entitiesList.length; i < len; i++) {\n\n const entity = this.entitiesList[i];\n const entityAABB = entity.aabb;\n const meshes = entity.meshes;\n\n math.collapseAABB3(entityAABB);\n\n for (let j = 0, lenj = meshes.length; j < lenj; j++) {\n\n const mesh = meshes[j];\n const geometry = mesh.geometry;\n const matrix = mesh.matrix;\n\n if (geometry.numInstances > 1) {\n\n const positions = geometry.positions;\n for (let i = 0, len = positions.length; i < len; i += 3) {\n tempVec4a[0] = positions[i + 0];\n tempVec4a[1] = positions[i + 1];\n tempVec4a[2] = positions[i + 2];\n tempVec4a[3] = 1;\n math.transformPoint4(matrix, tempVec4a, tempVec4b);\n math.expandAABB3Point3(entityAABB, tempVec4b);\n }\n\n } else {\n\n const positions = geometry.positions;\n for (let i = 0, len = positions.length; i < len; i += 3) {\n tempVec4a[0] = positions[i + 0];\n tempVec4a[1] = positions[i + 1];\n tempVec4a[2] = positions[i + 2];\n math.expandAABB3Point3(entityAABB, tempVec4a);\n }\n }\n }\n }\n }\n\n _createKDTree() {\n\n const aabb = math.collapseAABB3();\n\n for (let i = 0, len = this.entitiesList.length; i < len; i++) {\n const entity = this.entitiesList[i];\n math.expandAABB3(aabb, entity.aabb);\n }\n\n const rootKDNode = new KDNode(aabb);\n\n for (let i = 0, len = this.entitiesList.length; i < len; i++) {\n const entity = this.entitiesList[i];\n this._insertEntityIntoKDTree(rootKDNode, entity);\n }\n\n return rootKDNode;\n }\n\n _insertEntityIntoKDTree(kdNode, entity) {\n\n const nodeAABB = kdNode.aabb;\n const entityAABB = entity.aabb;\n\n const nodeAABBDiag = math.getAABB3Diag(nodeAABB);\n\n if (nodeAABBDiag < this.minTileSize) {\n kdNode.entities = kdNode.entities || [];\n kdNode.entities.push(entity);\n math.expandAABB3(nodeAABB, entityAABB);\n return;\n }\n\n if (kdNode.left) {\n if (math.containsAABB3(kdNode.left.aabb, entityAABB)) {\n this._insertEntityIntoKDTree(kdNode.left, entity);\n return;\n }\n }\n\n if (kdNode.right) {\n if (math.containsAABB3(kdNode.right.aabb, entityAABB)) {\n this._insertEntityIntoKDTree(kdNode.right, entity);\n return;\n }\n }\n\n kdTreeDimLength[0] = nodeAABB[3] - nodeAABB[0];\n kdTreeDimLength[1] = nodeAABB[4] - nodeAABB[1];\n kdTreeDimLength[2] = nodeAABB[5] - nodeAABB[2];\n\n let dim = 0;\n\n if (kdTreeDimLength[1] > kdTreeDimLength[dim]) {\n dim = 1;\n }\n\n if (kdTreeDimLength[2] > kdTreeDimLength[dim]) {\n dim = 2;\n }\n\n if (!kdNode.left) {\n const aabbLeft = nodeAABB.slice();\n aabbLeft[dim + 3] = ((nodeAABB[dim] + nodeAABB[dim + 3]) / 2.0);\n kdNode.left = new KDNode(aabbLeft);\n if (math.containsAABB3(aabbLeft, entityAABB)) {\n this._insertEntityIntoKDTree(kdNode.left, entity);\n return;\n }\n }\n\n if (!kdNode.right) {\n const aabbRight = nodeAABB.slice();\n aabbRight[dim] = ((nodeAABB[dim] + nodeAABB[dim + 3]) / 2.0);\n kdNode.right = new KDNode(aabbRight);\n if (math.containsAABB3(aabbRight, entityAABB)) {\n this._insertEntityIntoKDTree(kdNode.right, entity);\n return;\n }\n }\n\n kdNode.entities = kdNode.entities || [];\n kdNode.entities.push(entity);\n\n math.expandAABB3(nodeAABB, entityAABB);\n }\n\n _createTilesFromKDTree(rootKDNode) {\n this._createTilesFromKDNode(rootKDNode);\n }\n\n _createTilesFromKDNode(kdNode) {\n if (kdNode.entities && kdNode.entities.length > 0) {\n this._createTileFromEntities(kdNode.entities);\n }\n if (kdNode.left) {\n this._createTilesFromKDNode(kdNode.left);\n }\n if (kdNode.right) {\n this._createTilesFromKDNode(kdNode.right);\n }\n }\n\n /**\n * Creates a tile from the given entities.\n *\n * For each single-use {@link XKTGeometry}, this method centers {@link XKTGeometry#positions} to make them relative to the\n * tile's center, then quantizes the positions to unsigned 16-bit integers, relative to the tile's boundary.\n *\n * @param entities\n */\n _createTileFromEntities(entities) {\n\n const tileAABB = math.AABB3(); // A tighter World-space AABB around the entities\n math.collapseAABB3(tileAABB);\n\n for (let i = 0; i < entities.length; i++) {\n const entity = entities [i];\n math.expandAABB3(tileAABB, entity.aabb);\n }\n\n const tileCenter = math.getAABB3Center(tileAABB);\n const tileCenterNeg = math.mulVec3Scalar(tileCenter, -1, math.vec3());\n\n const rtcAABB = math.AABB3(); // AABB centered at the RTC origin\n\n rtcAABB[0] = tileAABB[0] - tileCenter[0];\n rtcAABB[1] = tileAABB[1] - tileCenter[1];\n rtcAABB[2] = tileAABB[2] - tileCenter[2];\n rtcAABB[3] = tileAABB[3] - tileCenter[0];\n rtcAABB[4] = tileAABB[4] - tileCenter[1];\n rtcAABB[5] = tileAABB[5] - tileCenter[2];\n\n for (let i = 0; i < entities.length; i++) {\n\n const entity = entities [i];\n\n const meshes = entity.meshes;\n\n for (let j = 0, lenj = meshes.length; j < lenj; j++) {\n\n const mesh = meshes[j];\n const geometry = mesh.geometry;\n\n if (!geometry.reused) { // Batched geometry\n\n const positions = geometry.positions;\n\n // Center positions relative to their tile's World-space center\n\n for (let k = 0, lenk = positions.length; k < lenk; k += 3) {\n\n positions[k + 0] -= tileCenter[0];\n positions[k + 1] -= tileCenter[1];\n positions[k + 2] -= tileCenter[2];\n }\n\n // Quantize positions relative to tile's RTC-space boundary\n\n geometryCompression.quantizePositions(positions, positions.length, rtcAABB, geometry.positionsQuantized);\n\n } else { // Instanced geometry\n\n // Post-multiply a translation to the mesh's modeling matrix\n // to center the entity's geometry instances to the tile RTC center\n\n //////////////////////////////\n // Why do we do this?\n // Seems to break various models\n /////////////////////////////////\n\n math.translateMat4v(tileCenterNeg, mesh.matrix);\n }\n }\n\n entity.entityIndex = this.entitiesList.length;\n\n this.entitiesList.push(entity);\n }\n\n const tile = new XKTTile(tileAABB, entities);\n\n this.tilesList.push(tile);\n }\n\n _createReusedGeometriesDecodeMatrix() {\n\n const tempVec3a = math.vec3();\n const reusedGeometriesAABB = math.collapseAABB3(math.AABB3());\n let countReusedGeometries = 0;\n\n for (let geometryIndex = 0, numGeometries = this.geometriesList.length; geometryIndex < numGeometries; geometryIndex++) {\n\n const geometry = this.geometriesList [geometryIndex];\n\n if (geometry.reused) { // Instanced geometry\n\n const positions = geometry.positions;\n\n for (let i = 0, len = positions.length; i < len; i += 3) {\n\n tempVec3a[0] = positions[i];\n tempVec3a[1] = positions[i + 1];\n tempVec3a[2] = positions[i + 2];\n\n math.expandAABB3Point3(reusedGeometriesAABB, tempVec3a);\n }\n\n countReusedGeometries++;\n }\n }\n\n if (countReusedGeometries > 0) {\n\n geometryCompression.createPositionsDecodeMatrix(reusedGeometriesAABB, this.reusedGeometriesDecodeMatrix);\n\n for (let geometryIndex = 0, numGeometries = this.geometriesList.length; geometryIndex < numGeometries; geometryIndex++) {\n\n const geometry = this.geometriesList [geometryIndex];\n\n if (geometry.reused) {\n geometryCompression.quantizePositions(geometry.positions, geometry.positions.length, reusedGeometriesAABB, geometry.positionsQuantized);\n }\n }\n\n } else {\n math.identityMat4(this.reusedGeometriesDecodeMatrix); // No need for this matrix, but we'll be tidy and set it to identity\n }\n }\n\n _flagSolidGeometries() {\n let maxNumPositions = 0;\n let maxNumIndices = 0;\n for (let i = 0, len = this.geometriesList.length; i < len; i++) {\n const geometry = this.geometriesList[i];\n if (geometry.primitiveType === \"triangles\") {\n if (geometry.positionsQuantized.length > maxNumPositions) {\n maxNumPositions = geometry.positionsQuantized.length;\n }\n if (geometry.indices.length > maxNumIndices) {\n maxNumIndices = geometry.indices.length;\n }\n }\n }\n let vertexIndexMapping = new Array(maxNumPositions / 3);\n let edges = new Array(maxNumIndices);\n for (let i = 0, len = this.geometriesList.length; i < len; i++) {\n const geometry = this.geometriesList[i];\n if (geometry.primitiveType === \"triangles\") {\n geometry.solid = isTriangleMeshSolid(geometry.indices, geometry.positionsQuantized, vertexIndexMapping, edges);\n }\n }\n }\n}\n\nexport {\n XKTModel\n}","/**\n * Given geometry defined as an array of positions, optional normals, option uv and an array of indices, returns\n * modified arrays that have duplicate vertices removed.\n *\n * @private\n */\nfunction mergeVertices(positions, indices, mergedPositions, mergedIndices) {\n const positionsMap = {};\n const indicesLookup = [];\n const precisionPoints = 4; // number of decimal points, e.g. 4 for epsilon of 0.0001\n const precision = 10 ** precisionPoints;\n let uvi = 0;\n for (let i = 0, len = positions.length; i < len; i += 3) {\n const vx = positions[i];\n const vy = positions[i + 1];\n const vz = positions[i + 2];\n const key = `${Math.round(vx * precision)}_${Math.round(vy * precision)}_${Math.round(vz * precision)}`;\n if (positionsMap[key] === undefined) {\n positionsMap[key] = mergedPositions.length / 3;\n mergedPositions.push(vx);\n mergedPositions.push(vy);\n mergedPositions.push(vz);\n }\n indicesLookup[i / 3] = positionsMap[key];\n uvi += 2;\n }\n for (let i = 0, len = indices.length; i < len; i++) {\n mergedIndices[i] = indicesLookup[indices[i]];\n }\n}\n\nexport {mergeVertices};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"pako\");","import {XKT_INFO} from \"../XKT_INFO.js\";\nimport * as pako from 'pako';\n\nconst XKT_VERSION = XKT_INFO.xktVersion;\nconst NUM_TEXTURE_ATTRIBUTES = 9;\nconst NUM_MATERIAL_ATTRIBUTES = 6;\n\n/**\n * Writes an {@link XKTModel} to an {@link ArrayBuffer}.\n *\n * @param {XKTModel} xktModel The {@link XKTModel}.\n * @param {String} metaModelJSON The metamodel JSON in a string.\n * @param {Object} [stats] Collects statistics.\n * @param {Object} options Options for how the XKT is written.\n * @param {Boolean} [options.zip=true] ZIP the contents?\n * @returns {ArrayBuffer} The {@link ArrayBuffer}.\n */\nfunction writeXKTModelToArrayBuffer(xktModel, metaModelJSON, stats, options) {\n const data = getModelData(xktModel, metaModelJSON, stats);\n const deflatedData = deflateData(data, metaModelJSON, options);\n stats.texturesSize += deflatedData.textureData.byteLength;\n const arrayBuffer = createArrayBuffer(deflatedData);\n return arrayBuffer;\n}\n\nfunction getModelData(xktModel, metaModelDataStr, stats) {\n\n //------------------------------------------------------------------------------------------------------------------\n // Allocate data\n //------------------------------------------------------------------------------------------------------------------\n\n const propertySetsList = xktModel.propertySetsList;\n const metaObjectsList = xktModel.metaObjectsList;\n const geometriesList = xktModel.geometriesList;\n const texturesList = xktModel.texturesList;\n const textureSetsList = xktModel.textureSetsList;\n const meshesList = xktModel.meshesList;\n const entitiesList = xktModel.entitiesList;\n const tilesList = xktModel.tilesList;\n\n const numPropertySets = propertySetsList.length;\n const numMetaObjects = metaObjectsList.length;\n const numGeometries = geometriesList.length;\n const numTextures = texturesList.length;\n const numTextureSets = textureSetsList.length;\n const numMeshes = meshesList.length;\n const numEntities = entitiesList.length;\n const numTiles = tilesList.length;\n\n let lenPositions = 0;\n let lenNormals = 0;\n let lenColors = 0;\n let lenUVs = 0;\n let lenIndices = 0;\n let lenEdgeIndices = 0;\n let lenMatrices = 0;\n let lenTextures = 0;\n\n for (let geometryIndex = 0; geometryIndex < numGeometries; geometryIndex++) {\n const geometry = geometriesList [geometryIndex];\n if (geometry.positionsQuantized) {\n lenPositions += geometry.positionsQuantized.length;\n }\n if (geometry.normalsOctEncoded) {\n lenNormals += geometry.normalsOctEncoded.length;\n }\n if (geometry.colorsCompressed) {\n lenColors += geometry.colorsCompressed.length;\n }\n if (geometry.uvs) {\n lenUVs += geometry.uvs.length;\n }\n if (geometry.indices) {\n lenIndices += geometry.indices.length;\n }\n if (geometry.edgeIndices) {\n lenEdgeIndices += geometry.edgeIndices.length;\n }\n }\n\n for (let textureIndex = 0; textureIndex < numTextures; textureIndex++) {\n const xktTexture = texturesList[textureIndex];\n const imageData = xktTexture.imageData;\n lenTextures += imageData.byteLength;\n\n if (xktTexture.compressed) {\n stats.numCompressedTextures++;\n }\n }\n\n for (let meshIndex = 0; meshIndex < numMeshes; meshIndex++) {\n const mesh = meshesList[meshIndex];\n if (mesh.geometry.numInstances > 1) {\n lenMatrices += 16;\n }\n }\n\n const data = {\n metadata: {},\n textureData: new Uint8Array(lenTextures), // All textures\n eachTextureDataPortion: new Uint32Array(numTextures), // For each texture, an index to its first element in textureData\n eachTextureAttributes: new Uint16Array(numTextures * NUM_TEXTURE_ATTRIBUTES),\n positions: new Uint16Array(lenPositions), // All geometry arrays\n normals: new Int8Array(lenNormals),\n colors: new Uint8Array(lenColors),\n uvs: new Float32Array(lenUVs),\n indices: new Uint32Array(lenIndices),\n edgeIndices: new Uint32Array(lenEdgeIndices),\n eachTextureSetTextures: new Int32Array(numTextureSets * 5), // For each texture set, a set of five Texture indices [color, metal/roughness,normals,emissive,occlusion]; each index has value -1 if no texture\n matrices: new Float32Array(lenMatrices), // Modeling matrices for entities that share geometries. Each entity either shares all it's geometries, or owns all its geometries exclusively. Exclusively-owned geometries are pre-transformed into World-space, and so their entities don't have modeling matrices in this array.\n reusedGeometriesDecodeMatrix: new Float32Array(xktModel.reusedGeometriesDecodeMatrix), // A single, global vertex position de-quantization matrix for all reused geometries. Reused geometries are quantized to their collective Local-space AABB, and this matrix is derived from that AABB.\n eachGeometryPrimitiveType: new Uint8Array(numGeometries), // Primitive type for each geometry (0=solid triangles, 1=surface triangles, 2=lines, 3=points, 4=line-strip)\n eachGeometryPositionsPortion: new Uint32Array(numGeometries), // For each geometry, an index to its first element in data.positions. Every primitive type has positions.\n eachGeometryNormalsPortion: new Uint32Array(numGeometries), // For each geometry, an index to its first element in data.normals. If the next geometry has the same index, then this geometry has no normals.\n eachGeometryColorsPortion: new Uint32Array(numGeometries), // For each geometry, an index to its first element in data.colors. If the next geometry has the same index, then this geometry has no colors.\n eachGeometryUVsPortion: new Uint32Array(numGeometries), // For each geometry, an index to its first element in data.uvs. If the next geometry has the same index, then this geometry has no UVs.\n eachGeometryIndicesPortion: new Uint32Array(numGeometries), // For each geometry, an index to its first element in data.indices. If the next geometry has the same index, then this geometry has no indices.\n eachGeometryEdgeIndicesPortion: new Uint32Array(numGeometries), // For each geometry, an index to its first element in data.edgeIndices. If the next geometry has the same index, then this geometry has no edge indices.\n eachMeshGeometriesPortion: new Uint32Array(numMeshes), // For each mesh, an index into the eachGeometry* arrays\n eachMeshMatricesPortion: new Uint32Array(numMeshes), // For each mesh that shares its geometry, an index to its first element in data.matrices, to indicate the modeling matrix that transforms the shared geometry Local-space vertex positions. This is ignored for meshes that don't share geometries, because the vertex positions of non-shared geometries are pre-transformed into World-space.\n eachMeshTextureSet: new Int32Array(numMeshes), // For each mesh, the index of its texture set in data.eachTextureSetTextures; this array contains signed integers so that we can use -1 to indicate when a mesh has no texture set\n eachMeshMaterialAttributes: new Uint8Array(numMeshes * NUM_MATERIAL_ATTRIBUTES), // For each mesh, an RGBA integer color of format [0..255, 0..255, 0..255, 0..255], and PBR metallic and roughness factors, of format [0..255, 0..255]\n eachEntityId: [], // For each entity, an ID string\n eachEntityMeshesPortion: new Uint32Array(numEntities), // For each entity, the index of the first element of meshes used by the entity\n eachTileAABB: new Float64Array(numTiles * 6), // For each tile, an axis-aligned bounding box\n eachTileEntitiesPortion: new Uint32Array(numTiles) // For each tile, the index of the first element of eachEntityId, eachEntityMeshesPortion and eachEntityMatricesPortion used by the tile\n };\n\n let countPositions = 0;\n let countNormals = 0;\n let countColors = 0;\n let countUVs = 0;\n let countIndices = 0;\n let countEdgeIndices = 0;\n\n // Metadata\n\n data.metadata = {\n id: xktModel.modelId,\n projectId: xktModel.projectId,\n revisionId: xktModel.revisionId,\n author: xktModel.author,\n createdAt: xktModel.createdAt,\n creatingApplication: xktModel.creatingApplication,\n schema: xktModel.schema,\n propertySets: [],\n metaObjects: []\n };\n\n // Property sets\n\n for (let propertySetsIndex = 0; propertySetsIndex < numPropertySets; propertySetsIndex++) {\n const propertySet = propertySetsList[propertySetsIndex];\n const propertySetJSON = {\n id: \"\" + propertySet.propertySetId,\n name: propertySet.propertySetName,\n type: propertySet.propertySetType,\n properties: propertySet.properties\n };\n data.metadata.propertySets.push(propertySetJSON);\n }\n\n // Metaobjects\n\n if (!metaModelDataStr) {\n for (let metaObjectsIndex = 0; metaObjectsIndex < numMetaObjects; metaObjectsIndex++) {\n const metaObject = metaObjectsList[metaObjectsIndex];\n const metaObjectJSON = {\n name: metaObject.metaObjectName,\n type: metaObject.metaObjectType,\n id: \"\" + metaObject.metaObjectId\n };\n if (metaObject.parentMetaObjectId !== undefined && metaObject.parentMetaObjectId !== null) {\n metaObjectJSON.parent = \"\" + metaObject.parentMetaObjectId;\n }\n if (metaObject.propertySetIds && metaObject.propertySetIds.length > 0) {\n metaObjectJSON.propertySetIds = metaObject.propertySetIds;\n }\n if (metaObject.external) {\n metaObjectJSON.external = metaObject.external;\n }\n data.metadata.metaObjects.push(metaObjectJSON);\n }\n }\n\n // Geometries\n\n for (let geometryIndex = 0; geometryIndex < numGeometries; geometryIndex++) {\n const geometry = geometriesList [geometryIndex];\n let primitiveType = 1;\n switch (geometry.primitiveType) {\n case \"triangles\":\n primitiveType = geometry.solid ? 0 : 1;\n break;\n case \"points\":\n primitiveType = 2;\n break;\n case \"lines\":\n primitiveType = 3;\n break;\n case \"line-strip\":\n primitiveType = 4;\n break;\n case \"triangle-strip\":\n primitiveType = 5;\n break;\n case \"triangle-fan\":\n primitiveType = 6;\n break;\n default:\n primitiveType = 1\n }\n data.eachGeometryPrimitiveType [geometryIndex] = primitiveType;\n data.eachGeometryPositionsPortion [geometryIndex] = countPositions;\n data.eachGeometryNormalsPortion [geometryIndex] = countNormals;\n data.eachGeometryColorsPortion [geometryIndex] = countColors;\n data.eachGeometryUVsPortion [geometryIndex] = countUVs;\n data.eachGeometryIndicesPortion [geometryIndex] = countIndices;\n data.eachGeometryEdgeIndicesPortion [geometryIndex] = countEdgeIndices;\n if (geometry.positionsQuantized) {\n data.positions.set(geometry.positionsQuantized, countPositions);\n countPositions += geometry.positionsQuantized.length;\n }\n if (geometry.normalsOctEncoded) {\n data.normals.set(geometry.normalsOctEncoded, countNormals);\n countNormals += geometry.normalsOctEncoded.length;\n }\n if (geometry.colorsCompressed) {\n data.colors.set(geometry.colorsCompressed, countColors);\n countColors += geometry.colorsCompressed.length;\n }\n if (geometry.uvs) {\n data.uvs.set(geometry.uvs, countUVs);\n countUVs += geometry.uvs.length;\n }\n if (geometry.indices) {\n data.indices.set(geometry.indices, countIndices);\n countIndices += geometry.indices.length;\n }\n if (geometry.edgeIndices) {\n data.edgeIndices.set(geometry.edgeIndices, countEdgeIndices);\n countEdgeIndices += geometry.edgeIndices.length;\n }\n }\n\n // Textures\n\n for (let textureIndex = 0, numTextures = xktModel.texturesList.length, portionIdx = 0; textureIndex < numTextures; textureIndex++) {\n const xktTexture = xktModel.texturesList[textureIndex];\n const imageData = xktTexture.imageData;\n data.textureData.set(imageData, portionIdx);\n data.eachTextureDataPortion[textureIndex] = portionIdx;\n\n portionIdx += imageData.byteLength;\n\n let textureAttrIdx = textureIndex * NUM_TEXTURE_ATTRIBUTES;\n data.eachTextureAttributes[textureAttrIdx++] = xktTexture.compressed ? 1 : 0;\n data.eachTextureAttributes[textureAttrIdx++] = xktTexture.mediaType; // GIFMediaType | PNGMediaType | JPEGMediaType\n data.eachTextureAttributes[textureAttrIdx++] = xktTexture.width;\n data.eachTextureAttributes[textureAttrIdx++] = xktTexture.height;\n data.eachTextureAttributes[textureAttrIdx++] = xktTexture.minFilter; // LinearMipmapLinearFilter | LinearMipMapNearestFilter | NearestMipMapNearestFilter | NearestMipMapLinearFilter | LinearMipMapLinearFilter\n data.eachTextureAttributes[textureAttrIdx++] = xktTexture.magFilter; // LinearFilter | NearestFilter\n data.eachTextureAttributes[textureAttrIdx++] = xktTexture.wrapS; // ClampToEdgeWrapping | MirroredRepeatWrapping | RepeatWrapping\n data.eachTextureAttributes[textureAttrIdx++] = xktTexture.wrapT; // ClampToEdgeWrapping | MirroredRepeatWrapping | RepeatWrapping\n data.eachTextureAttributes[textureAttrIdx++] = xktTexture.wrapR; // ClampToEdgeWrapping | MirroredRepeatWrapping | RepeatWrapping\n }\n\n // Texture sets\n\n for (let textureSetIndex = 0, numTextureSets = xktModel.textureSetsList.length, eachTextureSetTexturesIndex = 0; textureSetIndex < numTextureSets; textureSetIndex++) {\n const textureSet = textureSetsList[textureSetIndex];\n data.eachTextureSetTextures[eachTextureSetTexturesIndex++] = textureSet.colorTexture ? textureSet.colorTexture.textureIndex : -1; // Color map\n data.eachTextureSetTextures[eachTextureSetTexturesIndex++] = textureSet.metallicRoughnessTexture ? textureSet.metallicRoughnessTexture.textureIndex : -1; // Metal/rough map\n data.eachTextureSetTextures[eachTextureSetTexturesIndex++] = textureSet.normalsTexture ? textureSet.normalsTexture.textureIndex : -1; // Normal map\n data.eachTextureSetTextures[eachTextureSetTexturesIndex++] = textureSet.emissiveTexture ? textureSet.emissiveTexture.textureIndex : -1; // Emissive map\n data.eachTextureSetTextures[eachTextureSetTexturesIndex++] = textureSet.occlusionTexture ? textureSet.occlusionTexture.textureIndex : -1; // Occlusion map\n }\n\n // Tiles -> Entities -> Meshes\n\n let entityIndex = 0;\n let countEntityMeshesPortion = 0;\n let eachMeshMaterialAttributesIndex = 0;\n let matricesIndex = 0;\n let meshIndex = 0;\n\n for (let tileIndex = 0; tileIndex < numTiles; tileIndex++) {\n\n const tile = tilesList [tileIndex];\n const tileEntities = tile.entities;\n const numTileEntities = tileEntities.length;\n\n if (numTileEntities === 0) {\n continue;\n }\n\n data.eachTileEntitiesPortion[tileIndex] = entityIndex;\n\n const tileAABB = tile.aabb;\n\n for (let j = 0; j < numTileEntities; j++) {\n\n const entity = tileEntities[j];\n const entityMeshes = entity.meshes;\n const numEntityMeshes = entityMeshes.length;\n\n for (let k = 0; k < numEntityMeshes; k++) {\n\n const mesh = entityMeshes[k];\n const geometry = mesh.geometry;\n const geometryIndex = geometry.geometryIndex;\n\n data.eachMeshGeometriesPortion [countEntityMeshesPortion + k] = geometryIndex;\n\n if (mesh.geometry.numInstances > 1) {\n data.matrices.set(mesh.matrix, matricesIndex);\n data.eachMeshMatricesPortion [meshIndex] = matricesIndex;\n matricesIndex += 16;\n }\n\n data.eachMeshTextureSet[meshIndex] = mesh.textureSet ? mesh.textureSet.textureSetIndex : -1;\n\n data.eachMeshMaterialAttributes[eachMeshMaterialAttributesIndex++] = (mesh.color[0] * 255); // Color RGB\n data.eachMeshMaterialAttributes[eachMeshMaterialAttributesIndex++] = (mesh.color[1] * 255);\n data.eachMeshMaterialAttributes[eachMeshMaterialAttributesIndex++] = (mesh.color[2] * 255);\n data.eachMeshMaterialAttributes[eachMeshMaterialAttributesIndex++] = (mesh.opacity * 255); // Opacity\n data.eachMeshMaterialAttributes[eachMeshMaterialAttributesIndex++] = (mesh.metallic * 255); // Metallic\n data.eachMeshMaterialAttributes[eachMeshMaterialAttributesIndex++] = (mesh.roughness * 255); // Roughness\n\n meshIndex++;\n }\n\n data.eachEntityId [entityIndex] = entity.entityId;\n data.eachEntityMeshesPortion[entityIndex] = countEntityMeshesPortion; // <<<<<<<<<<<<<<<<<<<< Error here? Order/value of countEntityMeshesPortion correct?\n\n entityIndex++;\n countEntityMeshesPortion += numEntityMeshes;\n }\n\n const tileAABBIndex = tileIndex * 6;\n\n data.eachTileAABB.set(tileAABB, tileAABBIndex);\n }\n\n return data;\n}\n\nfunction deflateData(data, metaModelJSON, options) {\n\n function deflate(buffer) {\n return (options.zip !== false) ? pako.deflate(buffer) : buffer;\n }\n\n let metaModelBytes;\n if (metaModelJSON) {\n const deflatedJSON = deflateJSON(metaModelJSON);\n metaModelBytes = deflate(deflatedJSON)\n } else {\n const deflatedJSON = deflateJSON(data.metadata);\n metaModelBytes = deflate(deflatedJSON)\n }\n\n return {\n metadata: metaModelBytes,\n textureData: deflate(data.textureData.buffer),\n eachTextureDataPortion: deflate(data.eachTextureDataPortion.buffer),\n eachTextureAttributes: deflate(data.eachTextureAttributes.buffer),\n positions: deflate(data.positions.buffer),\n normals: deflate(data.normals.buffer),\n colors: deflate(data.colors.buffer),\n uvs: deflate(data.uvs.buffer),\n indices: deflate(data.indices.buffer),\n edgeIndices: deflate(data.edgeIndices.buffer),\n eachTextureSetTextures: deflate(data.eachTextureSetTextures.buffer),\n matrices: deflate(data.matrices.buffer),\n reusedGeometriesDecodeMatrix: deflate(data.reusedGeometriesDecodeMatrix.buffer),\n eachGeometryPrimitiveType: deflate(data.eachGeometryPrimitiveType.buffer),\n eachGeometryPositionsPortion: deflate(data.eachGeometryPositionsPortion.buffer),\n eachGeometryNormalsPortion: deflate(data.eachGeometryNormalsPortion.buffer),\n eachGeometryColorsPortion: deflate(data.eachGeometryColorsPortion.buffer),\n eachGeometryUVsPortion: deflate(data.eachGeometryUVsPortion.buffer),\n eachGeometryIndicesPortion: deflate(data.eachGeometryIndicesPortion.buffer),\n eachGeometryEdgeIndicesPortion: deflate(data.eachGeometryEdgeIndicesPortion.buffer),\n eachMeshGeometriesPortion: deflate(data.eachMeshGeometriesPortion.buffer),\n eachMeshMatricesPortion: deflate(data.eachMeshMatricesPortion.buffer),\n eachMeshTextureSet: deflate(data.eachMeshTextureSet.buffer),\n eachMeshMaterialAttributes: deflate(data.eachMeshMaterialAttributes.buffer),\n eachEntityId: deflate(JSON.stringify(data.eachEntityId)\n .replace(/[\\u007F-\\uFFFF]/g, function (chr) { // Produce only ASCII-chars, so that the data can be inflated later\n return \"\\\\u\" + (\"0000\" + chr.charCodeAt(0).toString(16)).substr(-4)\n })),\n eachEntityMeshesPortion: deflate(data.eachEntityMeshesPortion.buffer),\n eachTileAABB: deflate(data.eachTileAABB.buffer),\n eachTileEntitiesPortion: deflate(data.eachTileEntitiesPortion.buffer)\n };\n}\n\nfunction deflateJSON(strings) {\n return JSON.stringify(strings)\n .replace(/[\\u007F-\\uFFFF]/g, function (chr) { // Produce only ASCII-chars, so that the data can be inflated later\n return \"\\\\u\" + (\"0000\" + chr.charCodeAt(0).toString(16)).substr(-4)\n });\n}\n\nfunction createArrayBuffer(deflatedData) {\n return toArrayBuffer([\n deflatedData.metadata,\n deflatedData.textureData,\n deflatedData.eachTextureDataPortion,\n deflatedData.eachTextureAttributes,\n deflatedData.positions,\n deflatedData.normals,\n deflatedData.colors,\n deflatedData.uvs,\n deflatedData.indices,\n deflatedData.edgeIndices,\n deflatedData.eachTextureSetTextures,\n deflatedData.matrices,\n deflatedData.reusedGeometriesDecodeMatrix,\n deflatedData.eachGeometryPrimitiveType,\n deflatedData.eachGeometryPositionsPortion,\n deflatedData.eachGeometryNormalsPortion,\n deflatedData.eachGeometryColorsPortion,\n deflatedData.eachGeometryUVsPortion,\n deflatedData.eachGeometryIndicesPortion,\n deflatedData.eachGeometryEdgeIndicesPortion,\n deflatedData.eachMeshGeometriesPortion,\n deflatedData.eachMeshMatricesPortion,\n deflatedData.eachMeshTextureSet,\n deflatedData.eachMeshMaterialAttributes,\n deflatedData.eachEntityId,\n deflatedData.eachEntityMeshesPortion,\n deflatedData.eachTileAABB,\n deflatedData.eachTileEntitiesPortion\n ]);\n}\n\nfunction toArrayBuffer(elements) {\n const indexData = new Uint32Array(elements.length + 2);\n indexData[0] = XKT_VERSION;\n indexData [1] = elements.length; // Stored Data 1.1: number of stored elements\n let dataLen = 0; // Stored Data 1.2: length of stored elements\n for (let i = 0, len = elements.length; i < len; i++) {\n const element = elements[i];\n const elementsize = element.length;\n indexData[i + 2] = elementsize;\n dataLen += elementsize;\n }\n const indexBuf = new Uint8Array(indexData.buffer);\n const dataArray = new Uint8Array(indexBuf.length + dataLen);\n dataArray.set(indexBuf);\n let offset = indexBuf.length;\n for (let i = 0, len = elements.length; i < len; i++) { // Stored Data 2: the elements themselves\n const element = elements[i];\n dataArray.set(element, offset);\n offset += element.length;\n }\n return dataArray.buffer;\n}\n\nexport {writeXKTModelToArrayBuffer};","/** @private */\nfunction earcut(data, holeIndices, dim) {\n\n dim = dim || 2;\n\n var hasHoles = holeIndices && holeIndices.length,\n outerLen = hasHoles ? holeIndices[0] * dim : data.length,\n outerNode = linkedList(data, 0, outerLen, dim, true),\n triangles = [];\n\n if (!outerNode || outerNode.next === outerNode.prev) return triangles;\n\n var minX, minY, maxX, maxY, x, y, invSize;\n\n if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);\n\n // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n if (data.length > 80 * dim) {\n minX = maxX = data[0];\n minY = maxY = data[1];\n\n for (var i = dim; i < outerLen; i += dim) {\n x = data[i];\n y = data[i + 1];\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x > maxX) maxX = x;\n if (y > maxY) maxY = y;\n }\n\n // minX, minY and invSize are later used to transform coords into integers for z-order calculation\n invSize = Math.max(maxX - minX, maxY - minY);\n invSize = invSize !== 0 ? 1 / invSize : 0;\n }\n\n earcutLinked(outerNode, triangles, dim, minX, minY, invSize);\n\n return triangles;\n}\n\n// create a circular doubly linked list from polygon points in the specified winding order\nfunction linkedList(data, start, end, dim, clockwise) {\n var i, last;\n\n if (clockwise === (signedArea(data, start, end, dim) > 0)) {\n for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last);\n } else {\n for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last);\n }\n\n if (last && equals(last, last.next)) {\n removeNode(last);\n last = last.next;\n }\n\n return last;\n}\n\n// eliminate colinear or duplicate points\nfunction filterPoints(start, end) {\n if (!start) return start;\n if (!end) end = start;\n\n var p = start,\n again;\n do {\n again = false;\n\n if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {\n removeNode(p);\n p = end = p.prev;\n if (p === p.next) break;\n again = true;\n\n } else {\n p = p.next;\n }\n } while (again || p !== end);\n\n return end;\n}\n\n// main ear slicing loop which triangulates a polygon (given as a linked list)\nfunction earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {\n if (!ear) return;\n\n // interlink polygon nodes in z-order\n if (!pass && invSize) indexCurve(ear, minX, minY, invSize);\n\n var stop = ear,\n prev, next;\n\n // iterate through ears, slicing them one by one\n while (ear.prev !== ear.next) {\n prev = ear.prev;\n next = ear.next;\n\n if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {\n // cut off the triangle\n triangles.push(prev.i / dim);\n triangles.push(ear.i / dim);\n triangles.push(next.i / dim);\n\n removeNode(ear);\n\n // skipping the next vertex leads to less sliver triangles\n ear = next.next;\n stop = next.next;\n\n continue;\n }\n\n ear = next;\n\n // if we looped through the whole remaining polygon and can't find any more ears\n if (ear === stop) {\n // try filtering points and slicing again\n if (!pass) {\n earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);\n\n // if this didn't work, try curing all small self-intersections locally\n } else if (pass === 1) {\n ear = cureLocalIntersections(filterPoints(ear), triangles, dim);\n earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);\n\n // as a last resort, try splitting the remaining polygon into two\n } else if (pass === 2) {\n splitEarcut(ear, triangles, dim, minX, minY, invSize);\n }\n\n break;\n }\n }\n}\n\n// check whether a polygon node forms a valid ear with adjacent nodes\nfunction isEar(ear) {\n var a = ear.prev,\n b = ear,\n c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n // now make sure we don't have other points inside the potential ear\n var p = ear.next.next;\n\n while (p !== ear.prev) {\n if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.next;\n }\n\n return true;\n}\n\nfunction isEarHashed(ear, minX, minY, invSize) {\n var a = ear.prev,\n b = ear,\n c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n // triangle bbox; min & max are calculated like this for speed\n var minTX = a.x < b.x ? (a.x < c.x ? a.x : c.x) : (b.x < c.x ? b.x : c.x),\n minTY = a.y < b.y ? (a.y < c.y ? a.y : c.y) : (b.y < c.y ? b.y : c.y),\n maxTX = a.x > b.x ? (a.x > c.x ? a.x : c.x) : (b.x > c.x ? b.x : c.x),\n maxTY = a.y > b.y ? (a.y > c.y ? a.y : c.y) : (b.y > c.y ? b.y : c.y);\n\n // z-order range for the current triangle bbox;\n var minZ = zOrder(minTX, minTY, minX, minY, invSize),\n maxZ = zOrder(maxTX, maxTY, minX, minY, invSize);\n\n var p = ear.prevZ,\n n = ear.nextZ;\n\n // look for points inside the triangle in both directions\n while (p && p.z >= minZ && n && n.z <= maxZ) {\n if (p !== ear.prev && p !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n\n if (n !== ear.prev && n !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&\n area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n\n // look for remaining points in decreasing z-order\n while (p && p.z >= minZ) {\n if (p !== ear.prev && p !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n }\n\n // look for remaining points in increasing z-order\n while (n && n.z <= maxZ) {\n if (n !== ear.prev && n !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&\n area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n\n return true;\n}\n\n// go through all polygon nodes and cure small local self-intersections\nfunction cureLocalIntersections(start, triangles, dim) {\n var p = start;\n do {\n var a = p.prev,\n b = p.next.next;\n\n if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {\n\n triangles.push(a.i / dim);\n triangles.push(p.i / dim);\n triangles.push(b.i / dim);\n\n // remove two nodes involved\n removeNode(p);\n removeNode(p.next);\n\n p = start = b;\n }\n p = p.next;\n } while (p !== start);\n\n return filterPoints(p);\n}\n\n// try splitting polygon into two and triangulate them independently\nfunction splitEarcut(start, triangles, dim, minX, minY, invSize) {\n // look for a valid diagonal that divides the polygon into two\n var a = start;\n do {\n var b = a.next.next;\n while (b !== a.prev) {\n if (a.i !== b.i && isValidDiagonal(a, b)) {\n // split the polygon in two by the diagonal\n var c = splitPolygon(a, b);\n\n // filter colinear points around the cuts\n a = filterPoints(a, a.next);\n c = filterPoints(c, c.next);\n\n // run earcut on each half\n earcutLinked(a, triangles, dim, minX, minY, invSize);\n earcutLinked(c, triangles, dim, minX, minY, invSize);\n return;\n }\n b = b.next;\n }\n a = a.next;\n } while (a !== start);\n}\n\n// link every hole into the outer loop, producing a single-ring polygon without holes\nfunction eliminateHoles(data, holeIndices, outerNode, dim) {\n var queue = [],\n i, len, start, end, list;\n\n for (i = 0, len = holeIndices.length; i < len; i++) {\n start = holeIndices[i] * dim;\n end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n list = linkedList(data, start, end, dim, false);\n if (list === list.next) list.steiner = true;\n queue.push(getLeftmost(list));\n }\n\n queue.sort(compareX);\n\n // process holes from left to right\n for (i = 0; i < queue.length; i++) {\n eliminateHole(queue[i], outerNode);\n outerNode = filterPoints(outerNode, outerNode.next);\n }\n\n return outerNode;\n}\n\nfunction compareX(a, b) {\n return a.x - b.x;\n}\n\n// find a bridge between vertices that connects hole with an outer ring and and link it\nfunction eliminateHole(hole, outerNode) {\n outerNode = findHoleBridge(hole, outerNode);\n if (outerNode) {\n var b = splitPolygon(outerNode, hole);\n\n // filter collinear points around the cuts\n filterPoints(outerNode, outerNode.next);\n filterPoints(b, b.next);\n }\n}\n\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\nfunction findHoleBridge(hole, outerNode) {\n var p = outerNode,\n hx = hole.x,\n hy = hole.y,\n qx = -Infinity,\n m;\n\n // find a segment intersected by a ray from the hole's leftmost point to the left;\n // segment's endpoint with lesser x will be potential connection point\n do {\n if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {\n var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);\n if (x <= hx && x > qx) {\n qx = x;\n if (x === hx) {\n if (hy === p.y) return p;\n if (hy === p.next.y) return p.next;\n }\n m = p.x < p.next.x ? p : p.next;\n }\n }\n p = p.next;\n } while (p !== outerNode);\n\n if (!m) return null;\n\n if (hx === qx) return m; // hole touches outer segment; pick leftmost endpoint\n\n // look for points inside the triangle of hole point, segment intersection and endpoint;\n // if there are no points found, we have a valid connection;\n // otherwise choose the point of the minimum angle with the ray as connection point\n\n var stop = m,\n mx = m.x,\n my = m.y,\n tanMin = Infinity,\n tan;\n\n p = m;\n\n do {\n if (hx >= p.x && p.x >= mx && hx !== p.x &&\n pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {\n\n tan = Math.abs(hy - p.y) / (hx - p.x); // tangential\n\n if (locallyInside(p, hole) &&\n (tan < tanMin || (tan === tanMin && (p.x > m.x || (p.x === m.x && sectorContainsSector(m, p)))))) {\n m = p;\n tanMin = tan;\n }\n }\n\n p = p.next;\n } while (p !== stop);\n\n return m;\n}\n\n// whether sector in vertex m contains sector in vertex p in the same coordinates\nfunction sectorContainsSector(m, p) {\n return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0;\n}\n\n// interlink polygon nodes in z-order\nfunction indexCurve(start, minX, minY, invSize) {\n var p = start;\n do {\n if (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, invSize);\n p.prevZ = p.prev;\n p.nextZ = p.next;\n p = p.next;\n } while (p !== start);\n\n p.prevZ.nextZ = null;\n p.prevZ = null;\n\n sortLinked(p);\n}\n\n// Simon Tatham's linked list merge sort algorithm\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\nfunction sortLinked(list) {\n var i, p, q, e, tail, numMerges, pSize, qSize,\n inSize = 1;\n\n do {\n p = list;\n list = null;\n tail = null;\n numMerges = 0;\n\n while (p) {\n numMerges++;\n q = p;\n pSize = 0;\n for (i = 0; i < inSize; i++) {\n pSize++;\n q = q.nextZ;\n if (!q) break;\n }\n qSize = inSize;\n\n while (pSize > 0 || (qSize > 0 && q)) {\n\n if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {\n e = p;\n p = p.nextZ;\n pSize--;\n } else {\n e = q;\n q = q.nextZ;\n qSize--;\n }\n\n if (tail) tail.nextZ = e;\n else list = e;\n\n e.prevZ = tail;\n tail = e;\n }\n\n p = q;\n }\n\n tail.nextZ = null;\n inSize *= 2;\n\n } while (numMerges > 1);\n\n return list;\n}\n\n// z-order of a point given coords and inverse of the longer side of data bbox\nfunction zOrder(x, y, minX, minY, invSize) {\n // coords are transformed into non-negative 15-bit integer range\n x = 32767 * (x - minX) * invSize;\n y = 32767 * (y - minY) * invSize;\n\n x = (x | (x << 8)) & 0x00FF00FF;\n x = (x | (x << 4)) & 0x0F0F0F0F;\n x = (x | (x << 2)) & 0x33333333;\n x = (x | (x << 1)) & 0x55555555;\n\n y = (y | (y << 8)) & 0x00FF00FF;\n y = (y | (y << 4)) & 0x0F0F0F0F;\n y = (y | (y << 2)) & 0x33333333;\n y = (y | (y << 1)) & 0x55555555;\n\n return x | (y << 1);\n}\n\n// find the leftmost node of a polygon ring\nfunction getLeftmost(start) {\n var p = start,\n leftmost = start;\n do {\n if (p.x < leftmost.x || (p.x === leftmost.x && p.y < leftmost.y)) leftmost = p;\n p = p.next;\n } while (p !== start);\n\n return leftmost;\n}\n\n// check if a point lies within a convex triangle\nfunction pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}\n\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\nfunction isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges\n (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible\n (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors\n equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case\n}\n\n// signed area of a triangle\nfunction area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}\n\n// check if two points are equal\nfunction equals(p1, p2) {\n return p1.x === p2.x && p1.y === p2.y;\n}\n\n// check if two segments intersect\nfunction intersects(p1, q1, p2, q2) {\n var o1 = sign(area(p1, q1, p2));\n var o2 = sign(area(p1, q1, q2));\n var o3 = sign(area(p2, q2, p1));\n var o4 = sign(area(p2, q2, q1));\n\n if (o1 !== o2 && o3 !== o4) return true; // general case\n\n if (o1 === 0 && onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1\n if (o2 === 0 && onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1\n if (o3 === 0 && onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2\n if (o4 === 0 && onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2\n\n return false;\n}\n\n// for collinear points p, q, r, check if point q lies on segment pr\nfunction onSegment(p, q, r) {\n return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n}\n\nfunction sign(num) {\n return num > 0 ? 1 : num < 0 ? -1 : 0;\n}\n\n// check if a polygon diagonal intersects any polygon segments\nfunction intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}\n\n// check if a polygon diagonal is locally inside the polygon\nfunction locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}\n\n// check if the middle point of a polygon diagonal is inside the polygon\nfunction middleInside(a, b) {\n var p = a,\n inside = false,\n px = (a.x + b.x) / 2,\n py = (a.y + b.y) / 2;\n do {\n if (((p.y > py) !== (p.next.y > py)) && p.next.y !== p.y &&\n (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x))\n inside = !inside;\n p = p.next;\n } while (p !== a);\n\n return inside;\n}\n\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\nfunction splitPolygon(a, b) {\n var a2 = new Node(a.i, a.x, a.y),\n b2 = new Node(b.i, b.x, b.y),\n an = a.next,\n bp = b.prev;\n\n a.next = b;\n b.prev = a;\n\n a2.next = an;\n an.prev = a2;\n\n b2.next = a2;\n a2.prev = b2;\n\n bp.next = b2;\n b2.prev = bp;\n\n return b2;\n}\n\n// create a node and optionally link it with previous one (in a circular doubly linked list)\nfunction insertNode(i, x, y, last) {\n var p = new Node(i, x, y);\n\n if (!last) {\n p.prev = p;\n p.next = p;\n\n } else {\n p.next = last.next;\n p.prev = last;\n last.next.prev = p;\n last.next = p;\n }\n return p;\n}\n\nfunction removeNode(p) {\n p.next.prev = p.prev;\n p.prev.next = p.next;\n\n if (p.prevZ) p.prevZ.nextZ = p.nextZ;\n if (p.nextZ) p.nextZ.prevZ = p.prevZ;\n}\n\nfunction Node(i, x, y) {\n // vertex index in coordinates array\n this.i = i;\n\n // vertex coordinates\n this.x = x;\n this.y = y;\n\n // previous and next vertex nodes in a polygon ring\n this.prev = null;\n this.next = null;\n\n // z-order curve value\n this.z = null;\n\n // previous and next nodes in z-order\n this.prevZ = null;\n this.nextZ = null;\n\n // indicates whether this is a steiner point\n this.steiner = false;\n}\n\n// return a percentage difference between the polygon area and its triangulation area;\n// used to verify correctness of triangulation\nearcut.deviation = function (data, holeIndices, dim, triangles) {\n var hasHoles = holeIndices && holeIndices.length;\n var outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n\n var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));\n if (hasHoles) {\n for (var i = 0, len = holeIndices.length; i < len; i++) {\n var start = holeIndices[i] * dim;\n var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n polygonArea -= Math.abs(signedArea(data, start, end, dim));\n }\n }\n\n var trianglesArea = 0;\n for (i = 0; i < triangles.length; i += 3) {\n var a = triangles[i] * dim;\n var b = triangles[i + 1] * dim;\n var c = triangles[i + 2] * dim;\n trianglesArea += Math.abs(\n (data[a] - data[c]) * (data[b + 1] - data[a + 1]) -\n (data[a] - data[b]) * (data[c + 1] - data[a + 1]));\n }\n\n return polygonArea === 0 && trianglesArea === 0 ? 0 :\n Math.abs((trianglesArea - polygonArea) / polygonArea);\n};\n\nfunction signedArea(data, start, end, dim) {\n var sum = 0;\n for (var i = start, j = end - dim; i < end; i += dim) {\n sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);\n j = i;\n }\n return sum;\n}\n\n// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts\nearcut.flatten = function (data) {\n var dim = data[0][0].length,\n result = {vertices: [], holes: [], dimensions: dim},\n holeIndex = 0;\n\n for (var i = 0; i < data.length; i++) {\n for (var j = 0; j < data[i].length; j++) {\n for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);\n }\n if (i > 0) {\n holeIndex += data[i - 1].length;\n result.holes.push(holeIndex);\n }\n }\n return result;\n};\n\nexport {earcut};","import {earcut} from './../lib/earcut';\nimport {math} from \"./../lib/math.js\";\n\nconst tempVec2a = math.vec2();\nconst tempVec3a = math.vec3();\nconst tempVec3b = math.vec3();\nconst tempVec3c = math.vec3();\n\n/**\n * @desc Parses a CityJSON model into an {@link XKTModel}.\n *\n * [CityJSON](https://www.cityjson.org) is a JSON-based encoding for a subset of the CityGML data model (version 2.0.0),\n * which is an open standardised data model and exchange format to store digital 3D models of cities and\n * landscapes. CityGML is an official standard of the [Open Geospatial Consortium](https://www.ogc.org/).\n *\n * This converter function supports most of the [CityJSON 1.0.2 Specification](https://www.cityjson.org/specs/1.0.2),\n * with the following limitations:\n *\n * * Does not (yet) support CityJSON semantics for geometry primitives.\n * * Does not (yet) support textured geometries.\n * * Does not (yet) support geometry templates.\n * * When the CityJSON file provides multiple *themes* for a geometry, then we parse only the first of the provided themes for that geometry.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then load a CityJSON model into it.\n *\n * ````javascript\n * utils.loadJSON(\"./models/cityjson/DenHaag.json\", async (data) => {\n *\n * const xktModel = new XKTModel();\n *\n * parseCityJSONIntoXKTModel({\n * data,\n * xktModel,\n * log: (msg) => { console.log(msg); }\n * }).then(()=>{\n * xktModel.finalize();\n * },\n * (msg) => {\n * console.error(msg);\n * });\n * });\n * ````\n *\n * @param {Object} params Parsing params.\n * @param {Object} params.data CityJSON data.\n * @param {XKTModel} params.xktModel XKTModel to parse into.\n * @param {boolean} [params.center=false] Set true to center the CityJSON vertex positions to [0,0,0]. This is applied before the transformation matrix, if specified.\n * @param {Boolean} [params.transform] 4x4 transformation matrix to transform CityJSON vertex positions. Use this to rotate, translate and scale them if neccessary.\n * @param {Object} [params.stats] Collects statistics.\n * @param {function} [params.log] Logging callback.\n @returns {Promise} Resolves when CityJSON has been parsed.\n */\nfunction parseCityJSONIntoXKTModel({\n data,\n xktModel,\n center = false,\n transform = null,\n stats = {}, log\n }) {\n\n return new Promise(function (resolve, reject) {\n\n if (!data) {\n reject(\"Argument expected: data\");\n return;\n }\n\n if (data.type !== \"CityJSON\") {\n reject(\"Invalid argument: data is not a CityJSON file\");\n return;\n }\n\n if (!xktModel) {\n reject(\"Argument expected: xktModel\");\n return;\n }\n\n let vertices;\n\n log(\"Using parser: parseCityJSONIntoXKTModel\");\n\n log(`center: ${center}`);\n if (transform) {\n log(`transform: [${transform}]`);\n }\n\n if (data.transform || center || transform) {\n vertices = copyVertices(data.vertices);\n if (data.transform) {\n transformVertices(vertices, data.transform)\n }\n if (center) {\n centerVertices(vertices);\n }\n if (transform) {\n customTransformVertices(vertices, transform);\n }\n } else {\n vertices = data.vertices;\n }\n\n stats.sourceFormat = data.type || \"\";\n stats.schemaVersion = data.version || \"\";\n stats.title = \"\";\n stats.author = \"\";\n stats.created = \"\";\n stats.numMetaObjects = 0;\n stats.numPropertySets = 0;\n stats.numTriangles = 0;\n stats.numVertices = 0;\n stats.numObjects = 0;\n stats.numGeometries = 0;\n\n const rootMetaObjectId = math.createUUID();\n\n xktModel.createMetaObject({\n metaObjectId: rootMetaObjectId,\n metaObjectType: \"Model\",\n metaObjectName: \"Model\"\n });\n\n stats.numMetaObjects++;\n\n const modelMetaObjectId = math.createUUID();\n\n xktModel.createMetaObject({\n metaObjectId: modelMetaObjectId,\n metaObjectType: \"CityJSON\",\n metaObjectName: \"CityJSON\",\n parentMetaObjectId: rootMetaObjectId\n });\n\n stats.numMetaObjects++;\n\n const ctx = {\n data,\n vertices,\n xktModel,\n rootMetaObjectId: modelMetaObjectId,\n log: (log || function (msg) {\n }),\n nextId: 0,\n stats\n };\n\n ctx.xktModel.schema = data.type + \" \" + data.version;\n\n ctx.log(\"Converting \" + ctx.xktModel.schema);\n\n parseCityJSON(ctx);\n\n resolve();\n });\n}\n\nfunction copyVertices(vertices) {\n const vertices2 = [];\n for (let i = 0, j = 0; i < vertices.length; i++, j += 3) {\n const x = vertices[i][0];\n const y = vertices[i][1];\n const z = vertices[i][2];\n vertices2.push([x, y, z]);\n }\n return vertices2;\n}\n\nfunction transformVertices(vertices, cityJSONTransform) {\n const scale = cityJSONTransform.scale || math.vec3([1, 1, 1]);\n const translate = cityJSONTransform.translate || math.vec3([0, 0, 0]);\n for (let i = 0; i < vertices.length; i++) {\n const vertex = vertices[i];\n vertex[0] = (vertex[0] * scale[0]) + translate[0];\n vertex[1] = (vertex[1] * scale[1]) + translate[1];\n vertex[2] = (vertex[2] * scale[2]) + translate[2];\n }\n}\n\nfunction centerVertices(vertices) {\n if (center) {\n const centerPos = math.vec3();\n const numPoints = vertices.length;\n for (let i = 0, len = vertices.length; i < len; i++) {\n const vertex = vertices[i];\n centerPos[0] += vertex[0];\n centerPos[1] += vertex[1];\n centerPos[2] += vertex[2];\n }\n centerPos[0] /= numPoints;\n centerPos[1] /= numPoints;\n centerPos[2] /= numPoints;\n for (let i = 0, len = vertices.length; i < len; i++) {\n const vertex = vertices[i];\n vertex[0] -= centerPos[0];\n vertex[1] -= centerPos[1];\n vertex[2] -= centerPos[2];\n }\n }\n}\n\nfunction customTransformVertices(vertices, transform) {\n if (transform) {\n const mat = math.mat4(transform);\n for (let i = 0, len = vertices.length; i < len; i++) {\n const vertex = vertices[i];\n math.transformPoint3(mat, vertex, vertex);\n }\n }\n}\n\nfunction parseCityJSON(ctx) {\n\n const data = ctx.data;\n const cityObjects = data.CityObjects;\n\n for (const objectId in cityObjects) {\n if (cityObjects.hasOwnProperty(objectId)) {\n const cityObject = cityObjects[objectId];\n parseCityObject(ctx, cityObject, objectId);\n }\n }\n}\n\nfunction parseCityObject(ctx, cityObject, objectId) {\n\n const xktModel = ctx.xktModel;\n const data = ctx.data;\n const metaObjectId = objectId;\n const metaObjectType = cityObject.type;\n const metaObjectName = metaObjectType + \" : \" + objectId;\n\n const parentMetaObjectId = cityObject.parents ? cityObject.parents[0] : ctx.rootMetaObjectId;\n\n xktModel.createMetaObject({\n metaObjectId,\n metaObjectName,\n metaObjectType,\n parentMetaObjectId\n });\n\n ctx.stats.numMetaObjects++;\n\n if (!(cityObject.geometry && cityObject.geometry.length > 0)) {\n return;\n }\n\n const meshIds = [];\n\n for (let i = 0, len = cityObject.geometry.length; i < len; i++) {\n\n const geometry = cityObject.geometry[i];\n\n let objectMaterial;\n let surfaceMaterials;\n\n const appearance = data.appearance;\n if (appearance) {\n const materials = appearance.materials;\n if (materials) {\n const geometryMaterial = geometry.material;\n if (geometryMaterial) {\n const themeIds = Object.keys(geometryMaterial);\n if (themeIds.length > 0) {\n const themeId = themeIds[0];\n const theme = geometryMaterial[themeId];\n if (theme.value !== undefined) {\n objectMaterial = materials[theme.value];\n } else {\n const values = theme.values;\n if (values) {\n surfaceMaterials = [];\n for (let j = 0, lenj = values.length; j < lenj; j++) {\n const value = values[i];\n const surfaceMaterial = materials[value];\n surfaceMaterials.push(surfaceMaterial);\n }\n }\n }\n }\n }\n }\n }\n\n if (surfaceMaterials) {\n parseGeometrySurfacesWithOwnMaterials(ctx, geometry, surfaceMaterials, meshIds);\n\n } else {\n parseGeometrySurfacesWithSharedMaterial(ctx, geometry, objectMaterial, meshIds);\n }\n }\n\n if (meshIds.length > 0) {\n xktModel.createEntity({\n entityId: objectId,\n meshIds: meshIds\n });\n\n ctx.stats.numObjects++;\n }\n}\n\nfunction parseGeometrySurfacesWithOwnMaterials(ctx, geometry, surfaceMaterials, meshIds) {\n\n const geomType = geometry.type;\n\n switch (geomType) {\n\n case \"MultiPoint\":\n break;\n\n case \"MultiLineString\":\n break;\n\n case \"MultiSurface\":\n\n case \"CompositeSurface\":\n const surfaces = geometry.boundaries;\n parseSurfacesWithOwnMaterials(ctx, surfaceMaterials, surfaces, meshIds);\n break;\n\n case \"Solid\":\n const shells = geometry.boundaries;\n for (let j = 0; j < shells.length; j++) {\n const surfaces = shells[j];\n parseSurfacesWithOwnMaterials(ctx, surfaceMaterials, surfaces, meshIds);\n }\n break;\n\n case \"MultiSolid\":\n\n case \"CompositeSolid\":\n const solids = geometry.boundaries;\n for (let j = 0; j < solids.length; j++) {\n for (let k = 0; k < solids[j].length; k++) {\n const surfaces = solids[j][k];\n parseSurfacesWithOwnMaterials(ctx, surfaceMaterials, surfaces, meshIds);\n }\n }\n break;\n\n case \"GeometryInstance\":\n break;\n }\n}\n\nfunction parseSurfacesWithOwnMaterials(ctx, surfaceMaterials, surfaces, meshIds) {\n\n const vertices = ctx.vertices;\n const xktModel = ctx.xktModel;\n\n for (let i = 0; i < surfaces.length; i++) {\n\n const surface = surfaces[i];\n const surfaceMaterial = surfaceMaterials[i] || {diffuseColor: [0.8, 0.8, 0.8], transparency: 1.0};\n\n const face = [];\n const holes = [];\n\n const sharedIndices = [];\n\n const geometryCfg = {\n positions: [],\n indices: []\n };\n\n for (let j = 0; j < surface.length; j++) {\n\n if (face.length > 0) {\n holes.push(face.length);\n }\n\n const newFace = extractLocalIndices(ctx, surface[j], sharedIndices, geometryCfg);\n\n face.push(...newFace);\n }\n\n if (face.length === 3) { // Triangle\n\n geometryCfg.indices.push(face[0]);\n geometryCfg.indices.push(face[1]);\n geometryCfg.indices.push(face[2]);\n\n } else if (face.length > 3) { // Polygon\n\n // Prepare to triangulate\n\n const pList = [];\n\n for (let k = 0; k < face.length; k++) {\n pList.push({\n x: vertices[sharedIndices[face[k]]][0],\n y: vertices[sharedIndices[face[k]]][1],\n z: vertices[sharedIndices[face[k]]][2]\n });\n }\n\n const normal = getNormalOfPositions(pList, math.vec3());\n\n // Convert to 2D\n\n let pv = [];\n\n for (let k = 0; k < pList.length; k++) {\n\n to2D(pList[k], normal, tempVec2a);\n\n pv.unshift(tempVec2a[0]);\n pv.unshift(tempVec2a[1]);\n }\n\n // Triangulate\n\n const tr = earcut(pv, holes, 2);\n\n // Create triangles\n\n for (let k = 0; k < tr.length; k += 3) {\n geometryCfg.indices.unshift(face[tr[k]]);\n geometryCfg.indices.unshift(face[tr[k + 1]]);\n geometryCfg.indices.unshift(face[tr[k + 2]]);\n }\n }\n\n const geometryId = \"\" + ctx.nextId++;\n const meshId = \"\" + ctx.nextId++;\n\n xktModel.createGeometry({\n geometryId: geometryId,\n primitiveType: \"triangles\",\n positions: geometryCfg.positions,\n indices: geometryCfg.indices\n });\n\n xktModel.createMesh({\n meshId: meshId,\n geometryId: geometryId,\n color: (surfaceMaterial && surfaceMaterial.diffuseColor) ? surfaceMaterial.diffuseColor : [0.8, 0.8, 0.8],\n opacity: 1.0\n //opacity: (surfaceMaterial && surfaceMaterial.transparency !== undefined) ? (1.0 - surfaceMaterial.transparency) : 1.0\n });\n\n meshIds.push(meshId);\n\n ctx.stats.numGeometries++;\n ctx.stats.numVertices += geometryCfg.positions.length / 3;\n ctx.stats.numTriangles += geometryCfg.indices.length / 3;\n }\n}\n\nfunction parseGeometrySurfacesWithSharedMaterial(ctx, geometry, objectMaterial, meshIds) {\n\n const xktModel = ctx.xktModel;\n const sharedIndices = [];\n const geometryCfg = {\n positions: [],\n indices: []\n };\n\n const geomType = geometry.type;\n\n switch (geomType) {\n case \"MultiPoint\":\n break;\n\n case \"MultiLineString\":\n break;\n\n case \"MultiSurface\":\n case \"CompositeSurface\":\n const surfaces = geometry.boundaries;\n parseSurfacesWithSharedMaterial(ctx, surfaces, sharedIndices, geometryCfg);\n break;\n\n case \"Solid\":\n const shells = geometry.boundaries;\n for (let j = 0; j < shells.length; j++) {\n const surfaces = shells[j];\n parseSurfacesWithSharedMaterial(ctx, surfaces, sharedIndices, geometryCfg);\n }\n break;\n\n case \"MultiSolid\":\n case \"CompositeSolid\":\n const solids = geometry.boundaries;\n for (let j = 0; j < solids.length; j++) {\n for (let k = 0; k < solids[j].length; k++) {\n const surfaces = solids[j][k];\n parseSurfacesWithSharedMaterial(ctx, surfaces, sharedIndices, geometryCfg);\n }\n }\n break;\n\n case \"GeometryInstance\":\n break;\n }\n\n const geometryId = \"\" + ctx.nextId++;\n const meshId = \"\" + ctx.nextId++;\n\n xktModel.createGeometry({\n geometryId: geometryId,\n primitiveType: \"triangles\",\n positions: geometryCfg.positions,\n indices: geometryCfg.indices\n });\n\n xktModel.createMesh({\n meshId: meshId,\n geometryId: geometryId,\n color: (objectMaterial && objectMaterial.diffuseColor) ? objectMaterial.diffuseColor : [0.8, 0.8, 0.8],\n opacity: 1.0\n //opacity: (objectMaterial && objectMaterial.transparency !== undefined) ? (1.0 - objectMaterial.transparency) : 1.0\n });\n\n meshIds.push(meshId);\n\n ctx.stats.numGeometries++;\n ctx.stats.numVertices += geometryCfg.positions.length / 3;\n ctx.stats.numTriangles += geometryCfg.indices.length / 3;\n}\n\nfunction parseSurfacesWithSharedMaterial(ctx, surfaces, sharedIndices, primitiveCfg) {\n\n const vertices = ctx.vertices;\n\n for (let i = 0; i < surfaces.length; i++) {\n\n let boundary = [];\n let holes = [];\n\n for (let j = 0; j < surfaces[i].length; j++) {\n if (boundary.length > 0) {\n holes.push(boundary.length);\n }\n const newBoundary = extractLocalIndices(ctx, surfaces[i][j], sharedIndices, primitiveCfg);\n boundary.push(...newBoundary);\n }\n\n if (boundary.length === 3) { // Triangle\n\n primitiveCfg.indices.push(boundary[0]);\n primitiveCfg.indices.push(boundary[1]);\n primitiveCfg.indices.push(boundary[2]);\n\n } else if (boundary.length > 3) { // Polygon\n\n let pList = [];\n\n for (let k = 0; k < boundary.length; k++) {\n pList.push({\n x: vertices[sharedIndices[boundary[k]]][0],\n y: vertices[sharedIndices[boundary[k]]][1],\n z: vertices[sharedIndices[boundary[k]]][2]\n });\n }\n\n const normal = getNormalOfPositions(pList, math.vec3());\n let pv = [];\n\n for (let k = 0; k < pList.length; k++) {\n to2D(pList[k], normal, tempVec2a);\n pv.unshift(tempVec2a[0]);\n pv.unshift(tempVec2a[1]);\n }\n\n const tr = earcut(pv, holes, 2);\n\n for (let k = 0; k < tr.length; k += 3) {\n primitiveCfg.indices.unshift(boundary[tr[k]]);\n primitiveCfg.indices.unshift(boundary[tr[k + 1]]);\n primitiveCfg.indices.unshift(boundary[tr[k + 2]]);\n }\n }\n }\n}\n\nfunction extractLocalIndices(ctx, boundary, sharedIndices, geometryCfg) {\n\n const vertices = ctx.vertices;\n const newBoundary = []\n\n for (let i = 0, len = boundary.length; i < len; i++) {\n\n const index = boundary[i];\n\n if (sharedIndices.includes(index)) {\n const vertexIndex = sharedIndices.indexOf(index);\n newBoundary.push(vertexIndex);\n\n } else {\n geometryCfg.positions.push(vertices[index][0]);\n geometryCfg.positions.push(vertices[index][1]);\n geometryCfg.positions.push(vertices[index][2]);\n\n newBoundary.push(sharedIndices.length);\n\n sharedIndices.push(index);\n }\n }\n\n return newBoundary\n}\n\nfunction getNormalOfPositions(positions, normal) {\n\n for (let i = 0; i < positions.length; i++) {\n\n let nexti = i + 1;\n if (nexti === positions.length) {\n nexti = 0;\n }\n\n normal[0] += ((positions[i].y - positions[nexti].y) * (positions[i].z + positions[nexti].z));\n normal[1] += ((positions[i].z - positions[nexti].z) * (positions[i].x + positions[nexti].x));\n normal[2] += ((positions[i].x - positions[nexti].x) * (positions[i].y + positions[nexti].y));\n }\n\n return math.normalizeVec3(normal);\n}\n\nfunction to2D(_p, _n, re) {\n\n const p = tempVec3a;\n const n = tempVec3b;\n const x3 = tempVec3c;\n\n p[0] = _p.x;\n p[1] = _p.y;\n p[2] = _p.z;\n\n n[0] = _n.x;\n n[1] = _n.y;\n n[2] = _n.z;\n\n x3[0] = 1.1;\n x3[1] = 1.1;\n x3[2] = 1.1;\n\n const dist = math.lenVec3(math.subVec3(x3, n));\n\n if (dist < 0.01) {\n x3[0] += 1.0;\n x3[1] += 2.0;\n x3[2] += 3.0;\n }\n\n const dot = math.dotVec3(x3, n);\n const tmp2 = math.mulVec3Scalar(n, dot, math.vec3());\n\n x3[0] -= tmp2[0];\n x3[1] -= tmp2[1];\n x3[2] -= tmp2[2];\n\n math.normalizeVec3(x3);\n\n const y3 = math.cross3Vec3(n, x3, math.vec3());\n const x = math.dotVec3(p, x3);\n const y = math.dotVec3(p, y3);\n\n re[0] = x;\n re[1] = y;\n}\n\nexport {parseCityJSONIntoXKTModel};","function isString(value) {\n return (typeof value === 'string' || value instanceof String);\n}\n\nfunction apply(o, o2) {\n for (const name in o) {\n if (o.hasOwnProperty(name)) {\n o2[name] = o[name];\n }\n }\n return o2;\n}\n\n/**\n * @private\n */\nconst utils = {\n isString,\n apply\n};\n\nexport {utils};\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@loaders.gl/gltf\");","import {utils} from \"../XKTModel/lib/utils.js\";\nimport {math} from \"../lib/math.js\";\n\nimport {parse} from '@loaders.gl/core';\nimport {GLTFLoader} from '@loaders.gl/gltf';\nimport {\n ClampToEdgeWrapping,\n LinearFilter,\n LinearMipMapLinearFilter,\n LinearMipMapNearestFilter,\n MirroredRepeatWrapping,\n NearestFilter,\n NearestMipMapLinearFilter,\n NearestMipMapNearestFilter,\n RepeatWrapping\n} from \"../constants.js\";\n\n/**\n * @desc Parses glTF into an {@link XKTModel}, supporting ````.glb```` and textures.\n *\n * * Supports ````.glb```` and textures\n * * For a lightweight glTF JSON parser that ignores textures, see {@link parseGLTFJSONIntoXKTModel}.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then load a binary glTF model into it.\n *\n * ````javascript\n * utils.loadArraybuffer(\"../assets/models/gltf/HousePlan/glTF-Binary/HousePlan.glb\", async (data) => {\n *\n * const xktModel = new XKTModel();\n *\n * parseGLTFIntoXKTModel({\n * data,\n * xktModel,\n * log: (msg) => { console.log(msg); }\n * }).then(()=>{\n * xktModel.finalize();\n * },\n * (msg) => {\n * console.error(msg);\n * });\n * });\n * ````\n *\n * @param {Object} params Parsing parameters.\n * @param {ArrayBuffer} params.data The glTF.\n * @param {String} [params.baseUri] The base URI used to load this glTF, if any. For resolving relative uris to linked resources.\n * @param {Object} [params.metaModelData] Metamodel JSON. If this is provided, then parsing is able to ensure that the XKTObjects it creates will fit the metadata properly.\n * @param {XKTModel} params.xktModel XKTModel to parse into.\n * @param {Boolean} [params.includeTextures=true] Whether to parse textures.\n * @param {Boolean} [params.includeNormals=true] Whether to parse normals. When false, the parser will ignore the glTF\n * geometry normals, and the glTF data will rely on the xeokit ````Viewer```` to automatically generate them. This has\n * the limitation that the normals will be face-aligned, and therefore the ````Viewer```` will only be able to render\n * a flat-shaded non-PBR representation of the glTF.\n * @param {Object} [params.stats] Collects statistics.\n * @param {function} [params.log] Logging callback.\n @returns {Promise} Resolves when glTF has been parsed.\n */\nfunction parseGLTFIntoXKTModel({\n data,\n baseUri,\n xktModel,\n metaModelData,\n includeTextures = true,\n includeNormals = true,\n getAttachment,\n stats = {},\n log\n }) {\n\n return new Promise(function (resolve, reject) {\n\n if (!data) {\n reject(\"Argument expected: data\");\n return;\n }\n\n if (!xktModel) {\n reject(\"Argument expected: xktModel\");\n return;\n }\n\n stats.sourceFormat = \"glTF\";\n stats.schemaVersion = \"2.0\";\n stats.title = \"\";\n stats.author = \"\";\n stats.created = \"\";\n stats.numTriangles = 0;\n stats.numVertices = 0;\n stats.numNormals = 0;\n stats.numUVs = 0;\n stats.numTextures = 0;\n stats.numObjects = 0;\n stats.numGeometries = 0;\n\n parse(data, GLTFLoader, {\n baseUri\n }).then((gltfData) => {\n\n const ctx = {\n gltfData,\n metaModelCorrections: metaModelData ? getMetaModelCorrections(metaModelData) : null,\n getAttachment: getAttachment || (() => {\n throw new Error('You must define getAttachment() method to convert glTF with external resources')\n }),\n log: (log || function (msg) {\n }),\n error: function (msg) {\n console.error(msg);\n },\n xktModel,\n includeNormals: (includeNormals !== false),\n includeTextures: (includeTextures !== false),\n geometryCreated: {},\n nextId: 0,\n stats\n };\n\n ctx.log(\"Using parser: parseGLTFIntoXKTModel\");\n ctx.log(`Parsing normals: ${ctx.includeNormals ? \"enabled\" : \"disabled\"}`);\n ctx.log(`Parsing textures: ${ctx.includeTextures ? \"enabled\" : \"disabled\"}`);\n\n if (ctx.includeTextures) {\n parseTextures(ctx);\n }\n parseMaterials(ctx);\n parseDefaultScene(ctx);\n\n resolve();\n\n }, (errMsg) => {\n reject(`[parseGLTFIntoXKTModel] ${errMsg}`);\n });\n });\n}\n\nfunction getMetaModelCorrections(metaModelData) {\n const eachRootStats = {};\n const eachChildRoot = {};\n const metaObjects = metaModelData.metaObjects || [];\n const metaObjectsMap = {};\n for (let i = 0, len = metaObjects.length; i < len; i++) {\n const metaObject = metaObjects[i];\n metaObjectsMap[metaObject.id] = metaObject;\n }\n for (let i = 0, len = metaObjects.length; i < len; i++) {\n const metaObject = metaObjects[i];\n if (metaObject.parent !== undefined && metaObject.parent !== null) {\n const metaObjectParent = metaObjectsMap[metaObject.parent];\n if (metaObject.type === metaObjectParent.type) {\n let rootMetaObject = metaObjectParent;\n while (rootMetaObject.parent && metaObjectsMap[rootMetaObject.parent].type === rootMetaObject.type) {\n rootMetaObject = metaObjectsMap[rootMetaObject.parent];\n }\n const rootStats = eachRootStats[rootMetaObject.id] || (eachRootStats[rootMetaObject.id] = {\n numChildren: 0,\n countChildren: 0\n });\n rootStats.numChildren++;\n eachChildRoot[metaObject.id] = rootMetaObject;\n } else {\n\n }\n }\n }\n return {\n metaObjectsMap,\n eachRootStats,\n eachChildRoot\n };\n}\n\nfunction parseTextures(ctx) {\n const gltfData = ctx.gltfData;\n const textures = gltfData.textures;\n if (textures) {\n for (let i = 0, len = textures.length; i < len; i++) {\n parseTexture(ctx, textures[i]);\n ctx.stats.numTextures++;\n }\n }\n}\n\nfunction parseTexture(ctx, texture) {\n if (!texture.source || !texture.source.image) {\n return;\n }\n const textureId = `texture-${ctx.nextId++}`;\n\n let minFilter = NearestMipMapLinearFilter;\n switch (texture.sampler.minFilter) {\n case 9728:\n minFilter = NearestFilter;\n break;\n case 9729:\n minFilter = LinearFilter;\n break;\n case 9984:\n minFilter = NearestMipMapNearestFilter;\n break;\n case 9985:\n minFilter = LinearMipMapNearestFilter;\n break;\n case 9986:\n minFilter = NearestMipMapLinearFilter;\n break;\n case 9987:\n minFilter = LinearMipMapLinearFilter;\n break;\n }\n\n let magFilter = LinearFilter;\n switch (texture.sampler.magFilter) {\n case 9728:\n magFilter = NearestFilter;\n break;\n case 9729:\n magFilter = LinearFilter;\n break;\n }\n\n let wrapS = RepeatWrapping;\n switch (texture.sampler.wrapS) {\n case 33071:\n wrapS = ClampToEdgeWrapping;\n break;\n case 33648:\n wrapS = MirroredRepeatWrapping;\n break;\n case 10497:\n wrapS = RepeatWrapping;\n break;\n }\n\n let wrapT = RepeatWrapping;\n switch (texture.sampler.wrapT) {\n case 33071:\n wrapT = ClampToEdgeWrapping;\n break;\n case 33648:\n wrapT = MirroredRepeatWrapping;\n break;\n case 10497:\n wrapT = RepeatWrapping;\n break;\n }\n\n let wrapR = RepeatWrapping;\n switch (texture.sampler.wrapR) {\n case 33071:\n wrapR = ClampToEdgeWrapping;\n break;\n case 33648:\n wrapR = MirroredRepeatWrapping;\n break;\n case 10497:\n wrapR = RepeatWrapping;\n break;\n }\n\n ctx.xktModel.createTexture({\n textureId: textureId,\n imageData: texture.source.image,\n mediaType: texture.source.mediaType,\n compressed: true,\n width: texture.source.image.width,\n height: texture.source.image.height,\n minFilter,\n magFilter,\n wrapS,\n wrapT,\n wrapR,\n flipY: !!texture.flipY,\n // encoding: \"sRGB\"\n });\n texture._textureId = textureId;\n}\n\nfunction parseMaterials(ctx) {\n const gltfData = ctx.gltfData;\n const materials = gltfData.materials;\n if (materials) {\n for (let i = 0, len = materials.length; i < len; i++) {\n const material = materials[i];\n material._textureSetId = ctx.includeTextures ? parseTextureSet(ctx, material) : null;\n material._attributes = parseMaterialAttributes(ctx, material);\n }\n }\n}\n\nfunction parseTextureSet(ctx, material) {\n const textureSetCfg = {};\n if (material.normalTexture) {\n textureSetCfg.normalTextureId = material.normalTexture.texture._textureId;\n }\n if (material.occlusionTexture) {\n textureSetCfg.occlusionTextureId = material.occlusionTexture.texture._textureId;\n }\n if (material.emissiveTexture) {\n textureSetCfg.emissiveTextureId = material.emissiveTexture.texture._textureId;\n }\n // const alphaMode = material.alphaMode;\n // switch (alphaMode) {\n // case \"NORMAL_OPAQUE\":\n // materialCfg.alphaMode = \"opaque\";\n // break;\n // case \"MASK\":\n // materialCfg.alphaMode = \"mask\";\n // break;\n // case \"BLEND\":\n // materialCfg.alphaMode = \"blend\";\n // break;\n // default:\n // }\n // const alphaCutoff = material.alphaCutoff;\n // if (alphaCutoff !== undefined) {\n // materialCfg.alphaCutoff = alphaCutoff;\n // }\n const metallicPBR = material.pbrMetallicRoughness;\n if (material.pbrMetallicRoughness) {\n const pbrMetallicRoughness = material.pbrMetallicRoughness;\n const baseColorTexture = pbrMetallicRoughness.baseColorTexture || pbrMetallicRoughness.colorTexture;\n if (baseColorTexture) {\n if (baseColorTexture.texture) {\n textureSetCfg.colorTextureId = baseColorTexture.texture._textureId;\n } else {\n textureSetCfg.colorTextureId = ctx.gltfData.textures[baseColorTexture.index]._textureId;\n }\n }\n if (metallicPBR.metallicRoughnessTexture) {\n textureSetCfg.metallicRoughnessTextureId = metallicPBR.metallicRoughnessTexture.texture._textureId;\n }\n }\n const extensions = material.extensions;\n if (extensions) {\n const specularPBR = extensions[\"KHR_materials_pbrSpecularGlossiness\"];\n if (specularPBR) {\n const specularTexture = specularPBR.specularTexture;\n if (specularTexture !== null && specularTexture !== undefined) {\n // textureSetCfg.colorTextureId = ctx.gltfData.textures[specularColorTexture.index]._textureId;\n }\n const specularColorTexture = specularPBR.specularColorTexture;\n if (specularColorTexture !== null && specularColorTexture !== undefined) {\n textureSetCfg.colorTextureId = ctx.gltfData.textures[specularColorTexture.index]._textureId;\n }\n }\n }\n if (textureSetCfg.normalTextureId !== undefined ||\n textureSetCfg.occlusionTextureId !== undefined ||\n textureSetCfg.emissiveTextureId !== undefined ||\n textureSetCfg.colorTextureId !== undefined ||\n textureSetCfg.metallicRoughnessTextureId !== undefined) {\n textureSetCfg.textureSetId = `textureSet-${ctx.nextId++};`\n ctx.xktModel.createTextureSet(textureSetCfg);\n ctx.stats.numTextureSets++;\n return textureSetCfg.textureSetId;\n }\n return null;\n}\n\nfunction parseMaterialAttributes(ctx, material) { // Substitute RGBA for material, to use fast flat shading instead\n const extensions = material.extensions;\n const materialAttributes = {\n color: new Float32Array([1, 1, 1, 1]),\n opacity: 1,\n metallic: 0,\n roughness: 1\n };\n if (extensions) {\n const specularPBR = extensions[\"KHR_materials_pbrSpecularGlossiness\"];\n if (specularPBR) {\n const diffuseFactor = specularPBR.diffuseFactor;\n if (diffuseFactor !== null && diffuseFactor !== undefined) {\n materialAttributes.color.set(diffuseFactor);\n }\n }\n const common = extensions[\"KHR_materials_common\"];\n if (common) {\n const technique = common.technique;\n const values = common.values || {};\n const blinn = technique === \"BLINN\";\n const phong = technique === \"PHONG\";\n const lambert = technique === \"LAMBERT\";\n const diffuse = values.diffuse;\n if (diffuse && (blinn || phong || lambert)) {\n if (!utils.isString(diffuse)) {\n materialAttributes.color.set(diffuse);\n }\n }\n const transparency = values.transparency;\n if (transparency !== null && transparency !== undefined) {\n materialAttributes.opacity = transparency;\n }\n const transparent = values.transparent;\n if (transparent !== null && transparent !== undefined) {\n materialAttributes.opacity = transparent;\n }\n }\n }\n const metallicPBR = material.pbrMetallicRoughness;\n if (metallicPBR) {\n const baseColorFactor = metallicPBR.baseColorFactor;\n if (baseColorFactor) {\n materialAttributes.color[0] = baseColorFactor[0];\n materialAttributes.color[1] = baseColorFactor[1];\n materialAttributes.color[2] = baseColorFactor[2];\n materialAttributes.opacity = baseColorFactor[3];\n }\n const metallicFactor = metallicPBR.metallicFactor;\n if (metallicFactor !== null && metallicFactor !== undefined) {\n materialAttributes.metallic = metallicFactor;\n }\n const roughnessFactor = metallicPBR.roughnessFactor;\n if (roughnessFactor !== null && roughnessFactor !== undefined) {\n materialAttributes.roughness = roughnessFactor;\n }\n }\n return materialAttributes;\n}\n\nfunction parseDefaultScene(ctx) {\n const gltfData = ctx.gltfData;\n const scene = gltfData.scene || gltfData.scenes[0];\n if (!scene) {\n ctx.error(\"glTF has no default scene\");\n return;\n }\n parseScene(ctx, scene);\n}\n\nfunction parseScene(ctx, scene) {\n const nodes = scene.nodes;\n if (!nodes) {\n return;\n }\n for (let i = 0, len = nodes.length; i < len; i++) {\n const node = nodes[i];\n countMeshUsage(ctx, node);\n }\n for (let i = 0, len = nodes.length; i < len; i++) {\n const node = nodes[i];\n parseNode(ctx, node, 0, null);\n }\n}\n\nfunction countMeshUsage(ctx, node) {\n const mesh = node.mesh;\n if (mesh) {\n mesh.instances = mesh.instances ? mesh.instances + 1 : 1;\n }\n if (node.children) {\n const children = node.children;\n for (let i = 0, len = children.length; i < len; i++) {\n const childNode = children[i];\n if (!childNode) {\n ctx.error(\"Node not found: \" + i);\n continue;\n }\n countMeshUsage(ctx, childNode);\n }\n }\n}\n\nconst deferredMeshIds = [];\n\nfunction parseNode(ctx, node, depth, matrix) {\n\n const xktModel = ctx.xktModel;\n\n // Pre-order visit scene node\n\n let localMatrix;\n if (node.matrix) {\n localMatrix = node.matrix;\n if (matrix) {\n matrix = math.mulMat4(matrix, localMatrix, math.mat4());\n } else {\n matrix = localMatrix;\n }\n }\n if (node.translation) {\n localMatrix = math.translationMat4v(node.translation);\n if (matrix) {\n matrix = math.mulMat4(matrix, localMatrix, math.mat4());\n } else {\n matrix = localMatrix;\n }\n }\n if (node.rotation) {\n localMatrix = math.quaternionToMat4(node.rotation);\n if (matrix) {\n matrix = math.mulMat4(matrix, localMatrix, math.mat4());\n } else {\n matrix = localMatrix;\n }\n }\n if (node.scale) {\n localMatrix = math.scalingMat4v(node.scale);\n if (matrix) {\n matrix = math.mulMat4(matrix, localMatrix, math.mat4());\n } else {\n matrix = localMatrix;\n }\n }\n\n if (node.mesh) {\n\n const mesh = node.mesh;\n const numPrimitives = mesh.primitives.length;\n\n if (numPrimitives > 0) {\n for (let i = 0; i < numPrimitives; i++) {\n const primitive = mesh.primitives[i];\n if (!primitive._xktGeometryId) {\n const xktGeometryId = \"geometry-\" + ctx.nextId++;\n const geometryCfg = {\n geometryId: xktGeometryId\n };\n switch (primitive.mode) {\n case 0: // POINTS\n geometryCfg.primitiveType = \"points\";\n break;\n case 1: // LINES\n geometryCfg.primitiveType = \"lines\";\n break;\n case 2: // LINE_LOOP\n geometryCfg.primitiveType = \"line-loop\";\n break;\n case 3: // LINE_STRIP\n geometryCfg.primitiveType = \"line-strip\";\n break;\n case 4: // TRIANGLES\n geometryCfg.primitiveType = \"triangles\";\n break;\n case 5: // TRIANGLE_STRIP\n geometryCfg.primitiveType = \"triangle-strip\";\n break;\n case 6: // TRIANGLE_FAN\n geometryCfg.primitiveType = \"triangle-fan\";\n break;\n default:\n geometryCfg.primitiveType = \"triangles\";\n }\n const POSITION = primitive.attributes.POSITION;\n if (!POSITION) {\n continue;\n }\n geometryCfg.positions = primitive.attributes.POSITION.value;\n ctx.stats.numVertices += geometryCfg.positions.length / 3;\n if (ctx.includeNormals) {\n if (primitive.attributes.NORMAL) {\n geometryCfg.normals = primitive.attributes.NORMAL.value;\n ctx.stats.numNormals += geometryCfg.normals.length / 3;\n }\n }\n if (primitive.attributes.COLOR_0) {\n geometryCfg.colorsCompressed = primitive.attributes.COLOR_0.value;\n }\n if (ctx.includeTextures) {\n if (primitive.attributes.TEXCOORD_0) {\n geometryCfg.uvs = primitive.attributes.TEXCOORD_0.value;\n ctx.stats.numUVs += geometryCfg.uvs.length / 2;\n }\n }\n if (primitive.indices) {\n geometryCfg.indices = primitive.indices.value;\n if (primitive.mode === 4) {\n ctx.stats.numTriangles += geometryCfg.indices.length / 3;\n }\n }\n xktModel.createGeometry(geometryCfg);\n primitive._xktGeometryId = xktGeometryId;\n ctx.stats.numGeometries++;\n }\n\n const xktMeshId = ctx.nextId++;\n const meshCfg = {\n meshId: xktMeshId,\n geometryId: primitive._xktGeometryId,\n matrix: matrix ? matrix.slice() : math.identityMat4()\n };\n const material = primitive.material;\n if (material) {\n meshCfg.textureSetId = material._textureSetId;\n meshCfg.color = material._attributes.color;\n meshCfg.opacity = material._attributes.opacity;\n meshCfg.metallic = material._attributes.metallic;\n meshCfg.roughness = material._attributes.roughness;\n } else {\n meshCfg.color = [1.0, 1.0, 1.0];\n meshCfg.opacity = 1.0;\n }\n xktModel.createMesh(meshCfg);\n deferredMeshIds.push(xktMeshId);\n }\n }\n }\n\n // Visit child scene nodes\n\n if (node.children) {\n const children = node.children;\n for (let i = 0, len = children.length; i < len; i++) {\n const childNode = children[i];\n parseNode(ctx, childNode, depth + 1, matrix);\n }\n }\n\n // Post-order visit scene node\n\n const nodeName = node.name;\n if (((nodeName !== undefined && nodeName !== null) || depth === 0) && deferredMeshIds.length > 0) {\n if (nodeName === undefined || nodeName === null) {\n ctx.log(`Warning: 'name' properties not found on glTF scene nodes - will randomly-generate object IDs in XKT`);\n }\n let xktEntityId = nodeName; // Fall back on generated ID when `name` not found on glTF scene node(s)\n if (!!xktEntityId && xktModel.entities[xktEntityId]) {\n ctx.log(`Warning: Two or more glTF nodes found with same 'name' attribute: '${nodeName} - will randomly-generating an object ID in XKT`);\n }\n while (!xktEntityId || xktModel.entities[xktEntityId]) {\n xktEntityId = \"entity-\" + ctx.nextId++;\n }\n if (ctx.metaModelCorrections) {\n // Merging meshes into XKTObjects that map to metaobjects\n const rootMetaObject = ctx.metaModelCorrections.eachChildRoot[xktEntityId];\n if (rootMetaObject) {\n const rootMetaObjectStats = ctx.metaModelCorrections.eachRootStats[rootMetaObject.id];\n rootMetaObjectStats.countChildren++;\n if (rootMetaObjectStats.countChildren >= rootMetaObjectStats.numChildren) {\n xktModel.createEntity({\n entityId: rootMetaObject.id,\n meshIds: deferredMeshIds\n });\n ctx.stats.numObjects++;\n deferredMeshIds.length = 0;\n }\n } else {\n const metaObject = ctx.metaModelCorrections.metaObjectsMap[xktEntityId];\n if (metaObject) {\n xktModel.createEntity({\n entityId: xktEntityId,\n meshIds: deferredMeshIds\n });\n ctx.stats.numObjects++;\n deferredMeshIds.length = 0;\n }\n }\n } else {\n // Create an XKTObject from the meshes at each named glTF node, don't care about metaobjects\n xktModel.createEntity({\n entityId: xktEntityId,\n meshIds: deferredMeshIds\n });\n ctx.stats.numObjects++;\n deferredMeshIds.length = 0;\n }\n }\n}\n\nexport {parseGLTFIntoXKTModel};\n","import {utils} from \"../XKTModel/lib/utils.js\";\nimport {math} from \"../lib/math.js\";\n\nconst atob2 = (typeof atob !== 'undefined') ? atob : a => Buffer.from(a, 'base64').toString('binary');\n\nconst WEBGL_COMPONENT_TYPES = {\n 5120: Int8Array,\n 5121: Uint8Array,\n 5122: Int16Array,\n 5123: Uint16Array,\n 5125: Uint32Array,\n 5126: Float32Array\n};\n\nconst WEBGL_TYPE_SIZES = {\n 'SCALAR': 1,\n 'VEC2': 2,\n 'VEC3': 3,\n 'VEC4': 4,\n 'MAT2': 4,\n 'MAT3': 9,\n 'MAT4': 16\n};\n\n/**\n * @desc Parses glTF JSON into an {@link XKTModel}, without ````.glb```` and textures.\n *\n * * Lightweight JSON-based glTF parser which ignores textures\n * * For texture and ````.glb```` support, see {@link parseGLTFIntoXKTModel}\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then load a glTF model into it.\n *\n * ````javascript\n * utils.loadJSON(\"./models/gltf/duplex/scene.gltf\", async (data) => {\n *\n * const xktModel = new XKTModel();\n *\n * parseGLTFJSONIntoXKTModel({\n * data,\n * xktModel,\n * log: (msg) => { console.log(msg); }\n * }).then(()=>{\n * xktModel.finalize();\n * },\n * (msg) => {\n * console.error(msg);\n * });\n * });\n * ````\n *\n * @param {Object} params Parsing parameters.\n * @param {Object} params.data The glTF JSON.\n * @param {Object} [params.metaModelData] Metamodel JSON. If this is provided, then parsing is able to ensure that the XKTObjects it creates will fit the metadata properly.\n * @param {XKTModel} params.xktModel XKTModel to parse into.\n * @param {Boolean} [params.includeNormals=false] Whether to parse normals. When false, the parser will ignore the glTF\n * geometry normals, and the glTF data will rely on the xeokit ````Viewer```` to automatically generate them. This has\n * the limitation that the normals will be face-aligned, and therefore the ````Viewer```` will only be able to render\n * a flat-shaded representation of the glTF.\n * @param {Boolean} [params.reuseGeometries=true] When true, the parser will enable geometry reuse within the XKTModel. When false,\n * will automatically \"expand\" all reused geometries into duplicate copies. This has the drawback of increasing the XKT\n * file size (~10-30% for typical models), but can make the model more responsive in the xeokit Viewer, especially if the model\n * has excessive geometry reuse. An example of excessive geometry reuse would be if we have 4000 geometries that are\n * shared amongst 2000 objects, ie. a large number of geometries with a low amount of reuse, which can present a\n * pathological performance case for xeokit's underlying graphics APIs (WebGL, WebGPU etc).\n * @param {function} [params.getAttachment] Callback through which to fetch attachments, if the glTF has them.\n * @param {Object} [params.stats] Collects statistics.\n * @param {function} [params.log] Logging callback.\n * @returns {Promise}\n */\nfunction parseGLTFJSONIntoXKTModel({\n data,\n xktModel,\n metaModelData,\n includeNormals,\n reuseGeometries,\n getAttachment,\n stats = {},\n log\n }) {\n\n if (log) {\n log(\"Using parser: parseGLTFJSONIntoXKTModel\");\n }\n\n return new Promise(function (resolve, reject) {\n\n if (!data) {\n reject(\"Argument expected: data\");\n return;\n }\n\n if (!xktModel) {\n reject(\"Argument expected: xktModel\");\n return;\n }\n\n stats.sourceFormat = \"glTF\";\n stats.schemaVersion = \"2.0\";\n stats.title = \"\";\n stats.author = \"\";\n stats.created = \"\";\n stats.numTriangles = 0;\n stats.numVertices = 0;\n stats.numNormals = 0;\n stats.numObjects = 0;\n stats.numGeometries = 0;\n\n const ctx = {\n gltf: data,\n metaModelCorrections: metaModelData ? getMetaModelCorrections(metaModelData) : null,\n getAttachment: getAttachment || (() => {\n throw new Error('You must define getAttachment() method to convert glTF with external resources')\n }),\n log: (log || function (msg) {\n }),\n xktModel,\n includeNormals,\n createXKTGeometryIds: {},\n nextMeshId: 0,\n reuseGeometries: (reuseGeometries !== false),\n stats\n };\n\n ctx.log(`Parsing normals: ${ctx.includeNormals ? \"enabled\" : \"disabled\"}`);\n\n parseBuffers(ctx).then(() => {\n\n parseBufferViews(ctx);\n freeBuffers(ctx);\n parseMaterials(ctx);\n parseDefaultScene(ctx);\n\n resolve();\n\n }, (errMsg) => {\n reject(errMsg);\n });\n });\n}\n\nfunction getMetaModelCorrections(metaModelData) {\n const eachRootStats = {};\n const eachChildRoot = {};\n const metaObjects = metaModelData.metaObjects || [];\n const metaObjectsMap = {};\n for (let i = 0, len = metaObjects.length; i < len; i++) {\n const metaObject = metaObjects[i];\n metaObjectsMap[metaObject.id] = metaObject;\n }\n for (let i = 0, len = metaObjects.length; i < len; i++) {\n const metaObject = metaObjects[i];\n if (metaObject.parent !== undefined && metaObject.parent !== null) {\n const metaObjectParent = metaObjectsMap[metaObject.parent];\n if (metaObject.type === metaObjectParent.type) {\n let rootMetaObject = metaObjectParent;\n while (rootMetaObject.parent && metaObjectsMap[rootMetaObject.parent].type === rootMetaObject.type) {\n rootMetaObject = metaObjectsMap[rootMetaObject.parent];\n }\n const rootStats = eachRootStats[rootMetaObject.id] || (eachRootStats[rootMetaObject.id] = {\n numChildren: 0,\n countChildren: 0\n });\n rootStats.numChildren++;\n eachChildRoot[metaObject.id] = rootMetaObject;\n } else {\n\n }\n }\n }\n const metaModelCorrections = {\n metaObjectsMap,\n eachRootStats,\n eachChildRoot\n };\n return metaModelCorrections;\n}\n\nfunction parseBuffers(ctx) { // Parses geometry buffers into temporary \"_buffer\" Unit8Array properties on the glTF \"buffer\" elements\n const buffers = ctx.gltf.buffers;\n if (buffers) {\n return Promise.all(buffers.map(buffer => parseBuffer(ctx, buffer)));\n } else {\n return new Promise(function (resolve, reject) {\n resolve();\n });\n }\n}\n\nfunction parseBuffer(ctx, bufferInfo) {\n return new Promise(function (resolve, reject) {\n // Allow a shortcut where the glTF buffer is \"enrichened\" with direct\n // access to the data-arrayBuffer, w/out needing to either:\n // - read the file indicated by the \".uri\" component of the buffer\n // - base64-decode the encoded data in the \".uri\" component\n if (bufferInfo._arrayBuffer) {\n bufferInfo._buffer = bufferInfo._arrayBuffer;\n resolve(bufferInfo);\n return;\n }\n // Otherwise, proceed with \"standard-glTF\" .uri component.\n const uri = bufferInfo.uri;\n if (!uri) {\n reject('gltf/handleBuffer missing uri in ' + JSON.stringify(bufferInfo));\n return;\n }\n parseArrayBuffer(ctx, uri).then((arrayBuffer) => {\n bufferInfo._buffer = arrayBuffer;\n resolve(arrayBuffer);\n }, (errMsg) => {\n reject(errMsg);\n })\n });\n}\n\nfunction parseArrayBuffer(ctx, uri) {\n return new Promise(function (resolve, reject) {\n const dataUriRegex = /^data:(.*?)(;base64)?,(.*)$/; // Check for data: URI\n const dataUriRegexResult = uri.match(dataUriRegex);\n if (dataUriRegexResult) { // Safari can't handle data URIs through XMLHttpRequest\n const isBase64 = !!dataUriRegexResult[2];\n let data = dataUriRegexResult[3];\n data = decodeURIComponent(data);\n if (isBase64) {\n data = atob2(data);\n }\n const buffer = new ArrayBuffer(data.length);\n const view = new Uint8Array(buffer);\n for (let i = 0; i < data.length; i++) {\n view[i] = data.charCodeAt(i);\n }\n resolve(buffer);\n } else { // Uri is a path to a file\n ctx.getAttachment(uri).then(\n (arrayBuffer) => {\n resolve(arrayBuffer);\n },\n (errMsg) => {\n reject(errMsg);\n });\n }\n });\n}\n\nfunction parseBufferViews(ctx) { // Parses our temporary \"_buffer\" properties into \"_buffer\" properties on glTF \"bufferView\" elements\n const bufferViewsInfo = ctx.gltf.bufferViews;\n if (bufferViewsInfo) {\n for (let i = 0, len = bufferViewsInfo.length; i < len; i++) {\n parseBufferView(ctx, bufferViewsInfo[i]);\n }\n }\n}\n\nfunction parseBufferView(ctx, bufferViewInfo) {\n const buffer = ctx.gltf.buffers[bufferViewInfo.buffer];\n bufferViewInfo._typedArray = null;\n const byteLength = bufferViewInfo.byteLength || 0;\n const byteOffset = bufferViewInfo.byteOffset || 0;\n bufferViewInfo._buffer = buffer._buffer.slice(byteOffset, byteOffset + byteLength);\n}\n\nfunction freeBuffers(ctx) { // Deletes the \"_buffer\" properties from the glTF \"buffer\" elements, to save memory\n const buffers = ctx.gltf.buffers;\n if (buffers) {\n for (let i = 0, len = buffers.length; i < len; i++) {\n buffers[i]._buffer = null;\n }\n }\n}\n\nfunction parseMaterials(ctx) {\n const materialsInfo = ctx.gltf.materials;\n if (materialsInfo) {\n for (let i = 0, len = materialsInfo.length; i < len; i++) {\n const materialInfo = materialsInfo[i];\n const material = parseMaterial(ctx, materialInfo);\n materialInfo._materialData = material;\n }\n }\n}\n\nfunction parseMaterial(ctx, materialInfo) { // Attempts to extract an RGBA color for a glTF material\n const material = {\n color: new Float32Array([1, 1, 1]),\n opacity: 1.0,\n metallic: 0,\n roughness: 1\n };\n const extensions = materialInfo.extensions;\n if (extensions) {\n const specularPBR = extensions[\"KHR_materials_pbrSpecularGlossiness\"];\n if (specularPBR) {\n const diffuseFactor = specularPBR.diffuseFactor;\n if (diffuseFactor !== null && diffuseFactor !== undefined) {\n material.color[0] = diffuseFactor[0];\n material.color[1] = diffuseFactor[1];\n material.color[2] = diffuseFactor[2];\n }\n }\n const common = extensions[\"KHR_materials_common\"];\n if (common) {\n const technique = common.technique;\n const values = common.values || {};\n const blinn = technique === \"BLINN\";\n const phong = technique === \"PHONG\";\n const lambert = technique === \"LAMBERT\";\n const diffuse = values.diffuse;\n if (diffuse && (blinn || phong || lambert)) {\n if (!utils.isString(diffuse)) {\n material.color[0] = diffuse[0];\n material.color[1] = diffuse[1];\n material.color[2] = diffuse[2];\n }\n }\n const transparency = values.transparency;\n if (transparency !== null && transparency !== undefined) {\n material.opacity = transparency;\n }\n const transparent = values.transparent;\n if (transparent !== null && transparent !== undefined) {\n material.opacity = transparent;\n }\n }\n }\n const metallicPBR = materialInfo.pbrMetallicRoughness;\n if (metallicPBR) {\n const baseColorFactor = metallicPBR.baseColorFactor;\n if (baseColorFactor) {\n material.color[0] = baseColorFactor[0];\n material.color[1] = baseColorFactor[1];\n material.color[2] = baseColorFactor[2];\n material.opacity = baseColorFactor[3];\n }\n const metallicFactor = metallicPBR.metallicFactor;\n if (metallicFactor !== null && metallicFactor !== undefined) {\n material.metallic = metallicFactor;\n }\n const roughnessFactor = metallicPBR.roughnessFactor;\n if (roughnessFactor !== null && roughnessFactor !== undefined) {\n material.roughness = roughnessFactor;\n }\n }\n return material;\n}\n\nfunction parseDefaultScene(ctx) {\n const scene = ctx.gltf.scene || 0;\n const defaultSceneInfo = ctx.gltf.scenes[scene];\n if (!defaultSceneInfo) {\n throw new Error(\"glTF has no default scene\");\n }\n parseScene(ctx, defaultSceneInfo);\n}\n\n\nfunction parseScene(ctx, sceneInfo) {\n const nodes = sceneInfo.nodes;\n if (!nodes) {\n return;\n }\n for (let i = 0, len = nodes.length; i < len; i++) {\n const glTFNode = ctx.gltf.nodes[nodes[i]];\n if (glTFNode) {\n parseNode(ctx, glTFNode, 0, null);\n }\n }\n}\n\nlet deferredMeshIds = [];\n\nfunction parseNode(ctx, glTFNode, depth, matrix) {\n\n const gltf = ctx.gltf;\n const xktModel = ctx.xktModel;\n\n let localMatrix;\n\n if (glTFNode.matrix) {\n localMatrix = glTFNode.matrix;\n if (matrix) {\n matrix = math.mulMat4(matrix, localMatrix, math.mat4());\n } else {\n matrix = localMatrix;\n }\n }\n\n if (glTFNode.translation) {\n localMatrix = math.translationMat4v(glTFNode.translation);\n if (matrix) {\n matrix = math.mulMat4(matrix, localMatrix, localMatrix);\n } else {\n matrix = localMatrix;\n }\n }\n\n if (glTFNode.rotation) {\n localMatrix = math.quaternionToMat4(glTFNode.rotation);\n if (matrix) {\n matrix = math.mulMat4(matrix, localMatrix, localMatrix);\n } else {\n matrix = localMatrix;\n }\n }\n\n if (glTFNode.scale) {\n localMatrix = math.scalingMat4v(glTFNode.scale);\n if (matrix) {\n matrix = math.mulMat4(matrix, localMatrix, localMatrix);\n } else {\n matrix = localMatrix;\n }\n }\n\n const gltfMeshId = glTFNode.mesh;\n\n if (gltfMeshId !== undefined) {\n\n const meshInfo = gltf.meshes[gltfMeshId];\n\n if (meshInfo) {\n\n const numPrimitivesInMesh = meshInfo.primitives.length;\n\n if (numPrimitivesInMesh > 0) {\n\n for (let i = 0; i < numPrimitivesInMesh; i++) {\n\n const primitiveInfo = meshInfo.primitives[i];\n\n const geometryHash = createPrimitiveGeometryHash(primitiveInfo);\n\n let xktGeometryId = ctx.createXKTGeometryIds[geometryHash];\n\n if ((!ctx.reuseGeometries) || !xktGeometryId) {\n\n xktGeometryId = \"geometry-\" + ctx.nextMeshId++\n\n const geometryArrays = {};\n\n parsePrimitiveGeometry(ctx, primitiveInfo, geometryArrays);\n\n const colors = geometryArrays.colors;\n\n let colorsCompressed;\n\n if (geometryArrays.colors) {\n colorsCompressed = [];\n for (let j = 0, lenj = colors.length; j < lenj; j += 4) {\n colorsCompressed.push(colors[j + 0]);\n colorsCompressed.push(colors[j + 1]);\n colorsCompressed.push(colors[j + 2]);\n colorsCompressed.push(255);\n }\n }\n\n xktModel.createGeometry({\n geometryId: xktGeometryId,\n primitiveType: geometryArrays.primitive,\n positions: geometryArrays.positions,\n normals: ctx.includeNormals ? geometryArrays.normals : null,\n colorsCompressed: colorsCompressed,\n indices: geometryArrays.indices\n });\n\n ctx.stats.numGeometries++;\n ctx.stats.numVertices += geometryArrays.positions ? geometryArrays.positions.length / 3 : 0;\n ctx.stats.numNormals += (ctx.includeNormals && geometryArrays.normals) ? geometryArrays.normals.length / 3 : 0;\n ctx.stats.numTriangles += geometryArrays.indices ? geometryArrays.indices.length / 3 : 0;\n\n ctx.createXKTGeometryIds[geometryHash] = xktGeometryId;\n } else {\n// Geometry reused\n }\n\n const materialIndex = primitiveInfo.material;\n const materialInfo = (materialIndex !== null && materialIndex !== undefined) ? gltf.materials[materialIndex] : null;\n const color = materialInfo ? materialInfo._materialData.color : new Float32Array([1.0, 1.0, 1.0, 1.0]);\n const opacity = materialInfo ? materialInfo._materialData.opacity : 1.0;\n const metallic = materialInfo ? materialInfo._materialData.metallic : 0.0;\n const roughness = materialInfo ? materialInfo._materialData.roughness : 1.0;\n\n const xktMeshId = \"mesh-\" + ctx.nextMeshId++;\n\n xktModel.createMesh({\n meshId: xktMeshId,\n geometryId: xktGeometryId,\n matrix: matrix ? matrix.slice() : math.identityMat4(),\n color: color,\n opacity: opacity,\n metallic: metallic,\n roughness: roughness\n });\n\n deferredMeshIds.push(xktMeshId);\n }\n }\n }\n }\n\n\n if (glTFNode.children) {\n const children = glTFNode.children;\n for (let i = 0, len = children.length; i < len; i++) {\n const childNodeIdx = children[i];\n const childGLTFNode = gltf.nodes[childNodeIdx];\n if (!childGLTFNode) {\n console.warn('Node not found: ' + i);\n continue;\n }\n parseNode(ctx, childGLTFNode, depth + 1, matrix);\n }\n }\n\n // Post-order visit scene node\n\n const nodeName = glTFNode.name;\n if (((nodeName !== undefined && nodeName !== null) || depth === 0) && deferredMeshIds.length > 0) {\n if (nodeName === undefined || nodeName === null) {\n ctx.log(`[parseGLTFJSONIntoXKTModel] Warning: 'name' properties not found on glTF scene nodes - will randomly-generate object IDs in XKT`);\n }\n let xktEntityId = nodeName; // Fall back on generated ID when `name` not found on glTF scene node(s)\n if (xktEntityId === undefined || xktEntityId === null) {\n if (xktModel.entities[xktEntityId]) {\n ctx.error(\"Two or more glTF nodes found with same 'name' attribute: '\" + nodeName + \"'\");\n }\n while (!xktEntityId || xktModel.entities[xktEntityId]) {\n xktEntityId = \"entity-\" + ctx.nextId++;\n }\n }\n if (ctx.metaModelCorrections) { // Merging meshes into XKTObjects that map to metaobjects\n const rootMetaObject = ctx.metaModelCorrections.eachChildRoot[xktEntityId];\n if (rootMetaObject) {\n const rootMetaObjectStats = ctx.metaModelCorrections.eachRootStats[rootMetaObject.id];\n rootMetaObjectStats.countChildren++;\n if (rootMetaObjectStats.countChildren >= rootMetaObjectStats.numChildren) {\n xktModel.createEntity({\n entityId: rootMetaObject.id,\n meshIds: deferredMeshIds\n });\n ctx.stats.numObjects++;\n deferredMeshIds = [];\n }\n } else {\n const metaObject = ctx.metaModelCorrections.metaObjectsMap[xktEntityId];\n if (metaObject) {\n xktModel.createEntity({\n entityId: xktEntityId,\n meshIds: deferredMeshIds\n });\n ctx.stats.numObjects++;\n deferredMeshIds = [];\n }\n }\n } else { // Create an XKTObject from the meshes at each named glTF node, don't care about metaobjects\n xktModel.createEntity({\n entityId: xktEntityId,\n meshIds: deferredMeshIds\n });\n ctx.stats.numObjects++;\n deferredMeshIds = [];\n }\n }\n}\n\nfunction createPrimitiveGeometryHash(primitiveInfo) {\n const attributes = primitiveInfo.attributes;\n if (!attributes) {\n return \"empty\";\n }\n const mode = primitiveInfo.mode;\n const material = primitiveInfo.material;\n const indices = primitiveInfo.indices;\n const positions = primitiveInfo.attributes.POSITION;\n const normals = primitiveInfo.attributes.NORMAL;\n const colors = primitiveInfo.attributes.COLOR_0;\n const uv = primitiveInfo.attributes.TEXCOORD_0;\n return [\n mode,\n // material,\n (indices !== null && indices !== undefined) ? indices : \"-\",\n (positions !== null && positions !== undefined) ? positions : \"-\",\n (normals !== null && normals !== undefined) ? normals : \"-\",\n (colors !== null && colors !== undefined) ? colors : \"-\",\n (uv !== null && uv !== undefined) ? uv : \"-\"\n ].join(\";\");\n}\n\nfunction parsePrimitiveGeometry(ctx, primitiveInfo, geometryArrays) {\n const attributes = primitiveInfo.attributes;\n if (!attributes) {\n return;\n }\n switch (primitiveInfo.mode) {\n case 0: // POINTS\n geometryArrays.primitive = \"points\";\n break;\n case 1: // LINES\n geometryArrays.primitive = \"lines\";\n break;\n case 2: // LINE_LOOP\n // TODO: convert\n geometryArrays.primitive = \"lines\";\n break;\n case 3: // LINE_STRIP\n // TODO: convert\n geometryArrays.primitive = \"lines\";\n break;\n case 4: // TRIANGLES\n geometryArrays.primitive = \"triangles\";\n break;\n case 5: // TRIANGLE_STRIP\n // TODO: convert\n console.log(\"TRIANGLE_STRIP\");\n geometryArrays.primitive = \"triangles\";\n break;\n case 6: // TRIANGLE_FAN\n // TODO: convert\n console.log(\"TRIANGLE_FAN\");\n geometryArrays.primitive = \"triangles\";\n break;\n default:\n geometryArrays.primitive = \"triangles\";\n }\n const accessors = ctx.gltf.accessors;\n const indicesIndex = primitiveInfo.indices;\n if (indicesIndex !== null && indicesIndex !== undefined) {\n const accessorInfo = accessors[indicesIndex];\n geometryArrays.indices = parseAccessorTypedArray(ctx, accessorInfo);\n }\n const positionsIndex = attributes.POSITION;\n if (positionsIndex !== null && positionsIndex !== undefined) {\n const accessorInfo = accessors[positionsIndex];\n geometryArrays.positions = parseAccessorTypedArray(ctx, accessorInfo);\n }\n const normalsIndex = attributes.NORMAL;\n if (normalsIndex !== null && normalsIndex !== undefined) {\n const accessorInfo = accessors[normalsIndex];\n geometryArrays.normals = parseAccessorTypedArray(ctx, accessorInfo);\n }\n const colorsIndex = attributes.COLOR_0;\n if (colorsIndex !== null && colorsIndex !== undefined) {\n const accessorInfo = accessors[colorsIndex];\n geometryArrays.colors = parseAccessorTypedArray(ctx, accessorInfo);\n }\n}\n\nfunction parseAccessorTypedArray(ctx, accessorInfo) {\n const bufferView = ctx.gltf.bufferViews[accessorInfo.bufferView];\n const itemSize = WEBGL_TYPE_SIZES[accessorInfo.type];\n const TypedArray = WEBGL_COMPONENT_TYPES[accessorInfo.componentType];\n const elementBytes = TypedArray.BYTES_PER_ELEMENT; // For VEC3: itemSize is 3, elementBytes is 4, itemBytes is 12.\n const itemBytes = elementBytes * itemSize;\n if (accessorInfo.byteStride && accessorInfo.byteStride !== itemBytes) { // The buffer is not interleaved if the stride is the item size in bytes.\n throw new Error(\"interleaved buffer!\"); // TODO\n } else {\n return new TypedArray(bufferView._buffer, accessorInfo.byteOffset || 0, accessorInfo.count * itemSize);\n }\n}\n\nexport {parseGLTFJSONIntoXKTModel};\n","/**\n * @desc Parses IFC STEP file data into an {@link XKTModel}.\n *\n * This function uses [web-ifc](https://github.com/tomvandig/web-ifc) to parse the IFC, which relies on a\n * WASM file to do the parsing.\n *\n * Depending on how we use this function, we may need to provide it with a path to the directory where that WASM file is stored.\n *\n * This function is tested with web-ifc version 0.0.34.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then load an IFC model into it.\n *\n * ````javascript\n * import {XKTModel, parseIFCIntoXKTModel, writeXKTModelToArrayBuffer} from \"xeokit-convert.es.js\";\n *\n * import * as WebIFC from \"web-ifc-api.js\";\n *\n * utils.loadArraybuffer(\"rac_advanced_sample_project.ifc\", async (data) => {\n *\n * const xktModel = new XKTModel();\n *\n * parseIFCIntoXKTModel({\n * WebIFC,\n * data,\n * xktModel,\n * wasmPath: \"../dist/\",\n * autoNormals: true,\n * log: (msg) => { console.log(msg); }\n * }).then(()=>{\n * xktModel.finalize();\n * },\n * (msg) => {\n * console.error(msg);\n * });\n * });\n * ````\n *\n * @param {Object} params Parsing params.\n * @param {Object} params.WebIFC The WebIFC library. We pass this in as an external dependency, in order to give the\n * caller the choice of whether to use the Browser or NodeJS version.\n * @param {ArrayBuffer} [params.data] IFC file data.\n * @param {XKTModel} [params.xktModel] XKTModel to parse into.\n * @param {Boolean} [params.autoNormals=true] When true, the parser will ignore the IFC geometry normals, and the IFC\n * data will rely on the xeokit ````Viewer```` to automatically generate them. This has the limitation that the\n * normals will be face-aligned, and therefore the ````Viewer```` will only be able to render a flat-shaded representation\n * of the IFC model. This is ````true```` by default, because IFC models tend to look acceptable with flat-shading,\n * and we always want to minimize IFC model size wherever possible.\n * @param {String[]} [params.includeTypes] Option to only convert objects of these types.\n * @param {String[]} [params.excludeTypes] Option to never convert objects of these types.\n * @param {String} params.wasmPath Path to ````web-ifc.wasm````, required by this function.\n * @param {Object} [params.stats={}] Collects statistics.\n * @param {function} [params.log] Logging callback.\n * @returns {Promise} Resolves when IFC has been parsed.\n */\nfunction parseIFCIntoXKTModel({\n WebIFC,\n data,\n xktModel,\n autoNormals = true,\n includeTypes,\n excludeTypes,\n wasmPath,\n stats = {},\n log\n }) {\n\n if (log) {\n log(\"Using parser: parseIFCIntoXKTModel\");\n }\n\n return new Promise(function (resolve, reject) {\n\n if (!data) {\n reject(\"Argument expected: data\");\n return;\n }\n\n if (!xktModel) {\n reject(\"Argument expected: xktModel\");\n return;\n }\n\n if (!wasmPath) {\n reject(\"Argument expected: wasmPath\");\n return;\n }\n\n const ifcAPI = new WebIFC.IfcAPI();\n\n if (wasmPath) {\n ifcAPI.SetWasmPath(wasmPath);\n }\n\n ifcAPI.Init().then(() => {\n\n const dataArray = new Uint8Array(data);\n\n const modelID = ifcAPI.OpenModel(dataArray);\n\n stats.sourceFormat = \"IFC\";\n stats.schemaVersion = \"\";\n stats.title = \"\";\n stats.author = \"\";\n stats.created = \"\";\n stats.numMetaObjects = 0;\n stats.numPropertySets = 0;\n stats.numObjects = 0;\n stats.numGeometries = 0;\n stats.numTriangles = 0;\n stats.numVertices = 0;\n\n const ctx = {\n WebIFC,\n modelID,\n ifcAPI,\n xktModel,\n autoNormals,\n log: (log || function (msg) {\n }),\n nextId: 0,\n stats\n };\n\n if (includeTypes) {\n ctx.includeTypes = {};\n for (let i = 0, len = includeTypes.length; i < len; i++) {\n ctx.includeTypes[includeTypes[i]] = true;\n }\n }\n\n if (excludeTypes) {\n ctx.excludeTypes = {};\n for (let i = 0, len = excludeTypes.length; i < len; i++) {\n ctx.excludeTypes[excludeTypes[i]] = true;\n }\n }\n\n const lines = ctx.ifcAPI.GetLineIDsWithType(modelID, WebIFC.IFCPROJECT);\n const ifcProjectId = lines.get(0);\n const ifcProject = ctx.ifcAPI.GetLine(modelID, ifcProjectId);\n\n ctx.xktModel.schema = \"\";\n ctx.xktModel.modelId = \"\" + modelID;\n ctx.xktModel.projectId = \"\" + ifcProjectId;\n\n parseMetadata(ctx);\n parseGeometry(ctx);\n parsePropertySets(ctx);\n\n resolve();\n\n }).catch((e) => {\n\n reject(e);\n })\n });\n}\n\nfunction parsePropertySets(ctx) {\n\n const lines = ctx.ifcAPI.GetLineIDsWithType(ctx.modelID, ctx.WebIFC.IFCRELDEFINESBYPROPERTIES);\n\n for (let i = 0; i < lines.size(); i++) {\n\n let relID = lines.get(i);\n\n let rel = ctx.ifcAPI.GetLine(ctx.modelID, relID, true);\n\n if (rel) {\n\n const relatingPropertyDefinition = rel.RelatingPropertyDefinition;\n if (!relatingPropertyDefinition) {\n continue;\n }\n\n const propertySetId = relatingPropertyDefinition.GlobalId.value;\n\n const relatedObjects = rel.RelatedObjects;\n if (relatedObjects) {\n for (let i = 0, len = relatedObjects.length; i < len; i++) {\n const relatedObject = relatedObjects[i];\n const metaObjectId = relatedObject.GlobalId.value;\n const metaObject = ctx.xktModel.metaObjects[metaObjectId];\n if (metaObject) {\n if (!metaObject.propertySetIds) {\n metaObject.propertySetIds = [];\n }\n metaObject.propertySetIds.push(propertySetId);\n }\n }\n }\n\n const props = relatingPropertyDefinition.HasProperties;\n if (props && props.length > 0) {\n const propertySetType = \"Default\";\n const propertySetName = relatingPropertyDefinition.Name.value;\n const properties = [];\n for (let i = 0, len = props.length; i < len; i++) {\n const prop = props[i];\n const name = prop.Name;\n const nominalValue = prop.NominalValue;\n if (name && nominalValue) {\n const property = {\n name: name.value,\n type: nominalValue.type,\n value: nominalValue.value,\n valueType: nominalValue.valueType\n };\n if (prop.Description) {\n property.description = prop.Description.value;\n } else if (nominalValue.description) {\n property.description = nominalValue.description;\n }\n properties.push(property);\n }\n }\n ctx.xktModel.createPropertySet({propertySetId, propertySetType, propertySetName, properties});\n ctx.stats.numPropertySets++;\n }\n }\n }\n}\n\nfunction parseMetadata(ctx) {\n\n const lines = ctx.ifcAPI.GetLineIDsWithType(ctx.modelID, ctx.WebIFC.IFCPROJECT);\n const ifcProjectId = lines.get(0);\n const ifcProject = ctx.ifcAPI.GetLine(ctx.modelID, ifcProjectId);\n\n parseSpatialChildren(ctx, ifcProject);\n}\n\nfunction parseSpatialChildren(ctx, ifcElement, parentMetaObjectId) {\n\n const metaObjectType = ifcElement.__proto__.constructor.name;\n\n if (ctx.includeTypes && (!ctx.includeTypes[metaObjectType])) {\n return;\n }\n\n if (ctx.excludeTypes && ctx.excludeTypes[metaObjectType]) {\n return;\n }\n\n createMetaObject(ctx, ifcElement, parentMetaObjectId);\n\n const metaObjectId = ifcElement.GlobalId.value;\n\n parseRelatedItemsOfType(\n ctx,\n ifcElement.expressID,\n 'RelatingObject',\n 'RelatedObjects',\n ctx.WebIFC.IFCRELAGGREGATES,\n metaObjectId);\n\n parseRelatedItemsOfType(\n ctx,\n ifcElement.expressID,\n 'RelatingStructure',\n 'RelatedElements',\n ctx.WebIFC.IFCRELCONTAINEDINSPATIALSTRUCTURE,\n metaObjectId);\n}\n\nfunction createMetaObject(ctx, ifcElement, parentMetaObjectId) {\n\n const metaObjectId = ifcElement.GlobalId.value;\n const propertySetIds = null;\n const metaObjectType = ifcElement.__proto__.constructor.name;\n const metaObjectName = (ifcElement.Name && ifcElement.Name.value !== \"\") ? ifcElement.Name.value : metaObjectType;\n\n ctx.xktModel.createMetaObject({metaObjectId, propertySetIds, metaObjectType, metaObjectName, parentMetaObjectId});\n ctx.stats.numMetaObjects++;\n}\n\nfunction parseRelatedItemsOfType(ctx, id, relation, related, type, parentMetaObjectId) {\n\n const lines = ctx.ifcAPI.GetLineIDsWithType(ctx.modelID, type);\n\n for (let i = 0; i < lines.size(); i++) {\n\n const relID = lines.get(i);\n const rel = ctx.ifcAPI.GetLine(ctx.modelID, relID);\n const relatedItems = rel[relation];\n\n let foundElement = false;\n\n if (Array.isArray(relatedItems)) {\n const values = relatedItems.map((item) => item.value);\n foundElement = values.includes(id);\n\n } else {\n foundElement = (relatedItems.value === id);\n }\n\n if (foundElement) {\n\n const element = rel[related];\n\n if (!Array.isArray(element)) {\n\n const ifcElement = ctx.ifcAPI.GetLine(ctx.modelID, element.value);\n\n parseSpatialChildren(ctx, ifcElement, parentMetaObjectId);\n\n } else {\n\n element.forEach((element2) => {\n\n const ifcElement = ctx.ifcAPI.GetLine(ctx.modelID, element2.value);\n\n parseSpatialChildren(ctx, ifcElement, parentMetaObjectId);\n });\n }\n }\n }\n}\n\nfunction parseGeometry(ctx) {\n\n // Parses the geometry and materials in the IFC, creates\n // XKTEntity, XKTMesh and XKTGeometry components within the XKTModel.\n\n const flatMeshes = ctx.ifcAPI.LoadAllGeometry(ctx.modelID);\n\n for (let i = 0, len = flatMeshes.size(); i < len; i++) {\n const flatMesh = flatMeshes.get(i);\n createObject(ctx, flatMesh);\n }\n\n // LoadAllGeometry does not return IFCSpace meshes\n // here is a workaround\n\n const lines = ctx.ifcAPI.GetLineIDsWithType(ctx.modelID, ctx.WebIFC.IFCSPACE);\n for (let j = 0, len = lines.size(); j < len; j++) {\n const ifcSpaceId = lines.get(j);\n const flatMesh = ctx.ifcAPI.GetFlatMesh(ctx.modelID, ifcSpaceId);\n createObject(ctx, flatMesh);\n }\n}\n\nfunction createObject(ctx, flatMesh) {\n\n const flatMeshExpressID = flatMesh.expressID;\n const placedGeometries = flatMesh.geometries;\n\n const meshIds = [];\n\n const properties = ctx.ifcAPI.GetLine(ctx.modelID, flatMeshExpressID);\n const entityId = properties.GlobalId.value;\n\n const metaObjectId = entityId;\n const metaObject = ctx.xktModel.metaObjects[metaObjectId];\n\n if (ctx.includeTypes && (!metaObject || (!ctx.includeTypes[metaObject.metaObjectType]))) {\n return;\n }\n\n if (ctx.excludeTypes && (!metaObject || ctx.excludeTypes[metaObject.metaObjectType])) {\n console.log(\"excluding: \" + metaObjectId)\n return;\n }\n\n for (let j = 0, lenj = placedGeometries.size(); j < lenj; j++) {\n\n const placedGeometry = placedGeometries.get(j);\n const geometryId = \"\" + placedGeometry.geometryExpressID;\n\n if (!ctx.xktModel.geometries[geometryId]) {\n\n const geometry = ctx.ifcAPI.GetGeometry(ctx.modelID, placedGeometry.geometryExpressID);\n const vertexData = ctx.ifcAPI.GetVertexArray(geometry.GetVertexData(), geometry.GetVertexDataSize());\n const indices = ctx.ifcAPI.GetIndexArray(geometry.GetIndexData(), geometry.GetIndexDataSize());\n\n // De-interleave vertex arrays\n\n const positions = [];\n const normals = [];\n\n for (let k = 0, lenk = vertexData.length / 6; k < lenk; k++) {\n positions.push(vertexData[k * 6 + 0]);\n positions.push(vertexData[k * 6 + 1]);\n positions.push(vertexData[k * 6 + 2]);\n }\n\n if (!ctx.autoNormals) {\n for (let k = 0, lenk = vertexData.length / 6; k < lenk; k++) {\n normals.push(vertexData[k * 6 + 3]);\n normals.push(vertexData[k * 6 + 4]);\n normals.push(vertexData[k * 6 + 5]);\n }\n }\n\n ctx.xktModel.createGeometry({\n geometryId: geometryId,\n primitiveType: \"triangles\",\n positions: positions,\n normals: ctx.autoNormals ? null : normals,\n indices: indices\n });\n\n ctx.stats.numGeometries++;\n ctx.stats.numVertices += (positions.length / 3);\n ctx.stats.numTriangles += (indices.length / 3);\n }\n\n const meshId = (\"mesh\" + ctx.nextId++);\n\n ctx.xktModel.createMesh({\n meshId: meshId,\n geometryId: geometryId,\n matrix: placedGeometry.flatTransformation,\n color: [placedGeometry.color.x, placedGeometry.color.y, placedGeometry.color.z],\n opacity: placedGeometry.color.w\n });\n\n meshIds.push(meshId);\n }\n\n if (meshIds.length > 0) {\n ctx.xktModel.createEntity({\n entityId: entityId,\n meshIds: meshIds\n });\n ctx.stats.numObjects++;\n }\n}\n\nexport {parseIFCIntoXKTModel};\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@loaders.gl/las\");","import {parse} from '@loaders.gl/core';\nimport {LASLoader} from '@loaders.gl/las';\n\nimport {math} from \"../lib/math.js\";\n\nconst MAX_VERTICES = 500000; // TODO: Rough estimate\n\n/**\n * @desc Parses LAS and LAZ point cloud data into an {@link XKTModel}.\n *\n * This parser handles both the LASER file format (LAS) and its compressed version (LAZ),\n * a public format for the interchange of 3-dimensional point cloud data data, developed\n * for LIDAR mapping purposes.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then load an LAZ point cloud model into it.\n *\n * ````javascript\n * utils.loadArraybuffer(\"./models/laz/autzen.laz\", async (data) => {\n *\n * const xktModel = new XKTModel();\n *\n * await parseLASIntoXKTModel({\n * data,\n * xktModel,\n * rotateX: true,\n * log: (msg) => { console.log(msg); }\n * }).then(()=>{\n * xktModel.finalize();\n * },\n * (msg) => {\n * console.error(msg);\n * });\n * });\n * ````\n *\n * @param {Object} params Parsing params.\n * @param {ArrayBuffer} params.data LAS/LAZ file data.\n * @param {XKTModel} params.xktModel XKTModel to parse into.\n * @param {boolean} [params.center=false] Set true to center the LAS point positions to [0,0,0]. This is applied before the transformation matrix, if specified.\n * @param {Boolean} [params.transform] 4x4 transformation matrix to transform point positions. Use this to rotate, translate and scale them if neccessary.\n * @param {Number|String} [params.colorDepth=8] Whether colors encoded using 8 or 16 bits. Can be set to 'auto'. LAS specification recommends 16 bits.\n * @param {Boolean} [params.fp64=false] Configures if LASLoaderPlugin assumes that LAS positions are stored in 64-bit floats instead of 32-bit.\n * @param {Number} [params.skip=1] Read one from every n points.\n * @param {Object} [params.stats] Collects statistics.\n * @param {function} [params.log] Logging callback.\n * @returns {Promise} Resolves when LAS has been parsed.\n */\nfunction parseLASIntoXKTModel({\n data,\n xktModel,\n center = false,\n transform = null,\n colorDepth = \"auto\",\n fp64 = false,\n skip = 1,\n stats,\n log = () => {\n }\n }) {\n\n if (log) {\n log(\"Using parser: parseLASIntoXKTModel\");\n }\n\n return new Promise(function (resolve, reject) {\n\n if (!data) {\n reject(\"Argument expected: data\");\n return;\n }\n\n if (!xktModel) {\n reject(\"Argument expected: xktModel\");\n return;\n }\n\n log(\"Converting LAZ/LAS\");\n\n log(`center: ${center}`);\n if (transform) {\n log(`transform: [${transform}]`);\n }\n log(`colorDepth: ${colorDepth}`);\n log(`fp64: ${fp64}`);\n log(`skip: ${skip}`);\n\n parse(data, LASLoader, {\n las: {\n colorDepth,\n fp64\n }\n }).then((parsedData) => {\n\n const attributes = parsedData.attributes;\n\n const loaderData = parsedData.loaderData;\n const pointsFormatId = loaderData.pointsFormatId !== undefined ? loaderData.pointsFormatId : -1;\n\n if (!attributes.POSITION) {\n log(\"No positions found in file (expected for all LAS point formats)\");\n return;\n }\n\n let readAttributes = {};\n\n switch (pointsFormatId) {\n case 0:\n if (!attributes.intensity) {\n log(\"No intensities found in file (expected for LAS point format 0)\");\n return;\n }\n\n readAttributes = readIntensities(attributes.POSITION, attributes.intensity);\n break;\n case 1:\n if (!attributes.intensity) {\n log(\"No intensities found in file (expected for LAS point format 1)\");\n return;\n }\n readAttributes = readIntensities(attributes.POSITION, attributes.intensity);\n break;\n case 2:\n if (!attributes.intensity) {\n log(\"No intensities found in file (expected for LAS point format 2)\");\n return;\n }\n\n readAttributes = readColorsAndIntensities(attributes.POSITION, attributes.COLOR_0, attributes.intensity);\n break;\n case 3:\n if (!attributes.intensity) {\n log(\"No intensities found in file (expected for LAS point format 3)\");\n return;\n }\n readAttributes = readColorsAndIntensities(attributes.POSITION, attributes.COLOR_0, attributes.intensity);\n break;\n }\n\n const pointsChunks = chunkArray(readPositions(readAttributes.positions), MAX_VERTICES * 3);\n const colorsChunks = chunkArray(readAttributes.colors, MAX_VERTICES * 4);\n\n const meshIds = [];\n\n for (let j = 0, lenj = pointsChunks.length; j < lenj; j++) {\n\n const geometryId = `geometry-${j}`;\n const meshId = `mesh-${j}`;\n\n meshIds.push(meshId);\n\n xktModel.createGeometry({\n geometryId: geometryId,\n primitiveType: \"points\",\n positions: pointsChunks[j],\n colorsCompressed: colorsChunks[j]\n });\n\n xktModel.createMesh({\n meshId,\n geometryId\n });\n }\n\n const entityId = math.createUUID();\n\n xktModel.createEntity({\n entityId,\n meshIds\n });\n\n const rootMetaObjectId = math.createUUID();\n\n xktModel.createMetaObject({\n metaObjectId: rootMetaObjectId,\n metaObjectType: \"Model\",\n metaObjectName: \"Model\"\n });\n\n xktModel.createMetaObject({\n metaObjectId: entityId,\n metaObjectType: \"PointCloud\",\n metaObjectName: \"PointCloud (LAZ)\",\n parentMetaObjectId: rootMetaObjectId\n });\n\n if (stats) {\n stats.sourceFormat = \"LAS\";\n stats.schemaVersion = \"\";\n stats.title = \"\";\n stats.author = \"\";\n stats.created = \"\";\n stats.numMetaObjects = 2;\n stats.numPropertySets = 0;\n stats.numObjects = 1;\n stats.numGeometries = 1;\n stats.numVertices = readAttributes.positions.length / 3;\n }\n\n resolve();\n\n }, (errMsg) => {\n reject(errMsg);\n });\n });\n\n function readPositions(positionsValue) {\n if (positionsValue) {\n if (center) {\n const centerPos = math.vec3();\n const numPoints = positionsValue.length;\n for (let i = 0, len = positionsValue.length; i < len; i += 3) {\n centerPos[0] += positionsValue[i + 0];\n centerPos[1] += positionsValue[i + 1];\n centerPos[2] += positionsValue[i + 2];\n }\n centerPos[0] /= numPoints;\n centerPos[1] /= numPoints;\n centerPos[2] /= numPoints;\n for (let i = 0, len = positionsValue.length; i < len; i += 3) {\n positionsValue[i + 0] -= centerPos[0];\n positionsValue[i + 1] -= centerPos[1];\n positionsValue[i + 2] -= centerPos[2];\n }\n }\n if (transform) {\n const mat = math.mat4(transform);\n const pos = math.vec3();\n for (let i = 0, len = positionsValue.length; i < len; i += 3) {\n pos[0] = positionsValue[i + 0];\n pos[1] = positionsValue[i + 1];\n pos[2] = positionsValue[i + 2];\n math.transformPoint3(mat, pos, pos);\n positionsValue[i + 0] = pos[0];\n positionsValue[i + 1] = pos[1];\n positionsValue[i + 2] = pos[2];\n }\n }\n }\n return positionsValue;\n }\n\n function readColorsAndIntensities(attributesPosition, attributesColor, attributesIntensity) {\n const positionsValue = attributesPosition.value;\n const colors = attributesColor.value;\n const colorSize = attributesColor.size;\n const intensities = attributesIntensity.value;\n const colorsCompressedSize = intensities.length * 4;\n const positions = [];\n const colorsCompressed = new Uint8Array(colorsCompressedSize / skip);\n let count = skip;\n for (let i = 0, j = 0, k = 0, l = 0, m = 0, n=0,len = intensities.length; i < len; i++, k += colorSize, j += 4, l += 3) {\n if (count <= 0) {\n colorsCompressed[m++] = colors[k + 0];\n colorsCompressed[m++] = colors[k + 1];\n colorsCompressed[m++] = colors[k + 2];\n colorsCompressed[m++] = Math.round((intensities[i] / 65536) * 255);\n positions[n++] = positionsValue[l + 0];\n positions[n++] = positionsValue[l + 1];\n positions[n++] = positionsValue[l + 2];\n count = skip;\n } else {\n count--;\n }\n }\n return {\n positions,\n colors: colorsCompressed\n };\n }\n\n function readIntensities(attributesPosition, attributesIntensity) {\n const positionsValue = attributesPosition.value;\n const intensities = attributesIntensity.intensity;\n const colorsCompressedSize = intensities.length * 4;\n const positions = [];\n const colorsCompressed = new Uint8Array(colorsCompressedSize / skip);\n let count = skip;\n for (let i = 0, j = 0, k = 0, l = 0, m = 0, n = 0, len = intensities.length; i < len; i++, k += 3, j += 4, l += 3) {\n if (count <= 0) {\n colorsCompressed[m++] = 0;\n colorsCompressed[m++] = 0;\n colorsCompressed[m++] = 0;\n colorsCompressed[m++] = Math.round((intensities[i] / 65536) * 255);\n positions[n++] = positionsValue[l + 0];\n positions[n++] = positionsValue[l + 1];\n positions[n++] = positionsValue[l + 2];\n count = skip;\n } else {\n count--;\n }\n }\n return {\n positions,\n colors: colorsCompressed\n };\n }\n\n function chunkArray(array, chunkSize) {\n if (chunkSize >= array.length) {\n return [array]; // One chunk\n }\n let result = [];\n for (let i = 0; i < array.length; i += chunkSize) {\n result.push(array.slice(i, i + chunkSize));\n }\n return result;\n }\n\n}\n\nexport {parseLASIntoXKTModel};","/**\n * @desc Parses JSON metamodel into an {@link XKTModel}.\n *\n * @param {Object} params Parsing parameters.\n * @param {JSON} params.metaModelData Metamodel data.\n * @param {String[]} [params.excludeTypes] Types to exclude from parsing.\n * @param {String[]} [params.includeTypes] Types to include in parsing.\n * @param {XKTModel} params.xktModel XKTModel to parse into.\n * @param {function} [params.log] Logging callback.\n @returns {Promise} Resolves when JSON has been parsed.\n */\nfunction parseMetaModelIntoXKTModel({metaModelData, xktModel, includeTypes, excludeTypes, log}) {\n\n if (log) {\n log(\"Using parser: parseMetaModelIntoXKTModel\");\n }\n\n return new Promise(function (resolve, reject) {\n\n const metaObjects = metaModelData.metaObjects || [];\n const propertySets = metaModelData.propertySets || [];\n\n xktModel.modelId = metaModelData.revisionId || \"\"; // HACK\n xktModel.projectId = metaModelData.projectId || \"\";\n xktModel.revisionId = metaModelData.revisionId || \"\";\n xktModel.author = metaModelData.author || \"\";\n xktModel.createdAt = metaModelData.createdAt || \"\";\n xktModel.creatingApplication = metaModelData.creatingApplication || \"\";\n xktModel.schema = metaModelData.schema || \"\";\n\n for (let i = 0, len = propertySets.length; i < len; i++) {\n\n const propertySet = propertySets[i];\n\n xktModel.createPropertySet({\n propertySetId: propertySet.id,\n propertySetName: propertySet.name,\n propertySetType: propertySet.type,\n properties: propertySet.properties\n });\n }\n\n let includeTypesMap;\n if (includeTypes) {\n includeTypesMap = {};\n for (let i = 0, len = includeTypes.length; i < len; i++) {\n includeTypesMap[includeTypes[i]] = true;\n }\n }\n\n let excludeTypesMap;\n if (excludeTypes) {\n excludeTypesMap = {};\n for (let i = 0, len = excludeTypes.length; i < len; i++) {\n excludeTypesMap[excludeTypes[i]] = true;\n }\n }\n\n const metaObjectsMap = {};\n\n for (let i = 0, len = metaObjects.length; i < len; i++) {\n const newObject = metaObjects[i];\n metaObjectsMap[newObject.id] = newObject;\n }\n\n let countMetaObjects = 0;\n\n for (let i = 0, len = metaObjects.length; i < len; i++) {\n\n const metaObject = metaObjects[i];\n const type = metaObject.type;\n\n if (excludeTypesMap && excludeTypesMap[type]) {\n continue;\n }\n\n if (includeTypesMap && !includeTypesMap[type]) {\n continue;\n }\n\n if (metaObject.parent !== undefined && metaObject.parent !== null) {\n const metaObjectParent = metaObjectsMap[metaObject.parent];\n if (metaObject.type === metaObjectParent.type) { // Don't create redundant sub-objects\n continue\n }\n }\n\n const propertySetIds = [];\n if (metaObject.propertySetIds) {\n for (let j = 0, lenj = metaObject.propertySetIds.length; j < lenj; j++) {\n const propertySetId = metaObject.propertySetIds[j];\n if (propertySetId !== undefined && propertySetId !== null && propertySetId !== \"\") {\n propertySetIds.push(propertySetId);\n }\n }\n }\n if (metaObject.propertySetId !== undefined && metaObject.propertySetId !== null && metaObject.propertySetId !== \"\") {\n propertySetIds.push(metaObject.propertySetId);\n }\n\n xktModel.createMetaObject({\n metaObjectId: metaObject.id,\n metaObjectType: metaObject.type,\n metaObjectName: metaObject.name,\n parentMetaObjectId: metaObject.parent,\n propertySetIds: propertySetIds.length > 0 ? propertySetIds : null\n });\n\n countMetaObjects++;\n }\n\n if (log) {\n log(\"Converted meta objects: \" + countMetaObjects);\n }\n\n resolve();\n });\n}\n\nexport {parseMetaModelIntoXKTModel};\n","/**\n * @desc Parses PCD point cloud data into an {@link XKTModel}.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then load an LAZ point cloud model into it.\n *\n * ````javascript\n * utils.loadArraybuffer(\"\"./models/pcd/ism_test_cat.pcd\"\", async (data) => {\n *\n * const xktModel = new XKTModel();\n *\n * await parsePCDIntoXKTModel({\n * data,\n * xktModel,\n * log: (msg) => { console.log(msg); }\n * }).then(()=>{\n * xktModel.finalize();\n * },\n * (msg) => {\n * console.error(msg);\n * });\n * });\n * ````\n *\n * @param {Object} params Parsing params.\n * @param {ArrayBuffer} params.data PCD file data.\n * @param {Boolean} [params.littleEndian=true] Whether PCD binary data is Little-Endian or Big-Endian.\n * @param {XKTModel} params.xktModel XKTModel to parse into.\n * @param {Object} [params.stats] Collects statistics.\n * @param {function} [params.log] Logging callback.\n @returns {Promise} Resolves when PCD has been parsed.\n */\nfunction parsePCDIntoXKTModel({data, xktModel, littleEndian = true, stats, log}) {\n\n if (log) {\n log(\"Using parser: parsePCDIntoXKTModel\");\n }\n\n return new Promise(function(resolve, reject) {\n\n const textData = decodeText(new Uint8Array(data));\n\n const header = parseHeader(textData);\n\n const positions = [];\n const normals = [];\n const colors = [];\n\n if (header.data === 'ascii') {\n\n const offset = header.offset;\n const data = textData.substr(header.headerLen);\n const lines = data.split('\\n');\n\n for (let i = 0, l = lines.length; i < l; i++) {\n\n if (lines[i] === '') {\n continue;\n }\n\n const line = lines[i].split(' ');\n\n if (offset.x !== undefined) {\n positions.push(parseFloat(line[offset.x]));\n positions.push(parseFloat(line[offset.y]));\n positions.push(parseFloat(line[offset.z]));\n }\n\n if (offset.rgb !== undefined) {\n const rgb = parseFloat(line[offset.rgb]);\n const r = (rgb >> 16) & 0x0000ff;\n const g = (rgb >> 8) & 0x0000ff;\n const b = (rgb >> 0) & 0x0000ff;\n colors.push(r, g, b, 255);\n } else {\n colors.push(255);\n colors.push(255);\n colors.push(255);\n }\n }\n }\n\n if (header.data === 'binary_compressed') {\n\n const sizes = new Uint32Array(data.slice(header.headerLen, header.headerLen + 8));\n const compressedSize = sizes[0];\n const decompressedSize = sizes[1];\n const decompressed = decompressLZF(new Uint8Array(data, header.headerLen + 8, compressedSize), decompressedSize);\n const dataview = new DataView(decompressed.buffer);\n const offset = header.offset;\n\n for (let i = 0; i < header.points; i++) {\n\n if (offset.x !== undefined) {\n positions.push(dataview.getFloat32((header.points * offset.x) + header.size[0] * i, littleEndian));\n positions.push(dataview.getFloat32((header.points * offset.y) + header.size[1] * i, littleEndian));\n positions.push(dataview.getFloat32((header.points * offset.z) + header.size[2] * i, littleEndian));\n }\n\n if (offset.rgb !== undefined) {\n colors.push(dataview.getUint8((header.points * offset.rgb) + header.size[3] * i + 0));\n colors.push(dataview.getUint8((header.points * offset.rgb) + header.size[3] * i + 1));\n colors.push(dataview.getUint8((header.points * offset.rgb) + header.size[3] * i + 2));\n // colors.push(255);\n } else {\n colors.push(1);\n colors.push(1);\n colors.push(1);\n }\n }\n }\n\n if (header.data === 'binary') {\n\n const dataview = new DataView(data, header.headerLen);\n const offset = header.offset;\n\n for (let i = 0, row = 0; i < header.points; i++, row += header.rowSize) {\n if (offset.x !== undefined) {\n positions.push(dataview.getFloat32(row + offset.x, littleEndian));\n positions.push(dataview.getFloat32(row + offset.y, littleEndian));\n positions.push(dataview.getFloat32(row + offset.z, littleEndian));\n }\n\n if (offset.rgb !== undefined) {\n colors.push(dataview.getUint8(row + offset.rgb + 2));\n colors.push(dataview.getUint8(row + offset.rgb + 1));\n colors.push(dataview.getUint8(row + offset.rgb + 0));\n } else {\n colors.push(255);\n colors.push(255);\n colors.push(255);\n }\n }\n }\n\n xktModel.createGeometry({\n geometryId: \"pointsGeometry\",\n primitiveType: \"points\",\n positions: positions,\n colors: colors && colors.length > 0 ? colors : null\n });\n\n xktModel.createMesh({\n meshId: \"pointsMesh\",\n geometryId: \"pointsGeometry\"\n });\n\n xktModel.createEntity({\n entityId: \"geometries\",\n meshIds: [\"pointsMesh\"]\n });\n\n if (log) {\n log(\"Converted drawable objects: 1\");\n log(\"Converted geometries: 1\");\n log(\"Converted vertices: \" + positions.length / 3);\n }\n\n if (stats) {\n stats.sourceFormat = \"PCD\";\n stats.schemaVersion = \"\";\n stats.title = \"\";\n stats.author = \"\";\n stats.created = \"\";\n stats.numObjects = 1;\n stats.numGeometries = 1;\n stats.numVertices = positions.length / 3;\n }\n\n resolve();\n });\n}\n\nfunction parseHeader(data) {\n const header = {};\n const result1 = data.search(/[\\r\\n]DATA\\s(\\S*)\\s/i);\n const result2 = /[\\r\\n]DATA\\s(\\S*)\\s/i.exec(data.substr(result1 - 1));\n header.data = result2[1];\n header.headerLen = result2[0].length + result1;\n header.str = data.substr(0, header.headerLen);\n header.str = header.str.replace(/\\#.*/gi, ''); // Strip comments\n header.version = /VERSION (.*)/i.exec(header.str); // Parse\n header.fields = /FIELDS (.*)/i.exec(header.str);\n header.size = /SIZE (.*)/i.exec(header.str);\n header.type = /TYPE (.*)/i.exec(header.str);\n header.count = /COUNT (.*)/i.exec(header.str);\n header.width = /WIDTH (.*)/i.exec(header.str);\n header.height = /HEIGHT (.*)/i.exec(header.str);\n header.viewpoint = /VIEWPOINT (.*)/i.exec(header.str);\n header.points = /POINTS (.*)/i.exec(header.str);\n if (header.version !== null) {\n header.version = parseFloat(header.version[1]);\n }\n if (header.fields !== null) {\n header.fields = header.fields[1].split(' ');\n }\n if (header.type !== null) {\n header.type = header.type[1].split(' ');\n }\n if (header.width !== null) {\n header.width = parseInt(header.width[1]);\n }\n if (header.height !== null) {\n header.height = parseInt(header.height[1]);\n }\n if (header.viewpoint !== null) {\n header.viewpoint = header.viewpoint[1];\n }\n if (header.points !== null) {\n header.points = parseInt(header.points[1], 10);\n }\n if (header.points === null) {\n header.points = header.width * header.height;\n }\n if (header.size !== null) {\n header.size = header.size[1].split(' ').map(function (x) {\n return parseInt(x, 10);\n });\n }\n if (header.count !== null) {\n header.count = header.count[1].split(' ').map(function (x) {\n return parseInt(x, 10);\n });\n } else {\n header.count = [];\n for (let i = 0, l = header.fields.length; i < l; i++) {\n header.count.push(1);\n }\n }\n header.offset = {};\n let sizeSum = 0;\n for (let i = 0, l = header.fields.length; i < l; i++) {\n if (header.data === 'ascii') {\n header.offset[header.fields[i]] = i;\n } else {\n header.offset[header.fields[i]] = sizeSum;\n sizeSum += header.size[i] * header.count[i];\n }\n }\n header.rowSize = sizeSum; // For binary only\n return header;\n}\n\nfunction decodeText(array) {\n if (typeof TextDecoder !== 'undefined') {\n return new TextDecoder().decode(array);\n }\n let s = '';\n for (let i = 0, il = array.length; i < il; i++) {\n s += String.fromCharCode(array[i]);\n }\n try {\n return decodeURIComponent(escape(s));\n } catch (e) {\n return s;\n }\n}\n\nfunction decompressLZF(inData, outLength) { // https://gitlab.com/taketwo/three-pcd-loader/blob/master/decompress-lzf.js\n const inLength = inData.length;\n const outData = new Uint8Array(outLength);\n let inPtr = 0;\n let outPtr = 0;\n let ctrl;\n let len;\n let ref;\n do {\n ctrl = inData[inPtr++];\n if (ctrl < (1 << 5)) {\n ctrl++;\n if (outPtr + ctrl > outLength) throw new Error('Output buffer is not large enough');\n if (inPtr + ctrl > inLength) throw new Error('Invalid compressed data');\n do {\n outData[outPtr++] = inData[inPtr++];\n } while (--ctrl);\n } else {\n len = ctrl >> 5;\n ref = outPtr - ((ctrl & 0x1f) << 8) - 1;\n if (inPtr >= inLength) throw new Error('Invalid compressed data');\n if (len === 7) {\n len += inData[inPtr++];\n if (inPtr >= inLength) throw new Error('Invalid compressed data');\n }\n ref -= inData[inPtr++];\n if (outPtr + len + 2 > outLength) throw new Error('Output buffer is not large enough');\n if (ref < 0) throw new Error('Invalid compressed data');\n if (ref >= outPtr) throw new Error('Invalid compressed data');\n do {\n outData[outPtr++] = outData[ref++];\n } while (--len + 2);\n }\n } while (inPtr < inLength);\n return outData;\n}\n\nexport {parsePCDIntoXKTModel};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@loaders.gl/ply\");","import {parse} from '@loaders.gl/core';\nimport {PLYLoader} from '@loaders.gl/ply';\n\n/**\n * @desc Parses PLY file data into an {@link XKTModel}.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then load a PLY model into it.\n *\n * ````javascript\n * utils.loadArraybuffer(\"./models/ply/test.ply\", async (data) => {\n *\n * const xktModel = new XKTModel();\n *\n * parsePLYIntoXKTModel({data, xktModel}).then(()=>{\n * xktModel.finalize();\n * },\n * (msg) => {\n * console.error(msg);\n * });\n * });\n * ````\n *\n * @param {Object} params Parsing params.\n * @param {ArrayBuffer} params.data PLY file data.\n * @param {XKTModel} params.xktModel XKTModel to parse into.\n * @param {Object} [params.stats] Collects statistics.\n * @param {function} [params.log] Logging callback.\n @returns {Promise} Resolves when PLY has been parsed.\n */\nasync function parsePLYIntoXKTModel({data, xktModel, stats, log}) {\n\n if (log) {\n log(\"Using parser: parsePLYIntoXKTModel\");\n }\n\n if (!data) {\n throw \"Argument expected: data\";\n }\n\n if (!xktModel) {\n throw \"Argument expected: xktModel\";\n }\n\n let parsedData;\n try {\n parsedData = await parse(data, PLYLoader);\n } catch (e) {\n if (log) {\n log(\"Error: \" + e);\n }\n return;\n }\n\n const attributes = parsedData.attributes;\n const hasColors = !!attributes.COLOR_0;\n\n if (hasColors) {\n const colorsValue = hasColors ? attributes.COLOR_0.value : null;\n const colorsCompressed = [];\n for (let i = 0, len = colorsValue.length; i < len; i += 4) {\n colorsCompressed.push(colorsValue[i]);\n colorsCompressed.push(colorsValue[i + 1]);\n colorsCompressed.push(colorsValue[i + 2]);\n }\n xktModel.createGeometry({\n geometryId: \"plyGeometry\",\n primitiveType: \"triangles\",\n positions: attributes.POSITION.value,\n indices: parsedData.indices ? parsedData.indices.value : [],\n colorsCompressed: colorsCompressed\n });\n } else {\n xktModel.createGeometry({\n geometryId: \"plyGeometry\",\n primitiveType: \"triangles\",\n positions: attributes.POSITION.value,\n indices: parsedData.indices ? parsedData.indices.value : []\n });\n }\n\n xktModel.createMesh({\n meshId: \"plyMesh\",\n geometryId: \"plyGeometry\",\n color: (!hasColors) ? [1, 1, 1] : null\n });\n\n xktModel.createEntity({\n entityId: \"ply\",\n meshIds: [\"plyMesh\"]\n });\n\n if (stats) {\n stats.sourceFormat = \"PLY\";\n stats.schemaVersion = \"\";\n stats.title = \"\";\n stats.author = \"\";\n stats.created = \"\";\n stats.numMetaObjects = 2;\n stats.numPropertySets = 0;\n stats.numObjects = 1;\n stats.numGeometries = 1;\n stats.numVertices = attributes.POSITION.value.length / 3;\n }\n}\n\nexport {parsePLYIntoXKTModel};\n","import {faceToVertexNormals} from \"../lib/faceToVertexNormals.js\";\nimport {math} from \"../lib/math.js\";\n\n/**\n * @desc Parses STL file data into an {@link XKTModel}.\n *\n * * Supports binary and ASCII STL formats.\n * * Option to create a separate {@link XKTEntity} for each group of faces that share the same vertex colors.\n * * Option to smooth face-aligned normals loaded from STL.\n * * Option to reduce XKT file size by ignoring STL normals and relying on xeokit to auto-generate them.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then load an STL model into it.\n *\n * ````javascript\n * utils.loadArraybuffer(\"./models/stl/binary/spurGear.stl\", async (data) => {\n *\n * const xktModel = new XKTModel();\n *\n * parseSTLIntoXKTModel({data, xktModel});\n *\n * xktModel.finalize();\n * });\n * ````\n *\n * @param {Object} params Parsing params.\n * @param {ArrayBuffer|String} [params.data] STL file data. Can be binary or string.\n * @param {Boolean} [params.autoNormals=false] When true, the parser will ignore the STL geometry normals, and the STL\n * data will rely on the xeokit ````Viewer```` to automatically generate them. This has the limitation that the\n * normals will be face-aligned, and therefore the ````Viewer```` will only be able to render a flat-shaded representation\n * of the STL.\n * Overrides ````smoothNormals```` when ````true````. This ignores the normals in the STL, and loads no\n * normals from the STL into the {@link XKTModel}, resulting in the XKT file storing no normals for the STL model. The\n * xeokit-sdk will then automatically generate the normals within its shaders. The disadvantages are that auto-normals\n * may slow rendering down a little bit, and that the normals can only be face-aligned (and thus rendered using flat\n * shading). The advantages, however, are a smaller XKT file size, and the ability to apply certain geometry optimizations\n * during parsing, such as removing duplicated STL vertex positions, that are not possible when normals are loaded\n * for the STL vertices.\n * @param {Boolean} [params.smoothNormals=true] When true, automatically converts face-oriented STL normals to vertex normals, for a smooth appearance. Ignored if ````autoNormals```` is ````true````.\n * @param {Number} [params.smoothNormalsAngleThreshold=20] This is the threshold angle between normals of adjacent triangles, below which their shared wireframe edge is not drawn.\n * @param {Boolean} [params.splitMeshes=true] When true, creates a separate {@link XKTEntity} for each group of faces that share the same vertex colors. Only works with binary STL (ie. when ````data```` is an ArrayBuffer).\n * @param {XKTModel} [params.xktModel] XKTModel to parse into.\n * @param {Object} [params.stats] Collects statistics.\n * @param {function} [params.log] Logging callback.\n @returns {Promise} Resolves when STL has been parsed.\n */\nasync function parseSTLIntoXKTModel({\n data,\n splitMeshes,\n autoNormals,\n smoothNormals,\n smoothNormalsAngleThreshold,\n xktModel,\n stats,\n log\n }) {\n\n if (log) {\n log(\"Using parser: parseSTLIntoXKTModel\");\n }\n\n return new Promise(function (resolve, reject) {\n\n if (!data) {\n reject(\"Argument expected: data\");\n return;\n }\n\n if (!xktModel) {\n reject(\"Argument expected: xktModel\");\n return;\n }\n\n const rootMetaObjectId = math.createUUID();\n\n const rootMetaObject = xktModel.createMetaObject({\n metaObjectId: rootMetaObjectId,\n metaObjectType: \"Model\",\n metaObjectName: \"Model\"\n });\n\n const ctx = {\n data,\n splitMeshes,\n autoNormals,\n smoothNormals,\n smoothNormalsAngleThreshold,\n xktModel,\n rootMetaObject,\n nextId: 0,\n log: (log || function (msg) {\n }),\n stats: {\n numObjects: 0,\n numGeometries: 0,\n numTriangles: 0,\n numVertices: 0\n }\n };\n\n const binData = ensureBinary(data);\n\n if (isBinary(binData)) {\n parseBinary(ctx, binData);\n } else {\n parseASCII(ctx, ensureString(data));\n }\n\n if (stats) {\n stats.sourceFormat = \"STL\";\n stats.schemaVersion = \"\";\n stats.title = \"\";\n stats.author = \"\";\n stats.created = \"\";\n stats.numMetaObjects = 2;\n stats.numPropertySets = 0;\n stats.numObjects = 1;\n stats.numGeometries = 1;\n stats.numTriangles = ctx.stats.numTriangles;\n stats.numVertices = ctx.stats.numVertices;\n }\n\n resolve();\n });\n}\n\nfunction isBinary(data) {\n const reader = new DataView(data);\n const numFaces = reader.getUint32(80, true);\n const faceSize = (32 / 8 * 3) + ((32 / 8 * 3) * 3) + (16 / 8);\n const numExpectedBytes = 80 + (32 / 8) + (numFaces * faceSize);\n if (numExpectedBytes === reader.byteLength) {\n return true;\n }\n const solid = [115, 111, 108, 105, 100];\n for (let i = 0; i < 5; i++) {\n if (solid[i] !== reader.getUint8(i, false)) {\n return true;\n }\n }\n return false;\n}\n\nfunction parseBinary(ctx, data) {\n const reader = new DataView(data);\n const faces = reader.getUint32(80, true);\n let r;\n let g;\n let b;\n let hasColors = false;\n let colors;\n let defaultR;\n let defaultG;\n let defaultB;\n let lastR = null;\n let lastG = null;\n let lastB = null;\n let newMesh = false;\n let alpha;\n for (let index = 0; index < 80 - 10; index++) {\n if ((reader.getUint32(index, false) === 0x434F4C4F /*COLO*/) &&\n (reader.getUint8(index + 4) === 0x52 /*'R'*/) &&\n (reader.getUint8(index + 5) === 0x3D /*'='*/)) {\n hasColors = true;\n colors = [];\n defaultR = reader.getUint8(index + 6) / 255;\n defaultG = reader.getUint8(index + 7) / 255;\n defaultB = reader.getUint8(index + 8) / 255;\n alpha = reader.getUint8(index + 9) / 255;\n }\n }\n let dataOffset = 84;\n let faceLength = 12 * 4 + 2;\n let positions = [];\n let normals = [];\n let splitMeshes = ctx.splitMeshes;\n for (let face = 0; face < faces; face++) {\n let start = dataOffset + face * faceLength;\n let normalX = reader.getFloat32(start, true);\n let normalY = reader.getFloat32(start + 4, true);\n let normalZ = reader.getFloat32(start + 8, true);\n if (hasColors) {\n let packedColor = reader.getUint16(start + 48, true);\n if ((packedColor & 0x8000) === 0) {\n r = (packedColor & 0x1F) / 31;\n g = ((packedColor >> 5) & 0x1F) / 31;\n b = ((packedColor >> 10) & 0x1F) / 31;\n } else {\n r = defaultR;\n g = defaultG;\n b = defaultB;\n }\n if (splitMeshes && r !== lastR || g !== lastG || b !== lastB) {\n if (lastR !== null) {\n newMesh = true;\n }\n lastR = r;\n lastG = g;\n lastB = b;\n }\n }\n for (let i = 1; i <= 3; i++) {\n let vertexstart = start + i * 12;\n positions.push(reader.getFloat32(vertexstart, true));\n positions.push(reader.getFloat32(vertexstart + 4, true));\n positions.push(reader.getFloat32(vertexstart + 8, true));\n if (!ctx.autoNormals) {\n normals.push(normalX, normalY, normalZ);\n }\n if (hasColors) {\n colors.push(r, g, b, 1); // TODO: handle alpha\n }\n }\n if (splitMeshes && newMesh) {\n addMesh(ctx, positions, normals, colors);\n positions = [];\n normals = [];\n colors = colors ? [] : null;\n newMesh = false;\n }\n }\n if (positions.length > 0) {\n addMesh(ctx, positions, normals, colors);\n }\n}\n\nfunction parseASCII(ctx, data) {\n const faceRegex = /facet([\\s\\S]*?)endfacet/g;\n let faceCounter = 0;\n const floatRegex = /[\\s]+([+-]?(?:\\d+.\\d+|\\d+.|\\d+|.\\d+)(?:[eE][+-]?\\d+)?)/.source;\n const vertexRegex = new RegExp('vertex' + floatRegex + floatRegex + floatRegex, 'g');\n const normalRegex = new RegExp('normal' + floatRegex + floatRegex + floatRegex, 'g');\n const positions = [];\n const normals = [];\n const colors = null;\n let normalx;\n let normaly;\n let normalz;\n let result;\n let verticesPerFace;\n let normalsPerFace;\n let text;\n while ((result = faceRegex.exec(data)) !== null) {\n verticesPerFace = 0;\n normalsPerFace = 0;\n text = result[0];\n while ((result = normalRegex.exec(text)) !== null) {\n normalx = parseFloat(result[1]);\n normaly = parseFloat(result[2]);\n normalz = parseFloat(result[3]);\n normalsPerFace++;\n }\n while ((result = vertexRegex.exec(text)) !== null) {\n positions.push(parseFloat(result[1]), parseFloat(result[2]), parseFloat(result[3]));\n normals.push(normalx, normaly, normalz);\n verticesPerFace++;\n }\n if (normalsPerFace !== 1) {\n ctx.log(\"Error in normal of face \" + faceCounter);\n return -1;\n }\n if (verticesPerFace !== 3) {\n ctx.log(\"Error in positions of face \" + faceCounter);\n return -1;\n }\n faceCounter++;\n }\n addMesh(ctx, positions, normals, colors);\n}\n\nlet nextGeometryId = 0;\n\nfunction addMesh(ctx, positions, normals, colors) {\n\n const indices = new Int32Array(positions.length / 3);\n for (let ni = 0, len = indices.length; ni < len; ni++) {\n indices[ni] = ni;\n }\n\n normals = normals && normals.length > 0 ? normals : null;\n colors = colors && colors.length > 0 ? colors : null;\n\n if (!ctx.autoNormals && ctx.smoothNormals) {\n faceToVertexNormals(positions, normals, {smoothNormalsAngleThreshold: ctx.smoothNormalsAngleThreshold});\n }\n\n const geometryId = \"\" + nextGeometryId++;\n const meshId = \"\" + nextGeometryId++;\n const entityId = \"\" + nextGeometryId++;\n\n ctx.xktModel.createGeometry({\n geometryId: geometryId,\n primitiveType: \"triangles\",\n positions: positions,\n normals: (!ctx.autoNormals) ? normals : null,\n colors: colors,\n indices: indices\n });\n\n ctx.xktModel.createMesh({\n meshId: meshId,\n geometryId: geometryId,\n color: colors ? null : [1, 1, 1],\n metallic: 0.9,\n roughness: 0.1\n });\n\n ctx.xktModel.createEntity({\n entityId: entityId,\n meshIds: [meshId]\n });\n\n ctx.xktModel.createMetaObject({\n metaObjectId: entityId,\n metaObjectType: \"Default\",\n metaObjectName: \"STL Mesh\",\n parentMetaObjectId: ctx.rootMetaObject.metaObjectId\n });\n\n ctx.stats.numGeometries++;\n ctx.stats.numObjects++;\n ctx.stats.numVertices += positions.length / 3;\n ctx.stats.numTriangles += indices.length / 3;\n}\n\nfunction ensureString(buffer) {\n if (typeof buffer !== 'string') {\n return decodeText(new Uint8Array(buffer));\n }\n return buffer;\n}\n\nfunction ensureBinary(buffer) {\n if (typeof buffer === 'string') {\n const arrayBuffer = new Uint8Array(buffer.length);\n for (let i = 0; i < buffer.length; i++) {\n arrayBuffer[i] = buffer.charCodeAt(i) & 0xff; // implicitly assumes little-endian\n }\n return arrayBuffer.buffer || arrayBuffer;\n } else {\n return buffer;\n }\n}\n\nfunction decodeText(array) {\n if (typeof TextDecoder !== 'undefined') {\n return new TextDecoder().decode(array);\n }\n let s = '';\n for (let i = 0, il = array.length; i < il; i++) {\n s += String.fromCharCode(array[i]); // Implicitly assumes little-endian.\n }\n return decodeURIComponent(escape(s));\n}\n\nexport {parseSTLIntoXKTModel};\n","import {math} from \"./math.js\";\n\n/**\n * Converts surface-perpendicular face normals to vertex normals. Assumes that the mesh contains disjoint triangles\n * that don't share vertex array elements. Works by finding groups of vertices that have the same location and\n * averaging their normal vectors.\n *\n * @returns {{positions: Array, normals: *}}\n * @private\n */\nfunction faceToVertexNormals(positions, normals, options = {}) {\n const smoothNormalsAngleThreshold = options.smoothNormalsAngleThreshold || 20;\n const vertexMap = {};\n const vertexNormals = [];\n const vertexNormalAccum = {};\n let acc;\n let vx;\n let vy;\n let vz;\n let key;\n const precisionPoints = 4; // number of decimal points, e.g. 4 for epsilon of 0.0001\n const precision = 10 ** precisionPoints;\n let posi;\n let i;\n let j;\n let len;\n let a;\n let b;\n let c;\n\n for (i = 0, len = positions.length; i < len; i += 3) {\n\n posi = i / 3;\n\n vx = positions[i];\n vy = positions[i + 1];\n vz = positions[i + 2];\n\n key = `${Math.round(vx * precision)}_${Math.round(vy * precision)}_${Math.round(vz * precision)}`;\n\n if (vertexMap[key] === undefined) {\n vertexMap[key] = [posi];\n } else {\n vertexMap[key].push(posi);\n }\n\n const normal = math.normalizeVec3([normals[i], normals[i + 1], normals[i + 2]]);\n\n vertexNormals[posi] = normal;\n\n acc = math.vec4([normal[0], normal[1], normal[2], 1]);\n\n vertexNormalAccum[posi] = acc;\n }\n\n for (key in vertexMap) {\n\n if (vertexMap.hasOwnProperty(key)) {\n\n const vertices = vertexMap[key];\n const numVerts = vertices.length;\n\n for (i = 0; i < numVerts; i++) {\n\n const ii = vertices[i];\n\n acc = vertexNormalAccum[ii];\n\n for (j = 0; j < numVerts; j++) {\n\n if (i === j) {\n continue;\n }\n\n const jj = vertices[j];\n\n a = vertexNormals[ii];\n b = vertexNormals[jj];\n\n const angle = Math.abs(math.angleVec3(a, b) / math.DEGTORAD);\n\n if (angle < smoothNormalsAngleThreshold) {\n\n acc[0] += b[0];\n acc[1] += b[1];\n acc[2] += b[2];\n acc[3] += 1.0;\n }\n }\n }\n }\n }\n\n for (i = 0, len = normals.length; i < len; i += 3) {\n\n acc = vertexNormalAccum[i / 3];\n\n normals[i + 0] = acc[0] / acc[3];\n normals[i + 1] = acc[1] / acc[3];\n normals[i + 2] = acc[2] / acc[3];\n\n }\n}\n\nexport {faceToVertexNormals};","/**\n * @desc Creates box-shaped triangle mesh geometry arrays.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then create an {@link XKTMesh} with a box-shaped {@link XKTGeometry}.\n *\n * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#geometry_builders_buildBoxGeometry)]\n *\n * ````javascript\n * const xktModel = new XKTModel();\n *\n * const box = buildBoxGeometry({\n * primitiveType: \"triangles\" // or \"lines\"\n * center: [0,0,0],\n * xSize: 1, // Half-size on each axis\n * ySize: 1,\n * zSize: 1\n * });\n *\n * const xktGeometry = xktModel.createGeometry({\n * geometryId: \"boxGeometry\",\n * primitiveType: box.primitiveType,\n * positions: box.positions,\n * normals: box.normals,\n * indices: box.indices\n * });\n *\n * const xktMesh = xktModel.createMesh({\n * meshId: \"redBoxMesh\",\n * geometryId: \"boxGeometry\",\n * position: [-4, -6, -4],\n * scale: [1, 3, 1],\n * rotation: [0, 0, 0],\n * color: [1, 0, 0],\n * opacity: 1\n * });\n *\n * const xktEntity = xktModel.createEntity({\n * entityId: \"redBox\",\n * meshIds: [\"redBoxMesh\"]\n * });\n *\n * xktModel.finalize();\n * ````\n *\n * @function buildBoxGeometry\n * @param {*} [cfg] Configs\n * @param {Number[]} [cfg.center] 3D point indicating the center position.\n * @param {Number} [cfg.xSize=1.0] Half-size on the X-axis.\n * @param {Number} [cfg.ySize=1.0] Half-size on the Y-axis.\n * @param {Number} [cfg.zSize=1.0] Half-size on the Z-axis.\n * @returns {Object} Geometry arrays for {@link XKTModel#createGeometry} or {@link XKTModel#createMesh}.\n */\nfunction buildBoxGeometry(cfg = {}) {\n\n let xSize = cfg.xSize || 1;\n if (xSize < 0) {\n console.error(\"negative xSize not allowed - will invert\");\n xSize *= -1;\n }\n\n let ySize = cfg.ySize || 1;\n if (ySize < 0) {\n console.error(\"negative ySize not allowed - will invert\");\n ySize *= -1;\n }\n\n let zSize = cfg.zSize || 1;\n if (zSize < 0) {\n console.error(\"negative zSize not allowed - will invert\");\n zSize *= -1;\n }\n\n const center = cfg.center;\n const centerX = center ? center[0] : 0;\n const centerY = center ? center[1] : 0;\n const centerZ = center ? center[2] : 0;\n\n const xmin = -xSize + centerX;\n const ymin = -ySize + centerY;\n const zmin = -zSize + centerZ;\n const xmax = xSize + centerX;\n const ymax = ySize + centerY;\n const zmax = zSize + centerZ;\n\n return {\n\n primitiveType: \"triangles\",\n\n // The vertices - eight for our cube, each\n // one spanning three array elements for X,Y and Z\n\n positions: [\n\n // v0-v1-v2-v3 front\n xmax, ymax, zmax,\n xmin, ymax, zmax,\n xmin, ymin, zmax,\n xmax, ymin, zmax,\n\n // v0-v3-v4-v1 right\n xmax, ymax, zmax,\n xmax, ymin, zmax,\n xmax, ymin, zmin,\n xmax, ymax, zmin,\n\n // v0-v1-v6-v1 top\n xmax, ymax, zmax,\n xmax, ymax, zmin,\n xmin, ymax, zmin,\n xmin, ymax, zmax,\n\n // v1-v6-v7-v2 left\n xmin, ymax, zmax,\n xmin, ymax, zmin,\n xmin, ymin, zmin,\n xmin, ymin, zmax,\n\n // v7-v4-v3-v2 bottom\n xmin, ymin, zmin,\n xmax, ymin, zmin,\n xmax, ymin, zmax,\n xmin, ymin, zmax,\n\n // v4-v7-v6-v1 back\n xmax, ymin, zmin,\n xmin, ymin, zmin,\n xmin, ymax, zmin,\n xmax, ymax, zmin\n ],\n\n // Normal vectors, one for each vertex\n normals: [\n\n // v0-v1-v2-v3 front\n 0, 0, 1,\n 0, 0, 1,\n 0, 0, 1,\n 0, 0, 1,\n\n // v0-v3-v4-v5 right\n 1, 0, 0,\n 1, 0, 0,\n 1, 0, 0,\n 1, 0, 0,\n\n // v0-v5-v6-v1 top\n 0, 1, 0,\n 0, 1, 0,\n 0, 1, 0,\n 0, 1, 0,\n\n // v1-v6-v7-v2 left\n -1, 0, 0,\n -1, 0, 0,\n -1, 0, 0,\n -1, 0, 0,\n\n // v7-v4-v3-v2 bottom\n 0, -1, 0,\n 0, -1, 0,\n 0, -1, 0,\n 0, -1, 0,\n\n // v4-v7-v6-v5 back\n 0, 0, -1,\n 0, 0, -1,\n 0, 0, -1,\n 0, 0, -1\n ],\n\n // UV coords\n uv: [\n\n // v0-v1-v2-v3 front\n 1, 0,\n 0, 0,\n 0, 1,\n 1, 1,\n\n // v0-v3-v4-v1 right\n 0, 0,\n 0, 1,\n 1, 1,\n 1, 0,\n\n // v0-v1-v6-v1 top\n 1, 1,\n 1, 0,\n 0, 0,\n 0, 1,\n\n // v1-v6-v7-v2 left\n 1, 0,\n 0, 0,\n 0, 1,\n 1, 1,\n\n // v7-v4-v3-v2 bottom\n 0, 1,\n 1, 1,\n 1, 0,\n 0, 0,\n\n // v4-v7-v6-v1 back\n 0, 1,\n 1, 1,\n 1, 0,\n 0, 0\n ],\n\n // Indices - these organise the\n // positions and uv texture coordinates\n // into geometric primitives in accordance\n // with the \"primitive\" parameter,\n // in this case a set of three indices\n // for each triangle.\n //\n // Note that each triangle is specified\n // in counter-clockwise winding order.\n //\n // You can specify them in clockwise\n // order if you configure the Modes\n // node's frontFace flag as \"cw\", instead of\n // the default \"ccw\".\n indices: [\n 0, 1, 2,\n 0, 2, 3,\n // front\n 4, 5, 6,\n 4, 6, 7,\n // right\n 8, 9, 10,\n 8, 10, 11,\n // top\n 12, 13, 14,\n 12, 14, 15,\n // left\n 16, 17, 18,\n 16, 18, 19,\n // bottom\n 20, 21, 22,\n 20, 22, 23\n ]\n };\n}\n\nexport {buildBoxGeometry};\n","/**\n * @desc Creates box-shaped line segment geometry arrays.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then create an {@link XKTMesh} with a box-shaped {@link XKTGeometry}.\n *\n * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#geometry_builders_buildBoxLinesGeometry)]\n *\n * ````javascript\n * const xktModel = new XKTModel();\n *\n * const box = buildBoxLinesGeometry({\n * center: [0,0,0],\n * xSize: 1, // Half-size on each axis\n * ySize: 1,\n * zSize: 1\n * });\n *\n * const xktGeometry = xktModel.createGeometry({\n * geometryId: \"boxGeometry\",\n * primitiveType: box.primitiveType, // \"lines\"\n * positions: box.positions,\n * normals: box.normals,\n * indices: box.indices\n * });\n *\n * const xktMesh = xktModel.createMesh({\n * meshId: \"redBoxMesh\",\n * geometryId: \"boxGeometry\",\n * position: [-4, -6, -4],\n * scale: [1, 3, 1],\n * rotation: [0, 0, 0],\n * color: [1, 0, 0],\n * opacity: 1\n * });\n *\n * const xktEntity = xktModel.createEntity({\n * entityId: \"redBox\",\n * meshIds: [\"redBoxMesh\"]\n * });\n *\n * xktModel.finalize();\n * ````\n *\n * @function buildBoxLinesGeometry\n * @param {*} [cfg] Configs\n * @param {Number[]} [cfg.center] 3D point indicating the center position.\n * @param {Number} [cfg.xSize=1.0] Half-size on the X-axis.\n * @param {Number} [cfg.ySize=1.0] Half-size on the Y-axis.\n * @param {Number} [cfg.zSize=1.0] Half-size on the Z-axis.\n * @returns {Object} Geometry arrays for {@link XKTModel#createGeometry} or {@link XKTModel#createMesh}.\n */\nfunction buildBoxLinesGeometry(cfg = {}) {\n\n let xSize = cfg.xSize || 1;\n if (xSize < 0) {\n console.error(\"negative xSize not allowed - will invert\");\n xSize *= -1;\n }\n\n let ySize = cfg.ySize || 1;\n if (ySize < 0) {\n console.error(\"negative ySize not allowed - will invert\");\n ySize *= -1;\n }\n\n let zSize = cfg.zSize || 1;\n if (zSize < 0) {\n console.error(\"negative zSize not allowed - will invert\");\n zSize *= -1;\n }\n\n const center = cfg.center;\n const centerX = center ? center[0] : 0;\n const centerY = center ? center[1] : 0;\n const centerZ = center ? center[2] : 0;\n\n const xmin = -xSize + centerX;\n const ymin = -ySize + centerY;\n const zmin = -zSize + centerZ;\n const xmax = xSize + centerX;\n const ymax = ySize + centerY;\n const zmax = zSize + centerZ;\n\n return {\n primitiveType: \"lines\",\n positions: [\n xmin, ymin, zmin,\n xmin, ymin, zmax,\n xmin, ymax, zmin,\n xmin, ymax, zmax,\n xmax, ymin, zmin,\n xmax, ymin, zmax,\n xmax, ymax, zmin,\n xmax, ymax, zmax\n ],\n indices: [\n 0, 1,\n 1, 3,\n 3, 2,\n 2, 0,\n 4, 5,\n 5, 7,\n 7, 6,\n 6, 4,\n 0, 4,\n 1, 5,\n 2, 6,\n 3, 7\n ]\n }\n}\n\nexport {buildBoxLinesGeometry};\n","/**\n * @desc Creates cylinder-shaped geometry arrays.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then create an {@link XKTMesh} with a cylinder-shaped {@link XKTGeometry}.\n *\n * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#geometry_builders_buildCylinderGeometry)]\n *\n * ````javascript\n * const xktModel = new XKTModel();\n *\n * const cylinder = buildCylinderGeometry({\n * center: [0,0,0],\n * radiusTop: 2.0,\n * radiusBottom: 2.0,\n * height: 5.0,\n * radialSegments: 20,\n * heightSegments: 1,\n * openEnded: false\n * });\n *\n * const xktGeometry = xktModel.createGeometry({\n * geometryId: \"cylinderGeometry\",\n * primitiveType: cylinder.primitiveType,\n * positions: cylinder.positions,\n * normals: cylinder.normals,\n * indices: cylinder.indices\n * });\n *\n * const xktMesh = xktModel.createMesh({\n * meshId: \"redCylinderMesh\",\n * geometryId: \"cylinderGeometry\",\n * position: [-4, -6, -4],\n * scale: [1, 3, 1],\n * rotation: [0, 0, 0],\n * color: [1, 0, 0],\n * opacity: 1\n * });\n *\n * const xktEntity = xktModel.createEntity({\n * entityId: \"redCylinder\",\n * meshIds: [\"redCylinderMesh\"]\n * });\n *\n * xktModel.finalize();\n * ````\n *\n * @function buildCylinderGeometry\n * @param {*} [cfg] Configs\n * @param {Number[]} [cfg.center] 3D point indicating the center position.\n * @param {Number} [cfg.radiusTop=1] Radius of top.\n * @param {Number} [cfg.radiusBottom=1] Radius of bottom.\n * @param {Number} [cfg.height=1] Height.\n * @param {Number} [cfg.radialSegments=60] Number of horizontal segments.\n * @param {Number} [cfg.heightSegments=1] Number of vertical segments.\n * @param {Boolean} [cfg.openEnded=false] Whether or not the cylinder has solid caps on the ends.\n * @returns {Object} Geometry arrays for {@link XKTModel#createGeometry} or {@link XKTModel#createMesh}.\n */\nfunction buildCylinderGeometry(cfg = {}) {\n\n let radiusTop = cfg.radiusTop || 1;\n if (radiusTop < 0) {\n console.error(\"negative radiusTop not allowed - will invert\");\n radiusTop *= -1;\n }\n\n let radiusBottom = cfg.radiusBottom || 1;\n if (radiusBottom < 0) {\n console.error(\"negative radiusBottom not allowed - will invert\");\n radiusBottom *= -1;\n }\n\n let height = cfg.height || 1;\n if (height < 0) {\n console.error(\"negative height not allowed - will invert\");\n height *= -1;\n }\n\n let radialSegments = cfg.radialSegments || 32;\n if (radialSegments < 0) {\n console.error(\"negative radialSegments not allowed - will invert\");\n radialSegments *= -1;\n }\n if (radialSegments < 3) {\n radialSegments = 3;\n }\n\n let heightSegments = cfg.heightSegments || 1;\n if (heightSegments < 0) {\n console.error(\"negative heightSegments not allowed - will invert\");\n heightSegments *= -1;\n }\n if (heightSegments < 1) {\n heightSegments = 1;\n }\n\n const openEnded = !!cfg.openEnded;\n\n let center = cfg.center;\n const centerX = center ? center[0] : 0;\n const centerY = center ? center[1] : 0;\n const centerZ = center ? center[2] : 0;\n\n const heightHalf = height / 2;\n const heightLength = height / heightSegments;\n const radialAngle = (2.0 * Math.PI / radialSegments);\n const radialLength = 1.0 / radialSegments;\n //var nextRadius = this._radiusBottom;\n const radiusChange = (radiusTop - radiusBottom) / heightSegments;\n\n const positions = [];\n const normals = [];\n const uvs = [];\n const indices = [];\n\n let h;\n let i;\n\n let x;\n let z;\n\n let currentRadius;\n let currentHeight;\n\n let first;\n let second;\n\n let startIndex;\n let tu;\n let tv;\n\n // create vertices\n const normalY = (90.0 - (Math.atan(height / (radiusBottom - radiusTop))) * 180 / Math.PI) / 90.0;\n\n for (h = 0; h <= heightSegments; h++) {\n currentRadius = radiusTop - h * radiusChange;\n currentHeight = heightHalf - h * heightLength;\n\n for (i = 0; i <= radialSegments; i++) {\n x = Math.sin(i * radialAngle);\n z = Math.cos(i * radialAngle);\n\n normals.push(currentRadius * x);\n normals.push(normalY); //todo\n normals.push(currentRadius * z);\n\n uvs.push((i * radialLength));\n uvs.push(h * 1 / heightSegments);\n\n positions.push((currentRadius * x) + centerX);\n positions.push((currentHeight) + centerY);\n positions.push((currentRadius * z) + centerZ);\n }\n }\n\n // create faces\n for (h = 0; h < heightSegments; h++) {\n for (i = 0; i <= radialSegments; i++) {\n\n first = h * (radialSegments + 1) + i;\n second = first + radialSegments;\n\n indices.push(first);\n indices.push(second);\n indices.push(second + 1);\n\n indices.push(first);\n indices.push(second + 1);\n indices.push(first + 1);\n }\n }\n\n // create top cap\n if (!openEnded && radiusTop > 0) {\n startIndex = (positions.length / 3);\n\n // top center\n normals.push(0.0);\n normals.push(1.0);\n normals.push(0.0);\n\n uvs.push(0.5);\n uvs.push(0.5);\n\n positions.push(0 + centerX);\n positions.push(heightHalf + centerY);\n positions.push(0 + centerZ);\n\n // top triangle fan\n for (i = 0; i <= radialSegments; i++) {\n x = Math.sin(i * radialAngle);\n z = Math.cos(i * radialAngle);\n tu = (0.5 * Math.sin(i * radialAngle)) + 0.5;\n tv = (0.5 * Math.cos(i * radialAngle)) + 0.5;\n\n normals.push(radiusTop * x);\n normals.push(1.0);\n normals.push(radiusTop * z);\n\n uvs.push(tu);\n uvs.push(tv);\n\n positions.push((radiusTop * x) + centerX);\n positions.push((heightHalf) + centerY);\n positions.push((radiusTop * z) + centerZ);\n }\n\n for (i = 0; i < radialSegments; i++) {\n center = startIndex;\n first = startIndex + 1 + i;\n\n indices.push(first);\n indices.push(first + 1);\n indices.push(center);\n }\n }\n\n // create bottom cap\n if (!openEnded && radiusBottom > 0) {\n\n startIndex = (positions.length / 3);\n\n // top center\n normals.push(0.0);\n normals.push(-1.0);\n normals.push(0.0);\n\n uvs.push(0.5);\n uvs.push(0.5);\n\n positions.push(0 + centerX);\n positions.push(0 - heightHalf + centerY);\n positions.push(0 + centerZ);\n\n // top triangle fan\n for (i = 0; i <= radialSegments; i++) {\n\n x = Math.sin(i * radialAngle);\n z = Math.cos(i * radialAngle);\n\n tu = (0.5 * Math.sin(i * radialAngle)) + 0.5;\n tv = (0.5 * Math.cos(i * radialAngle)) + 0.5;\n\n normals.push(radiusBottom * x);\n normals.push(-1.0);\n normals.push(radiusBottom * z);\n\n uvs.push(tu);\n uvs.push(tv);\n\n positions.push((radiusBottom * x) + centerX);\n positions.push((0 - heightHalf) + centerY);\n positions.push((radiusBottom * z) + centerZ);\n }\n\n for (i = 0; i < radialSegments; i++) {\n\n center = startIndex;\n first = startIndex + 1 + i;\n\n indices.push(center);\n indices.push(first + 1);\n indices.push(first);\n }\n }\n\n return {\n primitiveType: \"triangles\",\n positions: positions,\n normals: normals,\n uv: uvs,\n uvs: uvs,\n indices: indices\n };\n}\n\n\nexport {buildCylinderGeometry};\n","/**\n * @desc Creates grid-shaped geometry arrays..\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then create an {@link XKTMesh} with a grid-shaped {@link XKTGeometry}.\n *\n * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#geometry_builders_buildGridGeometry)]\n *\n * ````javascript\n * const xktModel = new XKTModel();\n *\n * const grid = buildGridGeometry({\n * size: 1000,\n * divisions: 500\n * });\n *\n * const xktGeometry = xktModel.createGeometry({\n * geometryId: \"gridGeometry\",\n * primitiveType: grid.primitiveType, // Will be \"lines\"\n * positions: grid.positions,\n * indices: grid.indices\n * });\n *\n * const xktMesh = xktModel.createMesh({\n * meshId: \"redGridMesh\",\n * geometryId: \"gridGeometry\",\n * position: [-4, -6, -4],\n * scale: [1, 3, 1],\n * rotation: [0, 0, 0],\n * color: [1, 0, 0],\n * opacity: 1\n * });\n *\n * const xktEntity = xktModel.createEntity({\n * entityId: \"redGrid\",\n * meshIds: [\"redGridMesh\"]\n * });\n *\n * xktModel.finalize();\n * ````\n *\n * @function buildGridGeometry\n * @param {*} [cfg] Configs\n * @param {Number} [cfg.size=1] Dimension on the X and Z-axis.\n * @param {Number} [cfg.divisions=1] Number of divisions on X and Z axis..\n * @returns {Object} Geometry arrays for {@link XKTModel#createGeometry} or {@link XKTModel#createMesh}.\n */\nfunction buildGridGeometry(cfg = {}) {\n\n let size = cfg.size || 1;\n if (size < 0) {\n console.error(\"negative size not allowed - will invert\");\n size *= -1;\n }\n\n let divisions = cfg.divisions || 1;\n if (divisions < 0) {\n console.error(\"negative divisions not allowed - will invert\");\n divisions *= -1;\n }\n if (divisions < 1) {\n divisions = 1;\n }\n\n size = size || 10;\n divisions = divisions || 10;\n\n const step = size / divisions;\n const halfSize = size / 2;\n\n const positions = [];\n const indices = [];\n let l = 0;\n\n for (let i = 0, j = 0, k = -halfSize; i <= divisions; i++, k += step) {\n\n positions.push(-halfSize);\n positions.push(0);\n positions.push(k);\n\n positions.push(halfSize);\n positions.push(0);\n positions.push(k);\n\n positions.push(k);\n positions.push(0);\n positions.push(-halfSize);\n\n positions.push(k);\n positions.push(0);\n positions.push(halfSize);\n\n indices.push(l++);\n indices.push(l++);\n indices.push(l++);\n indices.push(l++);\n }\n\n return {\n primitiveType: \"lines\",\n positions: positions,\n indices: indices\n };\n}\n\n\nexport {buildGridGeometry};\n","/**\n * @desc Creates plane-shaped geometry arrays.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then create an {@link XKTMesh} with a plane-shaped {@link XKTGeometry}.\n *\n * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#geometry_builders_buildPlaneGeometry)]\n *\n * ````javascript\n * const xktModel = new XKTModel();\n *\n * const plane = buildPlaneGeometry({\n * center: [0,0,0],\n * xSize: 2,\n * zSize: 2,\n * xSegments: 10,\n * zSegments: 10\n * });\n *\n * const xktGeometry = xktModel.createGeometry({\n * geometryId: \"planeGeometry\",\n * primitiveType: plane.primitiveType, // Will be \"triangles\"\n * positions: plane.positions,\n * normals: plane.normals,\n * indices: plane.indices\n * });\n *\n * const xktMesh = xktModel.createMesh({\n * meshId: \"redPlaneMesh\",\n * geometryId: \"planeGeometry\",\n * position: [-4, -6, -4],\n * scale: [1, 3, 1],\n * rotation: [0, 0, 0],\n * color: [1, 0, 0],\n * opacity: 1\n * });\n *\n * const xktEntity = xktModel.createEntity({\n * entityId: \"redPlane\",\n * meshIds: [\"redPlaneMesh\"]\n * });\n *\n * xktModel.finalize();\n * ````\n *\n * @function buildPlaneGeometry\n * @param {*} [cfg] Configs\n * @param {Number[]} [cfg.center] 3D point indicating the center position.\n * @param {Number} [cfg.xSize=1] Dimension on the X-axis.\n * @param {Number} [cfg.zSize=1] Dimension on the Z-axis.\n * @param {Number} [cfg.xSegments=1] Number of segments on the X-axis.\n * @param {Number} [cfg.zSegments=1] Number of segments on the Z-axis.\n * @returns {Object} Geometry arrays for {@link XKTModel#createGeometry} or {@link XKTModel#createMesh}.\n */\nfunction buildPlaneGeometry(cfg = {}) {\n\n let xSize = cfg.xSize || 1;\n if (xSize < 0) {\n console.error(\"negative xSize not allowed - will invert\");\n xSize *= -1;\n }\n\n let zSize = cfg.zSize || 1;\n if (zSize < 0) {\n console.error(\"negative zSize not allowed - will invert\");\n zSize *= -1;\n }\n\n let xSegments = cfg.xSegments || 1;\n if (xSegments < 0) {\n console.error(\"negative xSegments not allowed - will invert\");\n xSegments *= -1;\n }\n if (xSegments < 1) {\n xSegments = 1;\n }\n\n let zSegments = cfg.xSegments || 1;\n if (zSegments < 0) {\n console.error(\"negative zSegments not allowed - will invert\");\n zSegments *= -1;\n }\n if (zSegments < 1) {\n zSegments = 1;\n }\n\n const center = cfg.center;\n const centerX = center ? center[0] : 0;\n const centerY = center ? center[1] : 0;\n const centerZ = center ? center[2] : 0;\n\n const halfWidth = xSize / 2;\n const halfHeight = zSize / 2;\n\n const planeX = Math.floor(xSegments) || 1;\n const planeZ = Math.floor(zSegments) || 1;\n\n const planeX1 = planeX + 1;\n const planeZ1 = planeZ + 1;\n\n const segmentWidth = xSize / planeX;\n const segmentHeight = zSize / planeZ;\n\n const positions = new Float32Array(planeX1 * planeZ1 * 3);\n const normals = new Float32Array(planeX1 * planeZ1 * 3);\n const uvs = new Float32Array(planeX1 * planeZ1 * 2);\n\n let offset = 0;\n let offset2 = 0;\n\n let iz;\n let ix;\n let x;\n let a;\n let b;\n let c;\n let d;\n\n for (iz = 0; iz < planeZ1; iz++) {\n\n const z = iz * segmentHeight - halfHeight;\n\n for (ix = 0; ix < planeX1; ix++) {\n\n x = ix * segmentWidth - halfWidth;\n\n positions[offset] = x + centerX;\n positions[offset + 1] = centerY;\n positions[offset + 2] = -z + centerZ;\n\n normals[offset + 2] = -1;\n\n uvs[offset2] = (ix) / planeX;\n uvs[offset2 + 1] = ((planeZ - iz) / planeZ);\n\n offset += 3;\n offset2 += 2;\n }\n }\n\n offset = 0;\n\n const indices = new ((positions.length / 3) > 65535 ? Uint32Array : Uint16Array)(planeX * planeZ * 6);\n\n for (iz = 0; iz < planeZ; iz++) {\n\n for (ix = 0; ix < planeX; ix++) {\n\n a = ix + planeX1 * iz;\n b = ix + planeX1 * (iz + 1);\n c = (ix + 1) + planeX1 * (iz + 1);\n d = (ix + 1) + planeX1 * iz;\n\n indices[offset] = d;\n indices[offset + 1] = b;\n indices[offset + 2] = a;\n\n indices[offset + 3] = d;\n indices[offset + 4] = c;\n indices[offset + 5] = b;\n\n offset += 6;\n }\n }\n\n return {\n primitiveType: \"triangles\",\n positions: positions,\n normals: normals,\n uv: uvs,\n uvs: uvs,\n indices: indices\n };\n}\n\nexport {buildPlaneGeometry};\n","/**\n * @desc Creates sphere-shaped geometry arrays.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then create an {@link XKTMesh} with a sphere-shaped {@link XKTGeometry}.\n *\n * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#geometry_builders_buildSphereGeometry)]\n *\n * ````javascript\n * const xktModel = new XKTModel();\n *\n * const sphere = buildSphereGeometry({\n * center: [0,0,0],\n * radius: 1.5,\n * heightSegments: 60,\n * widthSegments: 60\n * });\n *\n * const xktGeometry = xktModel.createGeometry({\n * geometryId: \"sphereGeometry\",\n * primitiveType: sphere.primitiveType, // Will be \"triangles\"\n * positions: sphere.positions,\n * normals: sphere.normals,\n * indices: sphere.indices\n * });\n *\n * const xktMesh = xktModel.createMesh({\n * meshId: \"redSphereMesh\",\n * geometryId: \"sphereGeometry\",\n * position: [-4, -6, -4],\n * scale: [1, 3, 1],\n * rotation: [0, 0, 0],\n * color: [1, 0, 0],\n * opacity: 1\n * });\n *\n *const xktEntity = xktModel.createEntity({\n * entityId: \"redSphere\",\n * meshIds: [\"redSphereMesh\"]\n * });\n *\n * xktModel.finalize();\n * ````\n *\n * @function buildSphereGeometry\n * @param {*} [cfg] Configs\n * @param {Number[]} [cfg.center] 3D point indicating the center position.\n * @param {Number} [cfg.radius=1] Radius.\n * @param {Number} [cfg.heightSegments=24] Number of latitudinal bands.\n * @param {Number} [cfg.widthSegments=18] Number of longitudinal bands.\n * @returns {Object} Geometry arrays for {@link XKTModel#createGeometry} or {@link XKTModel#createMesh}.\n */\nfunction buildSphereGeometry(cfg = {}) {\n\n const lod = cfg.lod || 1;\n\n const centerX = cfg.center ? cfg.center[0] : 0;\n const centerY = cfg.center ? cfg.center[1] : 0;\n const centerZ = cfg.center ? cfg.center[2] : 0;\n\n let radius = cfg.radius || 1;\n if (radius < 0) {\n console.error(\"negative radius not allowed - will invert\");\n radius *= -1;\n }\n\n let heightSegments = cfg.heightSegments || 18;\n if (heightSegments < 0) {\n console.error(\"negative heightSegments not allowed - will invert\");\n heightSegments *= -1;\n }\n heightSegments = Math.floor(lod * heightSegments);\n if (heightSegments < 18) {\n heightSegments = 18;\n }\n\n let widthSegments = cfg.widthSegments || 18;\n if (widthSegments < 0) {\n console.error(\"negative widthSegments not allowed - will invert\");\n widthSegments *= -1;\n }\n widthSegments = Math.floor(lod * widthSegments);\n if (widthSegments < 18) {\n widthSegments = 18;\n }\n\n const positions = [];\n const normals = [];\n const uvs = [];\n const indices = [];\n\n let i;\n let j;\n\n let theta;\n let sinTheta;\n let cosTheta;\n\n let phi;\n let sinPhi;\n let cosPhi;\n\n let x;\n let y;\n let z;\n\n let u;\n let v;\n\n let first;\n let second;\n\n for (i = 0; i <= heightSegments; i++) {\n\n theta = i * Math.PI / heightSegments;\n sinTheta = Math.sin(theta);\n cosTheta = Math.cos(theta);\n\n for (j = 0; j <= widthSegments; j++) {\n\n phi = j * 2 * Math.PI / widthSegments;\n sinPhi = Math.sin(phi);\n cosPhi = Math.cos(phi);\n\n x = cosPhi * sinTheta;\n y = cosTheta;\n z = sinPhi * sinTheta;\n u = 1.0 - j / widthSegments;\n v = i / heightSegments;\n\n normals.push(x);\n normals.push(y);\n normals.push(z);\n\n uvs.push(u);\n uvs.push(v);\n\n positions.push(centerX + radius * x);\n positions.push(centerY + radius * y);\n positions.push(centerZ + radius * z);\n }\n }\n\n for (i = 0; i < heightSegments; i++) {\n for (j = 0; j < widthSegments; j++) {\n\n first = (i * (widthSegments + 1)) + j;\n second = first + widthSegments + 1;\n\n indices.push(first + 1);\n indices.push(second + 1);\n indices.push(second);\n indices.push(first + 1);\n indices.push(second);\n indices.push(first);\n }\n }\n\n return {\n primitiveType: \"triangles\",\n positions: positions,\n normals: normals,\n uv: uvs,\n uvs: uvs,\n indices: indices\n };\n}\n\nexport {buildSphereGeometry};\n","import {math} from '../lib/math.js';\n\n/**\n * @desc Creates torus-shaped geometry arrays.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then create an {@link XKTMesh} with a torus-shaped {@link XKTGeometry}.\n *\n * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#geometry_builders_buildTorusGeometry)]\n *\n * ````javascript\n * const xktModel = new XKTModel();\n *\n * const torus = buildTorusGeometry({\n * center: [0,0,0],\n * radius: 1.0,\n * tube: 0.5,\n * radialSegments: 32,\n * tubeSegments: 24,\n * arc: Math.PI * 2.0\n * });\n *\n * const xktGeometry = xktModel.createGeometry({\n * geometryId: \"torusGeometry\",\n * primitiveType: torus.primitiveType, // Will be \"triangles\"\n * positions: torus.positions,\n * normals: torus.normals,\n * indices: torus.indices\n * });\n *\n * const xktMesh = xktModel.createMesh({\n * meshId: \"redTorusMesh\",\n * geometryId: \"torusGeometry\",\n * position: [-4, -6, -4],\n * scale: [1, 3, 1],\n * rotation: [0, 0, 0],\n * color: [1, 0, 0],\n * opacity: 1\n * });\n *\n * const xktEntity = xktModel.createEntity({\n * entityId: \"redTorus\",\n * meshIds: [\"redTorusMesh\"]\n * });\n *\n * xktModel.finalize();\n * ````\n *\n * @function buildTorusGeometry\n * @param {*} [cfg] Configs\n * @param {Number[]} [cfg.center] 3D point indicating the center position.\n * @param {Number} [cfg.radius=1] The overall radius.\n * @param {Number} [cfg.tube=0.3] The tube radius.\n * @param {Number} [cfg.radialSegments=32] The number of radial segments.\n * @param {Number} [cfg.tubeSegments=24] The number of tubular segments.\n * @param {Number} [cfg.arc=Math.PI*0.5] The length of the arc in radians, where Math.PI*2 is a closed torus.\n * @returns {Object} Geometry arrays for {@link XKTModel#createGeometry} or {@link XKTModel#createMesh}.\n */\nfunction buildTorusGeometry(cfg = {}) {\n\n let radius = cfg.radius || 1;\n if (radius < 0) {\n console.error(\"negative radius not allowed - will invert\");\n radius *= -1;\n }\n radius *= 0.5;\n\n let tube = cfg.tube || 0.3;\n if (tube < 0) {\n console.error(\"negative tube not allowed - will invert\");\n tube *= -1;\n }\n\n let radialSegments = cfg.radialSegments || 32;\n if (radialSegments < 0) {\n console.error(\"negative radialSegments not allowed - will invert\");\n radialSegments *= -1;\n }\n if (radialSegments < 4) {\n radialSegments = 4;\n }\n\n let tubeSegments = cfg.tubeSegments || 24;\n if (tubeSegments < 0) {\n console.error(\"negative tubeSegments not allowed - will invert\");\n tubeSegments *= -1;\n }\n if (tubeSegments < 4) {\n tubeSegments = 4;\n }\n\n let arc = cfg.arc || Math.PI * 2;\n if (arc < 0) {\n console.warn(\"negative arc not allowed - will invert\");\n arc *= -1;\n }\n if (arc > 360) {\n arc = 360;\n }\n\n const center = cfg.center;\n let centerX = center ? center[0] : 0;\n let centerY = center ? center[1] : 0;\n const centerZ = center ? center[2] : 0;\n\n const positions = [];\n const normals = [];\n const uvs = [];\n const indices = [];\n\n let u;\n let v;\n let x;\n let y;\n let z;\n let vec;\n\n let i;\n let j;\n\n for (j = 0; j <= tubeSegments; j++) {\n for (i = 0; i <= radialSegments; i++) {\n\n u = i / radialSegments * arc;\n v = 0.785398 + (j / tubeSegments * Math.PI * 2);\n\n centerX = radius * Math.cos(u);\n centerY = radius * Math.sin(u);\n\n x = (radius + tube * Math.cos(v)) * Math.cos(u);\n y = (radius + tube * Math.cos(v)) * Math.sin(u);\n z = tube * Math.sin(v);\n\n positions.push(x + centerX);\n positions.push(y + centerY);\n positions.push(z + centerZ);\n\n uvs.push(1 - (i / radialSegments));\n uvs.push((j / tubeSegments));\n\n vec = math.normalizeVec3(math.subVec3([x, y, z], [centerX, centerY, centerZ], []), []);\n\n normals.push(vec[0]);\n normals.push(vec[1]);\n normals.push(vec[2]);\n }\n }\n\n let a;\n let b;\n let c;\n let d;\n\n for (j = 1; j <= tubeSegments; j++) {\n for (i = 1; i <= radialSegments; i++) {\n\n a = (radialSegments + 1) * j + i - 1;\n b = (radialSegments + 1) * (j - 1) + i - 1;\n c = (radialSegments + 1) * (j - 1) + i;\n d = (radialSegments + 1) * j + i;\n\n indices.push(a);\n indices.push(b);\n indices.push(c);\n\n indices.push(c);\n indices.push(d);\n indices.push(a);\n }\n }\n\n return {\n primitiveType: \"triangles\",\n positions: positions,\n normals: normals,\n uv: uvs,\n uvs: uvs,\n indices: indices\n };\n}\n\nexport {buildTorusGeometry};\n","const letters = {\n ' ': {width: 16, points: []},\n '!': {\n width: 10, points: [\n [5, 21],\n [5, 7],\n [-1, -1],\n [5, 2],\n [4, 1],\n [5, 0],\n [6, 1],\n [5, 2]\n ]\n },\n '\"': {\n width: 16, points: [\n [4, 21],\n [4, 14],\n [-1, -1],\n [12, 21],\n [12, 14]\n ]\n },\n '#': {\n width: 21, points: [\n [11, 25],\n [4, -7],\n [-1, -1],\n [17, 25],\n [10, -7],\n [-1, -1],\n [4, 12],\n [18, 12],\n [-1, -1],\n [3, 6],\n [17, 6]\n ]\n },\n '$': {\n width: 20, points: [\n [8, 25],\n [8, -4],\n [-1, -1],\n [12, 25],\n [12, -4],\n [-1, -1],\n [17, 18],\n [15, 20],\n [12, 21],\n [8, 21],\n [5, 20],\n [3, 18],\n [3, 16],\n [4, 14],\n [5, 13],\n [7, 12],\n [13, 10],\n [15, 9],\n [16, 8],\n [17, 6],\n [17, 3],\n [15, 1],\n [12, 0],\n [8, 0],\n [5, 1],\n [3, 3]\n ]\n },\n '%': {\n width: 24, points: [\n [21, 21],\n [3, 0],\n [-1, -1],\n [8, 21],\n [10, 19],\n [10, 17],\n [9, 15],\n [7, 14],\n [5, 14],\n [3, 16],\n [3, 18],\n [4, 20],\n [6, 21],\n [8, 21],\n [10, 20],\n [13, 19],\n [16, 19],\n [19, 20],\n [21, 21],\n [-1, -1],\n [17, 7],\n [15, 6],\n [14, 4],\n [14, 2],\n [16, 0],\n [18, 0],\n [20, 1],\n [21, 3],\n [21, 5],\n [19, 7],\n [17, 7]\n ]\n },\n '&': {\n width: 26, points: [\n [23, 12],\n [23, 13],\n [22, 14],\n [21, 14],\n [20, 13],\n [19, 11],\n [17, 6],\n [15, 3],\n [13, 1],\n [11, 0],\n [7, 0],\n [5, 1],\n [4, 2],\n [3, 4],\n [3, 6],\n [4, 8],\n [5, 9],\n [12, 13],\n [13, 14],\n [14, 16],\n [14, 18],\n [13, 20],\n [11, 21],\n [9, 20],\n [8, 18],\n [8, 16],\n [9, 13],\n [11, 10],\n [16, 3],\n [18, 1],\n [20, 0],\n [22, 0],\n [23, 1],\n [23, 2]\n ]\n },\n '\\'': {\n width: 10, points: [\n [5, 19],\n [4, 20],\n [5, 21],\n [6, 20],\n [6, 18],\n [5, 16],\n [4, 15]\n ]\n },\n '(': {\n width: 14, points: [\n [11, 25],\n [9, 23],\n [7, 20],\n [5, 16],\n [4, 11],\n [4, 7],\n [5, 2],\n [7, -2],\n [9, -5],\n [11, -7]\n ]\n },\n ')': {\n width: 14, points: [\n [3, 25],\n [5, 23],\n [7, 20],\n [9, 16],\n [10, 11],\n [10, 7],\n [9, 2],\n [7, -2],\n [5, -5],\n [3, -7]\n ]\n },\n '*': {\n width: 16, points: [\n [8, 21],\n [8, 9],\n [-1, -1],\n [3, 18],\n [13, 12],\n [-1, -1],\n [13, 18],\n [3, 12]\n ]\n },\n '+': {\n width: 26, points: [\n [13, 18],\n [13, 0],\n [-1, -1],\n [4, 9],\n [22, 9]\n ]\n },\n ',': {\n width: 10, points: [\n [6, 1],\n [5, 0],\n [4, 1],\n [5, 2],\n [6, 1],\n [6, -1],\n [5, -3],\n [4, -4]\n ]\n },\n '-': {\n width: 26, points: [\n [4, 9],\n [22, 9]\n ]\n },\n '.': {\n width: 10, points: [\n [5, 2],\n [4, 1],\n [5, 0],\n [6, 1],\n [5, 2]\n ]\n },\n '/': {\n width: 22, points: [\n [20, 25],\n [2, -7]\n ]\n },\n '0': {\n width: 20, points: [\n [9, 21],\n [6, 20],\n [4, 17],\n [3, 12],\n [3, 9],\n [4, 4],\n [6, 1],\n [9, 0],\n [11, 0],\n [14, 1],\n [16, 4],\n [17, 9],\n [17, 12],\n [16, 17],\n [14, 20],\n [11, 21],\n [9, 21]\n ]\n },\n '1': {\n width: 20, points: [\n [6, 17],\n [8, 18],\n [11, 21],\n [11, 0]\n ]\n },\n '2': {\n width: 20, points: [\n [4, 16],\n [4, 17],\n [5, 19],\n [6, 20],\n [8, 21],\n [12, 21],\n [14, 20],\n [15, 19],\n [16, 17],\n [16, 15],\n [15, 13],\n [13, 10],\n [3, 0],\n [17, 0]\n ]\n },\n '3': {\n width: 20, points: [\n [5, 21],\n [16, 21],\n [10, 13],\n [13, 13],\n [15, 12],\n [16, 11],\n [17, 8],\n [17, 6],\n [16, 3],\n [14, 1],\n [11, 0],\n [8, 0],\n [5, 1],\n [4, 2],\n [3, 4]\n ]\n },\n '4': {\n width: 20, points: [\n [13, 21],\n [3, 7],\n [18, 7],\n [-1, -1],\n [13, 21],\n [13, 0]\n ]\n },\n '5': {\n width: 20, points: [\n [15, 21],\n [5, 21],\n [4, 12],\n [5, 13],\n [8, 14],\n [11, 14],\n [14, 13],\n [16, 11],\n [17, 8],\n [17, 6],\n [16, 3],\n [14, 1],\n [11, 0],\n [8, 0],\n [5, 1],\n [4, 2],\n [3, 4]\n ]\n },\n '6': {\n width: 20, points: [\n [16, 18],\n [15, 20],\n [12, 21],\n [10, 21],\n [7, 20],\n [5, 17],\n [4, 12],\n [4, 7],\n [5, 3],\n [7, 1],\n [10, 0],\n [11, 0],\n [14, 1],\n [16, 3],\n [17, 6],\n [17, 7],\n [16, 10],\n [14, 12],\n [11, 13],\n [10, 13],\n [7, 12],\n [5, 10],\n [4, 7]\n ]\n },\n '7': {\n width: 20, points: [\n [17, 21],\n [7, 0],\n [-1, -1],\n [3, 21],\n [17, 21]\n ]\n },\n '8': {\n width: 20, points: [\n [8, 21],\n [5, 20],\n [4, 18],\n [4, 16],\n [5, 14],\n [7, 13],\n [11, 12],\n [14, 11],\n [16, 9],\n [17, 7],\n [17, 4],\n [16, 2],\n [15, 1],\n [12, 0],\n [8, 0],\n [5, 1],\n [4, 2],\n [3, 4],\n [3, 7],\n [4, 9],\n [6, 11],\n [9, 12],\n [13, 13],\n [15, 14],\n [16, 16],\n [16, 18],\n [15, 20],\n [12, 21],\n [8, 21]\n ]\n },\n '9': {\n width: 20, points: [\n [16, 14],\n [15, 11],\n [13, 9],\n [10, 8],\n [9, 8],\n [6, 9],\n [4, 11],\n [3, 14],\n [3, 15],\n [4, 18],\n [6, 20],\n [9, 21],\n [10, 21],\n [13, 20],\n [15, 18],\n [16, 14],\n [16, 9],\n [15, 4],\n [13, 1],\n [10, 0],\n [8, 0],\n [5, 1],\n [4, 3]\n ]\n },\n ':': {\n width: 10, points: [\n [5, 14],\n [4, 13],\n [5, 12],\n [6, 13],\n [5, 14],\n [-1, -1],\n [5, 2],\n [4, 1],\n [5, 0],\n [6, 1],\n [5, 2]\n ]\n },\n ';': {\n width: 10, points: [\n [5, 14],\n [4, 13],\n [5, 12],\n [6, 13],\n [5, 14],\n [-1, -1],\n [6, 1],\n [5, 0],\n [4, 1],\n [5, 2],\n [6, 1],\n [6, -1],\n [5, -3],\n [4, -4]\n ]\n },\n '<': {\n width: 24, points: [\n [20, 18],\n [4, 9],\n [20, 0]\n ]\n },\n '=': {\n width: 26, points: [\n [4, 12],\n [22, 12],\n [-1, -1],\n [4, 6],\n [22, 6]\n ]\n },\n '>': {\n width: 24, points: [\n [4, 18],\n [20, 9],\n [4, 0]\n ]\n },\n '?': {\n width: 18, points: [\n [3, 16],\n [3, 17],\n [4, 19],\n [5, 20],\n [7, 21],\n [11, 21],\n [13, 20],\n [14, 19],\n [15, 17],\n [15, 15],\n [14, 13],\n [13, 12],\n [9, 10],\n [9, 7],\n [-1, -1],\n [9, 2],\n [8, 1],\n [9, 0],\n [10, 1],\n [9, 2]\n ]\n },\n '@': {\n width: 27, points: [\n [18, 13],\n [17, 15],\n [15, 16],\n [12, 16],\n [10, 15],\n [9, 14],\n [8, 11],\n [8, 8],\n [9, 6],\n [11, 5],\n [14, 5],\n [16, 6],\n [17, 8],\n [-1, -1],\n [12, 16],\n [10, 14],\n [9, 11],\n [9, 8],\n [10, 6],\n [11, 5],\n [-1, -1],\n [18, 16],\n [17, 8],\n [17, 6],\n [19, 5],\n [21, 5],\n [23, 7],\n [24, 10],\n [24, 12],\n [23, 15],\n [22, 17],\n [20, 19],\n [18, 20],\n [15, 21],\n [12, 21],\n [9, 20],\n [7, 19],\n [5, 17],\n [4, 15],\n [3, 12],\n [3, 9],\n [4, 6],\n [5, 4],\n [7, 2],\n [9, 1],\n [12, 0],\n [15, 0],\n [18, 1],\n [20, 2],\n [21, 3],\n [-1, -1],\n [19, 16],\n [18, 8],\n [18, 6],\n [19, 5]\n ]\n },\n 'A': {\n width: 18, points: [\n [9, 21],\n [1, 0],\n [-1, -1],\n [9, 21],\n [17, 0],\n [-1, -1],\n [4, 7],\n [14, 7]\n ]\n },\n 'B': {\n width: 21, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [4, 21],\n [13, 21],\n [16, 20],\n [17, 19],\n [18, 17],\n [18, 15],\n [17, 13],\n [16, 12],\n [13, 11],\n [-1, -1],\n [4, 11],\n [13, 11],\n [16, 10],\n [17, 9],\n [18, 7],\n [18, 4],\n [17, 2],\n [16, 1],\n [13, 0],\n [4, 0]\n ]\n },\n 'C': {\n width: 21, points: [\n [18, 16],\n [17, 18],\n [15, 20],\n [13, 21],\n [9, 21],\n [7, 20],\n [5, 18],\n [4, 16],\n [3, 13],\n [3, 8],\n [4, 5],\n [5, 3],\n [7, 1],\n [9, 0],\n [13, 0],\n [15, 1],\n [17, 3],\n [18, 5]\n ]\n },\n 'D': {\n width: 21, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [4, 21],\n [11, 21],\n [14, 20],\n [16, 18],\n [17, 16],\n [18, 13],\n [18, 8],\n [17, 5],\n [16, 3],\n [14, 1],\n [11, 0],\n [4, 0]\n ]\n },\n 'E': {\n width: 19, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [4, 21],\n [17, 21],\n [-1, -1],\n [4, 11],\n [12, 11],\n [-1, -1],\n [4, 0],\n [17, 0]\n ]\n },\n 'F': {\n width: 18, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [4, 21],\n [17, 21],\n [-1, -1],\n [4, 11],\n [12, 11]\n ]\n },\n 'G': {\n width: 21, points: [\n [18, 16],\n [17, 18],\n [15, 20],\n [13, 21],\n [9, 21],\n [7, 20],\n [5, 18],\n [4, 16],\n [3, 13],\n [3, 8],\n [4, 5],\n [5, 3],\n [7, 1],\n [9, 0],\n [13, 0],\n [15, 1],\n [17, 3],\n [18, 5],\n [18, 8],\n [-1, -1],\n [13, 8],\n [18, 8]\n ]\n },\n 'H': {\n width: 22, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [18, 21],\n [18, 0],\n [-1, -1],\n [4, 11],\n [18, 11]\n ]\n },\n 'I': {\n width: 8, points: [\n [4, 21],\n [4, 0]\n ]\n },\n 'J': {\n width: 16, points: [\n [12, 21],\n [12, 5],\n [11, 2],\n [10, 1],\n [8, 0],\n [6, 0],\n [4, 1],\n [3, 2],\n [2, 5],\n [2, 7]\n ]\n },\n 'K': {\n width: 21, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [18, 21],\n [4, 7],\n [-1, -1],\n [9, 12],\n [18, 0]\n ]\n },\n 'L': {\n width: 17, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [4, 0],\n [16, 0]\n ]\n },\n 'M': {\n width: 24, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [4, 21],\n [12, 0],\n [-1, -1],\n [20, 21],\n [12, 0],\n [-1, -1],\n [20, 21],\n [20, 0]\n ]\n },\n 'N': {\n width: 22, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [4, 21],\n [18, 0],\n [-1, -1],\n [18, 21],\n [18, 0]\n ]\n },\n 'O': {\n width: 22, points: [\n [9, 21],\n [7, 20],\n [5, 18],\n [4, 16],\n [3, 13],\n [3, 8],\n [4, 5],\n [5, 3],\n [7, 1],\n [9, 0],\n [13, 0],\n [15, 1],\n [17, 3],\n [18, 5],\n [19, 8],\n [19, 13],\n [18, 16],\n [17, 18],\n [15, 20],\n [13, 21],\n [9, 21]\n ]\n },\n 'P': {\n width: 21, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [4, 21],\n [13, 21],\n [16, 20],\n [17, 19],\n [18, 17],\n [18, 14],\n [17, 12],\n [16, 11],\n [13, 10],\n [4, 10]\n ]\n },\n 'Q': {\n width: 22, points: [\n [9, 21],\n [7, 20],\n [5, 18],\n [4, 16],\n [3, 13],\n [3, 8],\n [4, 5],\n [5, 3],\n [7, 1],\n [9, 0],\n [13, 0],\n [15, 1],\n [17, 3],\n [18, 5],\n [19, 8],\n [19, 13],\n [18, 16],\n [17, 18],\n [15, 20],\n [13, 21],\n [9, 21],\n [-1, -1],\n [12, 4],\n [18, -2]\n ]\n },\n 'R': {\n width: 21, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [4, 21],\n [13, 21],\n [16, 20],\n [17, 19],\n [18, 17],\n [18, 15],\n [17, 13],\n [16, 12],\n [13, 11],\n [4, 11],\n [-1, -1],\n [11, 11],\n [18, 0]\n ]\n },\n 'S': {\n width: 20, points: [\n [17, 18],\n [15, 20],\n [12, 21],\n [8, 21],\n [5, 20],\n [3, 18],\n [3, 16],\n [4, 14],\n [5, 13],\n [7, 12],\n [13, 10],\n [15, 9],\n [16, 8],\n [17, 6],\n [17, 3],\n [15, 1],\n [12, 0],\n [8, 0],\n [5, 1],\n [3, 3]\n ]\n },\n 'T': {\n width: 16, points: [\n [8, 21],\n [8, 0],\n [-1, -1],\n [1, 21],\n [15, 21]\n ]\n },\n 'U': {\n width: 22, points: [\n [4, 21],\n [4, 6],\n [5, 3],\n [7, 1],\n [10, 0],\n [12, 0],\n [15, 1],\n [17, 3],\n [18, 6],\n [18, 21]\n ]\n },\n 'V': {\n width: 18, points: [\n [1, 21],\n [9, 0],\n [-1, -1],\n [17, 21],\n [9, 0]\n ]\n },\n 'W': {\n width: 24, points: [\n [2, 21],\n [7, 0],\n [-1, -1],\n [12, 21],\n [7, 0],\n [-1, -1],\n [12, 21],\n [17, 0],\n [-1, -1],\n [22, 21],\n [17, 0]\n ]\n },\n 'X': {\n width: 20, points: [\n [3, 21],\n [17, 0],\n [-1, -1],\n [17, 21],\n [3, 0]\n ]\n },\n 'Y': {\n width: 18, points: [\n [1, 21],\n [9, 11],\n [9, 0],\n [-1, -1],\n [17, 21],\n [9, 11]\n ]\n },\n 'Z': {\n width: 20, points: [\n [17, 21],\n [3, 0],\n [-1, -1],\n [3, 21],\n [17, 21],\n [-1, -1],\n [3, 0],\n [17, 0]\n ]\n },\n '[': {\n width: 14, points: [\n [4, 25],\n [4, -7],\n [-1, -1],\n [5, 25],\n [5, -7],\n [-1, -1],\n [4, 25],\n [11, 25],\n [-1, -1],\n [4, -7],\n [11, -7]\n ]\n },\n '\\\\': {\n width: 14, points: [\n [0, 21],\n [14, -3]\n ]\n },\n ']': {\n width: 14, points: [\n [9, 25],\n [9, -7],\n [-1, -1],\n [10, 25],\n [10, -7],\n [-1, -1],\n [3, 25],\n [10, 25],\n [-1, -1],\n [3, -7],\n [10, -7]\n ]\n },\n '^': {\n width: 16, points: [\n [6, 15],\n [8, 18],\n [10, 15],\n [-1, -1],\n [3, 12],\n [8, 17],\n [13, 12],\n [-1, -1],\n [8, 17],\n [8, 0]\n ]\n },\n '_': {\n width: 16, points: [\n [0, -2],\n [16, -2]\n ]\n },\n '`': {\n width: 10, points: [\n [6, 21],\n [5, 20],\n [4, 18],\n [4, 16],\n [5, 15],\n [6, 16],\n [5, 17]\n ]\n },\n 'a': {\n width: 19, points: [\n [15, 14],\n [15, 0],\n [-1, -1],\n [15, 11],\n [13, 13],\n [11, 14],\n [8, 14],\n [6, 13],\n [4, 11],\n [3, 8],\n [3, 6],\n [4, 3],\n [6, 1],\n [8, 0],\n [11, 0],\n [13, 1],\n [15, 3]\n ]\n },\n 'b': {\n width: 19, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [4, 11],\n [6, 13],\n [8, 14],\n [11, 14],\n [13, 13],\n [15, 11],\n [16, 8],\n [16, 6],\n [15, 3],\n [13, 1],\n [11, 0],\n [8, 0],\n [6, 1],\n [4, 3]\n ]\n },\n 'c': {\n width: 18, points: [\n [15, 11],\n [13, 13],\n [11, 14],\n [8, 14],\n [6, 13],\n [4, 11],\n [3, 8],\n [3, 6],\n [4, 3],\n [6, 1],\n [8, 0],\n [11, 0],\n [13, 1],\n [15, 3]\n ]\n },\n 'd': {\n width: 19, points: [\n [15, 21],\n [15, 0],\n [-1, -1],\n [15, 11],\n [13, 13],\n [11, 14],\n [8, 14],\n [6, 13],\n [4, 11],\n [3, 8],\n [3, 6],\n [4, 3],\n [6, 1],\n [8, 0],\n [11, 0],\n [13, 1],\n [15, 3]\n ]\n },\n 'e': {\n width: 18, points: [\n [3, 8],\n [15, 8],\n [15, 10],\n [14, 12],\n [13, 13],\n [11, 14],\n [8, 14],\n [6, 13],\n [4, 11],\n [3, 8],\n [3, 6],\n [4, 3],\n [6, 1],\n [8, 0],\n [11, 0],\n [13, 1],\n [15, 3]\n ]\n },\n 'f': {\n width: 12, points: [\n [10, 21],\n [8, 21],\n [6, 20],\n [5, 17],\n [5, 0],\n [-1, -1],\n [2, 14],\n [9, 14]\n ]\n },\n 'g': {\n width: 19, points: [\n [15, 14],\n [15, -2],\n [14, -5],\n [13, -6],\n [11, -7],\n [8, -7],\n [6, -6],\n [-1, -1],\n [15, 11],\n [13, 13],\n [11, 14],\n [8, 14],\n [6, 13],\n [4, 11],\n [3, 8],\n [3, 6],\n [4, 3],\n [6, 1],\n [8, 0],\n [11, 0],\n [13, 1],\n [15, 3]\n ]\n },\n 'h': {\n width: 19, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [4, 10],\n [7, 13],\n [9, 14],\n [12, 14],\n [14, 13],\n [15, 10],\n [15, 0]\n ]\n },\n 'i': {\n width: 8, points: [\n [3, 21],\n [4, 20],\n [5, 21],\n [4, 22],\n [3, 21],\n [-1, -1],\n [4, 14],\n [4, 0]\n ]\n },\n 'j': {\n width: 10, points: [\n [5, 21],\n [6, 20],\n [7, 21],\n [6, 22],\n [5, 21],\n [-1, -1],\n [6, 14],\n [6, -3],\n [5, -6],\n [3, -7],\n [1, -7]\n ]\n },\n 'k': {\n width: 17, points: [\n [4, 21],\n [4, 0],\n [-1, -1],\n [14, 14],\n [4, 4],\n [-1, -1],\n [8, 8],\n [15, 0]\n ]\n },\n 'l': {\n width: 8, points: [\n [4, 21],\n [4, 0]\n ]\n },\n 'm': {\n width: 30, points: [\n [4, 14],\n [4, 0],\n [-1, -1],\n [4, 10],\n [7, 13],\n [9, 14],\n [12, 14],\n [14, 13],\n [15, 10],\n [15, 0],\n [-1, -1],\n [15, 10],\n [18, 13],\n [20, 14],\n [23, 14],\n [25, 13],\n [26, 10],\n [26, 0]\n ]\n },\n 'n': {\n width: 19, points: [\n [4, 14],\n [4, 0],\n [-1, -1],\n [4, 10],\n [7, 13],\n [9, 14],\n [12, 14],\n [14, 13],\n [15, 10],\n [15, 0]\n ]\n },\n 'o': {\n width: 19, points: [\n [8, 14],\n [6, 13],\n [4, 11],\n [3, 8],\n [3, 6],\n [4, 3],\n [6, 1],\n [8, 0],\n [11, 0],\n [13, 1],\n [15, 3],\n [16, 6],\n [16, 8],\n [15, 11],\n [13, 13],\n [11, 14],\n [8, 14]\n ]\n },\n 'p': {\n width: 19, points: [\n [4, 14],\n [4, -7],\n [-1, -1],\n [4, 11],\n [6, 13],\n [8, 14],\n [11, 14],\n [13, 13],\n [15, 11],\n [16, 8],\n [16, 6],\n [15, 3],\n [13, 1],\n [11, 0],\n [8, 0],\n [6, 1],\n [4, 3]\n ]\n },\n 'q': {\n width: 19, points: [\n [15, 14],\n [15, -7],\n [-1, -1],\n [15, 11],\n [13, 13],\n [11, 14],\n [8, 14],\n [6, 13],\n [4, 11],\n [3, 8],\n [3, 6],\n [4, 3],\n [6, 1],\n [8, 0],\n [11, 0],\n [13, 1],\n [15, 3]\n ]\n },\n 'r': {\n width: 13, points: [\n [4, 14],\n [4, 0],\n [-1, -1],\n [4, 8],\n [5, 11],\n [7, 13],\n [9, 14],\n [12, 14]\n ]\n },\n 's': {\n width: 17, points: [\n [14, 11],\n [13, 13],\n [10, 14],\n [7, 14],\n [4, 13],\n [3, 11],\n [4, 9],\n [6, 8],\n [11, 7],\n [13, 6],\n [14, 4],\n [14, 3],\n [13, 1],\n [10, 0],\n [7, 0],\n [4, 1],\n [3, 3]\n ]\n },\n 't': {\n width: 12, points: [\n [5, 21],\n [5, 4],\n [6, 1],\n [8, 0],\n [10, 0],\n [-1, -1],\n [2, 14],\n [9, 14]\n ]\n },\n 'u': {\n width: 19, points: [\n [4, 14],\n [4, 4],\n [5, 1],\n [7, 0],\n [10, 0],\n [12, 1],\n [15, 4],\n [-1, -1],\n [15, 14],\n [15, 0]\n ]\n },\n 'v': {\n width: 16, points: [\n [2, 14],\n [8, 0],\n [-1, -1],\n [14, 14],\n [8, 0]\n ]\n },\n 'w': {\n width: 22, points: [\n [3, 14],\n [7, 0],\n [-1, -1],\n [11, 14],\n [7, 0],\n [-1, -1],\n [11, 14],\n [15, 0],\n [-1, -1],\n [19, 14],\n [15, 0]\n ]\n },\n 'x': {\n width: 17, points: [\n [3, 14],\n [14, 0],\n [-1, -1],\n [14, 14],\n [3, 0]\n ]\n },\n 'y': {\n width: 16, points: [\n [2, 14],\n [8, 0],\n [-1, -1],\n [14, 14],\n [8, 0],\n [6, -4],\n [4, -6],\n [2, -7],\n [1, -7]\n ]\n },\n 'z': {\n width: 17, points: [\n [14, 14],\n [3, 0],\n [-1, -1],\n [3, 14],\n [14, 14],\n [-1, -1],\n [3, 0],\n [14, 0]\n ]\n },\n '{': {\n width: 14, points: [\n [9, 25],\n [7, 24],\n [6, 23],\n [5, 21],\n [5, 19],\n [6, 17],\n [7, 16],\n [8, 14],\n [8, 12],\n [6, 10],\n [-1, -1],\n [7, 24],\n [6, 22],\n [6, 20],\n [7, 18],\n [8, 17],\n [9, 15],\n [9, 13],\n [8, 11],\n [4, 9],\n [8, 7],\n [9, 5],\n [9, 3],\n [8, 1],\n [7, 0],\n [6, -2],\n [6, -4],\n [7, -6],\n [-1, -1],\n [6, 8],\n [8, 6],\n [8, 4],\n [7, 2],\n [6, 1],\n [5, -1],\n [5, -3],\n [6, -5],\n [7, -6],\n [9, -7]\n ]\n },\n '|': {\n width: 8, points: [\n [4, 25],\n [4, -7]\n ]\n },\n '}': {\n width: 14, points: [\n [5, 25],\n [7, 24],\n [8, 23],\n [9, 21],\n [9, 19],\n [8, 17],\n [7, 16],\n [6, 14],\n [6, 12],\n [8, 10],\n [-1, -1],\n [7, 24],\n [8, 22],\n [8, 20],\n [7, 18],\n [6, 17],\n [5, 15],\n [5, 13],\n [6, 11],\n [10, 9],\n [6, 7],\n [5, 5],\n [5, 3],\n [6, 1],\n [7, 0],\n [8, -2],\n [8, -4],\n [7, -6],\n [-1, -1],\n [8, 8],\n [6, 6],\n [6, 4],\n [7, 2],\n [8, 1],\n [9, -1],\n [9, -3],\n [8, -5],\n [7, -6],\n [5, -7]\n ]\n },\n '~': {\n width: 24, points: [\n [3, 6],\n [3, 8],\n [4, 11],\n [6, 12],\n [8, 12],\n [10, 11],\n [14, 8],\n [16, 7],\n [18, 7],\n [20, 8],\n [21, 10],\n [-1, -1],\n [3, 8],\n [4, 10],\n [6, 11],\n [8, 11],\n [10, 10],\n [14, 7],\n [16, 6],\n [18, 6],\n [20, 7],\n [21, 10],\n [21, 12]\n ]\n }\n};\n\n/**\n * @desc Creates wireframe text-shaped geometry arrays.\n *\n * ## Usage\n *\n * In the example below we'll create an {@link XKTModel}, then create an {@link XKTMesh} with a text-shaped {@link XKTGeometry}.\n *\n * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#geometry_builders_buildVectorTextGeometry)]\n *\n * ````javascript\n * const xktModel = new XKTModel();\n *\n * const text = buildVectorTextGeometry({\n * origin: [0,0,0],\n * text: \"On the other side of the screen, it all looked so easy\"\n * });\n *\n * const xktGeometry = xktModel.createGeometry({\n * geometryId: \"textGeometry\",\n * primitiveType: text.primitiveType, // Will be \"lines\"\n * positions: text.positions,\n * indices: text.indices\n * });\n *\n * const xktMesh = xktModel.createMesh({\n * meshId: \"redTextMesh\",\n * geometryId: \"textGeometry\",\n * position: [-4, -6, -4],\n * scale: [1, 3, 1],\n * rotation: [0, 0, 0],\n * color: [1, 0, 0],\n * opacity: 1\n * });\n *\n * const xktEntity = xktModel.createEntity({\n * entityId: \"redText\",\n * meshIds: [\"redTextMesh\"]\n * });\n *\n * xktModel.finalize();\n * ````\n *\n * @function buildVectorTextGeometry\n * @param {*} [cfg] Configs\n * @param {Number[]} [cfg.center] 3D point indicating the center position.\n * @param {Number[]} [cfg.origin] 3D point indicating the top left corner.\n * @param {Number} [cfg.size=1] Size of each character.\n * @param {String} [cfg.text=\"\"] The text.\n * @returns {Object} Geometry arrays for {@link XKTModel#createGeometry} or {@link XKTModel#createMesh}.\n */\nfunction buildVectorTextGeometry(cfg = {}) {\n\n var origin = cfg.origin || [0, 0, 0];\n var xOrigin = origin[0];\n var yOrigin = origin[1];\n var zOrigin = origin[2];\n var size = cfg.size || 1;\n\n var positions = [];\n var indices = [];\n var text = (\"\" + cfg.text).trim();\n var lines = (text || \"\").split(\"\\n\");\n var countVerts = 0;\n var y = 0;\n var x;\n var str;\n var len;\n var c;\n var mag = 1.0 / 25.0;\n var penUp;\n var p1;\n var p2;\n var needLine;\n var pointsLen;\n var a;\n\n for (var iLine = 0; iLine < lines.length; iLine++) {\n\n x = 0;\n str = lines[iLine];\n len = str.length;\n\n for (var i = 0; i < len; i++) {\n\n c = letters[str.charAt(i)];\n\n if (c === '\\n') {\n //alert(\"newline\");\n }\n\n if (!c) {\n continue;\n }\n\n penUp = 1;\n p1 = -1;\n p2 = -1;\n needLine = false;\n\n pointsLen = c.points.length;\n\n for (var j = 0; j < pointsLen; j++) {\n a = c.points[j];\n\n if (a[0] === -1 && a[1] === -1) {\n penUp = 1;\n needLine = false;\n continue;\n }\n\n positions.push((x + (a[0] * size) * mag) + xOrigin);\n positions.push((y + (a[1] * size) * mag) + yOrigin);\n positions.push(0 + zOrigin);\n\n if (p1 === -1) {\n p1 = countVerts;\n } else if (p2 === -1) {\n p2 = countVerts;\n } else {\n p1 = p2;\n p2 = countVerts;\n }\n countVerts++;\n\n if (penUp) {\n penUp = false;\n\n } else {\n indices.push(p1);\n indices.push(p2);\n }\n\n needLine = true;\n }\n x += c.width * mag * size;\n\n }\n y -= 35 * mag * size;\n }\n\n return {\n primitiveType: \"lines\",\n positions: positions,\n indices: indices\n };\n}\n\n\nexport {buildVectorTextGeometry}\n","/**\n * @private\n * @param buf\n * @returns {ArrayBuffer}\n */\nexport function toArrayBuffer(buf) {\n const ab = new ArrayBuffer(buf.length);\n const view = new Uint8Array(ab);\n for (let i = 0; i < buf.length; ++i) {\n view[i] = buf[i];\n }\n return ab;\n}","import {XKT_INFO} from \"./XKT_INFO.js\";\nimport {XKTModel} from \"./XKTModel/XKTModel.js\";\nimport {parseCityJSONIntoXKTModel} from \"./parsers/parseCityJSONIntoXKTModel.js\";\nimport {parseGLTFIntoXKTModel} from \"./parsers/parseGLTFIntoXKTModel.js\";\nimport {parseIFCIntoXKTModel} from \"./parsers/parseIFCIntoXKTModel.js\";\nimport {parseLASIntoXKTModel} from \"./parsers/parseLASIntoXKTModel.js\";\nimport {parsePCDIntoXKTModel} from \"./parsers/parsePCDIntoXKTModel.js\";\nimport {parsePLYIntoXKTModel} from \"./parsers/parsePLYIntoXKTModel.js\";\nimport {parseSTLIntoXKTModel} from \"./parsers/parseSTLIntoXKTModel.js\";\nimport {writeXKTModelToArrayBuffer} from \"./XKTModel/writeXKTModelToArrayBuffer.js\";\n\nimport {toArrayBuffer} from \"./XKTModel/lib/toArraybuffer\";\nimport {parseGLTFJSONIntoXKTModel} from \"./parsers/parseGLTFJSONIntoXKTModel\";\n\nconst fs = require('fs');\n\n/**\n * Converts model files into xeokit's native XKT format.\n *\n * Supported source formats are: IFC, CityJSON, glTF, LAZ and LAS.\n *\n * **Only bundled in xeokit-convert.cjs.js.**\n *\n * ## Usage\n *\n * ````javascript\n * const convert2xkt = require(\"@xeokit/xeokit-convert/dist/convert2xkt.cjs.js\");\n * const fs = require('fs');\n *\n * convert2xkt({\n * sourceData: fs.readFileSync(\"rme_advanced_sample_project.ifc\"),\n * outputXKT: (xtkArrayBuffer) => {\n * fs.writeFileSync(\"rme_advanced_sample_project.ifc.xkt\", xtkArrayBuffer);\n * }\n * }).then(() => {\n * console.log(\"Converted.\");\n * }, (errMsg) => {\n * console.error(\"Conversion failed: \" + errMsg)\n * });\n ````\n * @param {Object} params Conversion parameters.\n * @param {Object} params.WebIFC The WebIFC library. We pass this in as an external dependency, in order to give the\n * caller the choice of whether to use the Browser or NodeJS version.\n * @param {*} [params.configs] Configurations.\n * @param {String} [params.source] Path to source file. Alternative to ````sourceData````.\n * @param {ArrayBuffer|JSON} [params.sourceData] Source file data. Alternative to ````source````.\n * @param {String} [params.sourceFormat] Format of source file/data. Always needed with ````sourceData````, but not normally needed with ````source````, because convert2xkt will determine the format automatically from the file extension of ````source````.\n * @param {String} [params.metaModelDataStr] Source file data. Overrides metadata from ````metaModelSource````, ````sourceData```` and ````source````.\n * @param {String} [params.metaModelSource] Path to source metaModel file. Overrides metadata from ````sourceData```` and ````source````. Overridden by ````metaModelData````.\n * @param {String} [params.output] Path to destination XKT file. Directories on this path are automatically created if not existing.\n * @param {Function} [params.outputXKTModel] Callback to collect the ````XKTModel```` that is internally build by this method.\n * @param {Function} [params.outputXKT] Callback to collect XKT file data.\n * @param {String[]} [params.includeTypes] Option to only convert objects of these types.\n * @param {String[]} [params.excludeTypes] Option to never convert objects of these types.\n * @param {Object} [stats] Collects conversion statistics. Statistics are attached to this object if provided.\n * @param {Function} [params.outputStats] Callback to collect statistics.\n * @param {Boolean} [params.rotateX=false] Whether to rotate the model 90 degrees about the X axis to make the Y axis \"up\", if necessary. Applies to CityJSON and LAS/LAZ models.\n * @param {Boolean} [params.reuseGeometries=true] When true, will enable geometry reuse within the XKT. When false,\n * will automatically \"expand\" all reused geometries into duplicate copies. This has the drawback of increasing the XKT\n * file size (~10-30% for typical models), but can make the model more responsive in the xeokit Viewer, especially if the model\n * has excessive geometry reuse. An example of excessive geometry reuse would be when a model (eg. glTF) has 4000 geometries that are\n * shared amongst 2000 objects, ie. a large number of geometries with a low amount of reuse, which can present a\n * pathological performance case for xeokit's underlying graphics APIs (WebGL, WebGPU etc).\n * @param {Boolean} [params.includeTextures=true] Whether to convert textures. Only works for ````glTF```` models.\n * @param {Boolean} [params.includeNormals=true] Whether to convert normals. When false, the parser will ignore\n * geometry normals, and the modelwill rely on the xeokit ````Viewer```` to automatically generate them. This has\n * the limitation that the normals will be face-aligned, and therefore the ````Viewer```` will only be able to render\n * a flat-shaded non-PBR representation of the model.\n * @param {Number} [params.minTileSize=200] Minimum RTC coordinate tile size. Set this to a value between 100 and 10000,\n * depending on how far from the coordinate origin the model's vertex positions are; specify larger tile sizes when close\n * to the origin, and smaller sizes when distant. This compensates for decreasing precision as floats get bigger.\n * @param {Function} [params.log] Logging callback.\n * @return {Promise}\n */\nfunction convert2xkt({\n WebIFC,\n configs,\n source,\n sourceData,\n sourceFormat,\n metaModelSource,\n metaModelDataStr,\n output,\n outputXKTModel,\n outputXKT,\n includeTypes,\n excludeTypes,\n reuseGeometries = true,\n minTileSize = 200,\n stats = {},\n outputStats,\n rotateX = false,\n includeTextures = true,\n includeNormals = true,\n log = function (msg) {\n }\n }) {\n\n stats.sourceFormat = \"\";\n stats.schemaVersion = \"\";\n stats.title = \"\";\n stats.author = \"\";\n stats.created = \"\";\n stats.numMetaObjects = 0;\n stats.numPropertySets = 0;\n stats.numTriangles = 0;\n stats.numVertices = 0;\n stats.numNormals = 0;\n stats.numUVs = 0;\n stats.numTextures = 0;\n stats.numTextureSets = 0;\n stats.numObjects = 0;\n stats.numGeometries = 0;\n stats.sourceSize = 0;\n stats.xktSize = 0;\n stats.texturesSize = 0;\n stats.xktVersion = \"\";\n stats.compressionRatio = 0;\n stats.conversionTime = 0;\n stats.aabb = null;\n\n return new Promise(function (resolve, reject) {\n const _log = log;\n log = (msg) => {\n _log(`[convert2xkt] ${msg}`)\n }\n\n if (!source && !sourceData) {\n reject(\"Argument expected: source or sourceData\");\n return;\n }\n\n if (!sourceFormat && sourceData) {\n reject(\"Argument expected: sourceFormat is required with sourceData\");\n return;\n }\n\n if (!output && !outputXKTModel && !outputXKT) {\n reject(\"Argument expected: output, outputXKTModel or outputXKT\");\n return;\n }\n\n if (source) {\n log('Reading input file: ' + source);\n }\n\n const startTime = new Date();\n\n const sourceConfigs = configs.sourceConfigs || {};\n const ext = sourceFormat || source.split('.').pop();\n let fileTypeConfigs = sourceConfigs[ext];\n\n if (!fileTypeConfigs) {\n log(`[WARNING] Could not find configs sourceConfigs entry for source format \"${ext}\". This is derived from the source file name extension. Will use internal default configs.`);\n fileTypeConfigs = {};\n }\n function overrideOption(option1, option2) {\n if (option1 !== undefined) {\n return option1;\n }\n return option2;\n }\n\n if (!sourceData) {\n try {\n sourceData = fs.readFileSync(source);\n } catch (err) {\n reject(err);\n return;\n }\n }\n\n const sourceFileSizeBytes = sourceData.byteLength;\n\n log(\"Input file size: \" + (sourceFileSizeBytes / 1000).toFixed(2) + \" kB\");\n\n if (!metaModelDataStr && metaModelSource) {\n log('Reading input metadata file: ' + metaModelSource);\n try {\n metaModelDataStr = fs.readFileSync(metaModelSource);\n } catch (err) {\n reject(err);\n return;\n }\n } else {\n log(`Not embedding metadata in XKT`);\n }\n\n let metaModelJSON;\n\n if (metaModelDataStr) {\n try {\n metaModelJSON = JSON.parse(metaModelDataStr);\n } catch (e) {\n log(`Error parsing metadata JSON: ${e}`);\n }\n }\n\n minTileSize = overrideOption(fileTypeConfigs.minTileSize, minTileSize);\n rotateX = overrideOption(fileTypeConfigs.rotateX, rotateX);\n reuseGeometries = overrideOption(fileTypeConfigs.reuseGeometries, reuseGeometries);\n includeTextures = overrideOption(fileTypeConfigs.includeTextures, includeTextures);\n includeNormals = overrideOption(fileTypeConfigs.includeNormals, includeNormals);\n includeTypes = overrideOption(fileTypeConfigs.includeTypes, includeTypes);\n excludeTypes = overrideOption(fileTypeConfigs.excludeTypes, excludeTypes);\n\n if (reuseGeometries === false) {\n log(\"Geometry reuse is disabled\");\n }\n\n const xktModel = new XKTModel({\n minTileSize\n });\n\n switch (ext) {\n case \"json\":\n convert(parseCityJSONIntoXKTModel, {\n data: JSON.parse(sourceData),\n xktModel,\n stats,\n rotateX,\n center: fileTypeConfigs.center,\n transform: fileTypeConfigs.transform,\n log\n });\n break;\n\n case \"glb\":\n sourceData = toArrayBuffer(sourceData);\n convert(parseGLTFIntoXKTModel, {\n data: sourceData,\n reuseGeometries,\n includeTextures,\n includeNormals,\n metaModelData: metaModelJSON,\n xktModel,\n stats,\n log\n });\n break;\n\n case \"gltf\":\n const gltfJSON = JSON.parse(sourceData);\n const gltfBasePath = source ? getBasePath(source) : \"\";\n convert(parseGLTFJSONIntoXKTModel, {\n baseUri: gltfBasePath,\n data: gltfJSON,\n reuseGeometries,\n includeTextures,\n includeNormals,\n metaModelData: metaModelJSON,\n xktModel,\n getAttachment: async (name) => {\n const filePath = gltfBasePath + name;\n log(`Reading attachment file: ${filePath}`);\n const buffer = fs.readFileSync(filePath);\n const arrayBuf = toArrayBuffer(buffer);\n return arrayBuf;\n },\n stats,\n log\n });\n break;\n\n case \"ifc\":\n convert(parseIFCIntoXKTModel, {\n WebIFC,\n data: sourceData,\n xktModel,\n wasmPath: \"./\",\n includeTypes,\n excludeTypes,\n stats,\n log\n });\n break;\n\n case \"laz\":\n convert(parseLASIntoXKTModel, {\n data: sourceData,\n xktModel,\n stats,\n fp64: fileTypeConfigs.fp64,\n colorDepth: fileTypeConfigs.colorDepth,\n center: fileTypeConfigs.center,\n transform: fileTypeConfigs.transform,\n skip: overrideOption(fileTypeConfigs.skip, 1),\n log\n });\n break;\n\n case \"las\":\n convert(parseLASIntoXKTModel, {\n data: sourceData,\n xktModel,\n stats,\n fp64: fileTypeConfigs.fp64,\n colorDepth: fileTypeConfigs.colorDepth,\n center: fileTypeConfigs.center,\n transform: fileTypeConfigs.transform,\n skip: overrideOption(fileTypeConfigs.skip, 1),\n log\n });\n break;\n\n case \"pcd\":\n convert(parsePCDIntoXKTModel, {\n data: sourceData,\n xktModel,\n stats,\n log\n });\n break;\n\n case \"ply\":\n convert(parsePLYIntoXKTModel, {\n data: sourceData,\n xktModel,\n stats,\n log\n });\n break;\n\n case \"stl\":\n convert(parseSTLIntoXKTModel, {\n data: sourceData,\n xktModel,\n stats,\n log\n });\n break;\n\n default:\n reject(`Error: unsupported source format: \"${ext}\".`);\n return;\n }\n\n function convert(parser, converterParams) {\n\n parser(converterParams).then(() => {\n\n if (!metaModelJSON) {\n xktModel.createDefaultMetaObjects();\n }\n\n log(\"Input file parsed OK. Building XKT document...\");\n\n xktModel.finalize().then(() => {\n\n log(\"XKT document built OK. Writing to XKT file...\");\n\n const xktArrayBuffer = writeXKTModelToArrayBuffer(xktModel, metaModelJSON, stats, {zip: true});\n\n const xktContent = Buffer.from(xktArrayBuffer);\n\n const targetFileSizeBytes = xktArrayBuffer.byteLength;\n\n stats.minTileSize = minTileSize || 200;\n stats.sourceSize = (sourceFileSizeBytes / 1000).toFixed(2);\n stats.xktSize = (targetFileSizeBytes / 1000).toFixed(2);\n stats.xktVersion = XKT_INFO.xktVersion;\n stats.compressionRatio = (sourceFileSizeBytes / targetFileSizeBytes).toFixed(2);\n stats.conversionTime = ((new Date() - startTime) / 1000.0).toFixed(2);\n stats.aabb = xktModel.aabb;\n log(`Converted to: XKT v${stats.xktVersion}`);\n if (includeTypes) {\n log(\"Include types: \" + (includeTypes ? includeTypes : \"(include all)\"));\n }\n if (excludeTypes) {\n log(\"Exclude types: \" + (excludeTypes ? excludeTypes : \"(exclude none)\"));\n }\n log(\"XKT size: \" + stats.xktSize + \" kB\");\n log(\"XKT textures size: \" + (stats.texturesSize / 1000).toFixed(2) + \"kB\");\n log(\"Compression ratio: \" + stats.compressionRatio);\n log(\"Conversion time: \" + stats.conversionTime + \" s\");\n log(\"Converted metaobjects: \" + stats.numMetaObjects);\n log(\"Converted property sets: \" + stats.numPropertySets);\n log(\"Converted drawable objects: \" + stats.numObjects);\n log(\"Converted geometries: \" + stats.numGeometries);\n log(\"Converted textures: \" + stats.numTextures);\n log(\"Converted textureSets: \" + stats.numTextureSets);\n log(\"Converted triangles: \" + stats.numTriangles);\n log(\"Converted vertices: \" + stats.numVertices);\n log(\"Converted UVs: \" + stats.numUVs);\n log(\"Converted normals: \" + stats.numNormals);\n log(\"minTileSize: \" + stats.minTileSize);\n\n if (output) {\n const outputDir = getBasePath(output).trim();\n if (outputDir !== \"\" && !fs.existsSync(outputDir)) {\n fs.mkdirSync(outputDir, {recursive: true});\n }\n log('Writing XKT file: ' + output);\n fs.writeFileSync(output, xktContent);\n }\n\n if (outputXKTModel) {\n outputXKTModel(xktModel);\n }\n\n if (outputXKT) {\n outputXKT(xktContent);\n }\n\n if (outputStats) {\n outputStats(stats);\n }\n\n resolve();\n });\n }, (err) => {\n reject(err);\n });\n }\n });\n}\n\nfunction getBasePath(src) {\n const i = src.lastIndexOf(\"/\");\n return (i !== 0) ? src.substring(0, i + 1) : \"\";\n}\n\nexport {convert2xkt};","import '@loaders.gl/polyfills';\nimport {installFilePolyfills} from '@loaders.gl/polyfills';\n\ninstallFilePolyfills();\n\nexport * from \"./src/index.js\";\nexport {convert2xkt} from \"./src/convert2xkt.js\"; // convert2xkt is only bundled for Node.js\n"],"names":["root","factory","exports","module","define","amd","global","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","p","mat","mat2","mat3","xyz","tempVec3","vec","translate","scale","XKT_INFO","xktVersion","RepeatWrapping","ClampToEdgeWrapping","MirroredRepeatWrapping","NearestFilter","NearestMipMapNearestFilter","NearestMipmapNearestFilter","NearestMipmapLinearFilter","NearestMipMapLinearFilter","LinearFilter","LinearMipmapNearestFilter","LinearMipMapNearestFilter","LinearMipmapLinearFilter","LinearMipMapLinearFilter","GIFMediaType","JPEGMediaType","PNGMediaType","FloatArrayType","Float64Array","tempMat1","tempMat2","tempVec4","math","MIN_DOUBLE","Number","MAX_SAFE_INTEGER","MAX_DOUBLE","DEGTORAD","RADTODEG","vec2","values","vec3","vec4","mat3ToMat4","mat4","arguments","length","mat4ToMat3","createUUID","lut","i","toString","d0","Math","random","d1","d2","d3","concat","clamp","min","max","fmod","a","b","console","error","negateVec4","v","dest","addVec4","u","addVec4Scalar","s","addVec3","addVec3Scalar","subVec4","subVec3","subVec2","subVec4Scalar","subScalarVec4","mulVec4","mulVec4Scalar","mulVec3Scalar","mulVec2Scalar","divVec3","divVec4","divScalarVec3","divVec3Scalar","divVec4Scalar","divScalarVec4","dotVec4","cross3Vec4","u0","u1","u2","v0","v1","v2","cross3Vec3","x","y","z","x2","y2","z2","sqLenVec4","lenVec4","sqrt","dotVec3","dotVec2","sqLenVec3","sqLenVec2","lenVec3","distVec3","w","lenVec2","distVec2","rcpVec3","normalizeVec4","f","normalizeVec3","normalizeVec2","angleVec3","theta","acos","vec3FromMat4Scale","m","vecToArray","trunc","round","len","Array","slice","xyzArrayToObject","arr","xyzObjectToArray","arry","dupMat4","mat4To3","m4s","setMat4ToZeroes","setMat4ToOnes","diagonalMat4v","diagonalMat4c","diagonalMat4s","identityMat4","identityMat3","isIdentityMat4","negateMat4","addMat4","addMat4Scalar","addScalarMat4","subMat4","subMat4Scalar","subScalarMat4","mulMat4","a00","a01","a02","a03","a10","a11","a12","a13","a20","a21","a22","a23","a30","a31","a32","a33","b00","b01","b02","b03","b10","b11","b12","b13","b20","b21","b22","b23","b30","b31","b32","b33","mulMat3","mulMat4Scalar","mulMat4v4","v3","transposeMat4","m4","m14","m8","m13","m12","m9","transposeMat3","determinantMat4","inverseMat4","b04","b05","b06","b07","b08","b09","invDet","traceMat4","translationMat4v","translationMat3v","translationMat4c","translationMat4s","translateMat4v","translateMat4c","OLDtranslateMat4c","m15","m3","m7","m11","rotationMat4v","anglerad","axis","xy","yz","zx","xs","ys","zs","ax","sin","c","cos","q","rotationMat4c","scalingMat4v","scalingMat3v","scalingMat4c","scaleMat4c","scaleMat4v","scalingMat4s","rotationTranslationMat4","xx","xz","yy","zz","wx","wy","wz","mat4ToEuler","order","m21","m22","m23","m31","m32","m33","asin","abs","atan2","composeMat4","position","quaternion","quaternionToRotationMat4","decomposeMat4","matrix","sx","sy","sz","set","invSX","invSY","invSZ","mat4ToQuaternion","this","lookAtMat4v","pos","target","up","z0","z1","x0","x1","y0","y1","posx","posy","posz","upx","upy","upz","targetx","targety","targetz","lookAtMat4c","orthoMat4c","left","right","bottom","top","near","far","rl","tb","fn","frustumMat4v","fmin","fmax","fmin4","fmax4","t","tempMat20","tempMat21","tempMat22","frustumMat4","perspectiveMat4","fovyrad","aspectratio","znear","zfar","pmin","pmax","tan","transformPoint3","transformPoint4","transformPoints3","points","points2","p0","p1","p2","pi","result","m0","m1","m2","m5","m6","m10","transformPositions3","transformPositions4","transformVec3","transformVec4","rotateVec3X","rotateVec3Y","rotateVec3Z","projectVec4","unprojectVec3","viewMat","projMat","lerpVec3","t1","t2","flatten","leni","j","lenj","item","push","identityQuaternion","eulerToQuaternion","euler","c1","c2","c3","s1","s2","s3","trace","vec3PairToQuaternion","norm_u_norm_v","real_part","normalizeQuaternion","angleAxisToQuaternion","angleAxis","halfAngle","fsin","quaternionToEuler","mulQuaternions","p3","q0","q1","q2","q3","vec3ApplyQuaternion","qx","qy","qz","qw","ix","iy","iz","iw","quaternionToMat4","tx","ty","tz","twx","twy","twz","txx","txy","txz","tyy","tyz","tzz","conjugateQuaternion","inverseQuaternion","quaternionToAngleAxis","angle","AABB3","AABB2","OBB3","OBB2","Sphere3","transformOBB3","containsAABB3","aabb1","aabb2","getAABB3Diag","aabb","getAABB3DiagPoint","diagVec","xneg","xpos","yneg","ypos","zneg","zpos","getAABB3Center","getAABB2Center","collapseAABB3","AABB3ToOBB3","obb","positions3ToAABB3","positions","positionsDecodeMatrix","xmin","ymin","zmin","xmax","ymax","zmax","decompressPosition","OBB3ToAABB3","points3ToAABB3","points3ToSphere3","sphere","numPoints","dist","radius","positions3ToSphere3","tempVec3a","tempVec3b","lenPositions","numPositions","OBB3ToSphere3","point","lenPoints","getSphere3Center","expandAABB3","expandAABB3Point3","triangleNormal","normal","p1x","p1y","p1z","p2x","p2y","p2z","p3x","p3y","p3z","mag","octEncodeVec3","array","xfunc","yfunc","tempx","tempy","Int8Array","octDecodeVec2","oct","dot","uniquePositions","indicesLookup","indicesReverseLookup","weldedIndices","faces","numFaces","compa","compb","compc","cb","ab","cross","inverseNormal","geometryCompression","quantizePositions","quantizedPositions","maxInt","xMultiplier","yMultiplier","zMultiplier","verify","num","floor","compressPosition","multiplier","Float32Array","createPositionsDecodeMatrix","xwid","ywid","zwid","transformAndOctEncodeNormals","modelNormalMatrix","normals","lenNormals","compressedNormals","lenCompressedNormals","best","currentCos","bestCos","localNormal","worldNormal","octEncodeNormals","buildEdgeIndices","Uint16Array","indices","edgeThreshold","vx","vy","vz","positionsMap","precision","pow","lenUniquePositions","weldVertices","numIndices","ia","ib","ic","face","buildFaces","edge1","edge2","index1","index2","edge","normal1","normal2","edgeIndices","thresholdDot","edges","largeIndex","faceIndex","face1","face2","dot2","Uint32Array","isTriangleMeshSolid","vertexIndexMapping","compareIndexPositions","posA","posB","newIndices","sort","uniqueVertexIndex","a2","b2","temp","compareEdges","e1","e2","sameEdgeCount","XKTMesh","_createClass","cfg","_classCallCheck","meshId","meshIndex","geometry","color","metallic","roughness","opacity","textureSet","entity","XKTGeometry","geometryId","primitiveType","geometryIndex","numInstances","positionsQuantized","normalsOctEncoded","colorsCompressed","uvs","uvsCompressed","solid","XKTEntity","entityId","meshes","entityIndex","hasReusedGeometries","XKTTile","entities","KDNode","XKTMetaObject","metaObjectId","propertySetIds","metaObjectType","metaObjectName","parentMetaObjectId","XKTPropertySet","propertySetId","propertySetType","propertySetName","properties","XKTTexture","textureId","textureIndex","imageData","channel","width","height","src","compressed","mediaType","minFilter","magFilter","wrapS","wrapT","wrapR","XKTTextureSet","textureSetId","textureSetIndex","materialType","materialIndex","colorTexture","metallicRoughnessTexture","normalsTexture","emissiveTexture","occlusionTexture","_regeneratorRuntime","Op","hasOwn","desc","$Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","makeInvokeMethod","tryCatch","arg","type","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","Gp","defineIteratorMethods","forEach","method","_invoke","AsyncIterator","PromiseImpl","invoke","resolve","reject","record","_typeof","__await","then","unwrapped","previousPromise","callInvokeWithMethodAndArg","state","Error","done","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","methodName","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","doneResult","displayName","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","val","object","reverse","pop","skipTempReset","prev","charAt","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","asyncGeneratorStep","gen","_next","_throw","_defineProperties","props","descriptor","input","hint","prim","toPrimitive","res","String","_toPrimitive","tempVec4a","tempVec4b","tempMat4","tempMat4b","kdTreeDimLength","TEXTURE_ENCODING_OPTIONS","useSRGB","qualityLevel","encodeUASTC","mipmaps","XKTModel","instance","Constructor","modelId","projectId","revisionId","author","createdAt","creatingApplication","schema","minTileSize","propertySets","propertySetsList","metaObjects","metaObjectsList","reusedGeometriesDecodeMatrix","geometries","geometriesList","textures","texturesList","textureSets","textureSetsList","meshesList","entitiesList","tilesList","finalized","protoProps","_finalize","params","propertySet","metaObject","_rootMetaObject","fileExt","split","texture","colorTextureId","metallicRoughnessTextureId","normalsTextureId","emissiveTextureId","occlusionTextureId","triangles","lines","line_strip","colors","xktGeometryCfg","uv","Uint8Array","mergedPositions","mergedIndices","mergeVertices","rotation","mesh","meshIds","meshIdIdx","meshIdLen","warn","createMetaObject","_callee","rootKDNode","_context","log","_removeUnusedTextures","_compressTextures","_bakeSingleUseGeometryPositions","_bakeAndOctEncodeNormals","_createEntityAABBs","_createKDTree","_createTilesFromKDTree","_createReusedGeometriesDecodeMatrix","_flagSolidGeometries","args","apply","_this","countTextures","_loop","encodingOptions","load","ImageLoader","image","encode","KTX2BasisWriter","encodedData","encodedImageData","entityAABB","_insertEntityIntoKDTree","kdNode","nodeAABB","dim","aabbLeft","aabbRight","_createTilesFromKDNode","_createTileFromEntities","tileAABB","tileCenter","tileCenterNeg","rtcAABB","reused","k","lenk","tile","reusedGeometriesAABB","countReusedGeometries","numGeometries","maxNumPositions","maxNumIndices","XKT_VERSION","NUM_TEXTURE_ATTRIBUTES","NUM_MATERIAL_ATTRIBUTES","writeXKTModelToArrayBuffer","xktModel","metaModelJSON","stats","options","data","metaModelDataStr","numPropertySets","numMetaObjects","numTextures","numTextureSets","numMeshes","numEntities","numTiles","lenColors","lenUVs","lenIndices","lenEdgeIndices","lenMatrices","lenTextures","xktTexture","byteLength","numCompressedTextures","metadata","textureData","eachTextureDataPortion","eachTextureAttributes","eachTextureSetTextures","Int32Array","matrices","eachGeometryPrimitiveType","eachGeometryPositionsPortion","eachGeometryNormalsPortion","eachGeometryColorsPortion","eachGeometryUVsPortion","eachGeometryIndicesPortion","eachGeometryEdgeIndicesPortion","eachMeshGeometriesPortion","eachMeshMatricesPortion","eachMeshTextureSet","eachMeshMaterialAttributes","eachEntityId","eachEntityMeshesPortion","eachTileAABB","eachTileEntitiesPortion","countPositions","countNormals","countColors","countUVs","countIndices","countEdgeIndices","id","propertySetsIndex","propertySetJSON","metaObjectsIndex","metaObjectJSON","parent","external","portionIdx","textureAttrIdx","eachTextureSetTexturesIndex","countEntityMeshesPortion","eachMeshMaterialAttributesIndex","matricesIndex","tileIndex","tileEntities","numTileEntities","entityMeshes","numEntityMeshes","tileAABBIndex","getModelData","deflatedData","deflate","buffer","zip","pako","deflateJSON","JSON","stringify","replace","chr","charCodeAt","substr","deflateData","texturesSize","arrayBuffer","elements","indexData","dataLen","elementsize","indexBuf","dataArray","offset","element","toArrayBuffer","createArrayBuffer","strings","earcut","holeIndices","minX","minY","maxX","maxY","invSize","hasHoles","outerLen","outerNode","linkedList","list","queue","steiner","getLeftmost","compareX","eliminateHole","filterPoints","eliminateHoles","earcutLinked","start","end","clockwise","last","signedArea","insertNode","equals","removeNode","again","area","ear","pass","zOrder","prevZ","nextZ","e","tail","numMerges","pSize","qSize","inSize","sortLinked","indexCurve","isEarHashed","isEar","cureLocalIntersections","splitEarcut","pointInTriangle","minTX","minTY","maxTX","maxTY","minZ","maxZ","n","intersects","locallyInside","isValidDiagonal","splitPolygon","hole","hx","hy","mx","my","tanMin","Infinity","sectorContainsSector","findHoleBridge","leftmost","ay","bx","by","cx","cy","px","py","intersectsPolygon","inside","middleInside","o1","sign","o2","o3","o4","onSegment","Node","an","bp","sum","deviation","polygonArea","trianglesArea","vertices","holes","dimensions","holeIndex","tempVec2a","tempVec3c","parseCityJSONIntoXKTModel","_ref","_ref$center","center","_ref$transform","transform","_ref$stats","vertices2","copyVertices","cityJSONTransform","vertex","transformVertices","centerVertices","customTransformVertices","sourceFormat","schemaVersion","version","title","created","numTriangles","numVertices","numObjects","rootMetaObjectId","modelMetaObjectId","ctx","msg","nextId","cityObjects","CityObjects","objectId","parseCityObject","parseCityJSON","centerPos","cityObject","parents","objectMaterial","surfaceMaterials","appearance","materials","geometryMaterial","material","themeIds","theme","surfaceMaterial","parseGeometrySurfacesWithOwnMaterials","parseGeometrySurfacesWithSharedMaterial","createEntity","parseSurfacesWithOwnMaterials","boundaries","shells","solids","surfaces","surface","diffuseColor","transparency","sharedIndices","geometryCfg","newFace","extractLocalIndices","_toConsumableArray","pList","getNormalOfPositions","pv","to2D","unshift","tr","createGeometry","createMesh","parseSurfacesWithSharedMaterial","primitiveCfg","boundary","newBoundary","index","includes","vertexIndex","indexOf","nexti","_p","_n","re","x3","tmp2","y3","utils","isString","parseGLTFIntoXKTModel","baseUri","metaModelData","_ref$includeTextures","includeTextures","_ref$includeNormals","includeNormals","getAttachment","numNormals","numUVs","parse","GLTFLoader","gltfData","metaModelCorrections","getMetaModelCorrections","geometryCreated","parseTexture","parseTextures","_textureSetId","parseTextureSet","_attributes","parseMaterialAttributes","parseMaterials","scene","scenes","nodes","countMeshUsage","parseNode","parseScene","parseDefaultScene","errMsg","eachRootStats","eachChildRoot","metaObjectsMap","metaObjectParent","rootMetaObject","numChildren","countChildren","source","sampler","createTexture","flipY","_textureId","textureSetCfg","normalTexture","normalTextureId","metallicPBR","pbrMetallicRoughness","baseColorTexture","extensions","specularPBR","specularTexture","specularColorTexture","createTextureSet","materialAttributes","diffuseFactor","common","technique","blinn","phong","lambert","diffuse","transparent","baseColorFactor","metallicFactor","roughnessFactor","node","instances","children","childNode","deferredMeshIds","depth","localMatrix","translation","numPrimitives","primitives","primitive","_xktGeometryId","xktGeometryId","mode","attributes","POSITION","NORMAL","COLOR_0","TEXCOORD_0","xktMeshId","meshCfg","nodeName","xktEntityId","rootMetaObjectStats","atob2","atob","Buffer","from","WEBGL_COMPONENT_TYPES","Int16Array","WEBGL_TYPE_SIZES","parseGLTFJSONIntoXKTModel","reuseGeometries","gltf","createXKTGeometryIds","nextMeshId","buffers","all","map","bufferInfo","_arrayBuffer","_buffer","uri","dataUriRegexResult","match","isBase64","decodeURIComponent","ArrayBuffer","view","parseArrayBuffer","parseBuffer","parseBuffers","bufferViewsInfo","bufferViews","parseBufferView","parseBufferViews","freeBuffers","materialsInfo","materialInfo","parseMaterial","_materialData","defaultSceneInfo","sceneInfo","glTFNode","bufferViewInfo","_typedArray","byteOffset","gltfMeshId","meshInfo","numPrimitivesInMesh","primitiveInfo","geometryHash","createPrimitiveGeometryHash","geometryArrays","parsePrimitiveGeometry","childNodeIdx","childGLTFNode","join","accessors","indicesIndex","accessorInfo","parseAccessorTypedArray","positionsIndex","normalsIndex","colorsIndex","bufferView","itemSize","TypedArray","componentType","itemBytes","BYTES_PER_ELEMENT","byteStride","count","parseIFCIntoXKTModel","WebIFC","_ref$autoNormals","autoNormals","includeTypes","excludeTypes","wasmPath","ifcAPI","IfcAPI","SetWasmPath","Init","modelID","OpenModel","ifcProjectId","GetLineIDsWithType","IFCPROJECT","GetLine","ifcProject","parseSpatialChildren","parseMetadata","flatMeshes","LoadAllGeometry","size","createObject","IFCSPACE","ifcSpaceId","flatMesh","GetFlatMesh","parseGeometry","IFCRELDEFINESBYPROPERTIES","relID","rel","relatingPropertyDefinition","RelatingPropertyDefinition","GlobalId","relatedObjects","RelatedObjects","HasProperties","Name","nominalValue","NominalValue","property","valueType","Description","description","createPropertySet","parsePropertySets","ifcElement","parseRelatedItemsOfType","expressID","IFCRELAGGREGATES","IFCRELCONTAINEDINSPATIALSTRUCTURE","relation","related","relatedItems","isArray","element2","flatMeshExpressID","placedGeometries","placedGeometry","geometryExpressID","GetGeometry","vertexData","GetVertexArray","GetVertexData","GetVertexDataSize","GetIndexArray","GetIndexData","GetIndexDataSize","flatTransformation","MAX_VERTICES","parseLASIntoXKTModel","_ref$colorDepth","colorDepth","_ref$fp","fp64","_ref$skip","skip","_ref$log","LASLoader","las","parsedData","loaderData","pointsFormatId","readAttributes","intensity","readIntensities","readColorsAndIntensities","pointsChunks","chunkArray","positionsValue","readPositions","colorsChunks","attributesPosition","attributesColor","attributesIntensity","colorSize","intensities","colorsCompressedSize","l","chunkSize","parseMetaModelIntoXKTModel","includeTypesMap","excludeTypesMap","newObject","countMetaObjects","parsePCDIntoXKTModel","_ref$littleEndian","littleEndian","textData","TextDecoder","decode","il","fromCharCode","escape","decodeText","header","result1","search","result2","exec","headerLen","str","fields","viewpoint","parseFloat","parseInt","sizeSum","rowSize","parseHeader","line","rgb","g","sizes","compressedSize","decompressedSize","decompressed","inData","outLength","ctrl","ref","inLength","outData","inPtr","outPtr","decompressLZF","dataview","DataView","getFloat32","getUint8","row","parsePLYIntoXKTModel","_x","_parsePLYIntoXKTModel","hasColors","colorsValue","PLYLoader","t0","parseSTLIntoXKTModel","_parseSTLIntoXKTModel","splitMeshes","smoothNormals","smoothNormalsAngleThreshold","binData","ensureBinary","isBinary","parseBinary","parseASCII","reader","getUint32","defaultR","defaultG","defaultB","lastR","lastG","lastB","newMesh","normalX","normalY","normalZ","packedColor","getUint16","vertexstart","addMesh","normalx","normaly","normalz","verticesPerFace","normalsPerFace","text","faceRegex","faceCounter","floatRegex","vertexRegex","RegExp","normalRegex","nextGeometryId","ni","acc","posi","vertexMap","vertexNormals","vertexNormalAccum","numVerts","ii","jj","faceToVertexNormals","buildBoxGeometry","xSize","ySize","zSize","centerX","centerY","centerZ","buildBoxLinesGeometry","buildCylinderGeometry","radiusTop","radiusBottom","radialSegments","heightSegments","h","currentRadius","currentHeight","first","second","startIndex","tu","tv","openEnded","heightHalf","heightLength","radialAngle","PI","radialLength","radiusChange","atan","buildGridGeometry","divisions","step","halfSize","buildPlaneGeometry","xSegments","zSegments","halfWidth","halfHeight","planeX","planeZ","planeX1","planeZ1","segmentWidth","segmentHeight","offset2","buildSphereGeometry","lod","widthSegments","sinTheta","cosTheta","phi","sinPhi","buildTorusGeometry","tube","tubeSegments","arc","letters","buildVectorTextGeometry","penUp","pointsLen","origin","xOrigin","yOrigin","zOrigin","trim","countVerts","iLine","buf","fs","convert2xkt","configs","sourceData","metaModelSource","output","outputXKTModel","outputXKT","_ref$reuseGeometries","_ref$minTileSize","outputStats","_ref$rotateX","rotateX","sourceSize","xktSize","compressionRatio","conversionTime","_log","startTime","Date","sourceConfigs","ext","fileTypeConfigs","readFileSync","sourceFileSizeBytes","toFixed","overrideOption","_getAttachment","convert","gltfJSON","gltfBasePath","getBasePath","filePath","arrayBuf","option1","option2","parser","converterParams","createDefaultMetaObjects","finalize","xktArrayBuffer","xktContent","targetFileSizeBytes","outputDir","existsSync","mkdirSync","recursive","writeFileSync","lastIndexOf","substring","installFilePolyfills"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/ast/source/convert2xkt.js.json b/docs/ast/source/convert2xkt.js.json index 6624991..30f181e 100644 --- a/docs/ast/source/convert2xkt.js.json +++ b/docs/ast/source/convert2xkt.js.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 17395, + "end": 17462, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 421, + "line": 423, "column": 21 } }, "program": { "type": "Program", "start": 0, - "end": 17395, + "end": 17462, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 421, + "line": 423, "column": 21 } }, @@ -1150,14 +1150,14 @@ { "type": "Identifier", "start": 5144, - "end": 17252, + "end": 17319, "loc": { "start": { "line": 75, "column": 0 }, "end": { - "line": 414, + "line": 416, "column": 1 } }, @@ -2564,14 +2564,14 @@ "body": { "type": "BlockStatement", "start": 6022, - "end": 17252, + "end": 17319, "loc": { "start": { "line": 97, "column": 24 }, "end": { - "line": 414, + "line": 416, "column": 1 } }, @@ -4796,28 +4796,28 @@ { "type": "ReturnStatement", "start": 6623, - "end": 17250, + "end": 17317, "loc": { "start": { "line": 122, "column": 4 }, "end": { - "line": 413, + "line": 415, "column": 7 } }, "argument": { "type": "NewExpression", "start": 6630, - "end": 17249, + "end": 17316, "loc": { "start": { "line": 122, "column": 11 }, "end": { - "line": 413, + "line": 415, "column": 6 } }, @@ -4842,14 +4842,14 @@ { "type": "FunctionExpression", "start": 6642, - "end": 17248, + "end": 17315, "loc": { "start": { "line": 122, "column": 23 }, "end": { - "line": 413, + "line": 415, "column": 5 } }, @@ -4896,14 +4896,14 @@ "body": { "type": "BlockStatement", "start": 6669, - "end": 17248, + "end": 17315, "loc": { "start": { "line": 122, "column": 50 }, "end": { - "line": 413, + "line": 415, "column": 5 } }, @@ -7769,14 +7769,14 @@ { "type": "IfStatement", "start": 8322, - "end": 8625, + "end": 8692, "loc": { "start": { "line": 177, "column": 8 }, "end": { - "line": 185, + "line": 187, "column": 9 } }, @@ -8269,48 +8269,152 @@ ], "directives": [] }, - "alternate": null + "alternate": { + "type": "BlockStatement", + "start": 8631, + "end": 8692, + "loc": { + "start": { + "line": 185, + "column": 15 + }, + "end": { + "line": 187, + "column": 9 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 8645, + "end": 8682, + "loc": { + "start": { + "line": 186, + "column": 12 + }, + "end": { + "line": 186, + "column": 49 + } + }, + "expression": { + "type": "CallExpression", + "start": 8645, + "end": 8681, + "loc": { + "start": { + "line": 186, + "column": 12 + }, + "end": { + "line": 186, + "column": 48 + } + }, + "callee": { + "type": "Identifier", + "start": 8645, + "end": 8648, + "loc": { + "start": { + "line": 186, + "column": 12 + }, + "end": { + "line": 186, + "column": 15 + }, + "identifierName": "log" + }, + "name": "log" + }, + "arguments": [ + { + "type": "TemplateLiteral", + "start": 8649, + "end": 8680, + "loc": { + "start": { + "line": 186, + "column": 16 + }, + "end": { + "line": 186, + "column": 47 + } + }, + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "start": 8650, + "end": 8679, + "loc": { + "start": { + "line": 186, + "column": 17 + }, + "end": { + "line": 186, + "column": 46 + } + }, + "value": { + "raw": "Not embedding metadata in XKT", + "cooked": "Not embedding metadata in XKT" + }, + "tail": true + } + ] + } + ] + } + } + ], + "directives": [] + } }, { "type": "VariableDeclaration", - "start": 8635, - "end": 8653, + "start": 8702, + "end": 8720, "loc": { "start": { - "line": 187, + "line": 189, "column": 8 }, "end": { - "line": 187, + "line": 189, "column": 26 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 8639, - "end": 8652, + "start": 8706, + "end": 8719, "loc": { "start": { - "line": 187, + "line": 189, "column": 12 }, "end": { - "line": 187, + "line": 189, "column": 25 } }, "id": { "type": "Identifier", - "start": 8639, - "end": 8652, + "start": 8706, + "end": 8719, "loc": { "start": { - "line": 187, + "line": 189, "column": 12 }, "end": { - "line": 187, + "line": 189, "column": 25 }, "identifierName": "metaModelJSON" @@ -8324,29 +8428,29 @@ }, { "type": "IfStatement", - "start": 8663, - "end": 8874, + "start": 8730, + "end": 8941, "loc": { "start": { - "line": 189, + "line": 191, "column": 8 }, "end": { - "line": 195, + "line": 197, "column": 9 } }, "test": { "type": "Identifier", - "start": 8667, - "end": 8683, + "start": 8734, + "end": 8750, "loc": { "start": { - "line": 189, + "line": 191, "column": 12 }, "end": { - "line": 189, + "line": 191, "column": 28 }, "identifierName": "metaModelDataStr" @@ -8355,88 +8459,88 @@ }, "consequent": { "type": "BlockStatement", - "start": 8685, - "end": 8874, + "start": 8752, + "end": 8941, "loc": { "start": { - "line": 189, + "line": 191, "column": 30 }, "end": { - "line": 195, + "line": 197, "column": 9 } }, "body": [ { "type": "TryStatement", - "start": 8699, - "end": 8864, + "start": 8766, + "end": 8931, "loc": { "start": { - "line": 190, + "line": 192, "column": 12 }, "end": { - "line": 194, + "line": 196, "column": 13 } }, "block": { "type": "BlockStatement", - "start": 8703, - "end": 8780, + "start": 8770, + "end": 8847, "loc": { "start": { - "line": 190, + "line": 192, "column": 16 }, "end": { - "line": 192, + "line": 194, "column": 13 } }, "body": [ { "type": "ExpressionStatement", - "start": 8721, - "end": 8766, + "start": 8788, + "end": 8833, "loc": { "start": { - "line": 191, + "line": 193, "column": 16 }, "end": { - "line": 191, + "line": 193, "column": 61 } }, "expression": { "type": "AssignmentExpression", - "start": 8721, - "end": 8765, + "start": 8788, + "end": 8832, "loc": { "start": { - "line": 191, + "line": 193, "column": 16 }, "end": { - "line": 191, + "line": 193, "column": 60 } }, "operator": "=", "left": { "type": "Identifier", - "start": 8721, - "end": 8734, + "start": 8788, + "end": 8801, "loc": { "start": { - "line": 191, + "line": 193, "column": 16 }, "end": { - "line": 191, + "line": 193, "column": 29 }, "identifierName": "metaModelJSON" @@ -8445,43 +8549,43 @@ }, "right": { "type": "CallExpression", - "start": 8737, - "end": 8765, + "start": 8804, + "end": 8832, "loc": { "start": { - "line": 191, + "line": 193, "column": 32 }, "end": { - "line": 191, + "line": 193, "column": 60 } }, "callee": { "type": "MemberExpression", - "start": 8737, - "end": 8747, + "start": 8804, + "end": 8814, "loc": { "start": { - "line": 191, + "line": 193, "column": 32 }, "end": { - "line": 191, + "line": 193, "column": 42 } }, "object": { "type": "Identifier", - "start": 8737, - "end": 8741, + "start": 8804, + "end": 8808, "loc": { "start": { - "line": 191, + "line": 193, "column": 32 }, "end": { - "line": 191, + "line": 193, "column": 36 }, "identifierName": "JSON" @@ -8490,15 +8594,15 @@ }, "property": { "type": "Identifier", - "start": 8742, - "end": 8747, + "start": 8809, + "end": 8814, "loc": { "start": { - "line": 191, + "line": 193, "column": 37 }, "end": { - "line": 191, + "line": 193, "column": 42 }, "identifierName": "parse" @@ -8510,15 +8614,15 @@ "arguments": [ { "type": "Identifier", - "start": 8748, - "end": 8764, + "start": 8815, + "end": 8831, "loc": { "start": { - "line": 191, + "line": 193, "column": 43 }, "end": { - "line": 191, + "line": 193, "column": 59 }, "identifierName": "metaModelDataStr" @@ -8534,29 +8638,29 @@ }, "handler": { "type": "CatchClause", - "start": 8781, - "end": 8864, + "start": 8848, + "end": 8931, "loc": { "start": { - "line": 192, + "line": 194, "column": 14 }, "end": { - "line": 194, + "line": 196, "column": 13 } }, "param": { "type": "Identifier", - "start": 8788, - "end": 8789, + "start": 8855, + "end": 8856, "loc": { "start": { - "line": 192, + "line": 194, "column": 21 }, "end": { - "line": 192, + "line": 194, "column": 22 }, "identifierName": "e" @@ -8565,58 +8669,58 @@ }, "body": { "type": "BlockStatement", - "start": 8791, - "end": 8864, + "start": 8858, + "end": 8931, "loc": { "start": { - "line": 192, + "line": 194, "column": 24 }, "end": { - "line": 194, + "line": 196, "column": 13 } }, "body": [ { "type": "ExpressionStatement", - "start": 8809, - "end": 8850, + "start": 8876, + "end": 8917, "loc": { "start": { - "line": 193, + "line": 195, "column": 16 }, "end": { - "line": 193, + "line": 195, "column": 57 } }, "expression": { "type": "CallExpression", - "start": 8809, - "end": 8849, + "start": 8876, + "end": 8916, "loc": { "start": { - "line": 193, + "line": 195, "column": 16 }, "end": { - "line": 193, + "line": 195, "column": 56 } }, "callee": { "type": "Identifier", - "start": 8809, - "end": 8812, + "start": 8876, + "end": 8879, "loc": { "start": { - "line": 193, + "line": 195, "column": 16 }, "end": { - "line": 193, + "line": 195, "column": 19 }, "identifierName": "log" @@ -8626,30 +8730,30 @@ "arguments": [ { "type": "TemplateLiteral", - "start": 8813, - "end": 8848, + "start": 8880, + "end": 8915, "loc": { "start": { - "line": 193, + "line": 195, "column": 20 }, "end": { - "line": 193, + "line": 195, "column": 55 } }, "expressions": [ { "type": "Identifier", - "start": 8845, - "end": 8846, + "start": 8912, + "end": 8913, "loc": { "start": { - "line": 193, + "line": 195, "column": 52 }, "end": { - "line": 193, + "line": 195, "column": 53 }, "identifierName": "e" @@ -8660,15 +8764,15 @@ "quasis": [ { "type": "TemplateElement", - "start": 8814, - "end": 8843, + "start": 8881, + "end": 8910, "loc": { "start": { - "line": 193, + "line": 195, "column": 21 }, "end": { - "line": 193, + "line": 195, "column": 50 } }, @@ -8680,15 +8784,15 @@ }, { "type": "TemplateElement", - "start": 8847, - "end": 8847, + "start": 8914, + "end": 8914, "loc": { "start": { - "line": 193, + "line": 195, "column": 54 }, "end": { - "line": 193, + "line": 195, "column": 54 } }, @@ -8717,44 +8821,44 @@ }, { "type": "ExpressionStatement", - "start": 8884, - "end": 8955, + "start": 8951, + "end": 9022, "loc": { "start": { - "line": 197, + "line": 199, "column": 8 }, "end": { - "line": 197, + "line": 199, "column": 79 } }, "expression": { "type": "AssignmentExpression", - "start": 8884, - "end": 8954, + "start": 8951, + "end": 9021, "loc": { "start": { - "line": 197, + "line": 199, "column": 8 }, "end": { - "line": 197, + "line": 199, "column": 78 } }, "operator": "=", "left": { "type": "Identifier", - "start": 8884, - "end": 8895, + "start": 8951, + "end": 8962, "loc": { "start": { - "line": 197, + "line": 199, "column": 8 }, "end": { - "line": 197, + "line": 199, "column": 19 }, "identifierName": "minTileSize" @@ -8763,29 +8867,29 @@ }, "right": { "type": "CallExpression", - "start": 8898, - "end": 8954, + "start": 8965, + "end": 9021, "loc": { "start": { - "line": 197, + "line": 199, "column": 22 }, "end": { - "line": 197, + "line": 199, "column": 78 } }, "callee": { "type": "Identifier", - "start": 8898, - "end": 8912, + "start": 8965, + "end": 8979, "loc": { "start": { - "line": 197, + "line": 199, "column": 22 }, "end": { - "line": 197, + "line": 199, "column": 36 }, "identifierName": "overrideOption" @@ -8795,29 +8899,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 8913, - "end": 8940, + "start": 8980, + "end": 9007, "loc": { "start": { - "line": 197, + "line": 199, "column": 37 }, "end": { - "line": 197, + "line": 199, "column": 64 } }, "object": { "type": "Identifier", - "start": 8913, - "end": 8928, + "start": 8980, + "end": 8995, "loc": { "start": { - "line": 197, + "line": 199, "column": 37 }, "end": { - "line": 197, + "line": 199, "column": 52 }, "identifierName": "fileTypeConfigs" @@ -8826,15 +8930,15 @@ }, "property": { "type": "Identifier", - "start": 8929, - "end": 8940, + "start": 8996, + "end": 9007, "loc": { "start": { - "line": 197, + "line": 199, "column": 53 }, "end": { - "line": 197, + "line": 199, "column": 64 }, "identifierName": "minTileSize" @@ -8845,15 +8949,15 @@ }, { "type": "Identifier", - "start": 8942, - "end": 8953, + "start": 9009, + "end": 9020, "loc": { "start": { - "line": 197, + "line": 199, "column": 66 }, "end": { - "line": 197, + "line": 199, "column": 77 }, "identifierName": "minTileSize" @@ -8866,44 +8970,44 @@ }, { "type": "ExpressionStatement", - "start": 8964, - "end": 9023, + "start": 9031, + "end": 9090, "loc": { "start": { - "line": 198, + "line": 200, "column": 8 }, "end": { - "line": 198, + "line": 200, "column": 67 } }, "expression": { "type": "AssignmentExpression", - "start": 8964, - "end": 9022, + "start": 9031, + "end": 9089, "loc": { "start": { - "line": 198, + "line": 200, "column": 8 }, "end": { - "line": 198, + "line": 200, "column": 66 } }, "operator": "=", "left": { "type": "Identifier", - "start": 8964, - "end": 8971, + "start": 9031, + "end": 9038, "loc": { "start": { - "line": 198, + "line": 200, "column": 8 }, "end": { - "line": 198, + "line": 200, "column": 15 }, "identifierName": "rotateX" @@ -8912,29 +9016,29 @@ }, "right": { "type": "CallExpression", - "start": 8974, - "end": 9022, + "start": 9041, + "end": 9089, "loc": { "start": { - "line": 198, + "line": 200, "column": 18 }, "end": { - "line": 198, + "line": 200, "column": 66 } }, "callee": { "type": "Identifier", - "start": 8974, - "end": 8988, + "start": 9041, + "end": 9055, "loc": { "start": { - "line": 198, + "line": 200, "column": 18 }, "end": { - "line": 198, + "line": 200, "column": 32 }, "identifierName": "overrideOption" @@ -8944,29 +9048,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 8989, - "end": 9012, + "start": 9056, + "end": 9079, "loc": { "start": { - "line": 198, + "line": 200, "column": 33 }, "end": { - "line": 198, + "line": 200, "column": 56 } }, "object": { "type": "Identifier", - "start": 8989, - "end": 9004, + "start": 9056, + "end": 9071, "loc": { "start": { - "line": 198, + "line": 200, "column": 33 }, "end": { - "line": 198, + "line": 200, "column": 48 }, "identifierName": "fileTypeConfigs" @@ -8975,15 +9079,15 @@ }, "property": { "type": "Identifier", - "start": 9005, - "end": 9012, + "start": 9072, + "end": 9079, "loc": { "start": { - "line": 198, + "line": 200, "column": 49 }, "end": { - "line": 198, + "line": 200, "column": 56 }, "identifierName": "rotateX" @@ -8994,15 +9098,15 @@ }, { "type": "Identifier", - "start": 9014, - "end": 9021, + "start": 9081, + "end": 9088, "loc": { "start": { - "line": 198, + "line": 200, "column": 58 }, "end": { - "line": 198, + "line": 200, "column": 65 }, "identifierName": "rotateX" @@ -9015,44 +9119,44 @@ }, { "type": "ExpressionStatement", - "start": 9032, - "end": 9115, + "start": 9099, + "end": 9182, "loc": { "start": { - "line": 199, + "line": 201, "column": 8 }, "end": { - "line": 199, + "line": 201, "column": 91 } }, "expression": { "type": "AssignmentExpression", - "start": 9032, - "end": 9114, + "start": 9099, + "end": 9181, "loc": { "start": { - "line": 199, + "line": 201, "column": 8 }, "end": { - "line": 199, + "line": 201, "column": 90 } }, "operator": "=", "left": { "type": "Identifier", - "start": 9032, - "end": 9047, + "start": 9099, + "end": 9114, "loc": { "start": { - "line": 199, + "line": 201, "column": 8 }, "end": { - "line": 199, + "line": 201, "column": 23 }, "identifierName": "reuseGeometries" @@ -9061,29 +9165,29 @@ }, "right": { "type": "CallExpression", - "start": 9050, - "end": 9114, + "start": 9117, + "end": 9181, "loc": { "start": { - "line": 199, + "line": 201, "column": 26 }, "end": { - "line": 199, + "line": 201, "column": 90 } }, "callee": { "type": "Identifier", - "start": 9050, - "end": 9064, + "start": 9117, + "end": 9131, "loc": { "start": { - "line": 199, + "line": 201, "column": 26 }, "end": { - "line": 199, + "line": 201, "column": 40 }, "identifierName": "overrideOption" @@ -9093,29 +9197,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 9065, - "end": 9096, + "start": 9132, + "end": 9163, "loc": { "start": { - "line": 199, + "line": 201, "column": 41 }, "end": { - "line": 199, + "line": 201, "column": 72 } }, "object": { "type": "Identifier", - "start": 9065, - "end": 9080, + "start": 9132, + "end": 9147, "loc": { "start": { - "line": 199, + "line": 201, "column": 41 }, "end": { - "line": 199, + "line": 201, "column": 56 }, "identifierName": "fileTypeConfigs" @@ -9124,15 +9228,15 @@ }, "property": { "type": "Identifier", - "start": 9081, - "end": 9096, + "start": 9148, + "end": 9163, "loc": { "start": { - "line": 199, + "line": 201, "column": 57 }, "end": { - "line": 199, + "line": 201, "column": 72 }, "identifierName": "reuseGeometries" @@ -9143,15 +9247,15 @@ }, { "type": "Identifier", - "start": 9098, - "end": 9113, + "start": 9165, + "end": 9180, "loc": { "start": { - "line": 199, + "line": 201, "column": 74 }, "end": { - "line": 199, + "line": 201, "column": 89 }, "identifierName": "reuseGeometries" @@ -9164,44 +9268,44 @@ }, { "type": "ExpressionStatement", - "start": 9124, - "end": 9207, + "start": 9191, + "end": 9274, "loc": { "start": { - "line": 200, + "line": 202, "column": 8 }, "end": { - "line": 200, + "line": 202, "column": 91 } }, "expression": { "type": "AssignmentExpression", - "start": 9124, - "end": 9206, + "start": 9191, + "end": 9273, "loc": { "start": { - "line": 200, + "line": 202, "column": 8 }, "end": { - "line": 200, + "line": 202, "column": 90 } }, "operator": "=", "left": { "type": "Identifier", - "start": 9124, - "end": 9139, + "start": 9191, + "end": 9206, "loc": { "start": { - "line": 200, + "line": 202, "column": 8 }, "end": { - "line": 200, + "line": 202, "column": 23 }, "identifierName": "includeTextures" @@ -9210,29 +9314,29 @@ }, "right": { "type": "CallExpression", - "start": 9142, - "end": 9206, + "start": 9209, + "end": 9273, "loc": { "start": { - "line": 200, + "line": 202, "column": 26 }, "end": { - "line": 200, + "line": 202, "column": 90 } }, "callee": { "type": "Identifier", - "start": 9142, - "end": 9156, + "start": 9209, + "end": 9223, "loc": { "start": { - "line": 200, + "line": 202, "column": 26 }, "end": { - "line": 200, + "line": 202, "column": 40 }, "identifierName": "overrideOption" @@ -9242,29 +9346,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 9157, - "end": 9188, + "start": 9224, + "end": 9255, "loc": { "start": { - "line": 200, + "line": 202, "column": 41 }, "end": { - "line": 200, + "line": 202, "column": 72 } }, "object": { "type": "Identifier", - "start": 9157, - "end": 9172, + "start": 9224, + "end": 9239, "loc": { "start": { - "line": 200, + "line": 202, "column": 41 }, "end": { - "line": 200, + "line": 202, "column": 56 }, "identifierName": "fileTypeConfigs" @@ -9273,15 +9377,15 @@ }, "property": { "type": "Identifier", - "start": 9173, - "end": 9188, + "start": 9240, + "end": 9255, "loc": { "start": { - "line": 200, + "line": 202, "column": 57 }, "end": { - "line": 200, + "line": 202, "column": 72 }, "identifierName": "includeTextures" @@ -9292,15 +9396,15 @@ }, { "type": "Identifier", - "start": 9190, - "end": 9205, + "start": 9257, + "end": 9272, "loc": { "start": { - "line": 200, + "line": 202, "column": 74 }, "end": { - "line": 200, + "line": 202, "column": 89 }, "identifierName": "includeTextures" @@ -9313,44 +9417,44 @@ }, { "type": "ExpressionStatement", - "start": 9216, - "end": 9296, + "start": 9283, + "end": 9363, "loc": { "start": { - "line": 201, + "line": 203, "column": 8 }, "end": { - "line": 201, + "line": 203, "column": 88 } }, "expression": { "type": "AssignmentExpression", - "start": 9216, - "end": 9295, + "start": 9283, + "end": 9362, "loc": { "start": { - "line": 201, + "line": 203, "column": 8 }, "end": { - "line": 201, + "line": 203, "column": 87 } }, "operator": "=", "left": { "type": "Identifier", - "start": 9216, - "end": 9230, + "start": 9283, + "end": 9297, "loc": { "start": { - "line": 201, + "line": 203, "column": 8 }, "end": { - "line": 201, + "line": 203, "column": 22 }, "identifierName": "includeNormals" @@ -9359,29 +9463,29 @@ }, "right": { "type": "CallExpression", - "start": 9233, - "end": 9295, + "start": 9300, + "end": 9362, "loc": { "start": { - "line": 201, + "line": 203, "column": 25 }, "end": { - "line": 201, + "line": 203, "column": 87 } }, "callee": { "type": "Identifier", - "start": 9233, - "end": 9247, + "start": 9300, + "end": 9314, "loc": { "start": { - "line": 201, + "line": 203, "column": 25 }, "end": { - "line": 201, + "line": 203, "column": 39 }, "identifierName": "overrideOption" @@ -9391,29 +9495,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 9248, - "end": 9278, + "start": 9315, + "end": 9345, "loc": { "start": { - "line": 201, + "line": 203, "column": 40 }, "end": { - "line": 201, + "line": 203, "column": 70 } }, "object": { "type": "Identifier", - "start": 9248, - "end": 9263, + "start": 9315, + "end": 9330, "loc": { "start": { - "line": 201, + "line": 203, "column": 40 }, "end": { - "line": 201, + "line": 203, "column": 55 }, "identifierName": "fileTypeConfigs" @@ -9422,15 +9526,15 @@ }, "property": { "type": "Identifier", - "start": 9264, - "end": 9278, + "start": 9331, + "end": 9345, "loc": { "start": { - "line": 201, + "line": 203, "column": 56 }, "end": { - "line": 201, + "line": 203, "column": 70 }, "identifierName": "includeNormals" @@ -9441,15 +9545,15 @@ }, { "type": "Identifier", - "start": 9280, - "end": 9294, + "start": 9347, + "end": 9361, "loc": { "start": { - "line": 201, + "line": 203, "column": 72 }, "end": { - "line": 201, + "line": 203, "column": 86 }, "identifierName": "includeNormals" @@ -9462,44 +9566,44 @@ }, { "type": "ExpressionStatement", - "start": 9305, - "end": 9379, + "start": 9372, + "end": 9446, "loc": { "start": { - "line": 202, + "line": 204, "column": 8 }, "end": { - "line": 202, + "line": 204, "column": 82 } }, "expression": { "type": "AssignmentExpression", - "start": 9305, - "end": 9378, + "start": 9372, + "end": 9445, "loc": { "start": { - "line": 202, + "line": 204, "column": 8 }, "end": { - "line": 202, + "line": 204, "column": 81 } }, "operator": "=", "left": { "type": "Identifier", - "start": 9305, - "end": 9317, + "start": 9372, + "end": 9384, "loc": { "start": { - "line": 202, + "line": 204, "column": 8 }, "end": { - "line": 202, + "line": 204, "column": 20 }, "identifierName": "includeTypes" @@ -9508,29 +9612,29 @@ }, "right": { "type": "CallExpression", - "start": 9320, - "end": 9378, + "start": 9387, + "end": 9445, "loc": { "start": { - "line": 202, + "line": 204, "column": 23 }, "end": { - "line": 202, + "line": 204, "column": 81 } }, "callee": { "type": "Identifier", - "start": 9320, - "end": 9334, + "start": 9387, + "end": 9401, "loc": { "start": { - "line": 202, + "line": 204, "column": 23 }, "end": { - "line": 202, + "line": 204, "column": 37 }, "identifierName": "overrideOption" @@ -9540,29 +9644,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 9335, - "end": 9363, + "start": 9402, + "end": 9430, "loc": { "start": { - "line": 202, + "line": 204, "column": 38 }, "end": { - "line": 202, + "line": 204, "column": 66 } }, "object": { "type": "Identifier", - "start": 9335, - "end": 9350, + "start": 9402, + "end": 9417, "loc": { "start": { - "line": 202, + "line": 204, "column": 38 }, "end": { - "line": 202, + "line": 204, "column": 53 }, "identifierName": "fileTypeConfigs" @@ -9571,15 +9675,15 @@ }, "property": { "type": "Identifier", - "start": 9351, - "end": 9363, + "start": 9418, + "end": 9430, "loc": { "start": { - "line": 202, + "line": 204, "column": 54 }, "end": { - "line": 202, + "line": 204, "column": 66 }, "identifierName": "includeTypes" @@ -9590,15 +9694,15 @@ }, { "type": "Identifier", - "start": 9365, - "end": 9377, + "start": 9432, + "end": 9444, "loc": { "start": { - "line": 202, + "line": 204, "column": 68 }, "end": { - "line": 202, + "line": 204, "column": 80 }, "identifierName": "includeTypes" @@ -9611,44 +9715,44 @@ }, { "type": "ExpressionStatement", - "start": 9388, - "end": 9462, + "start": 9455, + "end": 9529, "loc": { "start": { - "line": 203, + "line": 205, "column": 8 }, "end": { - "line": 203, + "line": 205, "column": 82 } }, "expression": { "type": "AssignmentExpression", - "start": 9388, - "end": 9461, + "start": 9455, + "end": 9528, "loc": { "start": { - "line": 203, + "line": 205, "column": 8 }, "end": { - "line": 203, + "line": 205, "column": 81 } }, "operator": "=", "left": { "type": "Identifier", - "start": 9388, - "end": 9400, + "start": 9455, + "end": 9467, "loc": { "start": { - "line": 203, + "line": 205, "column": 8 }, "end": { - "line": 203, + "line": 205, "column": 20 }, "identifierName": "excludeTypes" @@ -9657,29 +9761,29 @@ }, "right": { "type": "CallExpression", - "start": 9403, - "end": 9461, + "start": 9470, + "end": 9528, "loc": { "start": { - "line": 203, + "line": 205, "column": 23 }, "end": { - "line": 203, + "line": 205, "column": 81 } }, "callee": { "type": "Identifier", - "start": 9403, - "end": 9417, + "start": 9470, + "end": 9484, "loc": { "start": { - "line": 203, + "line": 205, "column": 23 }, "end": { - "line": 203, + "line": 205, "column": 37 }, "identifierName": "overrideOption" @@ -9689,29 +9793,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 9418, - "end": 9446, + "start": 9485, + "end": 9513, "loc": { "start": { - "line": 203, + "line": 205, "column": 38 }, "end": { - "line": 203, + "line": 205, "column": 66 } }, "object": { "type": "Identifier", - "start": 9418, - "end": 9433, + "start": 9485, + "end": 9500, "loc": { "start": { - "line": 203, + "line": 205, "column": 38 }, "end": { - "line": 203, + "line": 205, "column": 53 }, "identifierName": "fileTypeConfigs" @@ -9720,15 +9824,15 @@ }, "property": { "type": "Identifier", - "start": 9434, - "end": 9446, + "start": 9501, + "end": 9513, "loc": { "start": { - "line": 203, + "line": 205, "column": 54 }, "end": { - "line": 203, + "line": 205, "column": 66 }, "identifierName": "excludeTypes" @@ -9739,15 +9843,15 @@ }, { "type": "Identifier", - "start": 9448, - "end": 9460, + "start": 9515, + "end": 9527, "loc": { "start": { - "line": 203, + "line": 205, "column": 68 }, "end": { - "line": 203, + "line": 205, "column": 80 }, "identifierName": "excludeTypes" @@ -9760,43 +9864,43 @@ }, { "type": "IfStatement", - "start": 9472, - "end": 9561, + "start": 9539, + "end": 9628, "loc": { "start": { - "line": 205, + "line": 207, "column": 8 }, "end": { - "line": 207, + "line": 209, "column": 9 } }, "test": { "type": "BinaryExpression", - "start": 9476, - "end": 9501, + "start": 9543, + "end": 9568, "loc": { "start": { - "line": 205, + "line": 207, "column": 12 }, "end": { - "line": 205, + "line": 207, "column": 37 } }, "left": { "type": "Identifier", - "start": 9476, - "end": 9491, + "start": 9543, + "end": 9558, "loc": { "start": { - "line": 205, + "line": 207, "column": 12 }, "end": { - "line": 205, + "line": 207, "column": 27 }, "identifierName": "reuseGeometries" @@ -9806,15 +9910,15 @@ "operator": "===", "right": { "type": "BooleanLiteral", - "start": 9496, - "end": 9501, + "start": 9563, + "end": 9568, "loc": { "start": { - "line": 205, + "line": 207, "column": 32 }, "end": { - "line": 205, + "line": 207, "column": 37 } }, @@ -9823,58 +9927,58 @@ }, "consequent": { "type": "BlockStatement", - "start": 9503, - "end": 9561, + "start": 9570, + "end": 9628, "loc": { "start": { - "line": 205, + "line": 207, "column": 39 }, "end": { - "line": 207, + "line": 209, "column": 9 } }, "body": [ { "type": "ExpressionStatement", - "start": 9517, - "end": 9551, + "start": 9584, + "end": 9618, "loc": { "start": { - "line": 206, + "line": 208, "column": 12 }, "end": { - "line": 206, + "line": 208, "column": 46 } }, "expression": { "type": "CallExpression", - "start": 9517, - "end": 9550, + "start": 9584, + "end": 9617, "loc": { "start": { - "line": 206, + "line": 208, "column": 12 }, "end": { - "line": 206, + "line": 208, "column": 45 } }, "callee": { "type": "Identifier", - "start": 9517, - "end": 9520, + "start": 9584, + "end": 9587, "loc": { "start": { - "line": 206, + "line": 208, "column": 12 }, "end": { - "line": 206, + "line": 208, "column": 15 }, "identifierName": "log" @@ -9884,15 +9988,15 @@ "arguments": [ { "type": "StringLiteral", - "start": 9521, - "end": 9549, + "start": 9588, + "end": 9616, "loc": { "start": { - "line": 206, + "line": 208, "column": 16 }, "end": { - "line": 206, + "line": 208, "column": 44 } }, @@ -9912,44 +10016,44 @@ }, { "type": "VariableDeclaration", - "start": 9571, - "end": 9638, + "start": 9638, + "end": 9705, "loc": { "start": { - "line": 209, + "line": 211, "column": 8 }, "end": { - "line": 211, + "line": 213, "column": 11 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 9577, - "end": 9637, + "start": 9644, + "end": 9704, "loc": { "start": { - "line": 209, + "line": 211, "column": 14 }, "end": { - "line": 211, + "line": 213, "column": 10 } }, "id": { "type": "Identifier", - "start": 9577, - "end": 9585, + "start": 9644, + "end": 9652, "loc": { "start": { - "line": 209, + "line": 211, "column": 14 }, "end": { - "line": 209, + "line": 211, "column": 22 }, "identifierName": "xktModel" @@ -9958,29 +10062,29 @@ }, "init": { "type": "NewExpression", - "start": 9588, - "end": 9637, + "start": 9655, + "end": 9704, "loc": { "start": { - "line": 209, + "line": 211, "column": 25 }, "end": { - "line": 211, + "line": 213, "column": 10 } }, "callee": { "type": "Identifier", - "start": 9592, - "end": 9600, + "start": 9659, + "end": 9667, "loc": { "start": { - "line": 209, + "line": 211, "column": 29 }, "end": { - "line": 209, + "line": 211, "column": 37 }, "identifierName": "XKTModel" @@ -9990,30 +10094,30 @@ "arguments": [ { "type": "ObjectExpression", - "start": 9601, - "end": 9636, + "start": 9668, + "end": 9703, "loc": { "start": { - "line": 209, + "line": 211, "column": 38 }, "end": { - "line": 211, + "line": 213, "column": 9 } }, "properties": [ { "type": "ObjectProperty", - "start": 9615, - "end": 9626, + "start": 9682, + "end": 9693, "loc": { "start": { - "line": 210, + "line": 212, "column": 12 }, "end": { - "line": 210, + "line": 212, "column": 23 } }, @@ -10022,15 +10126,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 9615, - "end": 9626, + "start": 9682, + "end": 9693, "loc": { "start": { - "line": 210, + "line": 212, "column": 12 }, "end": { - "line": 210, + "line": 212, "column": 23 }, "identifierName": "minTileSize" @@ -10039,15 +10143,15 @@ }, "value": { "type": "Identifier", - "start": 9615, - "end": 9626, + "start": 9682, + "end": 9693, "loc": { "start": { - "line": 210, + "line": 212, "column": 12 }, "end": { - "line": 210, + "line": 212, "column": 23 }, "identifierName": "minTileSize" @@ -10068,29 +10172,29 @@ }, { "type": "SwitchStatement", - "start": 9648, - "end": 13693, + "start": 9715, + "end": 13760, "loc": { "start": { - "line": 213, + "line": 215, "column": 8 }, "end": { - "line": 334, + "line": 336, "column": 9 } }, "discriminant": { "type": "Identifier", - "start": 9656, - "end": 9659, + "start": 9723, + "end": 9726, "loc": { "start": { - "line": 213, + "line": 215, "column": 16 }, "end": { - "line": 213, + "line": 215, "column": 19 }, "identifierName": "ext" @@ -10100,58 +10204,58 @@ "cases": [ { "type": "SwitchCase", - "start": 9675, - "end": 10053, + "start": 9742, + "end": 10120, "loc": { "start": { - "line": 214, + "line": 216, "column": 12 }, "end": { - "line": 224, + "line": 226, "column": 22 } }, "consequent": [ { "type": "ExpressionStatement", - "start": 9704, - "end": 10030, + "start": 9771, + "end": 10097, "loc": { "start": { - "line": 215, + "line": 217, "column": 16 }, "end": { - "line": 223, + "line": 225, "column": 19 } }, "expression": { "type": "CallExpression", - "start": 9704, - "end": 10029, + "start": 9771, + "end": 10096, "loc": { "start": { - "line": 215, + "line": 217, "column": 16 }, "end": { - "line": 223, + "line": 225, "column": 18 } }, "callee": { "type": "Identifier", - "start": 9704, - "end": 9711, + "start": 9771, + "end": 9778, "loc": { "start": { - "line": 215, + "line": 217, "column": 16 }, "end": { - "line": 215, + "line": 217, "column": 23 }, "identifierName": "convert" @@ -10161,15 +10265,15 @@ "arguments": [ { "type": "Identifier", - "start": 9712, - "end": 9737, + "start": 9779, + "end": 9804, "loc": { "start": { - "line": 215, + "line": 217, "column": 24 }, "end": { - "line": 215, + "line": 217, "column": 49 }, "identifierName": "parseCityJSONIntoXKTModel" @@ -10178,30 +10282,30 @@ }, { "type": "ObjectExpression", - "start": 9739, - "end": 10028, + "start": 9806, + "end": 10095, "loc": { "start": { - "line": 215, + "line": 217, "column": 51 }, "end": { - "line": 223, + "line": 225, "column": 17 } }, "properties": [ { "type": "ObjectProperty", - "start": 9761, - "end": 9789, + "start": 9828, + "end": 9856, "loc": { "start": { - "line": 216, + "line": 218, "column": 20 }, "end": { - "line": 216, + "line": 218, "column": 48 } }, @@ -10210,15 +10314,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 9761, - "end": 9765, + "start": 9828, + "end": 9832, "loc": { "start": { - "line": 216, + "line": 218, "column": 20 }, "end": { - "line": 216, + "line": 218, "column": 24 }, "identifierName": "data" @@ -10227,43 +10331,43 @@ }, "value": { "type": "CallExpression", - "start": 9767, - "end": 9789, + "start": 9834, + "end": 9856, "loc": { "start": { - "line": 216, + "line": 218, "column": 26 }, "end": { - "line": 216, + "line": 218, "column": 48 } }, "callee": { "type": "MemberExpression", - "start": 9767, - "end": 9777, + "start": 9834, + "end": 9844, "loc": { "start": { - "line": 216, + "line": 218, "column": 26 }, "end": { - "line": 216, + "line": 218, "column": 36 } }, "object": { "type": "Identifier", - "start": 9767, - "end": 9771, + "start": 9834, + "end": 9838, "loc": { "start": { - "line": 216, + "line": 218, "column": 26 }, "end": { - "line": 216, + "line": 218, "column": 30 }, "identifierName": "JSON" @@ -10272,15 +10376,15 @@ }, "property": { "type": "Identifier", - "start": 9772, - "end": 9777, + "start": 9839, + "end": 9844, "loc": { "start": { - "line": 216, + "line": 218, "column": 31 }, "end": { - "line": 216, + "line": 218, "column": 36 }, "identifierName": "parse" @@ -10292,15 +10396,15 @@ "arguments": [ { "type": "Identifier", - "start": 9778, - "end": 9788, + "start": 9845, + "end": 9855, "loc": { "start": { - "line": 216, + "line": 218, "column": 37 }, "end": { - "line": 216, + "line": 218, "column": 47 }, "identifierName": "sourceData" @@ -10312,15 +10416,15 @@ }, { "type": "ObjectProperty", - "start": 9811, - "end": 9819, + "start": 9878, + "end": 9886, "loc": { "start": { - "line": 217, + "line": 219, "column": 20 }, "end": { - "line": 217, + "line": 219, "column": 28 } }, @@ -10329,15 +10433,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 9811, - "end": 9819, + "start": 9878, + "end": 9886, "loc": { "start": { - "line": 217, + "line": 219, "column": 20 }, "end": { - "line": 217, + "line": 219, "column": 28 }, "identifierName": "xktModel" @@ -10346,15 +10450,15 @@ }, "value": { "type": "Identifier", - "start": 9811, - "end": 9819, + "start": 9878, + "end": 9886, "loc": { "start": { - "line": 217, + "line": 219, "column": 20 }, "end": { - "line": 217, + "line": 219, "column": 28 }, "identifierName": "xktModel" @@ -10367,15 +10471,15 @@ }, { "type": "ObjectProperty", - "start": 9841, - "end": 9846, + "start": 9908, + "end": 9913, "loc": { "start": { - "line": 218, + "line": 220, "column": 20 }, "end": { - "line": 218, + "line": 220, "column": 25 } }, @@ -10384,15 +10488,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 9841, - "end": 9846, + "start": 9908, + "end": 9913, "loc": { "start": { - "line": 218, + "line": 220, "column": 20 }, "end": { - "line": 218, + "line": 220, "column": 25 }, "identifierName": "stats" @@ -10401,15 +10505,15 @@ }, "value": { "type": "Identifier", - "start": 9841, - "end": 9846, + "start": 9908, + "end": 9913, "loc": { "start": { - "line": 218, + "line": 220, "column": 20 }, "end": { - "line": 218, + "line": 220, "column": 25 }, "identifierName": "stats" @@ -10422,15 +10526,15 @@ }, { "type": "ObjectProperty", - "start": 9868, - "end": 9875, + "start": 9935, + "end": 9942, "loc": { "start": { - "line": 219, + "line": 221, "column": 20 }, "end": { - "line": 219, + "line": 221, "column": 27 } }, @@ -10439,15 +10543,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 9868, - "end": 9875, + "start": 9935, + "end": 9942, "loc": { "start": { - "line": 219, + "line": 221, "column": 20 }, "end": { - "line": 219, + "line": 221, "column": 27 }, "identifierName": "rotateX" @@ -10456,15 +10560,15 @@ }, "value": { "type": "Identifier", - "start": 9868, - "end": 9875, + "start": 9935, + "end": 9942, "loc": { "start": { - "line": 219, + "line": 221, "column": 20 }, "end": { - "line": 219, + "line": 221, "column": 27 }, "identifierName": "rotateX" @@ -10477,15 +10581,15 @@ }, { "type": "ObjectProperty", - "start": 9897, - "end": 9927, + "start": 9964, + "end": 9994, "loc": { "start": { - "line": 220, + "line": 222, "column": 20 }, "end": { - "line": 220, + "line": 222, "column": 50 } }, @@ -10494,15 +10598,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 9897, - "end": 9903, + "start": 9964, + "end": 9970, "loc": { "start": { - "line": 220, + "line": 222, "column": 20 }, "end": { - "line": 220, + "line": 222, "column": 26 }, "identifierName": "center" @@ -10511,29 +10615,29 @@ }, "value": { "type": "MemberExpression", - "start": 9905, - "end": 9927, + "start": 9972, + "end": 9994, "loc": { "start": { - "line": 220, + "line": 222, "column": 28 }, "end": { - "line": 220, + "line": 222, "column": 50 } }, "object": { "type": "Identifier", - "start": 9905, - "end": 9920, + "start": 9972, + "end": 9987, "loc": { "start": { - "line": 220, + "line": 222, "column": 28 }, "end": { - "line": 220, + "line": 222, "column": 43 }, "identifierName": "fileTypeConfigs" @@ -10542,15 +10646,15 @@ }, "property": { "type": "Identifier", - "start": 9921, - "end": 9927, + "start": 9988, + "end": 9994, "loc": { "start": { - "line": 220, + "line": 222, "column": 44 }, "end": { - "line": 220, + "line": 222, "column": 50 }, "identifierName": "center" @@ -10562,15 +10666,15 @@ }, { "type": "ObjectProperty", - "start": 9949, - "end": 9985, + "start": 10016, + "end": 10052, "loc": { "start": { - "line": 221, + "line": 223, "column": 20 }, "end": { - "line": 221, + "line": 223, "column": 56 } }, @@ -10579,15 +10683,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 9949, - "end": 9958, + "start": 10016, + "end": 10025, "loc": { "start": { - "line": 221, + "line": 223, "column": 20 }, "end": { - "line": 221, + "line": 223, "column": 29 }, "identifierName": "transform" @@ -10596,29 +10700,29 @@ }, "value": { "type": "MemberExpression", - "start": 9960, - "end": 9985, + "start": 10027, + "end": 10052, "loc": { "start": { - "line": 221, + "line": 223, "column": 31 }, "end": { - "line": 221, + "line": 223, "column": 56 } }, "object": { "type": "Identifier", - "start": 9960, - "end": 9975, + "start": 10027, + "end": 10042, "loc": { "start": { - "line": 221, + "line": 223, "column": 31 }, "end": { - "line": 221, + "line": 223, "column": 46 }, "identifierName": "fileTypeConfigs" @@ -10627,15 +10731,15 @@ }, "property": { "type": "Identifier", - "start": 9976, - "end": 9985, + "start": 10043, + "end": 10052, "loc": { "start": { - "line": 221, + "line": 223, "column": 47 }, "end": { - "line": 221, + "line": 223, "column": 56 }, "identifierName": "transform" @@ -10647,15 +10751,15 @@ }, { "type": "ObjectProperty", - "start": 10007, - "end": 10010, + "start": 10074, + "end": 10077, "loc": { "start": { - "line": 222, + "line": 224, "column": 20 }, "end": { - "line": 222, + "line": 224, "column": 23 } }, @@ -10664,15 +10768,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10007, - "end": 10010, + "start": 10074, + "end": 10077, "loc": { "start": { - "line": 222, + "line": 224, "column": 20 }, "end": { - "line": 222, + "line": 224, "column": 23 }, "identifierName": "log" @@ -10681,15 +10785,15 @@ }, "value": { "type": "Identifier", - "start": 10007, - "end": 10010, + "start": 10074, + "end": 10077, "loc": { "start": { - "line": 222, + "line": 224, "column": 20 }, "end": { - "line": 222, + "line": 224, "column": 23 }, "identifierName": "log" @@ -10707,15 +10811,15 @@ }, { "type": "BreakStatement", - "start": 10047, - "end": 10053, + "start": 10114, + "end": 10120, "loc": { "start": { - "line": 224, + "line": 226, "column": 16 }, "end": { - "line": 224, + "line": 226, "column": 22 } }, @@ -10724,15 +10828,15 @@ ], "test": { "type": "StringLiteral", - "start": 9680, - "end": 9686, + "start": 9747, + "end": 9753, "loc": { "start": { - "line": 214, + "line": 216, "column": 17 }, "end": { - "line": 214, + "line": 216, "column": 23 } }, @@ -10745,59 +10849,59 @@ }, { "type": "SwitchCase", - "start": 10067, - "end": 10505, + "start": 10134, + "end": 10572, "loc": { "start": { - "line": 226, + "line": 228, "column": 12 }, "end": { - "line": 238, + "line": 240, "column": 22 } }, "consequent": [ { "type": "ExpressionStatement", - "start": 10095, - "end": 10134, + "start": 10162, + "end": 10201, "loc": { "start": { - "line": 227, + "line": 229, "column": 16 }, "end": { - "line": 227, + "line": 229, "column": 55 } }, "expression": { "type": "AssignmentExpression", - "start": 10095, - "end": 10133, + "start": 10162, + "end": 10200, "loc": { "start": { - "line": 227, + "line": 229, "column": 16 }, "end": { - "line": 227, + "line": 229, "column": 54 } }, "operator": "=", "left": { "type": "Identifier", - "start": 10095, - "end": 10105, + "start": 10162, + "end": 10172, "loc": { "start": { - "line": 227, + "line": 229, "column": 16 }, "end": { - "line": 227, + "line": 229, "column": 26 }, "identifierName": "sourceData" @@ -10806,29 +10910,29 @@ }, "right": { "type": "CallExpression", - "start": 10108, - "end": 10133, + "start": 10175, + "end": 10200, "loc": { "start": { - "line": 227, + "line": 229, "column": 29 }, "end": { - "line": 227, + "line": 229, "column": 54 } }, "callee": { "type": "Identifier", - "start": 10108, - "end": 10121, + "start": 10175, + "end": 10188, "loc": { "start": { - "line": 227, + "line": 229, "column": 29 }, "end": { - "line": 227, + "line": 229, "column": 42 }, "identifierName": "toArrayBuffer" @@ -10838,15 +10942,15 @@ "arguments": [ { "type": "Identifier", - "start": 10122, - "end": 10132, + "start": 10189, + "end": 10199, "loc": { "start": { - "line": 227, + "line": 229, "column": 43 }, "end": { - "line": 227, + "line": 229, "column": 53 }, "identifierName": "sourceData" @@ -10859,43 +10963,43 @@ }, { "type": "ExpressionStatement", - "start": 10151, - "end": 10482, + "start": 10218, + "end": 10549, "loc": { "start": { - "line": 228, + "line": 230, "column": 16 }, "end": { - "line": 237, + "line": 239, "column": 19 } }, "expression": { "type": "CallExpression", - "start": 10151, - "end": 10481, + "start": 10218, + "end": 10548, "loc": { "start": { - "line": 228, + "line": 230, "column": 16 }, "end": { - "line": 237, + "line": 239, "column": 18 } }, "callee": { "type": "Identifier", - "start": 10151, - "end": 10158, + "start": 10218, + "end": 10225, "loc": { "start": { - "line": 228, + "line": 230, "column": 16 }, "end": { - "line": 228, + "line": 230, "column": 23 }, "identifierName": "convert" @@ -10905,15 +11009,15 @@ "arguments": [ { "type": "Identifier", - "start": 10159, - "end": 10180, + "start": 10226, + "end": 10247, "loc": { "start": { - "line": 228, + "line": 230, "column": 24 }, "end": { - "line": 228, + "line": 230, "column": 45 }, "identifierName": "parseGLTFIntoXKTModel" @@ -10922,30 +11026,30 @@ }, { "type": "ObjectExpression", - "start": 10182, - "end": 10480, + "start": 10249, + "end": 10547, "loc": { "start": { - "line": 228, + "line": 230, "column": 47 }, "end": { - "line": 237, + "line": 239, "column": 17 } }, "properties": [ { "type": "ObjectProperty", - "start": 10204, - "end": 10220, + "start": 10271, + "end": 10287, "loc": { "start": { - "line": 229, + "line": 231, "column": 20 }, "end": { - "line": 229, + "line": 231, "column": 36 } }, @@ -10954,15 +11058,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10204, - "end": 10208, + "start": 10271, + "end": 10275, "loc": { "start": { - "line": 229, + "line": 231, "column": 20 }, "end": { - "line": 229, + "line": 231, "column": 24 }, "identifierName": "data" @@ -10971,15 +11075,15 @@ }, "value": { "type": "Identifier", - "start": 10210, - "end": 10220, + "start": 10277, + "end": 10287, "loc": { "start": { - "line": 229, + "line": 231, "column": 26 }, "end": { - "line": 229, + "line": 231, "column": 36 }, "identifierName": "sourceData" @@ -10989,15 +11093,15 @@ }, { "type": "ObjectProperty", - "start": 10242, - "end": 10257, + "start": 10309, + "end": 10324, "loc": { "start": { - "line": 230, + "line": 232, "column": 20 }, "end": { - "line": 230, + "line": 232, "column": 35 } }, @@ -11006,15 +11110,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10242, - "end": 10257, + "start": 10309, + "end": 10324, "loc": { "start": { - "line": 230, + "line": 232, "column": 20 }, "end": { - "line": 230, + "line": 232, "column": 35 }, "identifierName": "reuseGeometries" @@ -11023,15 +11127,15 @@ }, "value": { "type": "Identifier", - "start": 10242, - "end": 10257, + "start": 10309, + "end": 10324, "loc": { "start": { - "line": 230, + "line": 232, "column": 20 }, "end": { - "line": 230, + "line": 232, "column": 35 }, "identifierName": "reuseGeometries" @@ -11044,15 +11148,15 @@ }, { "type": "ObjectProperty", - "start": 10279, - "end": 10294, + "start": 10346, + "end": 10361, "loc": { "start": { - "line": 231, + "line": 233, "column": 20 }, "end": { - "line": 231, + "line": 233, "column": 35 } }, @@ -11061,15 +11165,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10279, - "end": 10294, + "start": 10346, + "end": 10361, "loc": { "start": { - "line": 231, + "line": 233, "column": 20 }, "end": { - "line": 231, + "line": 233, "column": 35 }, "identifierName": "includeTextures" @@ -11078,15 +11182,15 @@ }, "value": { "type": "Identifier", - "start": 10279, - "end": 10294, + "start": 10346, + "end": 10361, "loc": { "start": { - "line": 231, + "line": 233, "column": 20 }, "end": { - "line": 231, + "line": 233, "column": 35 }, "identifierName": "includeTextures" @@ -11099,15 +11203,15 @@ }, { "type": "ObjectProperty", - "start": 10316, - "end": 10330, + "start": 10383, + "end": 10397, "loc": { "start": { - "line": 232, + "line": 234, "column": 20 }, "end": { - "line": 232, + "line": 234, "column": 34 } }, @@ -11116,15 +11220,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10316, - "end": 10330, + "start": 10383, + "end": 10397, "loc": { "start": { - "line": 232, + "line": 234, "column": 20 }, "end": { - "line": 232, + "line": 234, "column": 34 }, "identifierName": "includeNormals" @@ -11133,15 +11237,15 @@ }, "value": { "type": "Identifier", - "start": 10316, - "end": 10330, + "start": 10383, + "end": 10397, "loc": { "start": { - "line": 232, + "line": 234, "column": 20 }, "end": { - "line": 232, + "line": 234, "column": 34 }, "identifierName": "includeNormals" @@ -11154,15 +11258,15 @@ }, { "type": "ObjectProperty", - "start": 10352, - "end": 10380, + "start": 10419, + "end": 10447, "loc": { "start": { - "line": 233, + "line": 235, "column": 20 }, "end": { - "line": 233, + "line": 235, "column": 48 } }, @@ -11171,15 +11275,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10352, - "end": 10365, + "start": 10419, + "end": 10432, "loc": { "start": { - "line": 233, + "line": 235, "column": 20 }, "end": { - "line": 233, + "line": 235, "column": 33 }, "identifierName": "metaModelData" @@ -11188,15 +11292,15 @@ }, "value": { "type": "Identifier", - "start": 10367, - "end": 10380, + "start": 10434, + "end": 10447, "loc": { "start": { - "line": 233, + "line": 235, "column": 35 }, "end": { - "line": 233, + "line": 235, "column": 48 }, "identifierName": "metaModelJSON" @@ -11206,15 +11310,15 @@ }, { "type": "ObjectProperty", - "start": 10402, - "end": 10410, + "start": 10469, + "end": 10477, "loc": { "start": { - "line": 234, + "line": 236, "column": 20 }, "end": { - "line": 234, + "line": 236, "column": 28 } }, @@ -11223,15 +11327,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10402, - "end": 10410, + "start": 10469, + "end": 10477, "loc": { "start": { - "line": 234, + "line": 236, "column": 20 }, "end": { - "line": 234, + "line": 236, "column": 28 }, "identifierName": "xktModel" @@ -11240,15 +11344,15 @@ }, "value": { "type": "Identifier", - "start": 10402, - "end": 10410, + "start": 10469, + "end": 10477, "loc": { "start": { - "line": 234, + "line": 236, "column": 20 }, "end": { - "line": 234, + "line": 236, "column": 28 }, "identifierName": "xktModel" @@ -11261,15 +11365,15 @@ }, { "type": "ObjectProperty", - "start": 10432, - "end": 10437, + "start": 10499, + "end": 10504, "loc": { "start": { - "line": 235, + "line": 237, "column": 20 }, "end": { - "line": 235, + "line": 237, "column": 25 } }, @@ -11278,15 +11382,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10432, - "end": 10437, + "start": 10499, + "end": 10504, "loc": { "start": { - "line": 235, + "line": 237, "column": 20 }, "end": { - "line": 235, + "line": 237, "column": 25 }, "identifierName": "stats" @@ -11295,15 +11399,15 @@ }, "value": { "type": "Identifier", - "start": 10432, - "end": 10437, + "start": 10499, + "end": 10504, "loc": { "start": { - "line": 235, + "line": 237, "column": 20 }, "end": { - "line": 235, + "line": 237, "column": 25 }, "identifierName": "stats" @@ -11316,15 +11420,15 @@ }, { "type": "ObjectProperty", - "start": 10459, - "end": 10462, + "start": 10526, + "end": 10529, "loc": { "start": { - "line": 236, + "line": 238, "column": 20 }, "end": { - "line": 236, + "line": 238, "column": 23 } }, @@ -11333,15 +11437,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10459, - "end": 10462, + "start": 10526, + "end": 10529, "loc": { "start": { - "line": 236, + "line": 238, "column": 20 }, "end": { - "line": 236, + "line": 238, "column": 23 }, "identifierName": "log" @@ -11350,15 +11454,15 @@ }, "value": { "type": "Identifier", - "start": 10459, - "end": 10462, + "start": 10526, + "end": 10529, "loc": { "start": { - "line": 236, + "line": 238, "column": 20 }, "end": { - "line": 236, + "line": 238, "column": 23 }, "identifierName": "log" @@ -11376,15 +11480,15 @@ }, { "type": "BreakStatement", - "start": 10499, - "end": 10505, + "start": 10566, + "end": 10572, "loc": { "start": { - "line": 238, + "line": 240, "column": 16 }, "end": { - "line": 238, + "line": 240, "column": 22 } }, @@ -11393,15 +11497,15 @@ ], "test": { "type": "StringLiteral", - "start": 10072, - "end": 10077, + "start": 10139, + "end": 10144, "loc": { "start": { - "line": 226, + "line": 228, "column": 17 }, "end": { - "line": 226, + "line": 228, "column": 22 } }, @@ -11414,59 +11518,59 @@ }, { "type": "SwitchCase", - "start": 10519, - "end": 11454, + "start": 10586, + "end": 11521, "loc": { "start": { - "line": 240, + "line": 242, "column": 12 }, "end": { - "line": 261, + "line": 263, "column": 22 } }, "consequent": [ { "type": "VariableDeclaration", - "start": 10548, - "end": 10588, + "start": 10615, + "end": 10655, "loc": { "start": { - "line": 241, + "line": 243, "column": 16 }, "end": { - "line": 241, + "line": 243, "column": 56 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 10554, - "end": 10587, + "start": 10621, + "end": 10654, "loc": { "start": { - "line": 241, + "line": 243, "column": 22 }, "end": { - "line": 241, + "line": 243, "column": 55 } }, "id": { "type": "Identifier", - "start": 10554, - "end": 10562, + "start": 10621, + "end": 10629, "loc": { "start": { - "line": 241, + "line": 243, "column": 22 }, "end": { - "line": 241, + "line": 243, "column": 30 }, "identifierName": "gltfJSON" @@ -11475,43 +11579,43 @@ }, "init": { "type": "CallExpression", - "start": 10565, - "end": 10587, + "start": 10632, + "end": 10654, "loc": { "start": { - "line": 241, + "line": 243, "column": 33 }, "end": { - "line": 241, + "line": 243, "column": 55 } }, "callee": { "type": "MemberExpression", - "start": 10565, - "end": 10575, + "start": 10632, + "end": 10642, "loc": { "start": { - "line": 241, + "line": 243, "column": 33 }, "end": { - "line": 241, + "line": 243, "column": 43 } }, "object": { "type": "Identifier", - "start": 10565, - "end": 10569, + "start": 10632, + "end": 10636, "loc": { "start": { - "line": 241, + "line": 243, "column": 33 }, "end": { - "line": 241, + "line": 243, "column": 37 }, "identifierName": "JSON" @@ -11520,15 +11624,15 @@ }, "property": { "type": "Identifier", - "start": 10570, - "end": 10575, + "start": 10637, + "end": 10642, "loc": { "start": { - "line": 241, + "line": 243, "column": 38 }, "end": { - "line": 241, + "line": 243, "column": 43 }, "identifierName": "parse" @@ -11540,15 +11644,15 @@ "arguments": [ { "type": "Identifier", - "start": 10576, - "end": 10586, + "start": 10643, + "end": 10653, "loc": { "start": { - "line": 241, + "line": 243, "column": 44 }, "end": { - "line": 241, + "line": 243, "column": 54 }, "identifierName": "sourceData" @@ -11563,44 +11667,44 @@ }, { "type": "VariableDeclaration", - "start": 10605, - "end": 10660, + "start": 10672, + "end": 10727, "loc": { "start": { - "line": 242, + "line": 244, "column": 16 }, "end": { - "line": 242, + "line": 244, "column": 71 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 10611, - "end": 10659, + "start": 10678, + "end": 10726, "loc": { "start": { - "line": 242, + "line": 244, "column": 22 }, "end": { - "line": 242, + "line": 244, "column": 70 } }, "id": { "type": "Identifier", - "start": 10611, - "end": 10623, + "start": 10678, + "end": 10690, "loc": { "start": { - "line": 242, + "line": 244, "column": 22 }, "end": { - "line": 242, + "line": 244, "column": 34 }, "identifierName": "gltfBasePath" @@ -11609,29 +11713,29 @@ }, "init": { "type": "ConditionalExpression", - "start": 10626, - "end": 10659, + "start": 10693, + "end": 10726, "loc": { "start": { - "line": 242, + "line": 244, "column": 37 }, "end": { - "line": 242, + "line": 244, "column": 70 } }, "test": { "type": "Identifier", - "start": 10626, - "end": 10632, + "start": 10693, + "end": 10699, "loc": { "start": { - "line": 242, + "line": 244, "column": 37 }, "end": { - "line": 242, + "line": 244, "column": 43 }, "identifierName": "source" @@ -11640,29 +11744,29 @@ }, "consequent": { "type": "CallExpression", - "start": 10635, - "end": 10654, + "start": 10702, + "end": 10721, "loc": { "start": { - "line": 242, + "line": 244, "column": 46 }, "end": { - "line": 242, + "line": 244, "column": 65 } }, "callee": { "type": "Identifier", - "start": 10635, - "end": 10646, + "start": 10702, + "end": 10713, "loc": { "start": { - "line": 242, + "line": 244, "column": 46 }, "end": { - "line": 242, + "line": 244, "column": 57 }, "identifierName": "getBasePath" @@ -11672,15 +11776,15 @@ "arguments": [ { "type": "Identifier", - "start": 10647, - "end": 10653, + "start": 10714, + "end": 10720, "loc": { "start": { - "line": 242, + "line": 244, "column": 58 }, "end": { - "line": 242, + "line": 244, "column": 64 }, "identifierName": "source" @@ -11691,15 +11795,15 @@ }, "alternate": { "type": "StringLiteral", - "start": 10657, - "end": 10659, + "start": 10724, + "end": 10726, "loc": { "start": { - "line": 242, + "line": 244, "column": 68 }, "end": { - "line": 242, + "line": 244, "column": 70 } }, @@ -11716,43 +11820,43 @@ }, { "type": "ExpressionStatement", - "start": 10677, - "end": 11431, + "start": 10744, + "end": 11498, "loc": { "start": { - "line": 243, + "line": 245, "column": 16 }, "end": { - "line": 260, + "line": 262, "column": 19 } }, "expression": { "type": "CallExpression", - "start": 10677, - "end": 11430, + "start": 10744, + "end": 11497, "loc": { "start": { - "line": 243, + "line": 245, "column": 16 }, "end": { - "line": 260, + "line": 262, "column": 18 } }, "callee": { "type": "Identifier", - "start": 10677, - "end": 10684, + "start": 10744, + "end": 10751, "loc": { "start": { - "line": 243, + "line": 245, "column": 16 }, "end": { - "line": 243, + "line": 245, "column": 23 }, "identifierName": "convert" @@ -11762,15 +11866,15 @@ "arguments": [ { "type": "Identifier", - "start": 10685, - "end": 10710, + "start": 10752, + "end": 10777, "loc": { "start": { - "line": 243, + "line": 245, "column": 24 }, "end": { - "line": 243, + "line": 245, "column": 49 }, "identifierName": "parseGLTFJSONIntoXKTModel" @@ -11779,30 +11883,30 @@ }, { "type": "ObjectExpression", - "start": 10712, - "end": 11429, + "start": 10779, + "end": 11496, "loc": { "start": { - "line": 243, + "line": 245, "column": 51 }, "end": { - "line": 260, + "line": 262, "column": 17 } }, "properties": [ { "type": "ObjectProperty", - "start": 10734, - "end": 10755, + "start": 10801, + "end": 10822, "loc": { "start": { - "line": 244, + "line": 246, "column": 20 }, "end": { - "line": 244, + "line": 246, "column": 41 } }, @@ -11811,15 +11915,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10734, - "end": 10741, + "start": 10801, + "end": 10808, "loc": { "start": { - "line": 244, + "line": 246, "column": 20 }, "end": { - "line": 244, + "line": 246, "column": 27 }, "identifierName": "baseUri" @@ -11828,15 +11932,15 @@ }, "value": { "type": "Identifier", - "start": 10743, - "end": 10755, + "start": 10810, + "end": 10822, "loc": { "start": { - "line": 244, + "line": 246, "column": 29 }, "end": { - "line": 244, + "line": 246, "column": 41 }, "identifierName": "gltfBasePath" @@ -11846,15 +11950,15 @@ }, { "type": "ObjectProperty", - "start": 10777, - "end": 10791, + "start": 10844, + "end": 10858, "loc": { "start": { - "line": 245, + "line": 247, "column": 20 }, "end": { - "line": 245, + "line": 247, "column": 34 } }, @@ -11863,15 +11967,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10777, - "end": 10781, + "start": 10844, + "end": 10848, "loc": { "start": { - "line": 245, + "line": 247, "column": 20 }, "end": { - "line": 245, + "line": 247, "column": 24 }, "identifierName": "data" @@ -11880,15 +11984,15 @@ }, "value": { "type": "Identifier", - "start": 10783, - "end": 10791, + "start": 10850, + "end": 10858, "loc": { "start": { - "line": 245, + "line": 247, "column": 26 }, "end": { - "line": 245, + "line": 247, "column": 34 }, "identifierName": "gltfJSON" @@ -11898,15 +12002,15 @@ }, { "type": "ObjectProperty", - "start": 10813, - "end": 10828, + "start": 10880, + "end": 10895, "loc": { "start": { - "line": 246, + "line": 248, "column": 20 }, "end": { - "line": 246, + "line": 248, "column": 35 } }, @@ -11915,15 +12019,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10813, - "end": 10828, + "start": 10880, + "end": 10895, "loc": { "start": { - "line": 246, + "line": 248, "column": 20 }, "end": { - "line": 246, + "line": 248, "column": 35 }, "identifierName": "reuseGeometries" @@ -11932,15 +12036,15 @@ }, "value": { "type": "Identifier", - "start": 10813, - "end": 10828, + "start": 10880, + "end": 10895, "loc": { "start": { - "line": 246, + "line": 248, "column": 20 }, "end": { - "line": 246, + "line": 248, "column": 35 }, "identifierName": "reuseGeometries" @@ -11953,15 +12057,15 @@ }, { "type": "ObjectProperty", - "start": 10850, - "end": 10865, + "start": 10917, + "end": 10932, "loc": { "start": { - "line": 247, + "line": 249, "column": 20 }, "end": { - "line": 247, + "line": 249, "column": 35 } }, @@ -11970,15 +12074,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10850, - "end": 10865, + "start": 10917, + "end": 10932, "loc": { "start": { - "line": 247, + "line": 249, "column": 20 }, "end": { - "line": 247, + "line": 249, "column": 35 }, "identifierName": "includeTextures" @@ -11987,15 +12091,15 @@ }, "value": { "type": "Identifier", - "start": 10850, - "end": 10865, + "start": 10917, + "end": 10932, "loc": { "start": { - "line": 247, + "line": 249, "column": 20 }, "end": { - "line": 247, + "line": 249, "column": 35 }, "identifierName": "includeTextures" @@ -12008,15 +12112,15 @@ }, { "type": "ObjectProperty", - "start": 10887, - "end": 10901, + "start": 10954, + "end": 10968, "loc": { "start": { - "line": 248, + "line": 250, "column": 20 }, "end": { - "line": 248, + "line": 250, "column": 34 } }, @@ -12025,15 +12129,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10887, - "end": 10901, + "start": 10954, + "end": 10968, "loc": { "start": { - "line": 248, + "line": 250, "column": 20 }, "end": { - "line": 248, + "line": 250, "column": 34 }, "identifierName": "includeNormals" @@ -12042,15 +12146,15 @@ }, "value": { "type": "Identifier", - "start": 10887, - "end": 10901, + "start": 10954, + "end": 10968, "loc": { "start": { - "line": 248, + "line": 250, "column": 20 }, "end": { - "line": 248, + "line": 250, "column": 34 }, "identifierName": "includeNormals" @@ -12063,15 +12167,15 @@ }, { "type": "ObjectProperty", - "start": 10923, - "end": 10951, + "start": 10990, + "end": 11018, "loc": { "start": { - "line": 249, + "line": 251, "column": 20 }, "end": { - "line": 249, + "line": 251, "column": 48 } }, @@ -12080,15 +12184,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10923, - "end": 10936, + "start": 10990, + "end": 11003, "loc": { "start": { - "line": 249, + "line": 251, "column": 20 }, "end": { - "line": 249, + "line": 251, "column": 33 }, "identifierName": "metaModelData" @@ -12097,15 +12201,15 @@ }, "value": { "type": "Identifier", - "start": 10938, - "end": 10951, + "start": 11005, + "end": 11018, "loc": { "start": { - "line": 249, + "line": 251, "column": 35 }, "end": { - "line": 249, + "line": 251, "column": 48 }, "identifierName": "metaModelJSON" @@ -12115,15 +12219,15 @@ }, { "type": "ObjectProperty", - "start": 10973, - "end": 10981, + "start": 11040, + "end": 11048, "loc": { "start": { - "line": 250, + "line": 252, "column": 20 }, "end": { - "line": 250, + "line": 252, "column": 28 } }, @@ -12132,15 +12236,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10973, - "end": 10981, + "start": 11040, + "end": 11048, "loc": { "start": { - "line": 250, + "line": 252, "column": 20 }, "end": { - "line": 250, + "line": 252, "column": 28 }, "identifierName": "xktModel" @@ -12149,15 +12253,15 @@ }, "value": { "type": "Identifier", - "start": 10973, - "end": 10981, + "start": 11040, + "end": 11048, "loc": { "start": { - "line": 250, + "line": 252, "column": 20 }, "end": { - "line": 250, + "line": 252, "column": 28 }, "identifierName": "xktModel" @@ -12170,15 +12274,15 @@ }, { "type": "ObjectProperty", - "start": 11003, - "end": 11359, + "start": 11070, + "end": 11426, "loc": { "start": { - "line": 251, + "line": 253, "column": 20 }, "end": { - "line": 257, + "line": 259, "column": 21 } }, @@ -12187,15 +12291,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11003, - "end": 11016, + "start": 11070, + "end": 11083, "loc": { "start": { - "line": 251, + "line": 253, "column": 20 }, "end": { - "line": 251, + "line": 253, "column": 33 }, "identifierName": "getAttachment" @@ -12204,15 +12308,15 @@ }, "value": { "type": "ArrowFunctionExpression", - "start": 11018, - "end": 11359, + "start": 11085, + "end": 11426, "loc": { "start": { - "line": 251, + "line": 253, "column": 35 }, "end": { - "line": 257, + "line": 259, "column": 21 } }, @@ -12223,15 +12327,15 @@ "params": [ { "type": "Identifier", - "start": 11025, - "end": 11029, + "start": 11092, + "end": 11096, "loc": { "start": { - "line": 251, + "line": 253, "column": 42 }, "end": { - "line": 251, + "line": 253, "column": 46 }, "identifierName": "name" @@ -12241,59 +12345,59 @@ ], "body": { "type": "BlockStatement", - "start": 11034, - "end": 11359, + "start": 11101, + "end": 11426, "loc": { "start": { - "line": 251, + "line": 253, "column": 51 }, "end": { - "line": 257, + "line": 259, "column": 21 } }, "body": [ { "type": "VariableDeclaration", - "start": 11060, - "end": 11097, + "start": 11127, + "end": 11164, "loc": { "start": { - "line": 252, + "line": 254, "column": 24 }, "end": { - "line": 252, + "line": 254, "column": 61 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 11066, - "end": 11096, + "start": 11133, + "end": 11163, "loc": { "start": { - "line": 252, + "line": 254, "column": 30 }, "end": { - "line": 252, + "line": 254, "column": 60 } }, "id": { "type": "Identifier", - "start": 11066, - "end": 11074, + "start": 11133, + "end": 11141, "loc": { "start": { - "line": 252, + "line": 254, "column": 30 }, "end": { - "line": 252, + "line": 254, "column": 38 }, "identifierName": "filePath" @@ -12302,29 +12406,29 @@ }, "init": { "type": "BinaryExpression", - "start": 11077, - "end": 11096, + "start": 11144, + "end": 11163, "loc": { "start": { - "line": 252, + "line": 254, "column": 41 }, "end": { - "line": 252, + "line": 254, "column": 60 } }, "left": { "type": "Identifier", - "start": 11077, - "end": 11089, + "start": 11144, + "end": 11156, "loc": { "start": { - "line": 252, + "line": 254, "column": 41 }, "end": { - "line": 252, + "line": 254, "column": 53 }, "identifierName": "gltfBasePath" @@ -12334,15 +12438,15 @@ "operator": "+", "right": { "type": "Identifier", - "start": 11092, - "end": 11096, + "start": 11159, + "end": 11163, "loc": { "start": { - "line": 252, + "line": 254, "column": 56 }, "end": { - "line": 252, + "line": 254, "column": 60 }, "identifierName": "name" @@ -12356,43 +12460,43 @@ }, { "type": "ExpressionStatement", - "start": 11122, - "end": 11166, + "start": 11189, + "end": 11233, "loc": { "start": { - "line": 253, + "line": 255, "column": 24 }, "end": { - "line": 253, + "line": 255, "column": 68 } }, "expression": { "type": "CallExpression", - "start": 11122, - "end": 11165, + "start": 11189, + "end": 11232, "loc": { "start": { - "line": 253, + "line": 255, "column": 24 }, "end": { - "line": 253, + "line": 255, "column": 67 } }, "callee": { "type": "Identifier", - "start": 11122, - "end": 11125, + "start": 11189, + "end": 11192, "loc": { "start": { - "line": 253, + "line": 255, "column": 24 }, "end": { - "line": 253, + "line": 255, "column": 27 }, "identifierName": "log" @@ -12402,30 +12506,30 @@ "arguments": [ { "type": "TemplateLiteral", - "start": 11126, - "end": 11164, + "start": 11193, + "end": 11231, "loc": { "start": { - "line": 253, + "line": 255, "column": 28 }, "end": { - "line": 253, + "line": 255, "column": 66 } }, "expressions": [ { "type": "Identifier", - "start": 11154, - "end": 11162, + "start": 11221, + "end": 11229, "loc": { "start": { - "line": 253, + "line": 255, "column": 56 }, "end": { - "line": 253, + "line": 255, "column": 64 }, "identifierName": "filePath" @@ -12436,15 +12540,15 @@ "quasis": [ { "type": "TemplateElement", - "start": 11127, - "end": 11152, + "start": 11194, + "end": 11219, "loc": { "start": { - "line": 253, + "line": 255, "column": 29 }, "end": { - "line": 253, + "line": 255, "column": 54 } }, @@ -12456,15 +12560,15 @@ }, { "type": "TemplateElement", - "start": 11163, - "end": 11163, + "start": 11230, + "end": 11230, "loc": { "start": { - "line": 253, + "line": 255, "column": 65 }, "end": { - "line": 253, + "line": 255, "column": 65 } }, @@ -12481,44 +12585,44 @@ }, { "type": "VariableDeclaration", - "start": 11191, - "end": 11232, + "start": 11258, + "end": 11299, "loc": { "start": { - "line": 254, + "line": 256, "column": 24 }, "end": { - "line": 254, + "line": 256, "column": 65 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 11197, - "end": 11231, + "start": 11264, + "end": 11298, "loc": { "start": { - "line": 254, + "line": 256, "column": 30 }, "end": { - "line": 254, + "line": 256, "column": 64 } }, "id": { "type": "Identifier", - "start": 11197, - "end": 11203, + "start": 11264, + "end": 11270, "loc": { "start": { - "line": 254, + "line": 256, "column": 30 }, "end": { - "line": 254, + "line": 256, "column": 36 }, "identifierName": "buffer" @@ -12527,43 +12631,43 @@ }, "init": { "type": "CallExpression", - "start": 11206, - "end": 11231, + "start": 11273, + "end": 11298, "loc": { "start": { - "line": 254, + "line": 256, "column": 39 }, "end": { - "line": 254, + "line": 256, "column": 64 } }, "callee": { "type": "MemberExpression", - "start": 11206, - "end": 11221, + "start": 11273, + "end": 11288, "loc": { "start": { - "line": 254, + "line": 256, "column": 39 }, "end": { - "line": 254, + "line": 256, "column": 54 } }, "object": { "type": "Identifier", - "start": 11206, - "end": 11208, + "start": 11273, + "end": 11275, "loc": { "start": { - "line": 254, + "line": 256, "column": 39 }, "end": { - "line": 254, + "line": 256, "column": 41 }, "identifierName": "fs" @@ -12572,15 +12676,15 @@ }, "property": { "type": "Identifier", - "start": 11209, - "end": 11221, + "start": 11276, + "end": 11288, "loc": { "start": { - "line": 254, + "line": 256, "column": 42 }, "end": { - "line": 254, + "line": 256, "column": 54 }, "identifierName": "readFileSync" @@ -12592,15 +12696,15 @@ "arguments": [ { "type": "Identifier", - "start": 11222, - "end": 11230, + "start": 11289, + "end": 11297, "loc": { "start": { - "line": 254, + "line": 256, "column": 55 }, "end": { - "line": 254, + "line": 256, "column": 63 }, "identifierName": "filePath" @@ -12615,44 +12719,44 @@ }, { "type": "VariableDeclaration", - "start": 11257, - "end": 11296, + "start": 11324, + "end": 11363, "loc": { "start": { - "line": 255, + "line": 257, "column": 24 }, "end": { - "line": 255, + "line": 257, "column": 63 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 11263, - "end": 11295, + "start": 11330, + "end": 11362, "loc": { "start": { - "line": 255, + "line": 257, "column": 30 }, "end": { - "line": 255, + "line": 257, "column": 62 } }, "id": { "type": "Identifier", - "start": 11263, - "end": 11271, + "start": 11330, + "end": 11338, "loc": { "start": { - "line": 255, + "line": 257, "column": 30 }, "end": { - "line": 255, + "line": 257, "column": 38 }, "identifierName": "arrayBuf" @@ -12661,29 +12765,29 @@ }, "init": { "type": "CallExpression", - "start": 11274, - "end": 11295, + "start": 11341, + "end": 11362, "loc": { "start": { - "line": 255, + "line": 257, "column": 41 }, "end": { - "line": 255, + "line": 257, "column": 62 } }, "callee": { "type": "Identifier", - "start": 11274, - "end": 11287, + "start": 11341, + "end": 11354, "loc": { "start": { - "line": 255, + "line": 257, "column": 41 }, "end": { - "line": 255, + "line": 257, "column": 54 }, "identifierName": "toArrayBuffer" @@ -12693,15 +12797,15 @@ "arguments": [ { "type": "Identifier", - "start": 11288, - "end": 11294, + "start": 11355, + "end": 11361, "loc": { "start": { - "line": 255, + "line": 257, "column": 55 }, "end": { - "line": 255, + "line": 257, "column": 61 }, "identifierName": "buffer" @@ -12716,29 +12820,29 @@ }, { "type": "ReturnStatement", - "start": 11321, - "end": 11337, + "start": 11388, + "end": 11404, "loc": { "start": { - "line": 256, + "line": 258, "column": 24 }, "end": { - "line": 256, + "line": 258, "column": 40 } }, "argument": { "type": "Identifier", - "start": 11328, - "end": 11336, + "start": 11395, + "end": 11403, "loc": { "start": { - "line": 256, + "line": 258, "column": 31 }, "end": { - "line": 256, + "line": 258, "column": 39 }, "identifierName": "arrayBuf" @@ -12753,15 +12857,15 @@ }, { "type": "ObjectProperty", - "start": 11381, - "end": 11386, + "start": 11448, + "end": 11453, "loc": { "start": { - "line": 258, + "line": 260, "column": 20 }, "end": { - "line": 258, + "line": 260, "column": 25 } }, @@ -12770,15 +12874,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11381, - "end": 11386, + "start": 11448, + "end": 11453, "loc": { "start": { - "line": 258, + "line": 260, "column": 20 }, "end": { - "line": 258, + "line": 260, "column": 25 }, "identifierName": "stats" @@ -12787,15 +12891,15 @@ }, "value": { "type": "Identifier", - "start": 11381, - "end": 11386, + "start": 11448, + "end": 11453, "loc": { "start": { - "line": 258, + "line": 260, "column": 20 }, "end": { - "line": 258, + "line": 260, "column": 25 }, "identifierName": "stats" @@ -12808,15 +12912,15 @@ }, { "type": "ObjectProperty", - "start": 11408, - "end": 11411, + "start": 11475, + "end": 11478, "loc": { "start": { - "line": 259, + "line": 261, "column": 20 }, "end": { - "line": 259, + "line": 261, "column": 23 } }, @@ -12825,15 +12929,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11408, - "end": 11411, + "start": 11475, + "end": 11478, "loc": { "start": { - "line": 259, + "line": 261, "column": 20 }, "end": { - "line": 259, + "line": 261, "column": 23 }, "identifierName": "log" @@ -12842,15 +12946,15 @@ }, "value": { "type": "Identifier", - "start": 11408, - "end": 11411, + "start": 11475, + "end": 11478, "loc": { "start": { - "line": 259, + "line": 261, "column": 20 }, "end": { - "line": 259, + "line": 261, "column": 23 }, "identifierName": "log" @@ -12868,15 +12972,15 @@ }, { "type": "BreakStatement", - "start": 11448, - "end": 11454, + "start": 11515, + "end": 11521, "loc": { "start": { - "line": 261, + "line": 263, "column": 16 }, "end": { - "line": 261, + "line": 263, "column": 22 } }, @@ -12885,15 +12989,15 @@ ], "test": { "type": "StringLiteral", - "start": 10524, - "end": 10530, + "start": 10591, + "end": 10597, "loc": { "start": { - "line": 240, + "line": 242, "column": 17 }, "end": { - "line": 240, + "line": 242, "column": 23 } }, @@ -12906,58 +13010,58 @@ }, { "type": "SwitchCase", - "start": 11468, - "end": 11821, + "start": 11535, + "end": 11888, "loc": { "start": { - "line": 263, + "line": 265, "column": 12 }, "end": { - "line": 274, + "line": 276, "column": 22 } }, "consequent": [ { "type": "ExpressionStatement", - "start": 11496, - "end": 11798, + "start": 11563, + "end": 11865, "loc": { "start": { - "line": 264, + "line": 266, "column": 16 }, "end": { - "line": 273, + "line": 275, "column": 19 } }, "expression": { "type": "CallExpression", - "start": 11496, - "end": 11797, + "start": 11563, + "end": 11864, "loc": { "start": { - "line": 264, + "line": 266, "column": 16 }, "end": { - "line": 273, + "line": 275, "column": 18 } }, "callee": { "type": "Identifier", - "start": 11496, - "end": 11503, + "start": 11563, + "end": 11570, "loc": { "start": { - "line": 264, + "line": 266, "column": 16 }, "end": { - "line": 264, + "line": 266, "column": 23 }, "identifierName": "convert" @@ -12967,15 +13071,15 @@ "arguments": [ { "type": "Identifier", - "start": 11504, - "end": 11524, + "start": 11571, + "end": 11591, "loc": { "start": { - "line": 264, + "line": 266, "column": 24 }, "end": { - "line": 264, + "line": 266, "column": 44 }, "identifierName": "parseIFCIntoXKTModel" @@ -12984,30 +13088,30 @@ }, { "type": "ObjectExpression", - "start": 11526, - "end": 11796, + "start": 11593, + "end": 11863, "loc": { "start": { - "line": 264, + "line": 266, "column": 46 }, "end": { - "line": 273, + "line": 275, "column": 17 } }, "properties": [ { "type": "ObjectProperty", - "start": 11548, - "end": 11554, + "start": 11615, + "end": 11621, "loc": { "start": { - "line": 265, + "line": 267, "column": 20 }, "end": { - "line": 265, + "line": 267, "column": 26 } }, @@ -13016,15 +13120,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11548, - "end": 11554, + "start": 11615, + "end": 11621, "loc": { "start": { - "line": 265, + "line": 267, "column": 20 }, "end": { - "line": 265, + "line": 267, "column": 26 }, "identifierName": "WebIFC" @@ -13033,15 +13137,15 @@ }, "value": { "type": "Identifier", - "start": 11548, - "end": 11554, + "start": 11615, + "end": 11621, "loc": { "start": { - "line": 265, + "line": 267, "column": 20 }, "end": { - "line": 265, + "line": 267, "column": 26 }, "identifierName": "WebIFC" @@ -13054,15 +13158,15 @@ }, { "type": "ObjectProperty", - "start": 11576, - "end": 11592, + "start": 11643, + "end": 11659, "loc": { "start": { - "line": 266, + "line": 268, "column": 20 }, "end": { - "line": 266, + "line": 268, "column": 36 } }, @@ -13071,15 +13175,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11576, - "end": 11580, + "start": 11643, + "end": 11647, "loc": { "start": { - "line": 266, + "line": 268, "column": 20 }, "end": { - "line": 266, + "line": 268, "column": 24 }, "identifierName": "data" @@ -13088,15 +13192,15 @@ }, "value": { "type": "Identifier", - "start": 11582, - "end": 11592, + "start": 11649, + "end": 11659, "loc": { "start": { - "line": 266, + "line": 268, "column": 26 }, "end": { - "line": 266, + "line": 268, "column": 36 }, "identifierName": "sourceData" @@ -13106,15 +13210,15 @@ }, { "type": "ObjectProperty", - "start": 11614, - "end": 11622, + "start": 11681, + "end": 11689, "loc": { "start": { - "line": 267, + "line": 269, "column": 20 }, "end": { - "line": 267, + "line": 269, "column": 28 } }, @@ -13123,15 +13227,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11614, - "end": 11622, + "start": 11681, + "end": 11689, "loc": { "start": { - "line": 267, + "line": 269, "column": 20 }, "end": { - "line": 267, + "line": 269, "column": 28 }, "identifierName": "xktModel" @@ -13140,15 +13244,15 @@ }, "value": { "type": "Identifier", - "start": 11614, - "end": 11622, + "start": 11681, + "end": 11689, "loc": { "start": { - "line": 267, + "line": 269, "column": 20 }, "end": { - "line": 267, + "line": 269, "column": 28 }, "identifierName": "xktModel" @@ -13161,15 +13265,15 @@ }, { "type": "ObjectProperty", - "start": 11644, - "end": 11658, + "start": 11711, + "end": 11725, "loc": { "start": { - "line": 268, + "line": 270, "column": 20 }, "end": { - "line": 268, + "line": 270, "column": 34 } }, @@ -13178,15 +13282,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11644, - "end": 11652, + "start": 11711, + "end": 11719, "loc": { "start": { - "line": 268, + "line": 270, "column": 20 }, "end": { - "line": 268, + "line": 270, "column": 28 }, "identifierName": "wasmPath" @@ -13195,15 +13299,15 @@ }, "value": { "type": "StringLiteral", - "start": 11654, - "end": 11658, + "start": 11721, + "end": 11725, "loc": { "start": { - "line": 268, + "line": 270, "column": 30 }, "end": { - "line": 268, + "line": 270, "column": 34 } }, @@ -13216,15 +13320,15 @@ }, { "type": "ObjectProperty", - "start": 11680, - "end": 11692, + "start": 11747, + "end": 11759, "loc": { "start": { - "line": 269, + "line": 271, "column": 20 }, "end": { - "line": 269, + "line": 271, "column": 32 } }, @@ -13233,15 +13337,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11680, - "end": 11692, + "start": 11747, + "end": 11759, "loc": { "start": { - "line": 269, + "line": 271, "column": 20 }, "end": { - "line": 269, + "line": 271, "column": 32 }, "identifierName": "includeTypes" @@ -13250,15 +13354,15 @@ }, "value": { "type": "Identifier", - "start": 11680, - "end": 11692, + "start": 11747, + "end": 11759, "loc": { "start": { - "line": 269, + "line": 271, "column": 20 }, "end": { - "line": 269, + "line": 271, "column": 32 }, "identifierName": "includeTypes" @@ -13271,15 +13375,15 @@ }, { "type": "ObjectProperty", - "start": 11714, - "end": 11726, + "start": 11781, + "end": 11793, "loc": { "start": { - "line": 270, + "line": 272, "column": 20 }, "end": { - "line": 270, + "line": 272, "column": 32 } }, @@ -13288,15 +13392,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11714, - "end": 11726, + "start": 11781, + "end": 11793, "loc": { "start": { - "line": 270, + "line": 272, "column": 20 }, "end": { - "line": 270, + "line": 272, "column": 32 }, "identifierName": "excludeTypes" @@ -13305,15 +13409,15 @@ }, "value": { "type": "Identifier", - "start": 11714, - "end": 11726, + "start": 11781, + "end": 11793, "loc": { "start": { - "line": 270, + "line": 272, "column": 20 }, "end": { - "line": 270, + "line": 272, "column": 32 }, "identifierName": "excludeTypes" @@ -13326,15 +13430,15 @@ }, { "type": "ObjectProperty", - "start": 11748, - "end": 11753, + "start": 11815, + "end": 11820, "loc": { "start": { - "line": 271, + "line": 273, "column": 20 }, "end": { - "line": 271, + "line": 273, "column": 25 } }, @@ -13343,15 +13447,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11748, - "end": 11753, + "start": 11815, + "end": 11820, "loc": { "start": { - "line": 271, + "line": 273, "column": 20 }, "end": { - "line": 271, + "line": 273, "column": 25 }, "identifierName": "stats" @@ -13360,15 +13464,15 @@ }, "value": { "type": "Identifier", - "start": 11748, - "end": 11753, + "start": 11815, + "end": 11820, "loc": { "start": { - "line": 271, + "line": 273, "column": 20 }, "end": { - "line": 271, + "line": 273, "column": 25 }, "identifierName": "stats" @@ -13381,15 +13485,15 @@ }, { "type": "ObjectProperty", - "start": 11775, - "end": 11778, + "start": 11842, + "end": 11845, "loc": { "start": { - "line": 272, + "line": 274, "column": 20 }, "end": { - "line": 272, + "line": 274, "column": 23 } }, @@ -13398,15 +13502,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11775, - "end": 11778, + "start": 11842, + "end": 11845, "loc": { "start": { - "line": 272, + "line": 274, "column": 20 }, "end": { - "line": 272, + "line": 274, "column": 23 }, "identifierName": "log" @@ -13415,15 +13519,15 @@ }, "value": { "type": "Identifier", - "start": 11775, - "end": 11778, + "start": 11842, + "end": 11845, "loc": { "start": { - "line": 272, + "line": 274, "column": 20 }, "end": { - "line": 272, + "line": 274, "column": 23 }, "identifierName": "log" @@ -13441,15 +13545,15 @@ }, { "type": "BreakStatement", - "start": 11815, - "end": 11821, + "start": 11882, + "end": 11888, "loc": { "start": { - "line": 274, + "line": 276, "column": 16 }, "end": { - "line": 274, + "line": 276, "column": 22 } }, @@ -13458,15 +13562,15 @@ ], "test": { "type": "StringLiteral", - "start": 11473, - "end": 11478, + "start": 11540, + "end": 11545, "loc": { "start": { - "line": 263, + "line": 265, "column": 17 }, "end": { - "line": 263, + "line": 265, "column": 22 } }, @@ -13479,58 +13583,58 @@ }, { "type": "SwitchCase", - "start": 11835, - "end": 12341, + "start": 11902, + "end": 12408, "loc": { "start": { - "line": 276, + "line": 278, "column": 12 }, "end": { - "line": 288, + "line": 290, "column": 22 } }, "consequent": [ { "type": "ExpressionStatement", - "start": 11863, - "end": 12318, + "start": 11930, + "end": 12385, "loc": { "start": { - "line": 277, + "line": 279, "column": 16 }, "end": { - "line": 287, + "line": 289, "column": 19 } }, "expression": { "type": "CallExpression", - "start": 11863, - "end": 12317, + "start": 11930, + "end": 12384, "loc": { "start": { - "line": 277, + "line": 279, "column": 16 }, "end": { - "line": 287, + "line": 289, "column": 18 } }, "callee": { "type": "Identifier", - "start": 11863, - "end": 11870, + "start": 11930, + "end": 11937, "loc": { "start": { - "line": 277, + "line": 279, "column": 16 }, "end": { - "line": 277, + "line": 279, "column": 23 }, "identifierName": "convert" @@ -13540,15 +13644,15 @@ "arguments": [ { "type": "Identifier", - "start": 11871, - "end": 11891, + "start": 11938, + "end": 11958, "loc": { "start": { - "line": 277, + "line": 279, "column": 24 }, "end": { - "line": 277, + "line": 279, "column": 44 }, "identifierName": "parseLASIntoXKTModel" @@ -13557,30 +13661,30 @@ }, { "type": "ObjectExpression", - "start": 11893, - "end": 12316, + "start": 11960, + "end": 12383, "loc": { "start": { - "line": 277, + "line": 279, "column": 46 }, "end": { - "line": 287, + "line": 289, "column": 17 } }, "properties": [ { "type": "ObjectProperty", - "start": 11915, - "end": 11931, + "start": 11982, + "end": 11998, "loc": { "start": { - "line": 278, + "line": 280, "column": 20 }, "end": { - "line": 278, + "line": 280, "column": 36 } }, @@ -13589,15 +13693,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11915, - "end": 11919, + "start": 11982, + "end": 11986, "loc": { "start": { - "line": 278, + "line": 280, "column": 20 }, "end": { - "line": 278, + "line": 280, "column": 24 }, "identifierName": "data" @@ -13606,15 +13710,15 @@ }, "value": { "type": "Identifier", - "start": 11921, - "end": 11931, + "start": 11988, + "end": 11998, "loc": { "start": { - "line": 278, + "line": 280, "column": 26 }, "end": { - "line": 278, + "line": 280, "column": 36 }, "identifierName": "sourceData" @@ -13624,15 +13728,15 @@ }, { "type": "ObjectProperty", - "start": 11953, - "end": 11961, + "start": 12020, + "end": 12028, "loc": { "start": { - "line": 279, + "line": 281, "column": 20 }, "end": { - "line": 279, + "line": 281, "column": 28 } }, @@ -13641,15 +13745,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11953, - "end": 11961, + "start": 12020, + "end": 12028, "loc": { "start": { - "line": 279, + "line": 281, "column": 20 }, "end": { - "line": 279, + "line": 281, "column": 28 }, "identifierName": "xktModel" @@ -13658,15 +13762,15 @@ }, "value": { "type": "Identifier", - "start": 11953, - "end": 11961, + "start": 12020, + "end": 12028, "loc": { "start": { - "line": 279, + "line": 281, "column": 20 }, "end": { - "line": 279, + "line": 281, "column": 28 }, "identifierName": "xktModel" @@ -13679,15 +13783,15 @@ }, { "type": "ObjectProperty", - "start": 11983, - "end": 11988, + "start": 12050, + "end": 12055, "loc": { "start": { - "line": 280, + "line": 282, "column": 20 }, "end": { - "line": 280, + "line": 282, "column": 25 } }, @@ -13696,15 +13800,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11983, - "end": 11988, + "start": 12050, + "end": 12055, "loc": { "start": { - "line": 280, + "line": 282, "column": 20 }, "end": { - "line": 280, + "line": 282, "column": 25 }, "identifierName": "stats" @@ -13713,15 +13817,15 @@ }, "value": { "type": "Identifier", - "start": 11983, - "end": 11988, + "start": 12050, + "end": 12055, "loc": { "start": { - "line": 280, + "line": 282, "column": 20 }, "end": { - "line": 280, + "line": 282, "column": 25 }, "identifierName": "stats" @@ -13734,15 +13838,15 @@ }, { "type": "ObjectProperty", - "start": 12010, - "end": 12036, + "start": 12077, + "end": 12103, "loc": { "start": { - "line": 281, + "line": 283, "column": 20 }, "end": { - "line": 281, + "line": 283, "column": 46 } }, @@ -13751,15 +13855,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12010, - "end": 12014, + "start": 12077, + "end": 12081, "loc": { "start": { - "line": 281, + "line": 283, "column": 20 }, "end": { - "line": 281, + "line": 283, "column": 24 }, "identifierName": "fp64" @@ -13768,29 +13872,29 @@ }, "value": { "type": "MemberExpression", - "start": 12016, - "end": 12036, + "start": 12083, + "end": 12103, "loc": { "start": { - "line": 281, + "line": 283, "column": 26 }, "end": { - "line": 281, + "line": 283, "column": 46 } }, "object": { "type": "Identifier", - "start": 12016, - "end": 12031, + "start": 12083, + "end": 12098, "loc": { "start": { - "line": 281, + "line": 283, "column": 26 }, "end": { - "line": 281, + "line": 283, "column": 41 }, "identifierName": "fileTypeConfigs" @@ -13799,15 +13903,15 @@ }, "property": { "type": "Identifier", - "start": 12032, - "end": 12036, + "start": 12099, + "end": 12103, "loc": { "start": { - "line": 281, + "line": 283, "column": 42 }, "end": { - "line": 281, + "line": 283, "column": 46 }, "identifierName": "fp64" @@ -13819,15 +13923,15 @@ }, { "type": "ObjectProperty", - "start": 12058, - "end": 12096, + "start": 12125, + "end": 12163, "loc": { "start": { - "line": 282, + "line": 284, "column": 20 }, "end": { - "line": 282, + "line": 284, "column": 58 } }, @@ -13836,15 +13940,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12058, - "end": 12068, + "start": 12125, + "end": 12135, "loc": { "start": { - "line": 282, + "line": 284, "column": 20 }, "end": { - "line": 282, + "line": 284, "column": 30 }, "identifierName": "colorDepth" @@ -13853,29 +13957,29 @@ }, "value": { "type": "MemberExpression", - "start": 12070, - "end": 12096, + "start": 12137, + "end": 12163, "loc": { "start": { - "line": 282, + "line": 284, "column": 32 }, "end": { - "line": 282, + "line": 284, "column": 58 } }, "object": { "type": "Identifier", - "start": 12070, - "end": 12085, + "start": 12137, + "end": 12152, "loc": { "start": { - "line": 282, + "line": 284, "column": 32 }, "end": { - "line": 282, + "line": 284, "column": 47 }, "identifierName": "fileTypeConfigs" @@ -13884,15 +13988,15 @@ }, "property": { "type": "Identifier", - "start": 12086, - "end": 12096, + "start": 12153, + "end": 12163, "loc": { "start": { - "line": 282, + "line": 284, "column": 48 }, "end": { - "line": 282, + "line": 284, "column": 58 }, "identifierName": "colorDepth" @@ -13904,15 +14008,15 @@ }, { "type": "ObjectProperty", - "start": 12118, - "end": 12148, + "start": 12185, + "end": 12215, "loc": { "start": { - "line": 283, + "line": 285, "column": 20 }, "end": { - "line": 283, + "line": 285, "column": 50 } }, @@ -13921,15 +14025,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12118, - "end": 12124, + "start": 12185, + "end": 12191, "loc": { "start": { - "line": 283, + "line": 285, "column": 20 }, "end": { - "line": 283, + "line": 285, "column": 26 }, "identifierName": "center" @@ -13938,29 +14042,29 @@ }, "value": { "type": "MemberExpression", - "start": 12126, - "end": 12148, + "start": 12193, + "end": 12215, "loc": { "start": { - "line": 283, + "line": 285, "column": 28 }, "end": { - "line": 283, + "line": 285, "column": 50 } }, "object": { "type": "Identifier", - "start": 12126, - "end": 12141, + "start": 12193, + "end": 12208, "loc": { "start": { - "line": 283, + "line": 285, "column": 28 }, "end": { - "line": 283, + "line": 285, "column": 43 }, "identifierName": "fileTypeConfigs" @@ -13969,15 +14073,15 @@ }, "property": { "type": "Identifier", - "start": 12142, - "end": 12148, + "start": 12209, + "end": 12215, "loc": { "start": { - "line": 283, + "line": 285, "column": 44 }, "end": { - "line": 283, + "line": 285, "column": 50 }, "identifierName": "center" @@ -13989,15 +14093,15 @@ }, { "type": "ObjectProperty", - "start": 12170, - "end": 12206, + "start": 12237, + "end": 12273, "loc": { "start": { - "line": 284, + "line": 286, "column": 20 }, "end": { - "line": 284, + "line": 286, "column": 56 } }, @@ -14006,15 +14110,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12170, - "end": 12179, + "start": 12237, + "end": 12246, "loc": { "start": { - "line": 284, + "line": 286, "column": 20 }, "end": { - "line": 284, + "line": 286, "column": 29 }, "identifierName": "transform" @@ -14023,29 +14127,29 @@ }, "value": { "type": "MemberExpression", - "start": 12181, - "end": 12206, + "start": 12248, + "end": 12273, "loc": { "start": { - "line": 284, + "line": 286, "column": 31 }, "end": { - "line": 284, + "line": 286, "column": 56 } }, "object": { "type": "Identifier", - "start": 12181, - "end": 12196, + "start": 12248, + "end": 12263, "loc": { "start": { - "line": 284, + "line": 286, "column": 31 }, "end": { - "line": 284, + "line": 286, "column": 46 }, "identifierName": "fileTypeConfigs" @@ -14054,15 +14158,15 @@ }, "property": { "type": "Identifier", - "start": 12197, - "end": 12206, + "start": 12264, + "end": 12273, "loc": { "start": { - "line": 284, + "line": 286, "column": 47 }, "end": { - "line": 284, + "line": 286, "column": 56 }, "identifierName": "transform" @@ -14074,15 +14178,15 @@ }, { "type": "ObjectProperty", - "start": 12228, - "end": 12273, + "start": 12295, + "end": 12340, "loc": { "start": { - "line": 285, + "line": 287, "column": 20 }, "end": { - "line": 285, + "line": 287, "column": 65 } }, @@ -14091,15 +14195,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12228, - "end": 12232, + "start": 12295, + "end": 12299, "loc": { "start": { - "line": 285, + "line": 287, "column": 20 }, "end": { - "line": 285, + "line": 287, "column": 24 }, "identifierName": "skip" @@ -14108,29 +14212,29 @@ }, "value": { "type": "CallExpression", - "start": 12234, - "end": 12273, + "start": 12301, + "end": 12340, "loc": { "start": { - "line": 285, + "line": 287, "column": 26 }, "end": { - "line": 285, + "line": 287, "column": 65 } }, "callee": { "type": "Identifier", - "start": 12234, - "end": 12248, + "start": 12301, + "end": 12315, "loc": { "start": { - "line": 285, + "line": 287, "column": 26 }, "end": { - "line": 285, + "line": 287, "column": 40 }, "identifierName": "overrideOption" @@ -14140,29 +14244,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 12249, - "end": 12269, + "start": 12316, + "end": 12336, "loc": { "start": { - "line": 285, + "line": 287, "column": 41 }, "end": { - "line": 285, + "line": 287, "column": 61 } }, "object": { "type": "Identifier", - "start": 12249, - "end": 12264, + "start": 12316, + "end": 12331, "loc": { "start": { - "line": 285, + "line": 287, "column": 41 }, "end": { - "line": 285, + "line": 287, "column": 56 }, "identifierName": "fileTypeConfigs" @@ -14171,15 +14275,15 @@ }, "property": { "type": "Identifier", - "start": 12265, - "end": 12269, + "start": 12332, + "end": 12336, "loc": { "start": { - "line": 285, + "line": 287, "column": 57 }, "end": { - "line": 285, + "line": 287, "column": 61 }, "identifierName": "skip" @@ -14190,15 +14294,15 @@ }, { "type": "NumericLiteral", - "start": 12271, - "end": 12272, + "start": 12338, + "end": 12339, "loc": { "start": { - "line": 285, + "line": 287, "column": 63 }, "end": { - "line": 285, + "line": 287, "column": 64 } }, @@ -14213,15 +14317,15 @@ }, { "type": "ObjectProperty", - "start": 12295, - "end": 12298, + "start": 12362, + "end": 12365, "loc": { "start": { - "line": 286, + "line": 288, "column": 20 }, "end": { - "line": 286, + "line": 288, "column": 23 } }, @@ -14230,15 +14334,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12295, - "end": 12298, + "start": 12362, + "end": 12365, "loc": { "start": { - "line": 286, + "line": 288, "column": 20 }, "end": { - "line": 286, + "line": 288, "column": 23 }, "identifierName": "log" @@ -14247,15 +14351,15 @@ }, "value": { "type": "Identifier", - "start": 12295, - "end": 12298, + "start": 12362, + "end": 12365, "loc": { "start": { - "line": 286, + "line": 288, "column": 20 }, "end": { - "line": 286, + "line": 288, "column": 23 }, "identifierName": "log" @@ -14273,15 +14377,15 @@ }, { "type": "BreakStatement", - "start": 12335, - "end": 12341, + "start": 12402, + "end": 12408, "loc": { "start": { - "line": 288, + "line": 290, "column": 16 }, "end": { - "line": 288, + "line": 290, "column": 22 } }, @@ -14290,15 +14394,15 @@ ], "test": { "type": "StringLiteral", - "start": 11840, - "end": 11845, + "start": 11907, + "end": 11912, "loc": { "start": { - "line": 276, + "line": 278, "column": 17 }, "end": { - "line": 276, + "line": 278, "column": 22 } }, @@ -14311,58 +14415,58 @@ }, { "type": "SwitchCase", - "start": 12355, - "end": 12861, + "start": 12422, + "end": 12928, "loc": { "start": { - "line": 290, + "line": 292, "column": 12 }, "end": { - "line": 302, + "line": 304, "column": 22 } }, "consequent": [ { "type": "ExpressionStatement", - "start": 12383, - "end": 12838, + "start": 12450, + "end": 12905, "loc": { "start": { - "line": 291, + "line": 293, "column": 16 }, "end": { - "line": 301, + "line": 303, "column": 19 } }, "expression": { "type": "CallExpression", - "start": 12383, - "end": 12837, + "start": 12450, + "end": 12904, "loc": { "start": { - "line": 291, + "line": 293, "column": 16 }, "end": { - "line": 301, + "line": 303, "column": 18 } }, "callee": { "type": "Identifier", - "start": 12383, - "end": 12390, + "start": 12450, + "end": 12457, "loc": { "start": { - "line": 291, + "line": 293, "column": 16 }, "end": { - "line": 291, + "line": 293, "column": 23 }, "identifierName": "convert" @@ -14372,15 +14476,15 @@ "arguments": [ { "type": "Identifier", - "start": 12391, - "end": 12411, + "start": 12458, + "end": 12478, "loc": { "start": { - "line": 291, + "line": 293, "column": 24 }, "end": { - "line": 291, + "line": 293, "column": 44 }, "identifierName": "parseLASIntoXKTModel" @@ -14389,30 +14493,30 @@ }, { "type": "ObjectExpression", - "start": 12413, - "end": 12836, + "start": 12480, + "end": 12903, "loc": { "start": { - "line": 291, + "line": 293, "column": 46 }, "end": { - "line": 301, + "line": 303, "column": 17 } }, "properties": [ { "type": "ObjectProperty", - "start": 12435, - "end": 12451, + "start": 12502, + "end": 12518, "loc": { "start": { - "line": 292, + "line": 294, "column": 20 }, "end": { - "line": 292, + "line": 294, "column": 36 } }, @@ -14421,15 +14525,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12435, - "end": 12439, + "start": 12502, + "end": 12506, "loc": { "start": { - "line": 292, + "line": 294, "column": 20 }, "end": { - "line": 292, + "line": 294, "column": 24 }, "identifierName": "data" @@ -14438,15 +14542,15 @@ }, "value": { "type": "Identifier", - "start": 12441, - "end": 12451, + "start": 12508, + "end": 12518, "loc": { "start": { - "line": 292, + "line": 294, "column": 26 }, "end": { - "line": 292, + "line": 294, "column": 36 }, "identifierName": "sourceData" @@ -14456,15 +14560,15 @@ }, { "type": "ObjectProperty", - "start": 12473, - "end": 12481, + "start": 12540, + "end": 12548, "loc": { "start": { - "line": 293, + "line": 295, "column": 20 }, "end": { - "line": 293, + "line": 295, "column": 28 } }, @@ -14473,15 +14577,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12473, - "end": 12481, + "start": 12540, + "end": 12548, "loc": { "start": { - "line": 293, + "line": 295, "column": 20 }, "end": { - "line": 293, + "line": 295, "column": 28 }, "identifierName": "xktModel" @@ -14490,15 +14594,15 @@ }, "value": { "type": "Identifier", - "start": 12473, - "end": 12481, + "start": 12540, + "end": 12548, "loc": { "start": { - "line": 293, + "line": 295, "column": 20 }, "end": { - "line": 293, + "line": 295, "column": 28 }, "identifierName": "xktModel" @@ -14511,15 +14615,15 @@ }, { "type": "ObjectProperty", - "start": 12503, - "end": 12508, + "start": 12570, + "end": 12575, "loc": { "start": { - "line": 294, + "line": 296, "column": 20 }, "end": { - "line": 294, + "line": 296, "column": 25 } }, @@ -14528,15 +14632,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12503, - "end": 12508, + "start": 12570, + "end": 12575, "loc": { "start": { - "line": 294, + "line": 296, "column": 20 }, "end": { - "line": 294, + "line": 296, "column": 25 }, "identifierName": "stats" @@ -14545,15 +14649,15 @@ }, "value": { "type": "Identifier", - "start": 12503, - "end": 12508, + "start": 12570, + "end": 12575, "loc": { "start": { - "line": 294, + "line": 296, "column": 20 }, "end": { - "line": 294, + "line": 296, "column": 25 }, "identifierName": "stats" @@ -14566,15 +14670,15 @@ }, { "type": "ObjectProperty", - "start": 12530, - "end": 12556, + "start": 12597, + "end": 12623, "loc": { "start": { - "line": 295, + "line": 297, "column": 20 }, "end": { - "line": 295, + "line": 297, "column": 46 } }, @@ -14583,15 +14687,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12530, - "end": 12534, + "start": 12597, + "end": 12601, "loc": { "start": { - "line": 295, + "line": 297, "column": 20 }, "end": { - "line": 295, + "line": 297, "column": 24 }, "identifierName": "fp64" @@ -14600,29 +14704,29 @@ }, "value": { "type": "MemberExpression", - "start": 12536, - "end": 12556, + "start": 12603, + "end": 12623, "loc": { "start": { - "line": 295, + "line": 297, "column": 26 }, "end": { - "line": 295, + "line": 297, "column": 46 } }, "object": { "type": "Identifier", - "start": 12536, - "end": 12551, + "start": 12603, + "end": 12618, "loc": { "start": { - "line": 295, + "line": 297, "column": 26 }, "end": { - "line": 295, + "line": 297, "column": 41 }, "identifierName": "fileTypeConfigs" @@ -14631,15 +14735,15 @@ }, "property": { "type": "Identifier", - "start": 12552, - "end": 12556, + "start": 12619, + "end": 12623, "loc": { "start": { - "line": 295, + "line": 297, "column": 42 }, "end": { - "line": 295, + "line": 297, "column": 46 }, "identifierName": "fp64" @@ -14651,15 +14755,15 @@ }, { "type": "ObjectProperty", - "start": 12578, - "end": 12616, + "start": 12645, + "end": 12683, "loc": { "start": { - "line": 296, + "line": 298, "column": 20 }, "end": { - "line": 296, + "line": 298, "column": 58 } }, @@ -14668,15 +14772,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12578, - "end": 12588, + "start": 12645, + "end": 12655, "loc": { "start": { - "line": 296, + "line": 298, "column": 20 }, "end": { - "line": 296, + "line": 298, "column": 30 }, "identifierName": "colorDepth" @@ -14685,29 +14789,29 @@ }, "value": { "type": "MemberExpression", - "start": 12590, - "end": 12616, + "start": 12657, + "end": 12683, "loc": { "start": { - "line": 296, + "line": 298, "column": 32 }, "end": { - "line": 296, + "line": 298, "column": 58 } }, "object": { "type": "Identifier", - "start": 12590, - "end": 12605, + "start": 12657, + "end": 12672, "loc": { "start": { - "line": 296, + "line": 298, "column": 32 }, "end": { - "line": 296, + "line": 298, "column": 47 }, "identifierName": "fileTypeConfigs" @@ -14716,15 +14820,15 @@ }, "property": { "type": "Identifier", - "start": 12606, - "end": 12616, + "start": 12673, + "end": 12683, "loc": { "start": { - "line": 296, + "line": 298, "column": 48 }, "end": { - "line": 296, + "line": 298, "column": 58 }, "identifierName": "colorDepth" @@ -14736,15 +14840,15 @@ }, { "type": "ObjectProperty", - "start": 12638, - "end": 12668, + "start": 12705, + "end": 12735, "loc": { "start": { - "line": 297, + "line": 299, "column": 20 }, "end": { - "line": 297, + "line": 299, "column": 50 } }, @@ -14753,15 +14857,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12638, - "end": 12644, + "start": 12705, + "end": 12711, "loc": { "start": { - "line": 297, + "line": 299, "column": 20 }, "end": { - "line": 297, + "line": 299, "column": 26 }, "identifierName": "center" @@ -14770,29 +14874,29 @@ }, "value": { "type": "MemberExpression", - "start": 12646, - "end": 12668, + "start": 12713, + "end": 12735, "loc": { "start": { - "line": 297, + "line": 299, "column": 28 }, "end": { - "line": 297, + "line": 299, "column": 50 } }, "object": { "type": "Identifier", - "start": 12646, - "end": 12661, + "start": 12713, + "end": 12728, "loc": { "start": { - "line": 297, + "line": 299, "column": 28 }, "end": { - "line": 297, + "line": 299, "column": 43 }, "identifierName": "fileTypeConfigs" @@ -14801,15 +14905,15 @@ }, "property": { "type": "Identifier", - "start": 12662, - "end": 12668, + "start": 12729, + "end": 12735, "loc": { "start": { - "line": 297, + "line": 299, "column": 44 }, "end": { - "line": 297, + "line": 299, "column": 50 }, "identifierName": "center" @@ -14821,15 +14925,15 @@ }, { "type": "ObjectProperty", - "start": 12690, - "end": 12726, + "start": 12757, + "end": 12793, "loc": { "start": { - "line": 298, + "line": 300, "column": 20 }, "end": { - "line": 298, + "line": 300, "column": 56 } }, @@ -14838,15 +14942,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12690, - "end": 12699, + "start": 12757, + "end": 12766, "loc": { "start": { - "line": 298, + "line": 300, "column": 20 }, "end": { - "line": 298, + "line": 300, "column": 29 }, "identifierName": "transform" @@ -14855,29 +14959,29 @@ }, "value": { "type": "MemberExpression", - "start": 12701, - "end": 12726, + "start": 12768, + "end": 12793, "loc": { "start": { - "line": 298, + "line": 300, "column": 31 }, "end": { - "line": 298, + "line": 300, "column": 56 } }, "object": { "type": "Identifier", - "start": 12701, - "end": 12716, + "start": 12768, + "end": 12783, "loc": { "start": { - "line": 298, + "line": 300, "column": 31 }, "end": { - "line": 298, + "line": 300, "column": 46 }, "identifierName": "fileTypeConfigs" @@ -14886,15 +14990,15 @@ }, "property": { "type": "Identifier", - "start": 12717, - "end": 12726, + "start": 12784, + "end": 12793, "loc": { "start": { - "line": 298, + "line": 300, "column": 47 }, "end": { - "line": 298, + "line": 300, "column": 56 }, "identifierName": "transform" @@ -14906,15 +15010,15 @@ }, { "type": "ObjectProperty", - "start": 12748, - "end": 12793, + "start": 12815, + "end": 12860, "loc": { "start": { - "line": 299, + "line": 301, "column": 20 }, "end": { - "line": 299, + "line": 301, "column": 65 } }, @@ -14923,15 +15027,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12748, - "end": 12752, + "start": 12815, + "end": 12819, "loc": { "start": { - "line": 299, + "line": 301, "column": 20 }, "end": { - "line": 299, + "line": 301, "column": 24 }, "identifierName": "skip" @@ -14940,29 +15044,29 @@ }, "value": { "type": "CallExpression", - "start": 12754, - "end": 12793, + "start": 12821, + "end": 12860, "loc": { "start": { - "line": 299, + "line": 301, "column": 26 }, "end": { - "line": 299, + "line": 301, "column": 65 } }, "callee": { "type": "Identifier", - "start": 12754, - "end": 12768, + "start": 12821, + "end": 12835, "loc": { "start": { - "line": 299, + "line": 301, "column": 26 }, "end": { - "line": 299, + "line": 301, "column": 40 }, "identifierName": "overrideOption" @@ -14972,29 +15076,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 12769, - "end": 12789, + "start": 12836, + "end": 12856, "loc": { "start": { - "line": 299, + "line": 301, "column": 41 }, "end": { - "line": 299, + "line": 301, "column": 61 } }, "object": { "type": "Identifier", - "start": 12769, - "end": 12784, + "start": 12836, + "end": 12851, "loc": { "start": { - "line": 299, + "line": 301, "column": 41 }, "end": { - "line": 299, + "line": 301, "column": 56 }, "identifierName": "fileTypeConfigs" @@ -15003,15 +15107,15 @@ }, "property": { "type": "Identifier", - "start": 12785, - "end": 12789, + "start": 12852, + "end": 12856, "loc": { "start": { - "line": 299, + "line": 301, "column": 57 }, "end": { - "line": 299, + "line": 301, "column": 61 }, "identifierName": "skip" @@ -15022,15 +15126,15 @@ }, { "type": "NumericLiteral", - "start": 12791, - "end": 12792, + "start": 12858, + "end": 12859, "loc": { "start": { - "line": 299, + "line": 301, "column": 63 }, "end": { - "line": 299, + "line": 301, "column": 64 } }, @@ -15045,15 +15149,15 @@ }, { "type": "ObjectProperty", - "start": 12815, - "end": 12818, + "start": 12882, + "end": 12885, "loc": { "start": { - "line": 300, + "line": 302, "column": 20 }, "end": { - "line": 300, + "line": 302, "column": 23 } }, @@ -15062,15 +15166,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12815, - "end": 12818, + "start": 12882, + "end": 12885, "loc": { "start": { - "line": 300, + "line": 302, "column": 20 }, "end": { - "line": 300, + "line": 302, "column": 23 }, "identifierName": "log" @@ -15079,15 +15183,15 @@ }, "value": { "type": "Identifier", - "start": 12815, - "end": 12818, + "start": 12882, + "end": 12885, "loc": { "start": { - "line": 300, + "line": 302, "column": 20 }, "end": { - "line": 300, + "line": 302, "column": 23 }, "identifierName": "log" @@ -15105,15 +15209,15 @@ }, { "type": "BreakStatement", - "start": 12855, - "end": 12861, + "start": 12922, + "end": 12928, "loc": { "start": { - "line": 302, + "line": 304, "column": 16 }, "end": { - "line": 302, + "line": 304, "column": 22 } }, @@ -15122,15 +15226,15 @@ ], "test": { "type": "StringLiteral", - "start": 12360, - "end": 12365, + "start": 12427, + "end": 12432, "loc": { "start": { - "line": 290, + "line": 292, "column": 17 }, "end": { - "line": 290, + "line": 292, "column": 22 } }, @@ -15143,58 +15247,58 @@ }, { "type": "SwitchCase", - "start": 12875, - "end": 13096, + "start": 12942, + "end": 13163, "loc": { "start": { - "line": 304, + "line": 306, "column": 12 }, "end": { - "line": 311, + "line": 313, "column": 22 } }, "consequent": [ { "type": "ExpressionStatement", - "start": 12903, - "end": 13073, + "start": 12970, + "end": 13140, "loc": { "start": { - "line": 305, + "line": 307, "column": 16 }, "end": { - "line": 310, + "line": 312, "column": 19 } }, "expression": { "type": "CallExpression", - "start": 12903, - "end": 13072, + "start": 12970, + "end": 13139, "loc": { "start": { - "line": 305, + "line": 307, "column": 16 }, "end": { - "line": 310, + "line": 312, "column": 18 } }, "callee": { "type": "Identifier", - "start": 12903, - "end": 12910, + "start": 12970, + "end": 12977, "loc": { "start": { - "line": 305, + "line": 307, "column": 16 }, "end": { - "line": 305, + "line": 307, "column": 23 }, "identifierName": "convert" @@ -15204,15 +15308,15 @@ "arguments": [ { "type": "Identifier", - "start": 12911, - "end": 12931, + "start": 12978, + "end": 12998, "loc": { "start": { - "line": 305, + "line": 307, "column": 24 }, "end": { - "line": 305, + "line": 307, "column": 44 }, "identifierName": "parsePCDIntoXKTModel" @@ -15221,30 +15325,30 @@ }, { "type": "ObjectExpression", - "start": 12933, - "end": 13071, + "start": 13000, + "end": 13138, "loc": { "start": { - "line": 305, + "line": 307, "column": 46 }, "end": { - "line": 310, + "line": 312, "column": 17 } }, "properties": [ { "type": "ObjectProperty", - "start": 12955, - "end": 12971, + "start": 13022, + "end": 13038, "loc": { "start": { - "line": 306, + "line": 308, "column": 20 }, "end": { - "line": 306, + "line": 308, "column": 36 } }, @@ -15253,15 +15357,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12955, - "end": 12959, + "start": 13022, + "end": 13026, "loc": { "start": { - "line": 306, + "line": 308, "column": 20 }, "end": { - "line": 306, + "line": 308, "column": 24 }, "identifierName": "data" @@ -15270,15 +15374,15 @@ }, "value": { "type": "Identifier", - "start": 12961, - "end": 12971, + "start": 13028, + "end": 13038, "loc": { "start": { - "line": 306, + "line": 308, "column": 26 }, "end": { - "line": 306, + "line": 308, "column": 36 }, "identifierName": "sourceData" @@ -15288,15 +15392,15 @@ }, { "type": "ObjectProperty", - "start": 12993, - "end": 13001, + "start": 13060, + "end": 13068, "loc": { "start": { - "line": 307, + "line": 309, "column": 20 }, "end": { - "line": 307, + "line": 309, "column": 28 } }, @@ -15305,15 +15409,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12993, - "end": 13001, + "start": 13060, + "end": 13068, "loc": { "start": { - "line": 307, + "line": 309, "column": 20 }, "end": { - "line": 307, + "line": 309, "column": 28 }, "identifierName": "xktModel" @@ -15322,15 +15426,15 @@ }, "value": { "type": "Identifier", - "start": 12993, - "end": 13001, + "start": 13060, + "end": 13068, "loc": { "start": { - "line": 307, + "line": 309, "column": 20 }, "end": { - "line": 307, + "line": 309, "column": 28 }, "identifierName": "xktModel" @@ -15343,15 +15447,15 @@ }, { "type": "ObjectProperty", - "start": 13023, - "end": 13028, + "start": 13090, + "end": 13095, "loc": { "start": { - "line": 308, + "line": 310, "column": 20 }, "end": { - "line": 308, + "line": 310, "column": 25 } }, @@ -15360,15 +15464,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 13023, - "end": 13028, + "start": 13090, + "end": 13095, "loc": { "start": { - "line": 308, + "line": 310, "column": 20 }, "end": { - "line": 308, + "line": 310, "column": 25 }, "identifierName": "stats" @@ -15377,15 +15481,15 @@ }, "value": { "type": "Identifier", - "start": 13023, - "end": 13028, + "start": 13090, + "end": 13095, "loc": { "start": { - "line": 308, + "line": 310, "column": 20 }, "end": { - "line": 308, + "line": 310, "column": 25 }, "identifierName": "stats" @@ -15398,15 +15502,15 @@ }, { "type": "ObjectProperty", - "start": 13050, - "end": 13053, + "start": 13117, + "end": 13120, "loc": { "start": { - "line": 309, + "line": 311, "column": 20 }, "end": { - "line": 309, + "line": 311, "column": 23 } }, @@ -15415,15 +15519,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 13050, - "end": 13053, + "start": 13117, + "end": 13120, "loc": { "start": { - "line": 309, + "line": 311, "column": 20 }, "end": { - "line": 309, + "line": 311, "column": 23 }, "identifierName": "log" @@ -15432,15 +15536,15 @@ }, "value": { "type": "Identifier", - "start": 13050, - "end": 13053, + "start": 13117, + "end": 13120, "loc": { "start": { - "line": 309, + "line": 311, "column": 20 }, "end": { - "line": 309, + "line": 311, "column": 23 }, "identifierName": "log" @@ -15458,15 +15562,15 @@ }, { "type": "BreakStatement", - "start": 13090, - "end": 13096, + "start": 13157, + "end": 13163, "loc": { "start": { - "line": 311, + "line": 313, "column": 16 }, "end": { - "line": 311, + "line": 313, "column": 22 } }, @@ -15475,15 +15579,15 @@ ], "test": { "type": "StringLiteral", - "start": 12880, - "end": 12885, + "start": 12947, + "end": 12952, "loc": { "start": { - "line": 304, + "line": 306, "column": 17 }, "end": { - "line": 304, + "line": 306, "column": 22 } }, @@ -15496,58 +15600,58 @@ }, { "type": "SwitchCase", - "start": 13110, - "end": 13331, + "start": 13177, + "end": 13398, "loc": { "start": { - "line": 313, + "line": 315, "column": 12 }, "end": { - "line": 320, + "line": 322, "column": 22 } }, "consequent": [ { "type": "ExpressionStatement", - "start": 13138, - "end": 13308, + "start": 13205, + "end": 13375, "loc": { "start": { - "line": 314, + "line": 316, "column": 16 }, "end": { - "line": 319, + "line": 321, "column": 19 } }, "expression": { "type": "CallExpression", - "start": 13138, - "end": 13307, + "start": 13205, + "end": 13374, "loc": { "start": { - "line": 314, + "line": 316, "column": 16 }, "end": { - "line": 319, + "line": 321, "column": 18 } }, "callee": { "type": "Identifier", - "start": 13138, - "end": 13145, + "start": 13205, + "end": 13212, "loc": { "start": { - "line": 314, + "line": 316, "column": 16 }, "end": { - "line": 314, + "line": 316, "column": 23 }, "identifierName": "convert" @@ -15557,15 +15661,15 @@ "arguments": [ { "type": "Identifier", - "start": 13146, - "end": 13166, + "start": 13213, + "end": 13233, "loc": { "start": { - "line": 314, + "line": 316, "column": 24 }, "end": { - "line": 314, + "line": 316, "column": 44 }, "identifierName": "parsePLYIntoXKTModel" @@ -15574,30 +15678,30 @@ }, { "type": "ObjectExpression", - "start": 13168, - "end": 13306, + "start": 13235, + "end": 13373, "loc": { "start": { - "line": 314, + "line": 316, "column": 46 }, "end": { - "line": 319, + "line": 321, "column": 17 } }, "properties": [ { "type": "ObjectProperty", - "start": 13190, - "end": 13206, + "start": 13257, + "end": 13273, "loc": { "start": { - "line": 315, + "line": 317, "column": 20 }, "end": { - "line": 315, + "line": 317, "column": 36 } }, @@ -15606,15 +15710,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 13190, - "end": 13194, + "start": 13257, + "end": 13261, "loc": { "start": { - "line": 315, + "line": 317, "column": 20 }, "end": { - "line": 315, + "line": 317, "column": 24 }, "identifierName": "data" @@ -15623,15 +15727,15 @@ }, "value": { "type": "Identifier", - "start": 13196, - "end": 13206, + "start": 13263, + "end": 13273, "loc": { "start": { - "line": 315, + "line": 317, "column": 26 }, "end": { - "line": 315, + "line": 317, "column": 36 }, "identifierName": "sourceData" @@ -15641,15 +15745,15 @@ }, { "type": "ObjectProperty", - "start": 13228, - "end": 13236, + "start": 13295, + "end": 13303, "loc": { "start": { - "line": 316, + "line": 318, "column": 20 }, "end": { - "line": 316, + "line": 318, "column": 28 } }, @@ -15658,15 +15762,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 13228, - "end": 13236, + "start": 13295, + "end": 13303, "loc": { "start": { - "line": 316, + "line": 318, "column": 20 }, "end": { - "line": 316, + "line": 318, "column": 28 }, "identifierName": "xktModel" @@ -15675,15 +15779,15 @@ }, "value": { "type": "Identifier", - "start": 13228, - "end": 13236, + "start": 13295, + "end": 13303, "loc": { "start": { - "line": 316, + "line": 318, "column": 20 }, "end": { - "line": 316, + "line": 318, "column": 28 }, "identifierName": "xktModel" @@ -15696,15 +15800,15 @@ }, { "type": "ObjectProperty", - "start": 13258, - "end": 13263, + "start": 13325, + "end": 13330, "loc": { "start": { - "line": 317, + "line": 319, "column": 20 }, "end": { - "line": 317, + "line": 319, "column": 25 } }, @@ -15713,15 +15817,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 13258, - "end": 13263, + "start": 13325, + "end": 13330, "loc": { "start": { - "line": 317, + "line": 319, "column": 20 }, "end": { - "line": 317, + "line": 319, "column": 25 }, "identifierName": "stats" @@ -15730,15 +15834,15 @@ }, "value": { "type": "Identifier", - "start": 13258, - "end": 13263, + "start": 13325, + "end": 13330, "loc": { "start": { - "line": 317, + "line": 319, "column": 20 }, "end": { - "line": 317, + "line": 319, "column": 25 }, "identifierName": "stats" @@ -15751,15 +15855,15 @@ }, { "type": "ObjectProperty", - "start": 13285, - "end": 13288, + "start": 13352, + "end": 13355, "loc": { "start": { - "line": 318, + "line": 320, "column": 20 }, "end": { - "line": 318, + "line": 320, "column": 23 } }, @@ -15768,15 +15872,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 13285, - "end": 13288, + "start": 13352, + "end": 13355, "loc": { "start": { - "line": 318, + "line": 320, "column": 20 }, "end": { - "line": 318, + "line": 320, "column": 23 }, "identifierName": "log" @@ -15785,15 +15889,15 @@ }, "value": { "type": "Identifier", - "start": 13285, - "end": 13288, + "start": 13352, + "end": 13355, "loc": { "start": { - "line": 318, + "line": 320, "column": 20 }, "end": { - "line": 318, + "line": 320, "column": 23 }, "identifierName": "log" @@ -15811,15 +15915,15 @@ }, { "type": "BreakStatement", - "start": 13325, - "end": 13331, + "start": 13392, + "end": 13398, "loc": { "start": { - "line": 320, + "line": 322, "column": 16 }, "end": { - "line": 320, + "line": 322, "column": 22 } }, @@ -15828,15 +15932,15 @@ ], "test": { "type": "StringLiteral", - "start": 13115, - "end": 13120, + "start": 13182, + "end": 13187, "loc": { "start": { - "line": 313, + "line": 315, "column": 17 }, "end": { - "line": 313, + "line": 315, "column": 22 } }, @@ -15849,58 +15953,58 @@ }, { "type": "SwitchCase", - "start": 13345, - "end": 13566, + "start": 13412, + "end": 13633, "loc": { "start": { - "line": 322, + "line": 324, "column": 12 }, "end": { - "line": 329, + "line": 331, "column": 22 } }, "consequent": [ { "type": "ExpressionStatement", - "start": 13373, - "end": 13543, + "start": 13440, + "end": 13610, "loc": { "start": { - "line": 323, + "line": 325, "column": 16 }, "end": { - "line": 328, + "line": 330, "column": 19 } }, "expression": { "type": "CallExpression", - "start": 13373, - "end": 13542, + "start": 13440, + "end": 13609, "loc": { "start": { - "line": 323, + "line": 325, "column": 16 }, "end": { - "line": 328, + "line": 330, "column": 18 } }, "callee": { "type": "Identifier", - "start": 13373, - "end": 13380, + "start": 13440, + "end": 13447, "loc": { "start": { - "line": 323, + "line": 325, "column": 16 }, "end": { - "line": 323, + "line": 325, "column": 23 }, "identifierName": "convert" @@ -15910,15 +16014,15 @@ "arguments": [ { "type": "Identifier", - "start": 13381, - "end": 13401, + "start": 13448, + "end": 13468, "loc": { "start": { - "line": 323, + "line": 325, "column": 24 }, "end": { - "line": 323, + "line": 325, "column": 44 }, "identifierName": "parseSTLIntoXKTModel" @@ -15927,30 +16031,30 @@ }, { "type": "ObjectExpression", - "start": 13403, - "end": 13541, + "start": 13470, + "end": 13608, "loc": { "start": { - "line": 323, + "line": 325, "column": 46 }, "end": { - "line": 328, + "line": 330, "column": 17 } }, "properties": [ { "type": "ObjectProperty", - "start": 13425, - "end": 13441, + "start": 13492, + "end": 13508, "loc": { "start": { - "line": 324, + "line": 326, "column": 20 }, "end": { - "line": 324, + "line": 326, "column": 36 } }, @@ -15959,15 +16063,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 13425, - "end": 13429, + "start": 13492, + "end": 13496, "loc": { "start": { - "line": 324, + "line": 326, "column": 20 }, "end": { - "line": 324, + "line": 326, "column": 24 }, "identifierName": "data" @@ -15976,15 +16080,15 @@ }, "value": { "type": "Identifier", - "start": 13431, - "end": 13441, + "start": 13498, + "end": 13508, "loc": { "start": { - "line": 324, + "line": 326, "column": 26 }, "end": { - "line": 324, + "line": 326, "column": 36 }, "identifierName": "sourceData" @@ -15994,15 +16098,15 @@ }, { "type": "ObjectProperty", - "start": 13463, - "end": 13471, + "start": 13530, + "end": 13538, "loc": { "start": { - "line": 325, + "line": 327, "column": 20 }, "end": { - "line": 325, + "line": 327, "column": 28 } }, @@ -16011,15 +16115,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 13463, - "end": 13471, + "start": 13530, + "end": 13538, "loc": { "start": { - "line": 325, + "line": 327, "column": 20 }, "end": { - "line": 325, + "line": 327, "column": 28 }, "identifierName": "xktModel" @@ -16028,15 +16132,15 @@ }, "value": { "type": "Identifier", - "start": 13463, - "end": 13471, + "start": 13530, + "end": 13538, "loc": { "start": { - "line": 325, + "line": 327, "column": 20 }, "end": { - "line": 325, + "line": 327, "column": 28 }, "identifierName": "xktModel" @@ -16049,15 +16153,15 @@ }, { "type": "ObjectProperty", - "start": 13493, - "end": 13498, + "start": 13560, + "end": 13565, "loc": { "start": { - "line": 326, + "line": 328, "column": 20 }, "end": { - "line": 326, + "line": 328, "column": 25 } }, @@ -16066,15 +16170,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 13493, - "end": 13498, + "start": 13560, + "end": 13565, "loc": { "start": { - "line": 326, + "line": 328, "column": 20 }, "end": { - "line": 326, + "line": 328, "column": 25 }, "identifierName": "stats" @@ -16083,15 +16187,15 @@ }, "value": { "type": "Identifier", - "start": 13493, - "end": 13498, + "start": 13560, + "end": 13565, "loc": { "start": { - "line": 326, + "line": 328, "column": 20 }, "end": { - "line": 326, + "line": 328, "column": 25 }, "identifierName": "stats" @@ -16104,15 +16208,15 @@ }, { "type": "ObjectProperty", - "start": 13520, - "end": 13523, + "start": 13587, + "end": 13590, "loc": { "start": { - "line": 327, + "line": 329, "column": 20 }, "end": { - "line": 327, + "line": 329, "column": 23 } }, @@ -16121,15 +16225,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 13520, - "end": 13523, + "start": 13587, + "end": 13590, "loc": { "start": { - "line": 327, + "line": 329, "column": 20 }, "end": { - "line": 327, + "line": 329, "column": 23 }, "identifierName": "log" @@ -16138,15 +16242,15 @@ }, "value": { "type": "Identifier", - "start": 13520, - "end": 13523, + "start": 13587, + "end": 13590, "loc": { "start": { - "line": 327, + "line": 329, "column": 20 }, "end": { - "line": 327, + "line": 329, "column": 23 }, "identifierName": "log" @@ -16164,15 +16268,15 @@ }, { "type": "BreakStatement", - "start": 13560, - "end": 13566, + "start": 13627, + "end": 13633, "loc": { "start": { - "line": 329, + "line": 331, "column": 16 }, "end": { - "line": 329, + "line": 331, "column": 22 } }, @@ -16181,15 +16285,15 @@ ], "test": { "type": "StringLiteral", - "start": 13350, - "end": 13355, + "start": 13417, + "end": 13422, "loc": { "start": { - "line": 322, + "line": 324, "column": 17 }, "end": { - "line": 322, + "line": 324, "column": 22 } }, @@ -16202,58 +16306,58 @@ }, { "type": "SwitchCase", - "start": 13580, - "end": 13683, + "start": 13647, + "end": 13750, "loc": { "start": { - "line": 331, + "line": 333, "column": 12 }, "end": { - "line": 333, + "line": 335, "column": 23 } }, "consequent": [ { "type": "ExpressionStatement", - "start": 13605, - "end": 13659, + "start": 13672, + "end": 13726, "loc": { "start": { - "line": 332, + "line": 334, "column": 16 }, "end": { - "line": 332, + "line": 334, "column": 70 } }, "expression": { "type": "CallExpression", - "start": 13605, - "end": 13658, + "start": 13672, + "end": 13725, "loc": { "start": { - "line": 332, + "line": 334, "column": 16 }, "end": { - "line": 332, + "line": 334, "column": 69 } }, "callee": { "type": "Identifier", - "start": 13605, - "end": 13611, + "start": 13672, + "end": 13678, "loc": { "start": { - "line": 332, + "line": 334, "column": 16 }, "end": { - "line": 332, + "line": 334, "column": 22 }, "identifierName": "reject" @@ -16263,30 +16367,30 @@ "arguments": [ { "type": "TemplateLiteral", - "start": 13612, - "end": 13657, + "start": 13679, + "end": 13724, "loc": { "start": { - "line": 332, + "line": 334, "column": 23 }, "end": { - "line": 332, + "line": 334, "column": 68 } }, "expressions": [ { "type": "Identifier", - "start": 13650, - "end": 13653, + "start": 13717, + "end": 13720, "loc": { "start": { - "line": 332, + "line": 334, "column": 61 }, "end": { - "line": 332, + "line": 334, "column": 64 }, "identifierName": "ext" @@ -16297,15 +16401,15 @@ "quasis": [ { "type": "TemplateElement", - "start": 13613, - "end": 13648, + "start": 13680, + "end": 13715, "loc": { "start": { - "line": 332, + "line": 334, "column": 24 }, "end": { - "line": 332, + "line": 334, "column": 59 } }, @@ -16317,15 +16421,15 @@ }, { "type": "TemplateElement", - "start": 13654, - "end": 13656, + "start": 13721, + "end": 13723, "loc": { "start": { - "line": 332, + "line": 334, "column": 65 }, "end": { - "line": 332, + "line": 334, "column": 67 } }, @@ -16342,15 +16446,15 @@ }, { "type": "ReturnStatement", - "start": 13676, - "end": 13683, + "start": 13743, + "end": 13750, "loc": { "start": { - "line": 333, + "line": 335, "column": 16 }, "end": { - "line": 333, + "line": 335, "column": 23 } }, @@ -16363,29 +16467,29 @@ }, { "type": "FunctionDeclaration", - "start": 13703, - "end": 17242, + "start": 13770, + "end": 17309, "loc": { "start": { - "line": 336, + "line": 338, "column": 8 }, "end": { - "line": 412, + "line": 414, "column": 9 } }, "id": { "type": "Identifier", - "start": 13712, - "end": 13719, + "start": 13779, + "end": 13786, "loc": { "start": { - "line": 336, + "line": 338, "column": 17 }, "end": { - "line": 336, + "line": 338, "column": 24 }, "identifierName": "convert" @@ -16398,15 +16502,15 @@ "params": [ { "type": "Identifier", - "start": 13720, - "end": 13726, + "start": 13787, + "end": 13793, "loc": { "start": { - "line": 336, + "line": 338, "column": 25 }, "end": { - "line": 336, + "line": 338, "column": 31 }, "identifierName": "parser" @@ -16415,15 +16519,15 @@ }, { "type": "Identifier", - "start": 13728, - "end": 13743, + "start": 13795, + "end": 13810, "loc": { "start": { - "line": 336, + "line": 338, "column": 33 }, "end": { - "line": 336, + "line": 338, "column": 48 }, "identifierName": "converterParams" @@ -16433,86 +16537,86 @@ ], "body": { "type": "BlockStatement", - "start": 13745, - "end": 17242, + "start": 13812, + "end": 17309, "loc": { "start": { - "line": 336, + "line": 338, "column": 50 }, "end": { - "line": 412, + "line": 414, "column": 9 } }, "body": [ { "type": "ExpressionStatement", - "start": 13760, - "end": 17232, + "start": 13827, + "end": 17299, "loc": { "start": { - "line": 338, + "line": 340, "column": 12 }, "end": { - "line": 411, + "line": 413, "column": 15 } }, "expression": { "type": "CallExpression", - "start": 13760, - "end": 17231, + "start": 13827, + "end": 17298, "loc": { "start": { - "line": 338, + "line": 340, "column": 12 }, "end": { - "line": 411, + "line": 413, "column": 14 } }, "callee": { "type": "MemberExpression", - "start": 13760, - "end": 13788, + "start": 13827, + "end": 13855, "loc": { "start": { - "line": 338, + "line": 340, "column": 12 }, "end": { - "line": 338, + "line": 340, "column": 40 } }, "object": { "type": "CallExpression", - "start": 13760, - "end": 13783, + "start": 13827, + "end": 13850, "loc": { "start": { - "line": 338, + "line": 340, "column": 12 }, "end": { - "line": 338, + "line": 340, "column": 35 } }, "callee": { "type": "Identifier", - "start": 13760, - "end": 13766, + "start": 13827, + "end": 13833, "loc": { "start": { - "line": 338, + "line": 340, "column": 12 }, "end": { - "line": 338, + "line": 340, "column": 18 }, "identifierName": "parser" @@ -16522,15 +16626,15 @@ "arguments": [ { "type": "Identifier", - "start": 13767, - "end": 13782, + "start": 13834, + "end": 13849, "loc": { "start": { - "line": 338, + "line": 340, "column": 19 }, "end": { - "line": 338, + "line": 340, "column": 34 }, "identifierName": "converterParams" @@ -16541,15 +16645,15 @@ }, "property": { "type": "Identifier", - "start": 13784, - "end": 13788, + "start": 13851, + "end": 13855, "loc": { "start": { - "line": 338, + "line": 340, "column": 36 }, "end": { - "line": 338, + "line": 340, "column": 40 }, "identifierName": "then" @@ -16561,15 +16665,15 @@ "arguments": [ { "type": "ArrowFunctionExpression", - "start": 13789, - "end": 17175, + "start": 13856, + "end": 17242, "loc": { "start": { - "line": 338, + "line": 340, "column": 41 }, "end": { - "line": 409, + "line": 411, "column": 13 } }, @@ -16580,44 +16684,44 @@ "params": [], "body": { "type": "BlockStatement", - "start": 13795, - "end": 17175, + "start": 13862, + "end": 17242, "loc": { "start": { - "line": 338, + "line": 340, "column": 47 }, "end": { - "line": 409, + "line": 411, "column": 13 } }, "body": [ { "type": "IfStatement", - "start": 13814, - "end": 13910, + "start": 13881, + "end": 13977, "loc": { "start": { - "line": 340, + "line": 342, "column": 16 }, "end": { - "line": 342, + "line": 344, "column": 17 } }, "test": { "type": "UnaryExpression", - "start": 13818, - "end": 13832, + "start": 13885, + "end": 13899, "loc": { "start": { - "line": 340, + "line": 342, "column": 20 }, "end": { - "line": 340, + "line": 342, "column": 34 } }, @@ -16625,15 +16729,15 @@ "prefix": true, "argument": { "type": "Identifier", - "start": 13819, - "end": 13832, + "start": 13886, + "end": 13899, "loc": { "start": { - "line": 340, + "line": 342, "column": 21 }, "end": { - "line": 340, + "line": 342, "column": 34 }, "identifierName": "metaModelJSON" @@ -16646,72 +16750,72 @@ }, "consequent": { "type": "BlockStatement", - "start": 13834, - "end": 13910, + "start": 13901, + "end": 13977, "loc": { "start": { - "line": 340, + "line": 342, "column": 36 }, "end": { - "line": 342, + "line": 344, "column": 17 } }, "body": [ { "type": "ExpressionStatement", - "start": 13856, - "end": 13892, + "start": 13923, + "end": 13959, "loc": { "start": { - "line": 341, + "line": 343, "column": 20 }, "end": { - "line": 341, + "line": 343, "column": 56 } }, "expression": { "type": "CallExpression", - "start": 13856, - "end": 13891, + "start": 13923, + "end": 13958, "loc": { "start": { - "line": 341, + "line": 343, "column": 20 }, "end": { - "line": 341, + "line": 343, "column": 55 } }, "callee": { "type": "MemberExpression", - "start": 13856, - "end": 13889, + "start": 13923, + "end": 13956, "loc": { "start": { - "line": 341, + "line": 343, "column": 20 }, "end": { - "line": 341, + "line": 343, "column": 53 } }, "object": { "type": "Identifier", - "start": 13856, - "end": 13864, + "start": 13923, + "end": 13931, "loc": { "start": { - "line": 341, + "line": 343, "column": 20 }, "end": { - "line": 341, + "line": 343, "column": 28 }, "identifierName": "xktModel" @@ -16720,15 +16824,15 @@ }, "property": { "type": "Identifier", - "start": 13865, - "end": 13889, + "start": 13932, + "end": 13956, "loc": { "start": { - "line": 341, + "line": 343, "column": 29 }, "end": { - "line": 341, + "line": 343, "column": 53 }, "identifierName": "createDefaultMetaObjects" @@ -16747,43 +16851,43 @@ }, { "type": "ExpressionStatement", - "start": 13928, - "end": 13982, + "start": 13995, + "end": 14049, "loc": { "start": { - "line": 344, + "line": 346, "column": 16 }, "end": { - "line": 344, + "line": 346, "column": 70 } }, "expression": { "type": "CallExpression", - "start": 13928, - "end": 13981, + "start": 13995, + "end": 14048, "loc": { "start": { - "line": 344, + "line": 346, "column": 16 }, "end": { - "line": 344, + "line": 346, "column": 69 } }, "callee": { "type": "Identifier", - "start": 13928, - "end": 13931, + "start": 13995, + "end": 13998, "loc": { "start": { - "line": 344, + "line": 346, "column": 16 }, "end": { - "line": 344, + "line": 346, "column": 19 }, "identifierName": "log" @@ -16793,15 +16897,15 @@ "arguments": [ { "type": "StringLiteral", - "start": 13932, - "end": 13980, + "start": 13999, + "end": 14047, "loc": { "start": { - "line": 344, + "line": 346, "column": 20 }, "end": { - "line": 344, + "line": 346, "column": 68 } }, @@ -16816,85 +16920,85 @@ }, { "type": "ExpressionStatement", - "start": 14000, - "end": 17161, + "start": 14067, + "end": 17228, "loc": { "start": { - "line": 346, + "line": 348, "column": 16 }, "end": { - "line": 408, + "line": 410, "column": 19 } }, "expression": { "type": "CallExpression", - "start": 14000, - "end": 17160, + "start": 14067, + "end": 17227, "loc": { "start": { - "line": 346, + "line": 348, "column": 16 }, "end": { - "line": 408, + "line": 410, "column": 18 } }, "callee": { "type": "MemberExpression", - "start": 14000, - "end": 14024, + "start": 14067, + "end": 14091, "loc": { "start": { - "line": 346, + "line": 348, "column": 16 }, "end": { - "line": 346, + "line": 348, "column": 40 } }, "object": { "type": "CallExpression", - "start": 14000, - "end": 14019, + "start": 14067, + "end": 14086, "loc": { "start": { - "line": 346, + "line": 348, "column": 16 }, "end": { - "line": 346, + "line": 348, "column": 35 } }, "callee": { "type": "MemberExpression", - "start": 14000, - "end": 14017, + "start": 14067, + "end": 14084, "loc": { "start": { - "line": 346, + "line": 348, "column": 16 }, "end": { - "line": 346, + "line": 348, "column": 33 } }, "object": { "type": "Identifier", - "start": 14000, - "end": 14008, + "start": 14067, + "end": 14075, "loc": { "start": { - "line": 346, + "line": 348, "column": 16 }, "end": { - "line": 346, + "line": 348, "column": 24 }, "identifierName": "xktModel" @@ -16903,15 +17007,15 @@ }, "property": { "type": "Identifier", - "start": 14009, - "end": 14017, + "start": 14076, + "end": 14084, "loc": { "start": { - "line": 346, + "line": 348, "column": 25 }, "end": { - "line": 346, + "line": 348, "column": 33 }, "identifierName": "finalize" @@ -16924,15 +17028,15 @@ }, "property": { "type": "Identifier", - "start": 14020, - "end": 14024, + "start": 14087, + "end": 14091, "loc": { "start": { - "line": 346, + "line": 348, "column": 36 }, "end": { - "line": 346, + "line": 348, "column": 40 }, "identifierName": "then" @@ -16944,15 +17048,15 @@ "arguments": [ { "type": "ArrowFunctionExpression", - "start": 14025, - "end": 17159, + "start": 14092, + "end": 17226, "loc": { "start": { - "line": 346, + "line": 348, "column": 41 }, "end": { - "line": 408, + "line": 410, "column": 17 } }, @@ -16963,58 +17067,58 @@ "params": [], "body": { "type": "BlockStatement", - "start": 14031, - "end": 17159, + "start": 14098, + "end": 17226, "loc": { "start": { - "line": 346, + "line": 348, "column": 47 }, "end": { - "line": 408, + "line": 410, "column": 17 } }, "body": [ { "type": "ExpressionStatement", - "start": 14054, - "end": 14107, + "start": 14121, + "end": 14174, "loc": { "start": { - "line": 348, + "line": 350, "column": 20 }, "end": { - "line": 348, + "line": 350, "column": 73 } }, "expression": { "type": "CallExpression", - "start": 14054, - "end": 14106, + "start": 14121, + "end": 14173, "loc": { "start": { - "line": 348, + "line": 350, "column": 20 }, "end": { - "line": 348, + "line": 350, "column": 72 } }, "callee": { "type": "Identifier", - "start": 14054, - "end": 14057, + "start": 14121, + "end": 14124, "loc": { "start": { - "line": 348, + "line": 350, "column": 20 }, "end": { - "line": 348, + "line": 350, "column": 23 }, "identifierName": "log" @@ -17024,15 +17128,15 @@ "arguments": [ { "type": "StringLiteral", - "start": 14058, - "end": 14105, + "start": 14125, + "end": 14172, "loc": { "start": { - "line": 348, + "line": 350, "column": 24 }, "end": { - "line": 348, + "line": 350, "column": 71 } }, @@ -17047,44 +17151,44 @@ }, { "type": "VariableDeclaration", - "start": 14129, - "end": 14224, + "start": 14196, + "end": 14291, "loc": { "start": { - "line": 350, + "line": 352, "column": 20 }, "end": { - "line": 350, + "line": 352, "column": 115 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 14135, - "end": 14223, + "start": 14202, + "end": 14290, "loc": { "start": { - "line": 350, + "line": 352, "column": 26 }, "end": { - "line": 350, + "line": 352, "column": 114 } }, "id": { "type": "Identifier", - "start": 14135, - "end": 14149, + "start": 14202, + "end": 14216, "loc": { "start": { - "line": 350, + "line": 352, "column": 26 }, "end": { - "line": 350, + "line": 352, "column": 40 }, "identifierName": "xktArrayBuffer" @@ -17093,29 +17197,29 @@ }, "init": { "type": "CallExpression", - "start": 14152, - "end": 14223, + "start": 14219, + "end": 14290, "loc": { "start": { - "line": 350, + "line": 352, "column": 43 }, "end": { - "line": 350, + "line": 352, "column": 114 } }, "callee": { "type": "Identifier", - "start": 14152, - "end": 14178, + "start": 14219, + "end": 14245, "loc": { "start": { - "line": 350, + "line": 352, "column": 43 }, "end": { - "line": 350, + "line": 352, "column": 69 }, "identifierName": "writeXKTModelToArrayBuffer" @@ -17125,15 +17229,15 @@ "arguments": [ { "type": "Identifier", - "start": 14179, - "end": 14187, + "start": 14246, + "end": 14254, "loc": { "start": { - "line": 350, + "line": 352, "column": 70 }, "end": { - "line": 350, + "line": 352, "column": 78 }, "identifierName": "xktModel" @@ -17142,15 +17246,15 @@ }, { "type": "Identifier", - "start": 14189, - "end": 14202, + "start": 14256, + "end": 14269, "loc": { "start": { - "line": 350, + "line": 352, "column": 80 }, "end": { - "line": 350, + "line": 352, "column": 93 }, "identifierName": "metaModelJSON" @@ -17159,15 +17263,15 @@ }, { "type": "Identifier", - "start": 14204, - "end": 14209, + "start": 14271, + "end": 14276, "loc": { "start": { - "line": 350, + "line": 352, "column": 95 }, "end": { - "line": 350, + "line": 352, "column": 100 }, "identifierName": "stats" @@ -17176,30 +17280,30 @@ }, { "type": "ObjectExpression", - "start": 14211, - "end": 14222, + "start": 14278, + "end": 14289, "loc": { "start": { - "line": 350, + "line": 352, "column": 102 }, "end": { - "line": 350, + "line": 352, "column": 113 } }, "properties": [ { "type": "ObjectProperty", - "start": 14212, - "end": 14221, + "start": 14279, + "end": 14288, "loc": { "start": { - "line": 350, + "line": 352, "column": 103 }, "end": { - "line": 350, + "line": 352, "column": 112 } }, @@ -17208,15 +17312,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 14212, - "end": 14215, + "start": 14279, + "end": 14282, "loc": { "start": { - "line": 350, + "line": 352, "column": 103 }, "end": { - "line": 350, + "line": 352, "column": 106 }, "identifierName": "zip" @@ -17225,15 +17329,15 @@ }, "value": { "type": "BooleanLiteral", - "start": 14217, - "end": 14221, + "start": 14284, + "end": 14288, "loc": { "start": { - "line": 350, + "line": 352, "column": 108 }, "end": { - "line": 350, + "line": 352, "column": 112 } }, @@ -17250,44 +17354,44 @@ }, { "type": "VariableDeclaration", - "start": 14246, - "end": 14293, + "start": 14313, + "end": 14360, "loc": { "start": { - "line": 352, + "line": 354, "column": 20 }, "end": { - "line": 352, + "line": 354, "column": 67 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 14252, - "end": 14292, + "start": 14319, + "end": 14359, "loc": { "start": { - "line": 352, + "line": 354, "column": 26 }, "end": { - "line": 352, + "line": 354, "column": 66 } }, "id": { "type": "Identifier", - "start": 14252, - "end": 14262, + "start": 14319, + "end": 14329, "loc": { "start": { - "line": 352, + "line": 354, "column": 26 }, "end": { - "line": 352, + "line": 354, "column": 36 }, "identifierName": "xktContent" @@ -17296,43 +17400,43 @@ }, "init": { "type": "CallExpression", - "start": 14265, - "end": 14292, + "start": 14332, + "end": 14359, "loc": { "start": { - "line": 352, + "line": 354, "column": 39 }, "end": { - "line": 352, + "line": 354, "column": 66 } }, "callee": { "type": "MemberExpression", - "start": 14265, - "end": 14276, + "start": 14332, + "end": 14343, "loc": { "start": { - "line": 352, + "line": 354, "column": 39 }, "end": { - "line": 352, + "line": 354, "column": 50 } }, "object": { "type": "Identifier", - "start": 14265, - "end": 14271, + "start": 14332, + "end": 14338, "loc": { "start": { - "line": 352, + "line": 354, "column": 39 }, "end": { - "line": 352, + "line": 354, "column": 45 }, "identifierName": "Buffer" @@ -17341,15 +17445,15 @@ }, "property": { "type": "Identifier", - "start": 14272, - "end": 14276, + "start": 14339, + "end": 14343, "loc": { "start": { - "line": 352, + "line": 354, "column": 46 }, "end": { - "line": 352, + "line": 354, "column": 50 }, "identifierName": "from" @@ -17361,15 +17465,15 @@ "arguments": [ { "type": "Identifier", - "start": 14277, - "end": 14291, + "start": 14344, + "end": 14358, "loc": { "start": { - "line": 352, + "line": 354, "column": 51 }, "end": { - "line": 352, + "line": 354, "column": 65 }, "identifierName": "xktArrayBuffer" @@ -17384,44 +17488,44 @@ }, { "type": "VariableDeclaration", - "start": 14315, - "end": 14369, + "start": 14382, + "end": 14436, "loc": { "start": { - "line": 354, + "line": 356, "column": 20 }, "end": { - "line": 354, + "line": 356, "column": 74 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 14321, - "end": 14368, + "start": 14388, + "end": 14435, "loc": { "start": { - "line": 354, + "line": 356, "column": 26 }, "end": { - "line": 354, + "line": 356, "column": 73 } }, "id": { "type": "Identifier", - "start": 14321, - "end": 14340, + "start": 14388, + "end": 14407, "loc": { "start": { - "line": 354, + "line": 356, "column": 26 }, "end": { - "line": 354, + "line": 356, "column": 45 }, "identifierName": "targetFileSizeBytes" @@ -17430,29 +17534,29 @@ }, "init": { "type": "MemberExpression", - "start": 14343, - "end": 14368, + "start": 14410, + "end": 14435, "loc": { "start": { - "line": 354, + "line": 356, "column": 48 }, "end": { - "line": 354, + "line": 356, "column": 73 } }, "object": { "type": "Identifier", - "start": 14343, - "end": 14357, + "start": 14410, + "end": 14424, "loc": { "start": { - "line": 354, + "line": 356, "column": 48 }, "end": { - "line": 354, + "line": 356, "column": 62 }, "identifierName": "xktArrayBuffer" @@ -17461,15 +17565,15 @@ }, "property": { "type": "Identifier", - "start": 14358, - "end": 14368, + "start": 14425, + "end": 14435, "loc": { "start": { - "line": 354, + "line": 356, "column": 63 }, "end": { - "line": 354, + "line": 356, "column": 73 }, "identifierName": "byteLength" @@ -17484,58 +17588,58 @@ }, { "type": "ExpressionStatement", - "start": 14391, - "end": 14430, + "start": 14458, + "end": 14497, "loc": { "start": { - "line": 356, + "line": 358, "column": 20 }, "end": { - "line": 356, + "line": 358, "column": 59 } }, "expression": { "type": "AssignmentExpression", - "start": 14391, - "end": 14429, + "start": 14458, + "end": 14496, "loc": { "start": { - "line": 356, + "line": 358, "column": 20 }, "end": { - "line": 356, + "line": 358, "column": 58 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 14391, - "end": 14408, + "start": 14458, + "end": 14475, "loc": { "start": { - "line": 356, + "line": 358, "column": 20 }, "end": { - "line": 356, + "line": 358, "column": 37 } }, "object": { "type": "Identifier", - "start": 14391, - "end": 14396, + "start": 14458, + "end": 14463, "loc": { "start": { - "line": 356, + "line": 358, "column": 20 }, "end": { - "line": 356, + "line": 358, "column": 25 }, "identifierName": "stats" @@ -17544,15 +17648,15 @@ }, "property": { "type": "Identifier", - "start": 14397, - "end": 14408, + "start": 14464, + "end": 14475, "loc": { "start": { - "line": 356, + "line": 358, "column": 26 }, "end": { - "line": 356, + "line": 358, "column": 37 }, "identifierName": "minTileSize" @@ -17563,29 +17667,29 @@ }, "right": { "type": "LogicalExpression", - "start": 14411, - "end": 14429, + "start": 14478, + "end": 14496, "loc": { "start": { - "line": 356, + "line": 358, "column": 40 }, "end": { - "line": 356, + "line": 358, "column": 58 } }, "left": { "type": "Identifier", - "start": 14411, - "end": 14422, + "start": 14478, + "end": 14489, "loc": { "start": { - "line": 356, + "line": 358, "column": 40 }, "end": { - "line": 356, + "line": 358, "column": 51 }, "identifierName": "minTileSize" @@ -17595,15 +17699,15 @@ "operator": "||", "right": { "type": "NumericLiteral", - "start": 14426, - "end": 14429, + "start": 14493, + "end": 14496, "loc": { "start": { - "line": 356, + "line": 358, "column": 55 }, "end": { - "line": 356, + "line": 358, "column": 58 } }, @@ -17618,58 +17722,58 @@ }, { "type": "ExpressionStatement", - "start": 14451, - "end": 14510, + "start": 14518, + "end": 14577, "loc": { "start": { - "line": 357, + "line": 359, "column": 20 }, "end": { - "line": 357, + "line": 359, "column": 79 } }, "expression": { "type": "AssignmentExpression", - "start": 14451, - "end": 14509, + "start": 14518, + "end": 14576, "loc": { "start": { - "line": 357, + "line": 359, "column": 20 }, "end": { - "line": 357, + "line": 359, "column": 78 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 14451, - "end": 14467, + "start": 14518, + "end": 14534, "loc": { "start": { - "line": 357, + "line": 359, "column": 20 }, "end": { - "line": 357, + "line": 359, "column": 36 } }, "object": { "type": "Identifier", - "start": 14451, - "end": 14456, + "start": 14518, + "end": 14523, "loc": { "start": { - "line": 357, + "line": 359, "column": 20 }, "end": { - "line": 357, + "line": 359, "column": 25 }, "identifierName": "stats" @@ -17678,15 +17782,15 @@ }, "property": { "type": "Identifier", - "start": 14457, - "end": 14467, + "start": 14524, + "end": 14534, "loc": { "start": { - "line": 357, + "line": 359, "column": 26 }, "end": { - "line": 357, + "line": 359, "column": 36 }, "identifierName": "sourceSize" @@ -17697,57 +17801,57 @@ }, "right": { "type": "CallExpression", - "start": 14470, - "end": 14509, + "start": 14537, + "end": 14576, "loc": { "start": { - "line": 357, + "line": 359, "column": 39 }, "end": { - "line": 357, + "line": 359, "column": 78 } }, "callee": { "type": "MemberExpression", - "start": 14470, - "end": 14506, + "start": 14537, + "end": 14573, "loc": { "start": { - "line": 357, + "line": 359, "column": 39 }, "end": { - "line": 357, + "line": 359, "column": 75 } }, "object": { "type": "BinaryExpression", - "start": 14471, - "end": 14497, + "start": 14538, + "end": 14564, "loc": { "start": { - "line": 357, + "line": 359, "column": 40 }, "end": { - "line": 357, + "line": 359, "column": 66 } }, "left": { "type": "Identifier", - "start": 14471, - "end": 14490, + "start": 14538, + "end": 14557, "loc": { "start": { - "line": 357, + "line": 359, "column": 40 }, "end": { - "line": 357, + "line": 359, "column": 59 }, "identifierName": "sourceFileSizeBytes" @@ -17757,15 +17861,15 @@ "operator": "/", "right": { "type": "NumericLiteral", - "start": 14493, - "end": 14497, + "start": 14560, + "end": 14564, "loc": { "start": { - "line": 357, + "line": 359, "column": 62 }, "end": { - "line": 357, + "line": 359, "column": 66 } }, @@ -17777,20 +17881,20 @@ }, "extra": { "parenthesized": true, - "parenStart": 14470 + "parenStart": 14537 } }, "property": { "type": "Identifier", - "start": 14499, - "end": 14506, + "start": 14566, + "end": 14573, "loc": { "start": { - "line": 357, + "line": 359, "column": 68 }, "end": { - "line": 357, + "line": 359, "column": 75 }, "identifierName": "toFixed" @@ -17802,15 +17906,15 @@ "arguments": [ { "type": "NumericLiteral", - "start": 14507, - "end": 14508, + "start": 14574, + "end": 14575, "loc": { "start": { - "line": 357, + "line": 359, "column": 76 }, "end": { - "line": 357, + "line": 359, "column": 77 } }, @@ -17826,58 +17930,58 @@ }, { "type": "ExpressionStatement", - "start": 14531, - "end": 14587, + "start": 14598, + "end": 14654, "loc": { "start": { - "line": 358, + "line": 360, "column": 20 }, "end": { - "line": 358, + "line": 360, "column": 76 } }, "expression": { "type": "AssignmentExpression", - "start": 14531, - "end": 14586, + "start": 14598, + "end": 14653, "loc": { "start": { - "line": 358, + "line": 360, "column": 20 }, "end": { - "line": 358, + "line": 360, "column": 75 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 14531, - "end": 14544, + "start": 14598, + "end": 14611, "loc": { "start": { - "line": 358, + "line": 360, "column": 20 }, "end": { - "line": 358, + "line": 360, "column": 33 } }, "object": { "type": "Identifier", - "start": 14531, - "end": 14536, + "start": 14598, + "end": 14603, "loc": { "start": { - "line": 358, + "line": 360, "column": 20 }, "end": { - "line": 358, + "line": 360, "column": 25 }, "identifierName": "stats" @@ -17886,15 +17990,15 @@ }, "property": { "type": "Identifier", - "start": 14537, - "end": 14544, + "start": 14604, + "end": 14611, "loc": { "start": { - "line": 358, + "line": 360, "column": 26 }, "end": { - "line": 358, + "line": 360, "column": 33 }, "identifierName": "xktSize" @@ -17905,57 +18009,57 @@ }, "right": { "type": "CallExpression", - "start": 14547, - "end": 14586, + "start": 14614, + "end": 14653, "loc": { "start": { - "line": 358, + "line": 360, "column": 36 }, "end": { - "line": 358, + "line": 360, "column": 75 } }, "callee": { "type": "MemberExpression", - "start": 14547, - "end": 14583, + "start": 14614, + "end": 14650, "loc": { "start": { - "line": 358, + "line": 360, "column": 36 }, "end": { - "line": 358, + "line": 360, "column": 72 } }, "object": { "type": "BinaryExpression", - "start": 14548, - "end": 14574, + "start": 14615, + "end": 14641, "loc": { "start": { - "line": 358, + "line": 360, "column": 37 }, "end": { - "line": 358, + "line": 360, "column": 63 } }, "left": { "type": "Identifier", - "start": 14548, - "end": 14567, + "start": 14615, + "end": 14634, "loc": { "start": { - "line": 358, + "line": 360, "column": 37 }, "end": { - "line": 358, + "line": 360, "column": 56 }, "identifierName": "targetFileSizeBytes" @@ -17965,15 +18069,15 @@ "operator": "/", "right": { "type": "NumericLiteral", - "start": 14570, - "end": 14574, + "start": 14637, + "end": 14641, "loc": { "start": { - "line": 358, + "line": 360, "column": 59 }, "end": { - "line": 358, + "line": 360, "column": 63 } }, @@ -17985,20 +18089,20 @@ }, "extra": { "parenthesized": true, - "parenStart": 14547 + "parenStart": 14614 } }, "property": { "type": "Identifier", - "start": 14576, - "end": 14583, + "start": 14643, + "end": 14650, "loc": { "start": { - "line": 358, + "line": 360, "column": 65 }, "end": { - "line": 358, + "line": 360, "column": 72 }, "identifierName": "toFixed" @@ -18010,15 +18114,15 @@ "arguments": [ { "type": "NumericLiteral", - "start": 14584, - "end": 14585, + "start": 14651, + "end": 14652, "loc": { "start": { - "line": 358, + "line": 360, "column": 73 }, "end": { - "line": 358, + "line": 360, "column": 74 } }, @@ -18034,58 +18138,58 @@ }, { "type": "ExpressionStatement", - "start": 14608, - "end": 14647, + "start": 14675, + "end": 14714, "loc": { "start": { - "line": 359, + "line": 361, "column": 20 }, "end": { - "line": 359, + "line": 361, "column": 59 } }, "expression": { "type": "AssignmentExpression", - "start": 14608, - "end": 14646, + "start": 14675, + "end": 14713, "loc": { "start": { - "line": 359, + "line": 361, "column": 20 }, "end": { - "line": 359, + "line": 361, "column": 58 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 14608, - "end": 14624, + "start": 14675, + "end": 14691, "loc": { "start": { - "line": 359, + "line": 361, "column": 20 }, "end": { - "line": 359, + "line": 361, "column": 36 } }, "object": { "type": "Identifier", - "start": 14608, - "end": 14613, + "start": 14675, + "end": 14680, "loc": { "start": { - "line": 359, + "line": 361, "column": 20 }, "end": { - "line": 359, + "line": 361, "column": 25 }, "identifierName": "stats" @@ -18094,15 +18198,15 @@ }, "property": { "type": "Identifier", - "start": 14614, - "end": 14624, + "start": 14681, + "end": 14691, "loc": { "start": { - "line": 359, + "line": 361, "column": 26 }, "end": { - "line": 359, + "line": 361, "column": 36 }, "identifierName": "xktVersion" @@ -18113,29 +18217,29 @@ }, "right": { "type": "MemberExpression", - "start": 14627, - "end": 14646, + "start": 14694, + "end": 14713, "loc": { "start": { - "line": 359, + "line": 361, "column": 39 }, "end": { - "line": 359, + "line": 361, "column": 58 } }, "object": { "type": "Identifier", - "start": 14627, - "end": 14635, + "start": 14694, + "end": 14702, "loc": { "start": { - "line": 359, + "line": 361, "column": 39 }, "end": { - "line": 359, + "line": 361, "column": 47 }, "identifierName": "XKT_INFO" @@ -18144,15 +18248,15 @@ }, "property": { "type": "Identifier", - "start": 14636, - "end": 14646, + "start": 14703, + "end": 14713, "loc": { "start": { - "line": 359, + "line": 361, "column": 48 }, "end": { - "line": 359, + "line": 361, "column": 58 }, "identifierName": "xktVersion" @@ -18165,58 +18269,58 @@ }, { "type": "ExpressionStatement", - "start": 14668, - "end": 14748, + "start": 14735, + "end": 14815, "loc": { "start": { - "line": 360, + "line": 362, "column": 20 }, "end": { - "line": 360, + "line": 362, "column": 100 } }, "expression": { "type": "AssignmentExpression", - "start": 14668, - "end": 14747, + "start": 14735, + "end": 14814, "loc": { "start": { - "line": 360, + "line": 362, "column": 20 }, "end": { - "line": 360, + "line": 362, "column": 99 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 14668, - "end": 14690, + "start": 14735, + "end": 14757, "loc": { "start": { - "line": 360, + "line": 362, "column": 20 }, "end": { - "line": 360, + "line": 362, "column": 42 } }, "object": { "type": "Identifier", - "start": 14668, - "end": 14673, + "start": 14735, + "end": 14740, "loc": { "start": { - "line": 360, + "line": 362, "column": 20 }, "end": { - "line": 360, + "line": 362, "column": 25 }, "identifierName": "stats" @@ -18225,15 +18329,15 @@ }, "property": { "type": "Identifier", - "start": 14674, - "end": 14690, + "start": 14741, + "end": 14757, "loc": { "start": { - "line": 360, + "line": 362, "column": 26 }, "end": { - "line": 360, + "line": 362, "column": 42 }, "identifierName": "compressionRatio" @@ -18244,57 +18348,57 @@ }, "right": { "type": "CallExpression", - "start": 14693, - "end": 14747, + "start": 14760, + "end": 14814, "loc": { "start": { - "line": 360, + "line": 362, "column": 45 }, "end": { - "line": 360, + "line": 362, "column": 99 } }, "callee": { "type": "MemberExpression", - "start": 14693, - "end": 14744, + "start": 14760, + "end": 14811, "loc": { "start": { - "line": 360, + "line": 362, "column": 45 }, "end": { - "line": 360, + "line": 362, "column": 96 } }, "object": { "type": "BinaryExpression", - "start": 14694, - "end": 14735, + "start": 14761, + "end": 14802, "loc": { "start": { - "line": 360, + "line": 362, "column": 46 }, "end": { - "line": 360, + "line": 362, "column": 87 } }, "left": { "type": "Identifier", - "start": 14694, - "end": 14713, + "start": 14761, + "end": 14780, "loc": { "start": { - "line": 360, + "line": 362, "column": 46 }, "end": { - "line": 360, + "line": 362, "column": 65 }, "identifierName": "sourceFileSizeBytes" @@ -18304,15 +18408,15 @@ "operator": "/", "right": { "type": "Identifier", - "start": 14716, - "end": 14735, + "start": 14783, + "end": 14802, "loc": { "start": { - "line": 360, + "line": 362, "column": 68 }, "end": { - "line": 360, + "line": 362, "column": 87 }, "identifierName": "targetFileSizeBytes" @@ -18321,20 +18425,20 @@ }, "extra": { "parenthesized": true, - "parenStart": 14693 + "parenStart": 14760 } }, "property": { "type": "Identifier", - "start": 14737, - "end": 14744, + "start": 14804, + "end": 14811, "loc": { "start": { - "line": 360, + "line": 362, "column": 89 }, "end": { - "line": 360, + "line": 362, "column": 96 }, "identifierName": "toFixed" @@ -18346,15 +18450,15 @@ "arguments": [ { "type": "NumericLiteral", - "start": 14745, - "end": 14746, + "start": 14812, + "end": 14813, "loc": { "start": { - "line": 360, + "line": 362, "column": 97 }, "end": { - "line": 360, + "line": 362, "column": 98 } }, @@ -18370,58 +18474,58 @@ }, { "type": "ExpressionStatement", - "start": 14769, - "end": 14839, + "start": 14836, + "end": 14906, "loc": { "start": { - "line": 361, + "line": 363, "column": 20 }, "end": { - "line": 361, + "line": 363, "column": 90 } }, "expression": { "type": "AssignmentExpression", - "start": 14769, - "end": 14838, + "start": 14836, + "end": 14905, "loc": { "start": { - "line": 361, + "line": 363, "column": 20 }, "end": { - "line": 361, + "line": 363, "column": 89 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 14769, - "end": 14789, + "start": 14836, + "end": 14856, "loc": { "start": { - "line": 361, + "line": 363, "column": 20 }, "end": { - "line": 361, + "line": 363, "column": 40 } }, "object": { "type": "Identifier", - "start": 14769, - "end": 14774, + "start": 14836, + "end": 14841, "loc": { "start": { - "line": 361, + "line": 363, "column": 20 }, "end": { - "line": 361, + "line": 363, "column": 25 }, "identifierName": "stats" @@ -18430,15 +18534,15 @@ }, "property": { "type": "Identifier", - "start": 14775, - "end": 14789, + "start": 14842, + "end": 14856, "loc": { "start": { - "line": 361, + "line": 363, "column": 26 }, "end": { - "line": 361, + "line": 363, "column": 40 }, "identifierName": "conversionTime" @@ -18449,85 +18553,85 @@ }, "right": { "type": "CallExpression", - "start": 14792, - "end": 14838, + "start": 14859, + "end": 14905, "loc": { "start": { - "line": 361, + "line": 363, "column": 43 }, "end": { - "line": 361, + "line": 363, "column": 89 } }, "callee": { "type": "MemberExpression", - "start": 14792, - "end": 14835, + "start": 14859, + "end": 14902, "loc": { "start": { - "line": 361, + "line": 363, "column": 43 }, "end": { - "line": 361, + "line": 363, "column": 86 } }, "object": { "type": "BinaryExpression", - "start": 14793, - "end": 14826, + "start": 14860, + "end": 14893, "loc": { "start": { - "line": 361, + "line": 363, "column": 44 }, "end": { - "line": 361, + "line": 363, "column": 77 } }, "left": { "type": "BinaryExpression", - "start": 14794, - "end": 14816, + "start": 14861, + "end": 14883, "loc": { "start": { - "line": 361, + "line": 363, "column": 45 }, "end": { - "line": 361, + "line": 363, "column": 67 } }, "left": { "type": "NewExpression", - "start": 14794, - "end": 14804, + "start": 14861, + "end": 14871, "loc": { "start": { - "line": 361, + "line": 363, "column": 45 }, "end": { - "line": 361, + "line": 363, "column": 55 } }, "callee": { "type": "Identifier", - "start": 14798, - "end": 14802, + "start": 14865, + "end": 14869, "loc": { "start": { - "line": 361, + "line": 363, "column": 49 }, "end": { - "line": 361, + "line": 363, "column": 53 }, "identifierName": "Date" @@ -18539,15 +18643,15 @@ "operator": "-", "right": { "type": "Identifier", - "start": 14807, - "end": 14816, + "start": 14874, + "end": 14883, "loc": { "start": { - "line": 361, + "line": 363, "column": 58 }, "end": { - "line": 361, + "line": 363, "column": 67 }, "identifierName": "startTime" @@ -18556,21 +18660,21 @@ }, "extra": { "parenthesized": true, - "parenStart": 14793 + "parenStart": 14860 } }, "operator": "/", "right": { "type": "NumericLiteral", - "start": 14820, - "end": 14826, + "start": 14887, + "end": 14893, "loc": { "start": { - "line": 361, + "line": 363, "column": 71 }, "end": { - "line": 361, + "line": 363, "column": 77 } }, @@ -18582,20 +18686,20 @@ }, "extra": { "parenthesized": true, - "parenStart": 14792 + "parenStart": 14859 } }, "property": { "type": "Identifier", - "start": 14828, - "end": 14835, + "start": 14895, + "end": 14902, "loc": { "start": { - "line": 361, + "line": 363, "column": 79 }, "end": { - "line": 361, + "line": 363, "column": 86 }, "identifierName": "toFixed" @@ -18607,15 +18711,15 @@ "arguments": [ { "type": "NumericLiteral", - "start": 14836, - "end": 14837, + "start": 14903, + "end": 14904, "loc": { "start": { - "line": 361, + "line": 363, "column": 87 }, "end": { - "line": 361, + "line": 363, "column": 88 } }, @@ -18631,58 +18735,58 @@ }, { "type": "ExpressionStatement", - "start": 14860, - "end": 14887, + "start": 14927, + "end": 14954, "loc": { "start": { - "line": 362, + "line": 364, "column": 20 }, "end": { - "line": 362, + "line": 364, "column": 47 } }, "expression": { "type": "AssignmentExpression", - "start": 14860, - "end": 14886, + "start": 14927, + "end": 14953, "loc": { "start": { - "line": 362, + "line": 364, "column": 20 }, "end": { - "line": 362, + "line": 364, "column": 46 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 14860, - "end": 14870, + "start": 14927, + "end": 14937, "loc": { "start": { - "line": 362, + "line": 364, "column": 20 }, "end": { - "line": 362, + "line": 364, "column": 30 } }, "object": { "type": "Identifier", - "start": 14860, - "end": 14865, + "start": 14927, + "end": 14932, "loc": { "start": { - "line": 362, + "line": 364, "column": 20 }, "end": { - "line": 362, + "line": 364, "column": 25 }, "identifierName": "stats" @@ -18691,15 +18795,15 @@ }, "property": { "type": "Identifier", - "start": 14866, - "end": 14870, + "start": 14933, + "end": 14937, "loc": { "start": { - "line": 362, + "line": 364, "column": 26 }, "end": { - "line": 362, + "line": 364, "column": 30 }, "identifierName": "aabb" @@ -18710,29 +18814,29 @@ }, "right": { "type": "MemberExpression", - "start": 14873, - "end": 14886, + "start": 14940, + "end": 14953, "loc": { "start": { - "line": 362, + "line": 364, "column": 33 }, "end": { - "line": 362, + "line": 364, "column": 46 } }, "object": { "type": "Identifier", - "start": 14873, - "end": 14881, + "start": 14940, + "end": 14948, "loc": { "start": { - "line": 362, + "line": 364, "column": 33 }, "end": { - "line": 362, + "line": 364, "column": 41 }, "identifierName": "xktModel" @@ -18741,15 +18845,15 @@ }, "property": { "type": "Identifier", - "start": 14882, - "end": 14886, + "start": 14949, + "end": 14953, "loc": { "start": { - "line": 362, + "line": 364, "column": 42 }, "end": { - "line": 362, + "line": 364, "column": 46 }, "identifierName": "aabb" @@ -18762,43 +18866,43 @@ }, { "type": "ExpressionStatement", - "start": 14908, - "end": 14954, + "start": 14975, + "end": 15021, "loc": { "start": { - "line": 363, + "line": 365, "column": 20 }, "end": { - "line": 363, + "line": 365, "column": 66 } }, "expression": { "type": "CallExpression", - "start": 14908, - "end": 14953, + "start": 14975, + "end": 15020, "loc": { "start": { - "line": 363, + "line": 365, "column": 20 }, "end": { - "line": 363, + "line": 365, "column": 65 } }, "callee": { "type": "Identifier", - "start": 14908, - "end": 14911, + "start": 14975, + "end": 14978, "loc": { "start": { - "line": 363, + "line": 365, "column": 20 }, "end": { - "line": 363, + "line": 365, "column": 23 }, "identifierName": "log" @@ -18808,44 +18912,44 @@ "arguments": [ { "type": "TemplateLiteral", - "start": 14912, - "end": 14952, + "start": 14979, + "end": 15019, "loc": { "start": { - "line": 363, + "line": 365, "column": 24 }, "end": { - "line": 363, + "line": 365, "column": 64 } }, "expressions": [ { "type": "MemberExpression", - "start": 14934, - "end": 14950, + "start": 15001, + "end": 15017, "loc": { "start": { - "line": 363, + "line": 365, "column": 46 }, "end": { - "line": 363, + "line": 365, "column": 62 } }, "object": { "type": "Identifier", - "start": 14934, - "end": 14939, + "start": 15001, + "end": 15006, "loc": { "start": { - "line": 363, + "line": 365, "column": 46 }, "end": { - "line": 363, + "line": 365, "column": 51 }, "identifierName": "stats" @@ -18854,15 +18958,15 @@ }, "property": { "type": "Identifier", - "start": 14940, - "end": 14950, + "start": 15007, + "end": 15017, "loc": { "start": { - "line": 363, + "line": 365, "column": 52 }, "end": { - "line": 363, + "line": 365, "column": 62 }, "identifierName": "xktVersion" @@ -18875,15 +18979,15 @@ "quasis": [ { "type": "TemplateElement", - "start": 14913, - "end": 14932, + "start": 14980, + "end": 14999, "loc": { "start": { - "line": 363, + "line": 365, "column": 25 }, "end": { - "line": 363, + "line": 365, "column": 44 } }, @@ -18895,15 +18999,15 @@ }, { "type": "TemplateElement", - "start": 14951, - "end": 14951, + "start": 15018, + "end": 15018, "loc": { "start": { - "line": 363, + "line": 365, "column": 63 }, "end": { - "line": 363, + "line": 365, "column": 63 } }, @@ -18920,29 +19024,29 @@ }, { "type": "IfStatement", - "start": 14975, - "end": 15114, + "start": 15042, + "end": 15181, "loc": { "start": { - "line": 364, + "line": 366, "column": 20 }, "end": { - "line": 366, + "line": 368, "column": 21 } }, "test": { "type": "Identifier", - "start": 14979, - "end": 14991, + "start": 15046, + "end": 15058, "loc": { "start": { - "line": 364, + "line": 366, "column": 24 }, "end": { - "line": 364, + "line": 366, "column": 36 }, "identifierName": "includeTypes" @@ -18951,58 +19055,58 @@ }, "consequent": { "type": "BlockStatement", - "start": 14993, - "end": 15114, + "start": 15060, + "end": 15181, "loc": { "start": { - "line": 364, + "line": 366, "column": 38 }, "end": { - "line": 366, + "line": 368, "column": 21 } }, "body": [ { "type": "ExpressionStatement", - "start": 15019, - "end": 15092, + "start": 15086, + "end": 15159, "loc": { "start": { - "line": 365, + "line": 367, "column": 24 }, "end": { - "line": 365, + "line": 367, "column": 97 } }, "expression": { "type": "CallExpression", - "start": 15019, - "end": 15091, + "start": 15086, + "end": 15158, "loc": { "start": { - "line": 365, + "line": 367, "column": 24 }, "end": { - "line": 365, + "line": 367, "column": 96 } }, "callee": { "type": "Identifier", - "start": 15019, - "end": 15022, + "start": 15086, + "end": 15089, "loc": { "start": { - "line": 365, + "line": 367, "column": 24 }, "end": { - "line": 365, + "line": 367, "column": 27 }, "identifierName": "log" @@ -19012,29 +19116,29 @@ "arguments": [ { "type": "BinaryExpression", - "start": 15023, - "end": 15090, + "start": 15090, + "end": 15157, "loc": { "start": { - "line": 365, + "line": 367, "column": 28 }, "end": { - "line": 365, + "line": 367, "column": 95 } }, "left": { "type": "StringLiteral", - "start": 15023, - "end": 15040, + "start": 15090, + "end": 15107, "loc": { "start": { - "line": 365, + "line": 367, "column": 28 }, "end": { - "line": 365, + "line": 367, "column": 45 } }, @@ -19047,29 +19151,29 @@ "operator": "+", "right": { "type": "ConditionalExpression", - "start": 15044, - "end": 15089, + "start": 15111, + "end": 15156, "loc": { "start": { - "line": 365, + "line": 367, "column": 49 }, "end": { - "line": 365, + "line": 367, "column": 94 } }, "test": { "type": "Identifier", - "start": 15044, - "end": 15056, + "start": 15111, + "end": 15123, "loc": { "start": { - "line": 365, + "line": 367, "column": 49 }, "end": { - "line": 365, + "line": 367, "column": 61 }, "identifierName": "includeTypes" @@ -19078,15 +19182,15 @@ }, "consequent": { "type": "Identifier", - "start": 15059, - "end": 15071, + "start": 15126, + "end": 15138, "loc": { "start": { - "line": 365, + "line": 367, "column": 64 }, "end": { - "line": 365, + "line": 367, "column": 76 }, "identifierName": "includeTypes" @@ -19095,15 +19199,15 @@ }, "alternate": { "type": "StringLiteral", - "start": 15074, - "end": 15089, + "start": 15141, + "end": 15156, "loc": { "start": { - "line": 365, + "line": 367, "column": 79 }, "end": { - "line": 365, + "line": 367, "column": 94 } }, @@ -19115,7 +19219,7 @@ }, "extra": { "parenthesized": true, - "parenStart": 15043 + "parenStart": 15110 } } } @@ -19129,29 +19233,29 @@ }, { "type": "IfStatement", - "start": 15135, - "end": 15275, + "start": 15202, + "end": 15342, "loc": { "start": { - "line": 367, + "line": 369, "column": 20 }, "end": { - "line": 369, + "line": 371, "column": 21 } }, "test": { "type": "Identifier", - "start": 15139, - "end": 15151, + "start": 15206, + "end": 15218, "loc": { "start": { - "line": 367, + "line": 369, "column": 24 }, "end": { - "line": 367, + "line": 369, "column": 36 }, "identifierName": "excludeTypes" @@ -19160,58 +19264,58 @@ }, "consequent": { "type": "BlockStatement", - "start": 15153, - "end": 15275, + "start": 15220, + "end": 15342, "loc": { "start": { - "line": 367, + "line": 369, "column": 38 }, "end": { - "line": 369, + "line": 371, "column": 21 } }, "body": [ { "type": "ExpressionStatement", - "start": 15179, - "end": 15253, + "start": 15246, + "end": 15320, "loc": { "start": { - "line": 368, + "line": 370, "column": 24 }, "end": { - "line": 368, + "line": 370, "column": 98 } }, "expression": { "type": "CallExpression", - "start": 15179, - "end": 15252, + "start": 15246, + "end": 15319, "loc": { "start": { - "line": 368, + "line": 370, "column": 24 }, "end": { - "line": 368, + "line": 370, "column": 97 } }, "callee": { "type": "Identifier", - "start": 15179, - "end": 15182, + "start": 15246, + "end": 15249, "loc": { "start": { - "line": 368, + "line": 370, "column": 24 }, "end": { - "line": 368, + "line": 370, "column": 27 }, "identifierName": "log" @@ -19221,29 +19325,29 @@ "arguments": [ { "type": "BinaryExpression", - "start": 15183, - "end": 15251, + "start": 15250, + "end": 15318, "loc": { "start": { - "line": 368, + "line": 370, "column": 28 }, "end": { - "line": 368, + "line": 370, "column": 96 } }, "left": { "type": "StringLiteral", - "start": 15183, - "end": 15200, + "start": 15250, + "end": 15267, "loc": { "start": { - "line": 368, + "line": 370, "column": 28 }, "end": { - "line": 368, + "line": 370, "column": 45 } }, @@ -19256,29 +19360,29 @@ "operator": "+", "right": { "type": "ConditionalExpression", - "start": 15204, - "end": 15250, + "start": 15271, + "end": 15317, "loc": { "start": { - "line": 368, + "line": 370, "column": 49 }, "end": { - "line": 368, + "line": 370, "column": 95 } }, "test": { "type": "Identifier", - "start": 15204, - "end": 15216, + "start": 15271, + "end": 15283, "loc": { "start": { - "line": 368, + "line": 370, "column": 49 }, "end": { - "line": 368, + "line": 370, "column": 61 }, "identifierName": "excludeTypes" @@ -19287,15 +19391,15 @@ }, "consequent": { "type": "Identifier", - "start": 15219, - "end": 15231, + "start": 15286, + "end": 15298, "loc": { "start": { - "line": 368, + "line": 370, "column": 64 }, "end": { - "line": 368, + "line": 370, "column": 76 }, "identifierName": "excludeTypes" @@ -19304,15 +19408,15 @@ }, "alternate": { "type": "StringLiteral", - "start": 15234, - "end": 15250, + "start": 15301, + "end": 15317, "loc": { "start": { - "line": 368, + "line": 370, "column": 79 }, "end": { - "line": 368, + "line": 370, "column": 95 } }, @@ -19324,7 +19428,7 @@ }, "extra": { "parenthesized": true, - "parenStart": 15203 + "parenStart": 15270 } } } @@ -19338,43 +19442,43 @@ }, { "type": "ExpressionStatement", - "start": 15296, - "end": 15338, + "start": 15363, + "end": 15405, "loc": { "start": { - "line": 370, + "line": 372, "column": 20 }, "end": { - "line": 370, + "line": 372, "column": 62 } }, "expression": { "type": "CallExpression", - "start": 15296, - "end": 15337, + "start": 15363, + "end": 15404, "loc": { "start": { - "line": 370, + "line": 372, "column": 20 }, "end": { - "line": 370, + "line": 372, "column": 61 } }, "callee": { "type": "Identifier", - "start": 15296, - "end": 15299, + "start": 15363, + "end": 15366, "loc": { "start": { - "line": 370, + "line": 372, "column": 20 }, "end": { - "line": 370, + "line": 372, "column": 23 }, "identifierName": "log" @@ -19384,43 +19488,43 @@ "arguments": [ { "type": "BinaryExpression", - "start": 15300, - "end": 15336, + "start": 15367, + "end": 15403, "loc": { "start": { - "line": 370, + "line": 372, "column": 24 }, "end": { - "line": 370, + "line": 372, "column": 60 } }, "left": { "type": "BinaryExpression", - "start": 15300, - "end": 15328, + "start": 15367, + "end": 15395, "loc": { "start": { - "line": 370, + "line": 372, "column": 24 }, "end": { - "line": 370, + "line": 372, "column": 52 } }, "left": { "type": "StringLiteral", - "start": 15300, - "end": 15312, + "start": 15367, + "end": 15379, "loc": { "start": { - "line": 370, + "line": 372, "column": 24 }, "end": { - "line": 370, + "line": 372, "column": 36 } }, @@ -19433,29 +19537,29 @@ "operator": "+", "right": { "type": "MemberExpression", - "start": 15315, - "end": 15328, + "start": 15382, + "end": 15395, "loc": { "start": { - "line": 370, + "line": 372, "column": 39 }, "end": { - "line": 370, + "line": 372, "column": 52 } }, "object": { "type": "Identifier", - "start": 15315, - "end": 15320, + "start": 15382, + "end": 15387, "loc": { "start": { - "line": 370, + "line": 372, "column": 39 }, "end": { - "line": 370, + "line": 372, "column": 44 }, "identifierName": "stats" @@ -19464,15 +19568,15 @@ }, "property": { "type": "Identifier", - "start": 15321, - "end": 15328, + "start": 15388, + "end": 15395, "loc": { "start": { - "line": 370, + "line": 372, "column": 45 }, "end": { - "line": 370, + "line": 372, "column": 52 }, "identifierName": "xktSize" @@ -19485,15 +19589,15 @@ "operator": "+", "right": { "type": "StringLiteral", - "start": 15331, - "end": 15336, + "start": 15398, + "end": 15403, "loc": { "start": { - "line": 370, + "line": 372, "column": 55 }, "end": { - "line": 370, + "line": 372, "column": 60 } }, @@ -19509,43 +19613,43 @@ }, { "type": "ExpressionStatement", - "start": 15359, - "end": 15434, + "start": 15426, + "end": 15501, "loc": { "start": { - "line": 371, + "line": 373, "column": 20 }, "end": { - "line": 371, + "line": 373, "column": 95 } }, "expression": { "type": "CallExpression", - "start": 15359, - "end": 15433, + "start": 15426, + "end": 15500, "loc": { "start": { - "line": 371, + "line": 373, "column": 20 }, "end": { - "line": 371, + "line": 373, "column": 94 } }, "callee": { "type": "Identifier", - "start": 15359, - "end": 15362, + "start": 15426, + "end": 15429, "loc": { "start": { - "line": 371, + "line": 373, "column": 20 }, "end": { - "line": 371, + "line": 373, "column": 23 }, "identifierName": "log" @@ -19555,43 +19659,43 @@ "arguments": [ { "type": "BinaryExpression", - "start": 15363, - "end": 15432, + "start": 15430, + "end": 15499, "loc": { "start": { - "line": 371, + "line": 373, "column": 24 }, "end": { - "line": 371, + "line": 373, "column": 93 } }, "left": { "type": "BinaryExpression", - "start": 15363, - "end": 15425, + "start": 15430, + "end": 15492, "loc": { "start": { - "line": 371, + "line": 373, "column": 24 }, "end": { - "line": 371, + "line": 373, "column": 86 } }, "left": { "type": "StringLiteral", - "start": 15363, - "end": 15384, + "start": 15430, + "end": 15451, "loc": { "start": { - "line": 371, + "line": 373, "column": 24 }, "end": { - "line": 371, + "line": 373, "column": 45 } }, @@ -19604,71 +19708,71 @@ "operator": "+", "right": { "type": "CallExpression", - "start": 15387, - "end": 15425, + "start": 15454, + "end": 15492, "loc": { "start": { - "line": 371, + "line": 373, "column": 48 }, "end": { - "line": 371, + "line": 373, "column": 86 } }, "callee": { "type": "MemberExpression", - "start": 15387, - "end": 15422, + "start": 15454, + "end": 15489, "loc": { "start": { - "line": 371, + "line": 373, "column": 48 }, "end": { - "line": 371, + "line": 373, "column": 83 } }, "object": { "type": "BinaryExpression", - "start": 15388, - "end": 15413, + "start": 15455, + "end": 15480, "loc": { "start": { - "line": 371, + "line": 373, "column": 49 }, "end": { - "line": 371, + "line": 373, "column": 74 } }, "left": { "type": "MemberExpression", - "start": 15388, - "end": 15406, + "start": 15455, + "end": 15473, "loc": { "start": { - "line": 371, + "line": 373, "column": 49 }, "end": { - "line": 371, + "line": 373, "column": 67 } }, "object": { "type": "Identifier", - "start": 15388, - "end": 15393, + "start": 15455, + "end": 15460, "loc": { "start": { - "line": 371, + "line": 373, "column": 49 }, "end": { - "line": 371, + "line": 373, "column": 54 }, "identifierName": "stats" @@ -19677,15 +19781,15 @@ }, "property": { "type": "Identifier", - "start": 15394, - "end": 15406, + "start": 15461, + "end": 15473, "loc": { "start": { - "line": 371, + "line": 373, "column": 55 }, "end": { - "line": 371, + "line": 373, "column": 67 }, "identifierName": "texturesSize" @@ -19697,15 +19801,15 @@ "operator": "/", "right": { "type": "NumericLiteral", - "start": 15409, - "end": 15413, + "start": 15476, + "end": 15480, "loc": { "start": { - "line": 371, + "line": 373, "column": 70 }, "end": { - "line": 371, + "line": 373, "column": 74 } }, @@ -19717,20 +19821,20 @@ }, "extra": { "parenthesized": true, - "parenStart": 15387 + "parenStart": 15454 } }, "property": { "type": "Identifier", - "start": 15415, - "end": 15422, + "start": 15482, + "end": 15489, "loc": { "start": { - "line": 371, + "line": 373, "column": 76 }, "end": { - "line": 371, + "line": 373, "column": 83 }, "identifierName": "toFixed" @@ -19742,15 +19846,15 @@ "arguments": [ { "type": "NumericLiteral", - "start": 15423, - "end": 15424, + "start": 15490, + "end": 15491, "loc": { "start": { - "line": 371, + "line": 373, "column": 84 }, "end": { - "line": 371, + "line": 373, "column": 85 } }, @@ -19766,15 +19870,15 @@ "operator": "+", "right": { "type": "StringLiteral", - "start": 15428, - "end": 15432, + "start": 15495, + "end": 15499, "loc": { "start": { - "line": 371, + "line": 373, "column": 89 }, "end": { - "line": 371, + "line": 373, "column": 93 } }, @@ -19790,43 +19894,43 @@ }, { "type": "ExpressionStatement", - "start": 15455, - "end": 15507, + "start": 15522, + "end": 15574, "loc": { "start": { - "line": 372, + "line": 374, "column": 20 }, "end": { - "line": 372, + "line": 374, "column": 72 } }, "expression": { "type": "CallExpression", - "start": 15455, - "end": 15506, + "start": 15522, + "end": 15573, "loc": { "start": { - "line": 372, + "line": 374, "column": 20 }, "end": { - "line": 372, + "line": 374, "column": 71 } }, "callee": { "type": "Identifier", - "start": 15455, - "end": 15458, + "start": 15522, + "end": 15525, "loc": { "start": { - "line": 372, + "line": 374, "column": 20 }, "end": { - "line": 372, + "line": 374, "column": 23 }, "identifierName": "log" @@ -19836,29 +19940,29 @@ "arguments": [ { "type": "BinaryExpression", - "start": 15459, - "end": 15505, + "start": 15526, + "end": 15572, "loc": { "start": { - "line": 372, + "line": 374, "column": 24 }, "end": { - "line": 372, + "line": 374, "column": 70 } }, "left": { "type": "StringLiteral", - "start": 15459, - "end": 15480, + "start": 15526, + "end": 15547, "loc": { "start": { - "line": 372, + "line": 374, "column": 24 }, "end": { - "line": 372, + "line": 374, "column": 45 } }, @@ -19871,29 +19975,29 @@ "operator": "+", "right": { "type": "MemberExpression", - "start": 15483, - "end": 15505, + "start": 15550, + "end": 15572, "loc": { "start": { - "line": 372, + "line": 374, "column": 48 }, "end": { - "line": 372, + "line": 374, "column": 70 } }, "object": { "type": "Identifier", - "start": 15483, - "end": 15488, + "start": 15550, + "end": 15555, "loc": { "start": { - "line": 372, + "line": 374, "column": 48 }, "end": { - "line": 372, + "line": 374, "column": 53 }, "identifierName": "stats" @@ -19902,15 +20006,15 @@ }, "property": { "type": "Identifier", - "start": 15489, - "end": 15505, + "start": 15556, + "end": 15572, "loc": { "start": { - "line": 372, + "line": 374, "column": 54 }, "end": { - "line": 372, + "line": 374, "column": 70 }, "identifierName": "compressionRatio" @@ -19925,43 +20029,43 @@ }, { "type": "ExpressionStatement", - "start": 15528, - "end": 15583, + "start": 15595, + "end": 15650, "loc": { "start": { - "line": 373, + "line": 375, "column": 20 }, "end": { - "line": 373, + "line": 375, "column": 75 } }, "expression": { "type": "CallExpression", - "start": 15528, - "end": 15582, + "start": 15595, + "end": 15649, "loc": { "start": { - "line": 373, + "line": 375, "column": 20 }, "end": { - "line": 373, + "line": 375, "column": 74 } }, "callee": { "type": "Identifier", - "start": 15528, - "end": 15531, + "start": 15595, + "end": 15598, "loc": { "start": { - "line": 373, + "line": 375, "column": 20 }, "end": { - "line": 373, + "line": 375, "column": 23 }, "identifierName": "log" @@ -19971,43 +20075,43 @@ "arguments": [ { "type": "BinaryExpression", - "start": 15532, - "end": 15581, + "start": 15599, + "end": 15648, "loc": { "start": { - "line": 373, + "line": 375, "column": 24 }, "end": { - "line": 373, + "line": 375, "column": 73 } }, "left": { "type": "BinaryExpression", - "start": 15532, - "end": 15574, + "start": 15599, + "end": 15641, "loc": { "start": { - "line": 373, + "line": 375, "column": 24 }, "end": { - "line": 373, + "line": 375, "column": 66 } }, "left": { "type": "StringLiteral", - "start": 15532, - "end": 15551, + "start": 15599, + "end": 15618, "loc": { "start": { - "line": 373, + "line": 375, "column": 24 }, "end": { - "line": 373, + "line": 375, "column": 43 } }, @@ -20020,29 +20124,29 @@ "operator": "+", "right": { "type": "MemberExpression", - "start": 15554, - "end": 15574, + "start": 15621, + "end": 15641, "loc": { "start": { - "line": 373, + "line": 375, "column": 46 }, "end": { - "line": 373, + "line": 375, "column": 66 } }, "object": { "type": "Identifier", - "start": 15554, - "end": 15559, + "start": 15621, + "end": 15626, "loc": { "start": { - "line": 373, + "line": 375, "column": 46 }, "end": { - "line": 373, + "line": 375, "column": 51 }, "identifierName": "stats" @@ -20051,15 +20155,15 @@ }, "property": { "type": "Identifier", - "start": 15560, - "end": 15574, + "start": 15627, + "end": 15641, "loc": { "start": { - "line": 373, + "line": 375, "column": 52 }, "end": { - "line": 373, + "line": 375, "column": 66 }, "identifierName": "conversionTime" @@ -20072,15 +20176,15 @@ "operator": "+", "right": { "type": "StringLiteral", - "start": 15577, - "end": 15581, + "start": 15644, + "end": 15648, "loc": { "start": { - "line": 373, + "line": 375, "column": 69 }, "end": { - "line": 373, + "line": 375, "column": 73 } }, @@ -20096,278 +20200,8 @@ }, { "type": "ExpressionStatement", - "start": 15604, - "end": 15658, - "loc": { - "start": { - "line": 374, - "column": 20 - }, - "end": { - "line": 374, - "column": 74 - } - }, - "expression": { - "type": "CallExpression", - "start": 15604, - "end": 15657, - "loc": { - "start": { - "line": 374, - "column": 20 - }, - "end": { - "line": 374, - "column": 73 - } - }, - "callee": { - "type": "Identifier", - "start": 15604, - "end": 15607, - "loc": { - "start": { - "line": 374, - "column": 20 - }, - "end": { - "line": 374, - "column": 23 - }, - "identifierName": "log" - }, - "name": "log" - }, - "arguments": [ - { - "type": "BinaryExpression", - "start": 15608, - "end": 15656, - "loc": { - "start": { - "line": 374, - "column": 24 - }, - "end": { - "line": 374, - "column": 72 - } - }, - "left": { - "type": "StringLiteral", - "start": 15608, - "end": 15633, - "loc": { - "start": { - "line": 374, - "column": 24 - }, - "end": { - "line": 374, - "column": 49 - } - }, - "extra": { - "rawValue": "Converted metaobjects: ", - "raw": "\"Converted metaobjects: \"" - }, - "value": "Converted metaobjects: " - }, - "operator": "+", - "right": { - "type": "MemberExpression", - "start": 15636, - "end": 15656, - "loc": { - "start": { - "line": 374, - "column": 52 - }, - "end": { - "line": 374, - "column": 72 - } - }, - "object": { - "type": "Identifier", - "start": 15636, - "end": 15641, - "loc": { - "start": { - "line": 374, - "column": 52 - }, - "end": { - "line": 374, - "column": 57 - }, - "identifierName": "stats" - }, - "name": "stats" - }, - "property": { - "type": "Identifier", - "start": 15642, - "end": 15656, - "loc": { - "start": { - "line": 374, - "column": 58 - }, - "end": { - "line": 374, - "column": 72 - }, - "identifierName": "numMetaObjects" - }, - "name": "numMetaObjects" - }, - "computed": false - } - } - ] - } - }, - { - "type": "ExpressionStatement", - "start": 15679, - "end": 15736, - "loc": { - "start": { - "line": 375, - "column": 20 - }, - "end": { - "line": 375, - "column": 77 - } - }, - "expression": { - "type": "CallExpression", - "start": 15679, - "end": 15735, - "loc": { - "start": { - "line": 375, - "column": 20 - }, - "end": { - "line": 375, - "column": 76 - } - }, - "callee": { - "type": "Identifier", - "start": 15679, - "end": 15682, - "loc": { - "start": { - "line": 375, - "column": 20 - }, - "end": { - "line": 375, - "column": 23 - }, - "identifierName": "log" - }, - "name": "log" - }, - "arguments": [ - { - "type": "BinaryExpression", - "start": 15683, - "end": 15734, - "loc": { - "start": { - "line": 375, - "column": 24 - }, - "end": { - "line": 375, - "column": 75 - } - }, - "left": { - "type": "StringLiteral", - "start": 15683, - "end": 15710, - "loc": { - "start": { - "line": 375, - "column": 24 - }, - "end": { - "line": 375, - "column": 51 - } - }, - "extra": { - "rawValue": "Converted property sets: ", - "raw": "\"Converted property sets: \"" - }, - "value": "Converted property sets: " - }, - "operator": "+", - "right": { - "type": "MemberExpression", - "start": 15713, - "end": 15734, - "loc": { - "start": { - "line": 375, - "column": 54 - }, - "end": { - "line": 375, - "column": 75 - } - }, - "object": { - "type": "Identifier", - "start": 15713, - "end": 15718, - "loc": { - "start": { - "line": 375, - "column": 54 - }, - "end": { - "line": 375, - "column": 59 - }, - "identifierName": "stats" - }, - "name": "stats" - }, - "property": { - "type": "Identifier", - "start": 15719, - "end": 15734, - "loc": { - "start": { - "line": 375, - "column": 60 - }, - "end": { - "line": 375, - "column": 75 - }, - "identifierName": "numPropertySets" - }, - "name": "numPropertySets" - }, - "computed": false - } - } - ] - } - }, - { - "type": "ExpressionStatement", - "start": 15757, - "end": 15812, + "start": 15671, + "end": 15725, "loc": { "start": { "line": 376, @@ -20375,13 +20209,13 @@ }, "end": { "line": 376, - "column": 75 + "column": 74 } }, "expression": { "type": "CallExpression", - "start": 15757, - "end": 15811, + "start": 15671, + "end": 15724, "loc": { "start": { "line": 376, @@ -20389,13 +20223,13 @@ }, "end": { "line": 376, - "column": 74 + "column": 73 } }, "callee": { "type": "Identifier", - "start": 15757, - "end": 15760, + "start": 15671, + "end": 15674, "loc": { "start": { "line": 376, @@ -20412,8 +20246,8 @@ "arguments": [ { "type": "BinaryExpression", - "start": 15761, - "end": 15810, + "start": 15675, + "end": 15723, "loc": { "start": { "line": 376, @@ -20421,13 +20255,13 @@ }, "end": { "line": 376, - "column": 73 + "column": 72 } }, "left": { "type": "StringLiteral", - "start": 15761, - "end": 15791, + "start": 15675, + "end": 15700, "loc": { "start": { "line": 376, @@ -20435,42 +20269,42 @@ }, "end": { "line": 376, - "column": 54 + "column": 49 } }, "extra": { - "rawValue": "Converted drawable objects: ", - "raw": "\"Converted drawable objects: \"" + "rawValue": "Converted metaobjects: ", + "raw": "\"Converted metaobjects: \"" }, - "value": "Converted drawable objects: " + "value": "Converted metaobjects: " }, "operator": "+", "right": { "type": "MemberExpression", - "start": 15794, - "end": 15810, + "start": 15703, + "end": 15723, "loc": { "start": { "line": 376, - "column": 57 + "column": 52 }, "end": { "line": 376, - "column": 73 + "column": 72 } }, "object": { "type": "Identifier", - "start": 15794, - "end": 15799, + "start": 15703, + "end": 15708, "loc": { "start": { "line": 376, - "column": 57 + "column": 52 }, "end": { "line": 376, - "column": 62 + "column": 57 }, "identifierName": "stats" }, @@ -20478,20 +20312,20 @@ }, "property": { "type": "Identifier", - "start": 15800, - "end": 15810, + "start": 15709, + "end": 15723, "loc": { "start": { "line": 376, - "column": 63 + "column": 58 }, "end": { "line": 376, - "column": 73 + "column": 72 }, - "identifierName": "numObjects" + "identifierName": "numMetaObjects" }, - "name": "numObjects" + "name": "numMetaObjects" }, "computed": false } @@ -20501,8 +20335,8 @@ }, { "type": "ExpressionStatement", - "start": 15833, - "end": 15885, + "start": 15746, + "end": 15803, "loc": { "start": { "line": 377, @@ -20510,13 +20344,13 @@ }, "end": { "line": 377, - "column": 72 + "column": 77 } }, "expression": { "type": "CallExpression", - "start": 15833, - "end": 15884, + "start": 15746, + "end": 15802, "loc": { "start": { "line": 377, @@ -20524,13 +20358,13 @@ }, "end": { "line": 377, - "column": 71 + "column": 76 } }, "callee": { "type": "Identifier", - "start": 15833, - "end": 15836, + "start": 15746, + "end": 15749, "loc": { "start": { "line": 377, @@ -20547,8 +20381,8 @@ "arguments": [ { "type": "BinaryExpression", - "start": 15837, - "end": 15883, + "start": 15750, + "end": 15801, "loc": { "start": { "line": 377, @@ -20556,13 +20390,13 @@ }, "end": { "line": 377, - "column": 70 + "column": 75 } }, "left": { "type": "StringLiteral", - "start": 15837, - "end": 15861, + "start": 15750, + "end": 15777, "loc": { "start": { "line": 377, @@ -20570,42 +20404,42 @@ }, "end": { "line": 377, - "column": 48 + "column": 51 } }, "extra": { - "rawValue": "Converted geometries: ", - "raw": "\"Converted geometries: \"" + "rawValue": "Converted property sets: ", + "raw": "\"Converted property sets: \"" }, - "value": "Converted geometries: " + "value": "Converted property sets: " }, "operator": "+", "right": { "type": "MemberExpression", - "start": 15864, - "end": 15883, + "start": 15780, + "end": 15801, "loc": { "start": { "line": 377, - "column": 51 + "column": 54 }, "end": { "line": 377, - "column": 70 + "column": 75 } }, "object": { "type": "Identifier", - "start": 15864, - "end": 15869, + "start": 15780, + "end": 15785, "loc": { "start": { "line": 377, - "column": 51 + "column": 54 }, "end": { "line": 377, - "column": 56 + "column": 59 }, "identifierName": "stats" }, @@ -20613,20 +20447,20 @@ }, "property": { "type": "Identifier", - "start": 15870, - "end": 15883, + "start": 15786, + "end": 15801, "loc": { "start": { "line": 377, - "column": 57 + "column": 60 }, "end": { "line": 377, - "column": 70 + "column": 75 }, - "identifierName": "numGeometries" + "identifierName": "numPropertySets" }, - "name": "numGeometries" + "name": "numPropertySets" }, "computed": false } @@ -20636,8 +20470,8 @@ }, { "type": "ExpressionStatement", - "start": 15906, - "end": 15954, + "start": 15824, + "end": 15879, "loc": { "start": { "line": 378, @@ -20645,13 +20479,13 @@ }, "end": { "line": 378, - "column": 68 + "column": 75 } }, "expression": { "type": "CallExpression", - "start": 15906, - "end": 15953, + "start": 15824, + "end": 15878, "loc": { "start": { "line": 378, @@ -20659,13 +20493,13 @@ }, "end": { "line": 378, - "column": 67 + "column": 74 } }, "callee": { "type": "Identifier", - "start": 15906, - "end": 15909, + "start": 15824, + "end": 15827, "loc": { "start": { "line": 378, @@ -20682,8 +20516,8 @@ "arguments": [ { "type": "BinaryExpression", - "start": 15910, - "end": 15952, + "start": 15828, + "end": 15877, "loc": { "start": { "line": 378, @@ -20691,13 +20525,13 @@ }, "end": { "line": 378, - "column": 66 + "column": 73 } }, "left": { "type": "StringLiteral", - "start": 15910, - "end": 15932, + "start": 15828, + "end": 15858, "loc": { "start": { "line": 378, @@ -20705,42 +20539,42 @@ }, "end": { "line": 378, - "column": 46 + "column": 54 } }, "extra": { - "rawValue": "Converted textures: ", - "raw": "\"Converted textures: \"" + "rawValue": "Converted drawable objects: ", + "raw": "\"Converted drawable objects: \"" }, - "value": "Converted textures: " + "value": "Converted drawable objects: " }, "operator": "+", "right": { "type": "MemberExpression", - "start": 15935, - "end": 15952, + "start": 15861, + "end": 15877, "loc": { "start": { "line": 378, - "column": 49 + "column": 57 }, "end": { "line": 378, - "column": 66 + "column": 73 } }, "object": { "type": "Identifier", - "start": 15935, - "end": 15940, + "start": 15861, + "end": 15866, "loc": { "start": { "line": 378, - "column": 49 + "column": 57 }, "end": { "line": 378, - "column": 54 + "column": 62 }, "identifierName": "stats" }, @@ -20748,20 +20582,20 @@ }, "property": { "type": "Identifier", - "start": 15941, - "end": 15952, + "start": 15867, + "end": 15877, "loc": { "start": { "line": 378, - "column": 55 + "column": 63 }, "end": { "line": 378, - "column": 66 + "column": 73 }, - "identifierName": "numTextures" + "identifierName": "numObjects" }, - "name": "numTextures" + "name": "numObjects" }, "computed": false } @@ -20771,8 +20605,8 @@ }, { "type": "ExpressionStatement", - "start": 15975, - "end": 16029, + "start": 15900, + "end": 15952, "loc": { "start": { "line": 379, @@ -20780,13 +20614,13 @@ }, "end": { "line": 379, - "column": 74 + "column": 72 } }, "expression": { "type": "CallExpression", - "start": 15975, - "end": 16028, + "start": 15900, + "end": 15951, "loc": { "start": { "line": 379, @@ -20794,13 +20628,13 @@ }, "end": { "line": 379, - "column": 73 + "column": 71 } }, "callee": { "type": "Identifier", - "start": 15975, - "end": 15978, + "start": 15900, + "end": 15903, "loc": { "start": { "line": 379, @@ -20817,8 +20651,8 @@ "arguments": [ { "type": "BinaryExpression", - "start": 15979, - "end": 16027, + "start": 15904, + "end": 15950, "loc": { "start": { "line": 379, @@ -20826,13 +20660,13 @@ }, "end": { "line": 379, - "column": 72 + "column": 70 } }, "left": { "type": "StringLiteral", - "start": 15979, - "end": 16004, + "start": 15904, + "end": 15928, "loc": { "start": { "line": 379, @@ -20840,42 +20674,42 @@ }, "end": { "line": 379, - "column": 49 + "column": 48 } }, "extra": { - "rawValue": "Converted textureSets: ", - "raw": "\"Converted textureSets: \"" + "rawValue": "Converted geometries: ", + "raw": "\"Converted geometries: \"" }, - "value": "Converted textureSets: " + "value": "Converted geometries: " }, "operator": "+", "right": { "type": "MemberExpression", - "start": 16007, - "end": 16027, + "start": 15931, + "end": 15950, "loc": { "start": { "line": 379, - "column": 52 + "column": 51 }, "end": { "line": 379, - "column": 72 + "column": 70 } }, "object": { "type": "Identifier", - "start": 16007, - "end": 16012, + "start": 15931, + "end": 15936, "loc": { "start": { "line": 379, - "column": 52 + "column": 51 }, "end": { "line": 379, - "column": 57 + "column": 56 }, "identifierName": "stats" }, @@ -20883,20 +20717,20 @@ }, "property": { "type": "Identifier", - "start": 16013, - "end": 16027, + "start": 15937, + "end": 15950, "loc": { "start": { "line": 379, - "column": 58 + "column": 57 }, "end": { "line": 379, - "column": 72 + "column": 70 }, - "identifierName": "numTextureSets" + "identifierName": "numGeometries" }, - "name": "numTextureSets" + "name": "numGeometries" }, "computed": false } @@ -20906,8 +20740,8 @@ }, { "type": "ExpressionStatement", - "start": 16050, - "end": 16100, + "start": 15973, + "end": 16021, "loc": { "start": { "line": 380, @@ -20915,13 +20749,13 @@ }, "end": { "line": 380, - "column": 70 + "column": 68 } }, "expression": { "type": "CallExpression", - "start": 16050, - "end": 16099, + "start": 15973, + "end": 16020, "loc": { "start": { "line": 380, @@ -20929,13 +20763,13 @@ }, "end": { "line": 380, - "column": 69 + "column": 67 } }, "callee": { "type": "Identifier", - "start": 16050, - "end": 16053, + "start": 15973, + "end": 15976, "loc": { "start": { "line": 380, @@ -20952,8 +20786,8 @@ "arguments": [ { "type": "BinaryExpression", - "start": 16054, - "end": 16098, + "start": 15977, + "end": 16019, "loc": { "start": { "line": 380, @@ -20961,13 +20795,13 @@ }, "end": { "line": 380, - "column": 68 + "column": 66 } }, "left": { "type": "StringLiteral", - "start": 16054, - "end": 16077, + "start": 15977, + "end": 15999, "loc": { "start": { "line": 380, @@ -20975,42 +20809,42 @@ }, "end": { "line": 380, - "column": 47 + "column": 46 } }, "extra": { - "rawValue": "Converted triangles: ", - "raw": "\"Converted triangles: \"" + "rawValue": "Converted textures: ", + "raw": "\"Converted textures: \"" }, - "value": "Converted triangles: " + "value": "Converted textures: " }, "operator": "+", "right": { "type": "MemberExpression", - "start": 16080, - "end": 16098, + "start": 16002, + "end": 16019, "loc": { "start": { "line": 380, - "column": 50 + "column": 49 }, "end": { "line": 380, - "column": 68 + "column": 66 } }, "object": { "type": "Identifier", - "start": 16080, - "end": 16085, + "start": 16002, + "end": 16007, "loc": { "start": { "line": 380, - "column": 50 + "column": 49 }, "end": { "line": 380, - "column": 55 + "column": 54 }, "identifierName": "stats" }, @@ -21018,20 +20852,20 @@ }, "property": { "type": "Identifier", - "start": 16086, - "end": 16098, + "start": 16008, + "end": 16019, "loc": { "start": { "line": 380, - "column": 56 + "column": 55 }, "end": { "line": 380, - "column": 68 + "column": 66 }, - "identifierName": "numTriangles" + "identifierName": "numTextures" }, - "name": "numTriangles" + "name": "numTextures" }, "computed": false } @@ -21041,8 +20875,8 @@ }, { "type": "ExpressionStatement", - "start": 16121, - "end": 16169, + "start": 16042, + "end": 16096, "loc": { "start": { "line": 381, @@ -21050,13 +20884,13 @@ }, "end": { "line": 381, - "column": 68 + "column": 74 } }, "expression": { "type": "CallExpression", - "start": 16121, - "end": 16168, + "start": 16042, + "end": 16095, "loc": { "start": { "line": 381, @@ -21064,13 +20898,13 @@ }, "end": { "line": 381, - "column": 67 + "column": 73 } }, "callee": { "type": "Identifier", - "start": 16121, - "end": 16124, + "start": 16042, + "end": 16045, "loc": { "start": { "line": 381, @@ -21087,8 +20921,8 @@ "arguments": [ { "type": "BinaryExpression", - "start": 16125, - "end": 16167, + "start": 16046, + "end": 16094, "loc": { "start": { "line": 381, @@ -21096,13 +20930,13 @@ }, "end": { "line": 381, - "column": 66 + "column": 72 } }, "left": { "type": "StringLiteral", - "start": 16125, - "end": 16147, + "start": 16046, + "end": 16071, "loc": { "start": { "line": 381, @@ -21110,42 +20944,42 @@ }, "end": { "line": 381, - "column": 46 + "column": 49 } }, "extra": { - "rawValue": "Converted vertices: ", - "raw": "\"Converted vertices: \"" + "rawValue": "Converted textureSets: ", + "raw": "\"Converted textureSets: \"" }, - "value": "Converted vertices: " + "value": "Converted textureSets: " }, "operator": "+", "right": { "type": "MemberExpression", - "start": 16150, - "end": 16167, + "start": 16074, + "end": 16094, "loc": { "start": { "line": 381, - "column": 49 + "column": 52 }, "end": { "line": 381, - "column": 66 + "column": 72 } }, "object": { "type": "Identifier", - "start": 16150, - "end": 16155, + "start": 16074, + "end": 16079, "loc": { "start": { "line": 381, - "column": 49 + "column": 52 }, "end": { "line": 381, - "column": 54 + "column": 57 }, "identifierName": "stats" }, @@ -21153,20 +20987,20 @@ }, "property": { "type": "Identifier", - "start": 16156, - "end": 16167, + "start": 16080, + "end": 16094, "loc": { "start": { "line": 381, - "column": 55 + "column": 58 }, "end": { "line": 381, - "column": 66 + "column": 72 }, - "identifierName": "numVertices" + "identifierName": "numTextureSets" }, - "name": "numVertices" + "name": "numTextureSets" }, "computed": false } @@ -21176,8 +21010,8 @@ }, { "type": "ExpressionStatement", - "start": 16190, - "end": 16228, + "start": 16117, + "end": 16167, "loc": { "start": { "line": 382, @@ -21185,13 +21019,13 @@ }, "end": { "line": 382, - "column": 58 + "column": 70 } }, "expression": { "type": "CallExpression", - "start": 16190, - "end": 16227, + "start": 16117, + "end": 16166, "loc": { "start": { "line": 382, @@ -21199,13 +21033,13 @@ }, "end": { "line": 382, - "column": 57 + "column": 69 } }, "callee": { "type": "Identifier", - "start": 16190, - "end": 16193, + "start": 16117, + "end": 16120, "loc": { "start": { "line": 382, @@ -21222,8 +21056,8 @@ "arguments": [ { "type": "BinaryExpression", - "start": 16194, - "end": 16226, + "start": 16121, + "end": 16165, "loc": { "start": { "line": 382, @@ -21231,13 +21065,13 @@ }, "end": { "line": 382, - "column": 56 + "column": 68 } }, "left": { "type": "StringLiteral", - "start": 16194, - "end": 16211, + "start": 16121, + "end": 16144, "loc": { "start": { "line": 382, @@ -21245,42 +21079,42 @@ }, "end": { "line": 382, - "column": 41 + "column": 47 } }, "extra": { - "rawValue": "Converted UVs: ", - "raw": "\"Converted UVs: \"" + "rawValue": "Converted triangles: ", + "raw": "\"Converted triangles: \"" }, - "value": "Converted UVs: " + "value": "Converted triangles: " }, "operator": "+", "right": { "type": "MemberExpression", - "start": 16214, - "end": 16226, + "start": 16147, + "end": 16165, "loc": { "start": { "line": 382, - "column": 44 + "column": 50 }, "end": { "line": 382, - "column": 56 + "column": 68 } }, "object": { "type": "Identifier", - "start": 16214, - "end": 16219, + "start": 16147, + "end": 16152, "loc": { "start": { "line": 382, - "column": 44 + "column": 50 }, "end": { "line": 382, - "column": 49 + "column": 55 }, "identifierName": "stats" }, @@ -21288,20 +21122,20 @@ }, "property": { "type": "Identifier", - "start": 16220, - "end": 16226, + "start": 16153, + "end": 16165, "loc": { "start": { "line": 382, - "column": 50 + "column": 56 }, "end": { "line": 382, - "column": 56 + "column": 68 }, - "identifierName": "numUVs" + "identifierName": "numTriangles" }, - "name": "numUVs" + "name": "numTriangles" }, "computed": false } @@ -21311,8 +21145,8 @@ }, { "type": "ExpressionStatement", - "start": 16249, - "end": 16295, + "start": 16188, + "end": 16236, "loc": { "start": { "line": 383, @@ -21320,13 +21154,13 @@ }, "end": { "line": 383, - "column": 66 + "column": 68 } }, "expression": { "type": "CallExpression", - "start": 16249, - "end": 16294, + "start": 16188, + "end": 16235, "loc": { "start": { "line": 383, @@ -21334,13 +21168,13 @@ }, "end": { "line": 383, - "column": 65 + "column": 67 } }, "callee": { "type": "Identifier", - "start": 16249, - "end": 16252, + "start": 16188, + "end": 16191, "loc": { "start": { "line": 383, @@ -21357,8 +21191,8 @@ "arguments": [ { "type": "BinaryExpression", - "start": 16253, - "end": 16293, + "start": 16192, + "end": 16234, "loc": { "start": { "line": 383, @@ -21366,13 +21200,13 @@ }, "end": { "line": 383, - "column": 64 + "column": 66 } }, "left": { "type": "StringLiteral", - "start": 16253, - "end": 16274, + "start": 16192, + "end": 16214, "loc": { "start": { "line": 383, @@ -21380,42 +21214,42 @@ }, "end": { "line": 383, - "column": 45 + "column": 46 } }, "extra": { - "rawValue": "Converted normals: ", - "raw": "\"Converted normals: \"" + "rawValue": "Converted vertices: ", + "raw": "\"Converted vertices: \"" }, - "value": "Converted normals: " + "value": "Converted vertices: " }, "operator": "+", "right": { "type": "MemberExpression", - "start": 16277, - "end": 16293, + "start": 16217, + "end": 16234, "loc": { "start": { "line": 383, - "column": 48 + "column": 49 }, "end": { "line": 383, - "column": 64 + "column": 66 } }, "object": { "type": "Identifier", - "start": 16277, - "end": 16282, + "start": 16217, + "end": 16222, "loc": { "start": { "line": 383, - "column": 48 + "column": 49 }, "end": { "line": 383, - "column": 53 + "column": 54 }, "identifierName": "stats" }, @@ -21423,20 +21257,20 @@ }, "property": { "type": "Identifier", - "start": 16283, - "end": 16293, + "start": 16223, + "end": 16234, "loc": { "start": { "line": 383, - "column": 54 + "column": 55 }, "end": { "line": 383, - "column": 64 + "column": 66 }, - "identifierName": "numNormals" + "identifierName": "numVertices" }, - "name": "numNormals" + "name": "numVertices" }, "computed": false } @@ -21446,8 +21280,8 @@ }, { "type": "ExpressionStatement", - "start": 16316, - "end": 16357, + "start": 16257, + "end": 16295, "loc": { "start": { "line": 384, @@ -21455,13 +21289,13 @@ }, "end": { "line": 384, - "column": 61 + "column": 58 } }, "expression": { "type": "CallExpression", - "start": 16316, - "end": 16356, + "start": 16257, + "end": 16294, "loc": { "start": { "line": 384, @@ -21469,13 +21303,13 @@ }, "end": { "line": 384, - "column": 60 + "column": 57 } }, "callee": { "type": "Identifier", - "start": 16316, - "end": 16319, + "start": 16257, + "end": 16260, "loc": { "start": { "line": 384, @@ -21492,8 +21326,8 @@ "arguments": [ { "type": "BinaryExpression", - "start": 16320, - "end": 16355, + "start": 16261, + "end": 16293, "loc": { "start": { "line": 384, @@ -21501,13 +21335,13 @@ }, "end": { "line": 384, - "column": 59 + "column": 56 } }, "left": { "type": "StringLiteral", - "start": 16320, - "end": 16335, + "start": 16261, + "end": 16278, "loc": { "start": { "line": 384, @@ -21515,6 +21349,276 @@ }, "end": { "line": 384, + "column": 41 + } + }, + "extra": { + "rawValue": "Converted UVs: ", + "raw": "\"Converted UVs: \"" + }, + "value": "Converted UVs: " + }, + "operator": "+", + "right": { + "type": "MemberExpression", + "start": 16281, + "end": 16293, + "loc": { + "start": { + "line": 384, + "column": 44 + }, + "end": { + "line": 384, + "column": 56 + } + }, + "object": { + "type": "Identifier", + "start": 16281, + "end": 16286, + "loc": { + "start": { + "line": 384, + "column": 44 + }, + "end": { + "line": 384, + "column": 49 + }, + "identifierName": "stats" + }, + "name": "stats" + }, + "property": { + "type": "Identifier", + "start": 16287, + "end": 16293, + "loc": { + "start": { + "line": 384, + "column": 50 + }, + "end": { + "line": 384, + "column": 56 + }, + "identifierName": "numUVs" + }, + "name": "numUVs" + }, + "computed": false + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 16316, + "end": 16362, + "loc": { + "start": { + "line": 385, + "column": 20 + }, + "end": { + "line": 385, + "column": 66 + } + }, + "expression": { + "type": "CallExpression", + "start": 16316, + "end": 16361, + "loc": { + "start": { + "line": 385, + "column": 20 + }, + "end": { + "line": 385, + "column": 65 + } + }, + "callee": { + "type": "Identifier", + "start": 16316, + "end": 16319, + "loc": { + "start": { + "line": 385, + "column": 20 + }, + "end": { + "line": 385, + "column": 23 + }, + "identifierName": "log" + }, + "name": "log" + }, + "arguments": [ + { + "type": "BinaryExpression", + "start": 16320, + "end": 16360, + "loc": { + "start": { + "line": 385, + "column": 24 + }, + "end": { + "line": 385, + "column": 64 + } + }, + "left": { + "type": "StringLiteral", + "start": 16320, + "end": 16341, + "loc": { + "start": { + "line": 385, + "column": 24 + }, + "end": { + "line": 385, + "column": 45 + } + }, + "extra": { + "rawValue": "Converted normals: ", + "raw": "\"Converted normals: \"" + }, + "value": "Converted normals: " + }, + "operator": "+", + "right": { + "type": "MemberExpression", + "start": 16344, + "end": 16360, + "loc": { + "start": { + "line": 385, + "column": 48 + }, + "end": { + "line": 385, + "column": 64 + } + }, + "object": { + "type": "Identifier", + "start": 16344, + "end": 16349, + "loc": { + "start": { + "line": 385, + "column": 48 + }, + "end": { + "line": 385, + "column": 53 + }, + "identifierName": "stats" + }, + "name": "stats" + }, + "property": { + "type": "Identifier", + "start": 16350, + "end": 16360, + "loc": { + "start": { + "line": 385, + "column": 54 + }, + "end": { + "line": 385, + "column": 64 + }, + "identifierName": "numNormals" + }, + "name": "numNormals" + }, + "computed": false + } + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 16383, + "end": 16424, + "loc": { + "start": { + "line": 386, + "column": 20 + }, + "end": { + "line": 386, + "column": 61 + } + }, + "expression": { + "type": "CallExpression", + "start": 16383, + "end": 16423, + "loc": { + "start": { + "line": 386, + "column": 20 + }, + "end": { + "line": 386, + "column": 60 + } + }, + "callee": { + "type": "Identifier", + "start": 16383, + "end": 16386, + "loc": { + "start": { + "line": 386, + "column": 20 + }, + "end": { + "line": 386, + "column": 23 + }, + "identifierName": "log" + }, + "name": "log" + }, + "arguments": [ + { + "type": "BinaryExpression", + "start": 16387, + "end": 16422, + "loc": { + "start": { + "line": 386, + "column": 24 + }, + "end": { + "line": 386, + "column": 59 + } + }, + "left": { + "type": "StringLiteral", + "start": 16387, + "end": 16402, + "loc": { + "start": { + "line": 386, + "column": 24 + }, + "end": { + "line": 386, "column": 39 } }, @@ -21527,29 +21631,29 @@ "operator": "+", "right": { "type": "MemberExpression", - "start": 16338, - "end": 16355, + "start": 16405, + "end": 16422, "loc": { "start": { - "line": 384, + "line": 386, "column": 42 }, "end": { - "line": 384, + "line": 386, "column": 59 } }, "object": { "type": "Identifier", - "start": 16338, - "end": 16343, + "start": 16405, + "end": 16410, "loc": { "start": { - "line": 384, + "line": 386, "column": 42 }, "end": { - "line": 384, + "line": 386, "column": 47 }, "identifierName": "stats" @@ -21558,15 +21662,15 @@ }, "property": { "type": "Identifier", - "start": 16344, - "end": 16355, + "start": 16411, + "end": 16422, "loc": { "start": { - "line": 384, + "line": 386, "column": 48 }, "end": { - "line": 384, + "line": 386, "column": 59 }, "identifierName": "minTileSize" @@ -21581,29 +21685,29 @@ }, { "type": "IfStatement", - "start": 16379, - "end": 16781, + "start": 16446, + "end": 16848, "loc": { "start": { - "line": 386, + "line": 388, "column": 20 }, "end": { - "line": 393, + "line": 395, "column": 21 } }, "test": { "type": "Identifier", - "start": 16383, - "end": 16389, + "start": 16450, + "end": 16456, "loc": { "start": { - "line": 386, + "line": 388, "column": 24 }, "end": { - "line": 386, + "line": 388, "column": 30 }, "identifierName": "output" @@ -21612,59 +21716,59 @@ }, "consequent": { "type": "BlockStatement", - "start": 16391, - "end": 16781, + "start": 16458, + "end": 16848, "loc": { "start": { - "line": 386, + "line": 388, "column": 32 }, "end": { - "line": 393, + "line": 395, "column": 21 } }, "body": [ { "type": "VariableDeclaration", - "start": 16417, - "end": 16462, + "start": 16484, + "end": 16529, "loc": { "start": { - "line": 387, + "line": 389, "column": 24 }, "end": { - "line": 387, + "line": 389, "column": 69 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 16423, - "end": 16461, + "start": 16490, + "end": 16528, "loc": { "start": { - "line": 387, + "line": 389, "column": 30 }, "end": { - "line": 387, + "line": 389, "column": 68 } }, "id": { "type": "Identifier", - "start": 16423, - "end": 16432, + "start": 16490, + "end": 16499, "loc": { "start": { - "line": 387, + "line": 389, "column": 30 }, "end": { - "line": 387, + "line": 389, "column": 39 }, "identifierName": "outputDir" @@ -21673,57 +21777,57 @@ }, "init": { "type": "CallExpression", - "start": 16435, - "end": 16461, + "start": 16502, + "end": 16528, "loc": { "start": { - "line": 387, + "line": 389, "column": 42 }, "end": { - "line": 387, + "line": 389, "column": 68 } }, "callee": { "type": "MemberExpression", - "start": 16435, - "end": 16459, + "start": 16502, + "end": 16526, "loc": { "start": { - "line": 387, + "line": 389, "column": 42 }, "end": { - "line": 387, + "line": 389, "column": 66 } }, "object": { "type": "CallExpression", - "start": 16435, - "end": 16454, + "start": 16502, + "end": 16521, "loc": { "start": { - "line": 387, + "line": 389, "column": 42 }, "end": { - "line": 387, + "line": 389, "column": 61 } }, "callee": { "type": "Identifier", - "start": 16435, - "end": 16446, + "start": 16502, + "end": 16513, "loc": { "start": { - "line": 387, + "line": 389, "column": 42 }, "end": { - "line": 387, + "line": 389, "column": 53 }, "identifierName": "getBasePath" @@ -21733,15 +21837,15 @@ "arguments": [ { "type": "Identifier", - "start": 16447, - "end": 16453, + "start": 16514, + "end": 16520, "loc": { "start": { - "line": 387, + "line": 389, "column": 54 }, "end": { - "line": 387, + "line": 389, "column": 60 }, "identifierName": "output" @@ -21752,15 +21856,15 @@ }, "property": { "type": "Identifier", - "start": 16455, - "end": 16459, + "start": 16522, + "end": 16526, "loc": { "start": { - "line": 387, + "line": 389, "column": 62 }, "end": { - "line": 387, + "line": 389, "column": 66 }, "identifierName": "trim" @@ -21777,57 +21881,57 @@ }, { "type": "IfStatement", - "start": 16487, - "end": 16637, + "start": 16554, + "end": 16704, "loc": { "start": { - "line": 388, + "line": 390, "column": 24 }, "end": { - "line": 390, + "line": 392, "column": 25 } }, "test": { "type": "LogicalExpression", - "start": 16491, - "end": 16536, + "start": 16558, + "end": 16603, "loc": { "start": { - "line": 388, + "line": 390, "column": 28 }, "end": { - "line": 388, + "line": 390, "column": 73 } }, "left": { "type": "BinaryExpression", - "start": 16491, - "end": 16507, + "start": 16558, + "end": 16574, "loc": { "start": { - "line": 388, + "line": 390, "column": 28 }, "end": { - "line": 388, + "line": 390, "column": 44 } }, "left": { "type": "Identifier", - "start": 16491, - "end": 16500, + "start": 16558, + "end": 16567, "loc": { "start": { - "line": 388, + "line": 390, "column": 28 }, "end": { - "line": 388, + "line": 390, "column": 37 }, "identifierName": "outputDir" @@ -21837,15 +21941,15 @@ "operator": "!==", "right": { "type": "StringLiteral", - "start": 16505, - "end": 16507, + "start": 16572, + "end": 16574, "loc": { "start": { - "line": 388, + "line": 390, "column": 42 }, "end": { - "line": 388, + "line": 390, "column": 44 } }, @@ -21859,15 +21963,15 @@ "operator": "&&", "right": { "type": "UnaryExpression", - "start": 16511, - "end": 16536, + "start": 16578, + "end": 16603, "loc": { "start": { - "line": 388, + "line": 390, "column": 48 }, "end": { - "line": 388, + "line": 390, "column": 73 } }, @@ -21875,43 +21979,43 @@ "prefix": true, "argument": { "type": "CallExpression", - "start": 16512, - "end": 16536, + "start": 16579, + "end": 16603, "loc": { "start": { - "line": 388, + "line": 390, "column": 49 }, "end": { - "line": 388, + "line": 390, "column": 73 } }, "callee": { "type": "MemberExpression", - "start": 16512, - "end": 16525, + "start": 16579, + "end": 16592, "loc": { "start": { - "line": 388, + "line": 390, "column": 49 }, "end": { - "line": 388, + "line": 390, "column": 62 } }, "object": { "type": "Identifier", - "start": 16512, - "end": 16514, + "start": 16579, + "end": 16581, "loc": { "start": { - "line": 388, + "line": 390, "column": 49 }, "end": { - "line": 388, + "line": 390, "column": 51 }, "identifierName": "fs" @@ -21920,15 +22024,15 @@ }, "property": { "type": "Identifier", - "start": 16515, - "end": 16525, + "start": 16582, + "end": 16592, "loc": { "start": { - "line": 388, + "line": 390, "column": 52 }, "end": { - "line": 388, + "line": 390, "column": 62 }, "identifierName": "existsSync" @@ -21940,15 +22044,15 @@ "arguments": [ { "type": "Identifier", - "start": 16526, - "end": 16535, + "start": 16593, + "end": 16602, "loc": { "start": { - "line": 388, + "line": 390, "column": 63 }, "end": { - "line": 388, + "line": 390, "column": 72 }, "identifierName": "outputDir" @@ -21964,72 +22068,72 @@ }, "consequent": { "type": "BlockStatement", - "start": 16538, - "end": 16637, + "start": 16605, + "end": 16704, "loc": { "start": { - "line": 388, + "line": 390, "column": 75 }, "end": { - "line": 390, + "line": 392, "column": 25 } }, "body": [ { "type": "ExpressionStatement", - "start": 16568, - "end": 16611, + "start": 16635, + "end": 16678, "loc": { "start": { - "line": 389, + "line": 391, "column": 28 }, "end": { - "line": 389, + "line": 391, "column": 71 } }, "expression": { "type": "CallExpression", - "start": 16568, - "end": 16610, + "start": 16635, + "end": 16677, "loc": { "start": { - "line": 389, + "line": 391, "column": 28 }, "end": { - "line": 389, + "line": 391, "column": 70 } }, "callee": { "type": "MemberExpression", - "start": 16568, - "end": 16580, + "start": 16635, + "end": 16647, "loc": { "start": { - "line": 389, + "line": 391, "column": 28 }, "end": { - "line": 389, + "line": 391, "column": 40 } }, "object": { "type": "Identifier", - "start": 16568, - "end": 16570, + "start": 16635, + "end": 16637, "loc": { "start": { - "line": 389, + "line": 391, "column": 28 }, "end": { - "line": 389, + "line": 391, "column": 30 }, "identifierName": "fs" @@ -22038,15 +22142,15 @@ }, "property": { "type": "Identifier", - "start": 16571, - "end": 16580, + "start": 16638, + "end": 16647, "loc": { "start": { - "line": 389, + "line": 391, "column": 31 }, "end": { - "line": 389, + "line": 391, "column": 40 }, "identifierName": "mkdirSync" @@ -22058,15 +22162,15 @@ "arguments": [ { "type": "Identifier", - "start": 16581, - "end": 16590, + "start": 16648, + "end": 16657, "loc": { "start": { - "line": 389, + "line": 391, "column": 41 }, "end": { - "line": 389, + "line": 391, "column": 50 }, "identifierName": "outputDir" @@ -22075,30 +22179,30 @@ }, { "type": "ObjectExpression", - "start": 16592, - "end": 16609, + "start": 16659, + "end": 16676, "loc": { "start": { - "line": 389, + "line": 391, "column": 52 }, "end": { - "line": 389, + "line": 391, "column": 69 } }, "properties": [ { "type": "ObjectProperty", - "start": 16593, - "end": 16608, + "start": 16660, + "end": 16675, "loc": { "start": { - "line": 389, + "line": 391, "column": 53 }, "end": { - "line": 389, + "line": 391, "column": 68 } }, @@ -22107,15 +22211,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 16593, - "end": 16602, + "start": 16660, + "end": 16669, "loc": { "start": { - "line": 389, + "line": 391, "column": 53 }, "end": { - "line": 389, + "line": 391, "column": 62 }, "identifierName": "recursive" @@ -22124,15 +22228,15 @@ }, "value": { "type": "BooleanLiteral", - "start": 16604, - "end": 16608, + "start": 16671, + "end": 16675, "loc": { "start": { - "line": 389, + "line": 391, "column": 64 }, "end": { - "line": 389, + "line": 391, "column": 68 } }, @@ -22151,43 +22255,43 @@ }, { "type": "ExpressionStatement", - "start": 16662, - "end": 16697, + "start": 16729, + "end": 16764, "loc": { "start": { - "line": 391, + "line": 393, "column": 24 }, "end": { - "line": 391, + "line": 393, "column": 59 } }, "expression": { "type": "CallExpression", - "start": 16662, - "end": 16696, + "start": 16729, + "end": 16763, "loc": { "start": { - "line": 391, + "line": 393, "column": 24 }, "end": { - "line": 391, + "line": 393, "column": 58 } }, "callee": { "type": "Identifier", - "start": 16662, - "end": 16665, + "start": 16729, + "end": 16732, "loc": { "start": { - "line": 391, + "line": 393, "column": 24 }, "end": { - "line": 391, + "line": 393, "column": 27 }, "identifierName": "log" @@ -22197,29 +22301,29 @@ "arguments": [ { "type": "BinaryExpression", - "start": 16666, - "end": 16695, + "start": 16733, + "end": 16762, "loc": { "start": { - "line": 391, + "line": 393, "column": 28 }, "end": { - "line": 391, + "line": 393, "column": 57 } }, "left": { "type": "StringLiteral", - "start": 16666, - "end": 16686, + "start": 16733, + "end": 16753, "loc": { "start": { - "line": 391, + "line": 393, "column": 28 }, "end": { - "line": 391, + "line": 393, "column": 48 } }, @@ -22232,15 +22336,15 @@ "operator": "+", "right": { "type": "Identifier", - "start": 16689, - "end": 16695, + "start": 16756, + "end": 16762, "loc": { "start": { - "line": 391, + "line": 393, "column": 51 }, "end": { - "line": 391, + "line": 393, "column": 57 }, "identifierName": "output" @@ -22253,57 +22357,57 @@ }, { "type": "ExpressionStatement", - "start": 16722, - "end": 16759, + "start": 16789, + "end": 16826, "loc": { "start": { - "line": 392, + "line": 394, "column": 24 }, "end": { - "line": 392, + "line": 394, "column": 61 } }, "expression": { "type": "CallExpression", - "start": 16722, - "end": 16758, + "start": 16789, + "end": 16825, "loc": { "start": { - "line": 392, + "line": 394, "column": 24 }, "end": { - "line": 392, + "line": 394, "column": 60 } }, "callee": { "type": "MemberExpression", - "start": 16722, - "end": 16738, + "start": 16789, + "end": 16805, "loc": { "start": { - "line": 392, + "line": 394, "column": 24 }, "end": { - "line": 392, + "line": 394, "column": 40 } }, "object": { "type": "Identifier", - "start": 16722, - "end": 16724, + "start": 16789, + "end": 16791, "loc": { "start": { - "line": 392, + "line": 394, "column": 24 }, "end": { - "line": 392, + "line": 394, "column": 26 }, "identifierName": "fs" @@ -22312,15 +22416,15 @@ }, "property": { "type": "Identifier", - "start": 16725, - "end": 16738, + "start": 16792, + "end": 16805, "loc": { "start": { - "line": 392, + "line": 394, "column": 27 }, "end": { - "line": 392, + "line": 394, "column": 40 }, "identifierName": "writeFileSync" @@ -22332,15 +22436,15 @@ "arguments": [ { "type": "Identifier", - "start": 16739, - "end": 16745, + "start": 16806, + "end": 16812, "loc": { "start": { - "line": 392, + "line": 394, "column": 41 }, "end": { - "line": 392, + "line": 394, "column": 47 }, "identifierName": "output" @@ -22349,15 +22453,15 @@ }, { "type": "Identifier", - "start": 16747, - "end": 16757, + "start": 16814, + "end": 16824, "loc": { "start": { - "line": 392, + "line": 394, "column": 49 }, "end": { - "line": 392, + "line": 394, "column": 59 }, "identifierName": "xktContent" @@ -22374,29 +22478,29 @@ }, { "type": "IfStatement", - "start": 16803, - "end": 16896, + "start": 16870, + "end": 16963, "loc": { "start": { - "line": 395, + "line": 397, "column": 20 }, "end": { - "line": 397, + "line": 399, "column": 21 } }, "test": { "type": "Identifier", - "start": 16807, - "end": 16821, + "start": 16874, + "end": 16888, "loc": { "start": { - "line": 395, + "line": 397, "column": 24 }, "end": { - "line": 395, + "line": 397, "column": 38 }, "identifierName": "outputXKTModel" @@ -22405,58 +22509,58 @@ }, "consequent": { "type": "BlockStatement", - "start": 16823, - "end": 16896, + "start": 16890, + "end": 16963, "loc": { "start": { - "line": 395, + "line": 397, "column": 40 }, "end": { - "line": 397, + "line": 399, "column": 21 } }, "body": [ { "type": "ExpressionStatement", - "start": 16849, - "end": 16874, + "start": 16916, + "end": 16941, "loc": { "start": { - "line": 396, + "line": 398, "column": 24 }, "end": { - "line": 396, + "line": 398, "column": 49 } }, "expression": { "type": "CallExpression", - "start": 16849, - "end": 16873, + "start": 16916, + "end": 16940, "loc": { "start": { - "line": 396, + "line": 398, "column": 24 }, "end": { - "line": 396, + "line": 398, "column": 48 } }, "callee": { "type": "Identifier", - "start": 16849, - "end": 16863, + "start": 16916, + "end": 16930, "loc": { "start": { - "line": 396, + "line": 398, "column": 24 }, "end": { - "line": 396, + "line": 398, "column": 38 }, "identifierName": "outputXKTModel" @@ -22466,15 +22570,15 @@ "arguments": [ { "type": "Identifier", - "start": 16864, - "end": 16872, + "start": 16931, + "end": 16939, "loc": { "start": { - "line": 396, + "line": 398, "column": 39 }, "end": { - "line": 396, + "line": 398, "column": 47 }, "identifierName": "xktModel" @@ -22491,29 +22595,29 @@ }, { "type": "IfStatement", - "start": 16918, - "end": 17003, + "start": 16985, + "end": 17070, "loc": { "start": { - "line": 399, + "line": 401, "column": 20 }, "end": { - "line": 401, + "line": 403, "column": 21 } }, "test": { "type": "Identifier", - "start": 16922, - "end": 16931, + "start": 16989, + "end": 16998, "loc": { "start": { - "line": 399, + "line": 401, "column": 24 }, "end": { - "line": 399, + "line": 401, "column": 33 }, "identifierName": "outputXKT" @@ -22522,58 +22626,58 @@ }, "consequent": { "type": "BlockStatement", - "start": 16933, - "end": 17003, + "start": 17000, + "end": 17070, "loc": { "start": { - "line": 399, + "line": 401, "column": 35 }, "end": { - "line": 401, + "line": 403, "column": 21 } }, "body": [ { "type": "ExpressionStatement", - "start": 16959, - "end": 16981, + "start": 17026, + "end": 17048, "loc": { "start": { - "line": 400, + "line": 402, "column": 24 }, "end": { - "line": 400, + "line": 402, "column": 46 } }, "expression": { "type": "CallExpression", - "start": 16959, - "end": 16980, + "start": 17026, + "end": 17047, "loc": { "start": { - "line": 400, + "line": 402, "column": 24 }, "end": { - "line": 400, + "line": 402, "column": 45 } }, "callee": { "type": "Identifier", - "start": 16959, - "end": 16968, + "start": 17026, + "end": 17035, "loc": { "start": { - "line": 400, + "line": 402, "column": 24 }, "end": { - "line": 400, + "line": 402, "column": 33 }, "identifierName": "outputXKT" @@ -22583,15 +22687,15 @@ "arguments": [ { "type": "Identifier", - "start": 16969, - "end": 16979, + "start": 17036, + "end": 17046, "loc": { "start": { - "line": 400, + "line": 402, "column": 34 }, "end": { - "line": 400, + "line": 402, "column": 44 }, "identifierName": "xktContent" @@ -22608,29 +22712,29 @@ }, { "type": "IfStatement", - "start": 17025, - "end": 17109, + "start": 17092, + "end": 17176, "loc": { "start": { - "line": 403, + "line": 405, "column": 20 }, "end": { - "line": 405, + "line": 407, "column": 21 } }, "test": { "type": "Identifier", - "start": 17029, - "end": 17040, + "start": 17096, + "end": 17107, "loc": { "start": { - "line": 403, + "line": 405, "column": 24 }, "end": { - "line": 403, + "line": 405, "column": 35 }, "identifierName": "outputStats" @@ -22639,58 +22743,58 @@ }, "consequent": { "type": "BlockStatement", - "start": 17042, - "end": 17109, + "start": 17109, + "end": 17176, "loc": { "start": { - "line": 403, + "line": 405, "column": 37 }, "end": { - "line": 405, + "line": 407, "column": 21 } }, "body": [ { "type": "ExpressionStatement", - "start": 17068, - "end": 17087, + "start": 17135, + "end": 17154, "loc": { "start": { - "line": 404, + "line": 406, "column": 24 }, "end": { - "line": 404, + "line": 406, "column": 43 } }, "expression": { "type": "CallExpression", - "start": 17068, - "end": 17086, + "start": 17135, + "end": 17153, "loc": { "start": { - "line": 404, + "line": 406, "column": 24 }, "end": { - "line": 404, + "line": 406, "column": 42 } }, "callee": { "type": "Identifier", - "start": 17068, - "end": 17079, + "start": 17135, + "end": 17146, "loc": { "start": { - "line": 404, + "line": 406, "column": 24 }, "end": { - "line": 404, + "line": 406, "column": 35 }, "identifierName": "outputStats" @@ -22700,15 +22804,15 @@ "arguments": [ { "type": "Identifier", - "start": 17080, - "end": 17085, + "start": 17147, + "end": 17152, "loc": { "start": { - "line": 404, + "line": 406, "column": 36 }, "end": { - "line": 404, + "line": 406, "column": 41 }, "identifierName": "stats" @@ -22725,43 +22829,43 @@ }, { "type": "ExpressionStatement", - "start": 17131, - "end": 17141, + "start": 17198, + "end": 17208, "loc": { "start": { - "line": 407, + "line": 409, "column": 20 }, "end": { - "line": 407, + "line": 409, "column": 30 } }, "expression": { "type": "CallExpression", - "start": 17131, - "end": 17140, + "start": 17198, + "end": 17207, "loc": { "start": { - "line": 407, + "line": 409, "column": 20 }, "end": { - "line": 407, + "line": 409, "column": 29 } }, "callee": { "type": "Identifier", - "start": 17131, - "end": 17138, + "start": 17198, + "end": 17205, "loc": { "start": { - "line": 407, + "line": 409, "column": 20 }, "end": { - "line": 407, + "line": 409, "column": 27 }, "identifierName": "resolve" @@ -22784,15 +22888,15 @@ }, { "type": "ArrowFunctionExpression", - "start": 17177, - "end": 17230, + "start": 17244, + "end": 17297, "loc": { "start": { - "line": 409, + "line": 411, "column": 15 }, "end": { - "line": 411, + "line": 413, "column": 13 } }, @@ -22803,15 +22907,15 @@ "params": [ { "type": "Identifier", - "start": 17178, - "end": 17181, + "start": 17245, + "end": 17248, "loc": { "start": { - "line": 409, + "line": 411, "column": 16 }, "end": { - "line": 409, + "line": 411, "column": 19 }, "identifierName": "err" @@ -22821,58 +22925,58 @@ ], "body": { "type": "BlockStatement", - "start": 17186, - "end": 17230, + "start": 17253, + "end": 17297, "loc": { "start": { - "line": 409, + "line": 411, "column": 24 }, "end": { - "line": 411, + "line": 413, "column": 13 } }, "body": [ { "type": "ExpressionStatement", - "start": 17204, - "end": 17216, + "start": 17271, + "end": 17283, "loc": { "start": { - "line": 410, + "line": 412, "column": 16 }, "end": { - "line": 410, + "line": 412, "column": 28 } }, "expression": { "type": "CallExpression", - "start": 17204, - "end": 17215, + "start": 17271, + "end": 17282, "loc": { "start": { - "line": 410, + "line": 412, "column": 16 }, "end": { - "line": 410, + "line": 412, "column": 27 } }, "callee": { "type": "Identifier", - "start": 17204, - "end": 17210, + "start": 17271, + "end": 17277, "loc": { "start": { - "line": 410, + "line": 412, "column": 16 }, "end": { - "line": 410, + "line": 412, "column": 22 }, "identifierName": "reject" @@ -22882,15 +22986,15 @@ "arguments": [ { "type": "Identifier", - "start": 17211, - "end": 17214, + "start": 17278, + "end": 17281, "loc": { "start": { - "line": 410, + "line": 412, "column": 23 }, "end": { - "line": 410, + "line": 412, "column": 26 }, "identifierName": "err" @@ -22927,29 +23031,29 @@ }, { "type": "FunctionDeclaration", - "start": 17254, - "end": 17372, + "start": 17321, + "end": 17439, "loc": { "start": { - "line": 416, + "line": 418, "column": 0 }, "end": { - "line": 419, + "line": 421, "column": 1 } }, "id": { "type": "Identifier", - "start": 17263, - "end": 17274, + "start": 17330, + "end": 17341, "loc": { "start": { - "line": 416, + "line": 418, "column": 9 }, "end": { - "line": 416, + "line": 418, "column": 20 }, "identifierName": "getBasePath" @@ -22962,15 +23066,15 @@ "params": [ { "type": "Identifier", - "start": 17275, - "end": 17278, + "start": 17342, + "end": 17345, "loc": { "start": { - "line": 416, + "line": 418, "column": 21 }, "end": { - "line": 416, + "line": 418, "column": 24 }, "identifierName": "src" @@ -22980,59 +23084,59 @@ ], "body": { "type": "BlockStatement", - "start": 17280, - "end": 17372, + "start": 17347, + "end": 17439, "loc": { "start": { - "line": 416, + "line": 418, "column": 26 }, "end": { - "line": 419, + "line": 421, "column": 1 } }, "body": [ { "type": "VariableDeclaration", - "start": 17286, - "end": 17317, + "start": 17353, + "end": 17384, "loc": { "start": { - "line": 417, + "line": 419, "column": 4 }, "end": { - "line": 417, + "line": 419, "column": 35 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 17292, - "end": 17316, + "start": 17359, + "end": 17383, "loc": { "start": { - "line": 417, + "line": 419, "column": 10 }, "end": { - "line": 417, + "line": 419, "column": 34 } }, "id": { "type": "Identifier", - "start": 17292, - "end": 17293, + "start": 17359, + "end": 17360, "loc": { "start": { - "line": 417, + "line": 419, "column": 10 }, "end": { - "line": 417, + "line": 419, "column": 11 }, "identifierName": "i" @@ -23041,43 +23145,43 @@ }, "init": { "type": "CallExpression", - "start": 17296, - "end": 17316, + "start": 17363, + "end": 17383, "loc": { "start": { - "line": 417, + "line": 419, "column": 14 }, "end": { - "line": 417, + "line": 419, "column": 34 } }, "callee": { "type": "MemberExpression", - "start": 17296, - "end": 17311, + "start": 17363, + "end": 17378, "loc": { "start": { - "line": 417, + "line": 419, "column": 14 }, "end": { - "line": 417, + "line": 419, "column": 29 } }, "object": { "type": "Identifier", - "start": 17296, - "end": 17299, + "start": 17363, + "end": 17366, "loc": { "start": { - "line": 417, + "line": 419, "column": 14 }, "end": { - "line": 417, + "line": 419, "column": 17 }, "identifierName": "src" @@ -23086,15 +23190,15 @@ }, "property": { "type": "Identifier", - "start": 17300, - "end": 17311, + "start": 17367, + "end": 17378, "loc": { "start": { - "line": 417, + "line": 419, "column": 18 }, "end": { - "line": 417, + "line": 419, "column": 29 }, "identifierName": "lastIndexOf" @@ -23106,15 +23210,15 @@ "arguments": [ { "type": "StringLiteral", - "start": 17312, - "end": 17315, + "start": 17379, + "end": 17382, "loc": { "start": { - "line": 417, + "line": 419, "column": 30 }, "end": { - "line": 417, + "line": 419, "column": 33 } }, @@ -23132,57 +23236,57 @@ }, { "type": "ReturnStatement", - "start": 17322, - "end": 17370, + "start": 17389, + "end": 17437, "loc": { "start": { - "line": 418, + "line": 420, "column": 4 }, "end": { - "line": 418, + "line": 420, "column": 52 } }, "argument": { "type": "ConditionalExpression", - "start": 17329, - "end": 17369, + "start": 17396, + "end": 17436, "loc": { "start": { - "line": 418, + "line": 420, "column": 11 }, "end": { - "line": 418, + "line": 420, "column": 51 } }, "test": { "type": "BinaryExpression", - "start": 17330, - "end": 17337, + "start": 17397, + "end": 17404, "loc": { "start": { - "line": 418, + "line": 420, "column": 12 }, "end": { - "line": 418, + "line": 420, "column": 19 } }, "left": { "type": "Identifier", - "start": 17330, - "end": 17331, + "start": 17397, + "end": 17398, "loc": { "start": { - "line": 418, + "line": 420, "column": 12 }, "end": { - "line": 418, + "line": 420, "column": 13 }, "identifierName": "i" @@ -23192,15 +23296,15 @@ "operator": "!==", "right": { "type": "NumericLiteral", - "start": 17336, - "end": 17337, + "start": 17403, + "end": 17404, "loc": { "start": { - "line": 418, + "line": 420, "column": 18 }, "end": { - "line": 418, + "line": 420, "column": 19 } }, @@ -23212,48 +23316,48 @@ }, "extra": { "parenthesized": true, - "parenStart": 17329 + "parenStart": 17396 } }, "consequent": { "type": "CallExpression", - "start": 17341, - "end": 17364, + "start": 17408, + "end": 17431, "loc": { "start": { - "line": 418, + "line": 420, "column": 23 }, "end": { - "line": 418, + "line": 420, "column": 46 } }, "callee": { "type": "MemberExpression", - "start": 17341, - "end": 17354, + "start": 17408, + "end": 17421, "loc": { "start": { - "line": 418, + "line": 420, "column": 23 }, "end": { - "line": 418, + "line": 420, "column": 36 } }, "object": { "type": "Identifier", - "start": 17341, - "end": 17344, + "start": 17408, + "end": 17411, "loc": { "start": { - "line": 418, + "line": 420, "column": 23 }, "end": { - "line": 418, + "line": 420, "column": 26 }, "identifierName": "src" @@ -23262,15 +23366,15 @@ }, "property": { "type": "Identifier", - "start": 17345, - "end": 17354, + "start": 17412, + "end": 17421, "loc": { "start": { - "line": 418, + "line": 420, "column": 27 }, "end": { - "line": 418, + "line": 420, "column": 36 }, "identifierName": "substring" @@ -23282,15 +23386,15 @@ "arguments": [ { "type": "NumericLiteral", - "start": 17355, - "end": 17356, + "start": 17422, + "end": 17423, "loc": { "start": { - "line": 418, + "line": 420, "column": 37 }, "end": { - "line": 418, + "line": 420, "column": 38 } }, @@ -23302,29 +23406,29 @@ }, { "type": "BinaryExpression", - "start": 17358, - "end": 17363, + "start": 17425, + "end": 17430, "loc": { "start": { - "line": 418, + "line": 420, "column": 40 }, "end": { - "line": 418, + "line": 420, "column": 45 } }, "left": { "type": "Identifier", - "start": 17358, - "end": 17359, + "start": 17425, + "end": 17426, "loc": { "start": { - "line": 418, + "line": 420, "column": 40 }, "end": { - "line": 418, + "line": 420, "column": 41 }, "identifierName": "i" @@ -23334,15 +23438,15 @@ "operator": "+", "right": { "type": "NumericLiteral", - "start": 17362, - "end": 17363, + "start": 17429, + "end": 17430, "loc": { "start": { - "line": 418, + "line": 420, "column": 44 }, "end": { - "line": 418, + "line": 420, "column": 45 } }, @@ -23357,15 +23461,15 @@ }, "alternate": { "type": "StringLiteral", - "start": 17367, - "end": 17369, + "start": 17434, + "end": 17436, "loc": { "start": { - "line": 418, + "line": 420, "column": 49 }, "end": { - "line": 418, + "line": 420, "column": 51 } }, @@ -23383,15 +23487,15 @@ }, { "type": "ExportNamedDeclaration", - "start": 17374, - "end": 17395, + "start": 17441, + "end": 17462, "loc": { "start": { - "line": 421, + "line": 423, "column": 0 }, "end": { - "line": 421, + "line": 423, "column": 21 } }, @@ -23399,29 +23503,29 @@ "specifiers": [ { "type": "ExportSpecifier", - "start": 17382, - "end": 17393, + "start": 17449, + "end": 17460, "loc": { "start": { - "line": 421, + "line": 423, "column": 8 }, "end": { - "line": 421, + "line": 423, "column": 19 } }, "local": { "type": "Identifier", - "start": 17382, - "end": 17393, + "start": 17449, + "end": 17460, "loc": { "start": { - "line": 421, + "line": 423, "column": 8 }, "end": { - "line": 421, + "line": 423, "column": 19 }, "identifierName": "convert2xkt" @@ -23430,15 +23534,15 @@ }, "exported": { "type": "Identifier", - "start": 17382, - "end": 17393, + "start": 17449, + "end": 17460, "loc": { "start": { - "line": 421, + "line": 423, "column": 8 }, "end": { - "line": 421, + "line": 423, "column": 19 }, "identifierName": "convert2xkt" @@ -23451,29 +23555,29 @@ }, { "type": "ExportNamedDeclaration", - "start": 17374, - "end": 17395, + "start": 17441, + "end": 17462, "loc": { "start": { - "line": 421, + "line": 423, "column": 0 }, "end": { - "line": 421, + "line": 423, "column": 21 } }, "declaration": { "type": "FunctionDeclaration", "start": 5144, - "end": 17252, + "end": 17319, "loc": { "start": { "line": 75, "column": 0 }, "end": { - "line": 414, + "line": 416, "column": 1 } }, @@ -24880,14 +24984,14 @@ "body": { "type": "BlockStatement", "start": 6022, - "end": 17252, + "end": 17319, "loc": { "start": { "line": 97, "column": 24 }, "end": { - "line": 414, + "line": 416, "column": 1 } }, @@ -27112,28 +27216,28 @@ { "type": "ReturnStatement", "start": 6623, - "end": 17250, + "end": 17317, "loc": { "start": { "line": 122, "column": 4 }, "end": { - "line": 413, + "line": 415, "column": 7 } }, "argument": { "type": "NewExpression", "start": 6630, - "end": 17249, + "end": 17316, "loc": { "start": { "line": 122, "column": 11 }, "end": { - "line": 413, + "line": 415, "column": 6 } }, @@ -27158,14 +27262,14 @@ { "type": "FunctionExpression", "start": 6642, - "end": 17248, + "end": 17315, "loc": { "start": { "line": 122, "column": 23 }, "end": { - "line": 413, + "line": 415, "column": 5 } }, @@ -27212,14 +27316,14 @@ "body": { "type": "BlockStatement", "start": 6669, - "end": 17248, + "end": 17315, "loc": { "start": { "line": 122, "column": 50 }, "end": { - "line": 413, + "line": 415, "column": 5 } }, @@ -30085,14 +30189,14 @@ { "type": "IfStatement", "start": 8322, - "end": 8625, + "end": 8692, "loc": { "start": { "line": 177, "column": 8 }, "end": { - "line": 185, + "line": 187, "column": 9 } }, @@ -30585,48 +30689,152 @@ ], "directives": [] }, - "alternate": null + "alternate": { + "type": "BlockStatement", + "start": 8631, + "end": 8692, + "loc": { + "start": { + "line": 185, + "column": 15 + }, + "end": { + "line": 187, + "column": 9 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 8645, + "end": 8682, + "loc": { + "start": { + "line": 186, + "column": 12 + }, + "end": { + "line": 186, + "column": 49 + } + }, + "expression": { + "type": "CallExpression", + "start": 8645, + "end": 8681, + "loc": { + "start": { + "line": 186, + "column": 12 + }, + "end": { + "line": 186, + "column": 48 + } + }, + "callee": { + "type": "Identifier", + "start": 8645, + "end": 8648, + "loc": { + "start": { + "line": 186, + "column": 12 + }, + "end": { + "line": 186, + "column": 15 + }, + "identifierName": "log" + }, + "name": "log" + }, + "arguments": [ + { + "type": "TemplateLiteral", + "start": 8649, + "end": 8680, + "loc": { + "start": { + "line": 186, + "column": 16 + }, + "end": { + "line": 186, + "column": 47 + } + }, + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "start": 8650, + "end": 8679, + "loc": { + "start": { + "line": 186, + "column": 17 + }, + "end": { + "line": 186, + "column": 46 + } + }, + "value": { + "raw": "Not embedding metadata in XKT", + "cooked": "Not embedding metadata in XKT" + }, + "tail": true + } + ] + } + ] + } + } + ], + "directives": [] + } }, { "type": "VariableDeclaration", - "start": 8635, - "end": 8653, + "start": 8702, + "end": 8720, "loc": { "start": { - "line": 187, + "line": 189, "column": 8 }, "end": { - "line": 187, + "line": 189, "column": 26 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 8639, - "end": 8652, + "start": 8706, + "end": 8719, "loc": { "start": { - "line": 187, + "line": 189, "column": 12 }, "end": { - "line": 187, + "line": 189, "column": 25 } }, "id": { "type": "Identifier", - "start": 8639, - "end": 8652, + "start": 8706, + "end": 8719, "loc": { "start": { - "line": 187, + "line": 189, "column": 12 }, "end": { - "line": 187, + "line": 189, "column": 25 }, "identifierName": "metaModelJSON" @@ -30640,29 +30848,29 @@ }, { "type": "IfStatement", - "start": 8663, - "end": 8874, + "start": 8730, + "end": 8941, "loc": { "start": { - "line": 189, + "line": 191, "column": 8 }, "end": { - "line": 195, + "line": 197, "column": 9 } }, "test": { "type": "Identifier", - "start": 8667, - "end": 8683, + "start": 8734, + "end": 8750, "loc": { "start": { - "line": 189, + "line": 191, "column": 12 }, "end": { - "line": 189, + "line": 191, "column": 28 }, "identifierName": "metaModelDataStr" @@ -30671,88 +30879,88 @@ }, "consequent": { "type": "BlockStatement", - "start": 8685, - "end": 8874, + "start": 8752, + "end": 8941, "loc": { "start": { - "line": 189, + "line": 191, "column": 30 }, "end": { - "line": 195, + "line": 197, "column": 9 } }, "body": [ { "type": "TryStatement", - "start": 8699, - "end": 8864, + "start": 8766, + "end": 8931, "loc": { "start": { - "line": 190, + "line": 192, "column": 12 }, "end": { - "line": 194, + "line": 196, "column": 13 } }, "block": { "type": "BlockStatement", - "start": 8703, - "end": 8780, + "start": 8770, + "end": 8847, "loc": { "start": { - "line": 190, + "line": 192, "column": 16 }, "end": { - "line": 192, + "line": 194, "column": 13 } }, "body": [ { "type": "ExpressionStatement", - "start": 8721, - "end": 8766, + "start": 8788, + "end": 8833, "loc": { "start": { - "line": 191, + "line": 193, "column": 16 }, "end": { - "line": 191, + "line": 193, "column": 61 } }, "expression": { "type": "AssignmentExpression", - "start": 8721, - "end": 8765, + "start": 8788, + "end": 8832, "loc": { "start": { - "line": 191, + "line": 193, "column": 16 }, "end": { - "line": 191, + "line": 193, "column": 60 } }, "operator": "=", "left": { "type": "Identifier", - "start": 8721, - "end": 8734, + "start": 8788, + "end": 8801, "loc": { "start": { - "line": 191, + "line": 193, "column": 16 }, "end": { - "line": 191, + "line": 193, "column": 29 }, "identifierName": "metaModelJSON" @@ -30761,43 +30969,43 @@ }, "right": { "type": "CallExpression", - "start": 8737, - "end": 8765, + "start": 8804, + "end": 8832, "loc": { "start": { - "line": 191, + "line": 193, "column": 32 }, "end": { - "line": 191, + "line": 193, "column": 60 } }, "callee": { "type": "MemberExpression", - "start": 8737, - "end": 8747, + "start": 8804, + "end": 8814, "loc": { "start": { - "line": 191, + "line": 193, "column": 32 }, "end": { - "line": 191, + "line": 193, "column": 42 } }, "object": { "type": "Identifier", - "start": 8737, - "end": 8741, + "start": 8804, + "end": 8808, "loc": { "start": { - "line": 191, + "line": 193, "column": 32 }, "end": { - "line": 191, + "line": 193, "column": 36 }, "identifierName": "JSON" @@ -30806,15 +31014,15 @@ }, "property": { "type": "Identifier", - "start": 8742, - "end": 8747, + "start": 8809, + "end": 8814, "loc": { "start": { - "line": 191, + "line": 193, "column": 37 }, "end": { - "line": 191, + "line": 193, "column": 42 }, "identifierName": "parse" @@ -30826,15 +31034,15 @@ "arguments": [ { "type": "Identifier", - "start": 8748, - "end": 8764, + "start": 8815, + "end": 8831, "loc": { "start": { - "line": 191, + "line": 193, "column": 43 }, "end": { - "line": 191, + "line": 193, "column": 59 }, "identifierName": "metaModelDataStr" @@ -30850,29 +31058,29 @@ }, "handler": { "type": "CatchClause", - "start": 8781, - "end": 8864, + "start": 8848, + "end": 8931, "loc": { "start": { - "line": 192, + "line": 194, "column": 14 }, "end": { - "line": 194, + "line": 196, "column": 13 } }, "param": { "type": "Identifier", - "start": 8788, - "end": 8789, + "start": 8855, + "end": 8856, "loc": { "start": { - "line": 192, + "line": 194, "column": 21 }, "end": { - "line": 192, + "line": 194, "column": 22 }, "identifierName": "e" @@ -30881,58 +31089,58 @@ }, "body": { "type": "BlockStatement", - "start": 8791, - "end": 8864, + "start": 8858, + "end": 8931, "loc": { "start": { - "line": 192, + "line": 194, "column": 24 }, "end": { - "line": 194, + "line": 196, "column": 13 } }, "body": [ { "type": "ExpressionStatement", - "start": 8809, - "end": 8850, + "start": 8876, + "end": 8917, "loc": { "start": { - "line": 193, + "line": 195, "column": 16 }, "end": { - "line": 193, + "line": 195, "column": 57 } }, "expression": { "type": "CallExpression", - "start": 8809, - "end": 8849, + "start": 8876, + "end": 8916, "loc": { "start": { - "line": 193, + "line": 195, "column": 16 }, "end": { - "line": 193, + "line": 195, "column": 56 } }, "callee": { "type": "Identifier", - "start": 8809, - "end": 8812, + "start": 8876, + "end": 8879, "loc": { "start": { - "line": 193, + "line": 195, "column": 16 }, "end": { - "line": 193, + "line": 195, "column": 19 }, "identifierName": "log" @@ -30942,30 +31150,30 @@ "arguments": [ { "type": "TemplateLiteral", - "start": 8813, - "end": 8848, + "start": 8880, + "end": 8915, "loc": { "start": { - "line": 193, + "line": 195, "column": 20 }, "end": { - "line": 193, + "line": 195, "column": 55 } }, "expressions": [ { "type": "Identifier", - "start": 8845, - "end": 8846, + "start": 8912, + "end": 8913, "loc": { "start": { - "line": 193, + "line": 195, "column": 52 }, "end": { - "line": 193, + "line": 195, "column": 53 }, "identifierName": "e" @@ -30976,15 +31184,15 @@ "quasis": [ { "type": "TemplateElement", - "start": 8814, - "end": 8843, + "start": 8881, + "end": 8910, "loc": { "start": { - "line": 193, + "line": 195, "column": 21 }, "end": { - "line": 193, + "line": 195, "column": 50 } }, @@ -30996,15 +31204,15 @@ }, { "type": "TemplateElement", - "start": 8847, - "end": 8847, + "start": 8914, + "end": 8914, "loc": { "start": { - "line": 193, + "line": 195, "column": 54 }, "end": { - "line": 193, + "line": 195, "column": 54 } }, @@ -31033,44 +31241,44 @@ }, { "type": "ExpressionStatement", - "start": 8884, - "end": 8955, + "start": 8951, + "end": 9022, "loc": { "start": { - "line": 197, + "line": 199, "column": 8 }, "end": { - "line": 197, + "line": 199, "column": 79 } }, "expression": { "type": "AssignmentExpression", - "start": 8884, - "end": 8954, + "start": 8951, + "end": 9021, "loc": { "start": { - "line": 197, + "line": 199, "column": 8 }, "end": { - "line": 197, + "line": 199, "column": 78 } }, "operator": "=", "left": { "type": "Identifier", - "start": 8884, - "end": 8895, + "start": 8951, + "end": 8962, "loc": { "start": { - "line": 197, + "line": 199, "column": 8 }, "end": { - "line": 197, + "line": 199, "column": 19 }, "identifierName": "minTileSize" @@ -31079,29 +31287,29 @@ }, "right": { "type": "CallExpression", - "start": 8898, - "end": 8954, + "start": 8965, + "end": 9021, "loc": { "start": { - "line": 197, + "line": 199, "column": 22 }, "end": { - "line": 197, + "line": 199, "column": 78 } }, "callee": { "type": "Identifier", - "start": 8898, - "end": 8912, + "start": 8965, + "end": 8979, "loc": { "start": { - "line": 197, + "line": 199, "column": 22 }, "end": { - "line": 197, + "line": 199, "column": 36 }, "identifierName": "overrideOption" @@ -31111,29 +31319,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 8913, - "end": 8940, + "start": 8980, + "end": 9007, "loc": { "start": { - "line": 197, + "line": 199, "column": 37 }, "end": { - "line": 197, + "line": 199, "column": 64 } }, "object": { "type": "Identifier", - "start": 8913, - "end": 8928, + "start": 8980, + "end": 8995, "loc": { "start": { - "line": 197, + "line": 199, "column": 37 }, "end": { - "line": 197, + "line": 199, "column": 52 }, "identifierName": "fileTypeConfigs" @@ -31142,15 +31350,15 @@ }, "property": { "type": "Identifier", - "start": 8929, - "end": 8940, + "start": 8996, + "end": 9007, "loc": { "start": { - "line": 197, + "line": 199, "column": 53 }, "end": { - "line": 197, + "line": 199, "column": 64 }, "identifierName": "minTileSize" @@ -31161,15 +31369,15 @@ }, { "type": "Identifier", - "start": 8942, - "end": 8953, + "start": 9009, + "end": 9020, "loc": { "start": { - "line": 197, + "line": 199, "column": 66 }, "end": { - "line": 197, + "line": 199, "column": 77 }, "identifierName": "minTileSize" @@ -31182,44 +31390,44 @@ }, { "type": "ExpressionStatement", - "start": 8964, - "end": 9023, + "start": 9031, + "end": 9090, "loc": { "start": { - "line": 198, + "line": 200, "column": 8 }, "end": { - "line": 198, + "line": 200, "column": 67 } }, "expression": { "type": "AssignmentExpression", - "start": 8964, - "end": 9022, + "start": 9031, + "end": 9089, "loc": { "start": { - "line": 198, + "line": 200, "column": 8 }, "end": { - "line": 198, + "line": 200, "column": 66 } }, "operator": "=", "left": { "type": "Identifier", - "start": 8964, - "end": 8971, + "start": 9031, + "end": 9038, "loc": { "start": { - "line": 198, + "line": 200, "column": 8 }, "end": { - "line": 198, + "line": 200, "column": 15 }, "identifierName": "rotateX" @@ -31228,29 +31436,29 @@ }, "right": { "type": "CallExpression", - "start": 8974, - "end": 9022, + "start": 9041, + "end": 9089, "loc": { "start": { - "line": 198, + "line": 200, "column": 18 }, "end": { - "line": 198, + "line": 200, "column": 66 } }, "callee": { "type": "Identifier", - "start": 8974, - "end": 8988, + "start": 9041, + "end": 9055, "loc": { "start": { - "line": 198, + "line": 200, "column": 18 }, "end": { - "line": 198, + "line": 200, "column": 32 }, "identifierName": "overrideOption" @@ -31260,29 +31468,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 8989, - "end": 9012, + "start": 9056, + "end": 9079, "loc": { "start": { - "line": 198, + "line": 200, "column": 33 }, "end": { - "line": 198, + "line": 200, "column": 56 } }, "object": { "type": "Identifier", - "start": 8989, - "end": 9004, + "start": 9056, + "end": 9071, "loc": { "start": { - "line": 198, + "line": 200, "column": 33 }, "end": { - "line": 198, + "line": 200, "column": 48 }, "identifierName": "fileTypeConfigs" @@ -31291,15 +31499,15 @@ }, "property": { "type": "Identifier", - "start": 9005, - "end": 9012, + "start": 9072, + "end": 9079, "loc": { "start": { - "line": 198, + "line": 200, "column": 49 }, "end": { - "line": 198, + "line": 200, "column": 56 }, "identifierName": "rotateX" @@ -31310,15 +31518,15 @@ }, { "type": "Identifier", - "start": 9014, - "end": 9021, + "start": 9081, + "end": 9088, "loc": { "start": { - "line": 198, + "line": 200, "column": 58 }, "end": { - "line": 198, + "line": 200, "column": 65 }, "identifierName": "rotateX" @@ -31331,44 +31539,44 @@ }, { "type": "ExpressionStatement", - "start": 9032, - "end": 9115, + "start": 9099, + "end": 9182, "loc": { "start": { - "line": 199, + "line": 201, "column": 8 }, "end": { - "line": 199, + "line": 201, "column": 91 } }, "expression": { "type": "AssignmentExpression", - "start": 9032, - "end": 9114, + "start": 9099, + "end": 9181, "loc": { "start": { - "line": 199, + "line": 201, "column": 8 }, "end": { - "line": 199, + "line": 201, "column": 90 } }, "operator": "=", "left": { "type": "Identifier", - "start": 9032, - "end": 9047, + "start": 9099, + "end": 9114, "loc": { "start": { - "line": 199, + "line": 201, "column": 8 }, "end": { - "line": 199, + "line": 201, "column": 23 }, "identifierName": "reuseGeometries" @@ -31377,29 +31585,29 @@ }, "right": { "type": "CallExpression", - "start": 9050, - "end": 9114, + "start": 9117, + "end": 9181, "loc": { "start": { - "line": 199, + "line": 201, "column": 26 }, "end": { - "line": 199, + "line": 201, "column": 90 } }, "callee": { "type": "Identifier", - "start": 9050, - "end": 9064, + "start": 9117, + "end": 9131, "loc": { "start": { - "line": 199, + "line": 201, "column": 26 }, "end": { - "line": 199, + "line": 201, "column": 40 }, "identifierName": "overrideOption" @@ -31409,29 +31617,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 9065, - "end": 9096, + "start": 9132, + "end": 9163, "loc": { "start": { - "line": 199, + "line": 201, "column": 41 }, "end": { - "line": 199, + "line": 201, "column": 72 } }, "object": { "type": "Identifier", - "start": 9065, - "end": 9080, + "start": 9132, + "end": 9147, "loc": { "start": { - "line": 199, + "line": 201, "column": 41 }, "end": { - "line": 199, + "line": 201, "column": 56 }, "identifierName": "fileTypeConfigs" @@ -31440,15 +31648,15 @@ }, "property": { "type": "Identifier", - "start": 9081, - "end": 9096, + "start": 9148, + "end": 9163, "loc": { "start": { - "line": 199, + "line": 201, "column": 57 }, "end": { - "line": 199, + "line": 201, "column": 72 }, "identifierName": "reuseGeometries" @@ -31459,15 +31667,15 @@ }, { "type": "Identifier", - "start": 9098, - "end": 9113, + "start": 9165, + "end": 9180, "loc": { "start": { - "line": 199, + "line": 201, "column": 74 }, "end": { - "line": 199, + "line": 201, "column": 89 }, "identifierName": "reuseGeometries" @@ -31480,44 +31688,44 @@ }, { "type": "ExpressionStatement", - "start": 9124, - "end": 9207, + "start": 9191, + "end": 9274, "loc": { "start": { - "line": 200, + "line": 202, "column": 8 }, "end": { - "line": 200, + "line": 202, "column": 91 } }, "expression": { "type": "AssignmentExpression", - "start": 9124, - "end": 9206, + "start": 9191, + "end": 9273, "loc": { "start": { - "line": 200, + "line": 202, "column": 8 }, "end": { - "line": 200, + "line": 202, "column": 90 } }, "operator": "=", "left": { "type": "Identifier", - "start": 9124, - "end": 9139, + "start": 9191, + "end": 9206, "loc": { "start": { - "line": 200, + "line": 202, "column": 8 }, "end": { - "line": 200, + "line": 202, "column": 23 }, "identifierName": "includeTextures" @@ -31526,29 +31734,29 @@ }, "right": { "type": "CallExpression", - "start": 9142, - "end": 9206, + "start": 9209, + "end": 9273, "loc": { "start": { - "line": 200, + "line": 202, "column": 26 }, "end": { - "line": 200, + "line": 202, "column": 90 } }, "callee": { "type": "Identifier", - "start": 9142, - "end": 9156, + "start": 9209, + "end": 9223, "loc": { "start": { - "line": 200, + "line": 202, "column": 26 }, "end": { - "line": 200, + "line": 202, "column": 40 }, "identifierName": "overrideOption" @@ -31558,29 +31766,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 9157, - "end": 9188, + "start": 9224, + "end": 9255, "loc": { "start": { - "line": 200, + "line": 202, "column": 41 }, "end": { - "line": 200, + "line": 202, "column": 72 } }, "object": { "type": "Identifier", - "start": 9157, - "end": 9172, + "start": 9224, + "end": 9239, "loc": { "start": { - "line": 200, + "line": 202, "column": 41 }, "end": { - "line": 200, + "line": 202, "column": 56 }, "identifierName": "fileTypeConfigs" @@ -31589,15 +31797,15 @@ }, "property": { "type": "Identifier", - "start": 9173, - "end": 9188, + "start": 9240, + "end": 9255, "loc": { "start": { - "line": 200, + "line": 202, "column": 57 }, "end": { - "line": 200, + "line": 202, "column": 72 }, "identifierName": "includeTextures" @@ -31608,15 +31816,15 @@ }, { "type": "Identifier", - "start": 9190, - "end": 9205, + "start": 9257, + "end": 9272, "loc": { "start": { - "line": 200, + "line": 202, "column": 74 }, "end": { - "line": 200, + "line": 202, "column": 89 }, "identifierName": "includeTextures" @@ -31629,44 +31837,44 @@ }, { "type": "ExpressionStatement", - "start": 9216, - "end": 9296, + "start": 9283, + "end": 9363, "loc": { "start": { - "line": 201, + "line": 203, "column": 8 }, "end": { - "line": 201, + "line": 203, "column": 88 } }, "expression": { "type": "AssignmentExpression", - "start": 9216, - "end": 9295, + "start": 9283, + "end": 9362, "loc": { "start": { - "line": 201, + "line": 203, "column": 8 }, "end": { - "line": 201, + "line": 203, "column": 87 } }, "operator": "=", "left": { "type": "Identifier", - "start": 9216, - "end": 9230, + "start": 9283, + "end": 9297, "loc": { "start": { - "line": 201, + "line": 203, "column": 8 }, "end": { - "line": 201, + "line": 203, "column": 22 }, "identifierName": "includeNormals" @@ -31675,29 +31883,29 @@ }, "right": { "type": "CallExpression", - "start": 9233, - "end": 9295, + "start": 9300, + "end": 9362, "loc": { "start": { - "line": 201, + "line": 203, "column": 25 }, "end": { - "line": 201, + "line": 203, "column": 87 } }, "callee": { "type": "Identifier", - "start": 9233, - "end": 9247, + "start": 9300, + "end": 9314, "loc": { "start": { - "line": 201, + "line": 203, "column": 25 }, "end": { - "line": 201, + "line": 203, "column": 39 }, "identifierName": "overrideOption" @@ -31707,29 +31915,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 9248, - "end": 9278, + "start": 9315, + "end": 9345, "loc": { "start": { - "line": 201, + "line": 203, "column": 40 }, "end": { - "line": 201, + "line": 203, "column": 70 } }, "object": { "type": "Identifier", - "start": 9248, - "end": 9263, + "start": 9315, + "end": 9330, "loc": { "start": { - "line": 201, + "line": 203, "column": 40 }, "end": { - "line": 201, + "line": 203, "column": 55 }, "identifierName": "fileTypeConfigs" @@ -31738,15 +31946,15 @@ }, "property": { "type": "Identifier", - "start": 9264, - "end": 9278, + "start": 9331, + "end": 9345, "loc": { "start": { - "line": 201, + "line": 203, "column": 56 }, "end": { - "line": 201, + "line": 203, "column": 70 }, "identifierName": "includeNormals" @@ -31757,15 +31965,15 @@ }, { "type": "Identifier", - "start": 9280, - "end": 9294, + "start": 9347, + "end": 9361, "loc": { "start": { - "line": 201, + "line": 203, "column": 72 }, "end": { - "line": 201, + "line": 203, "column": 86 }, "identifierName": "includeNormals" @@ -31778,44 +31986,44 @@ }, { "type": "ExpressionStatement", - "start": 9305, - "end": 9379, + "start": 9372, + "end": 9446, "loc": { "start": { - "line": 202, + "line": 204, "column": 8 }, "end": { - "line": 202, + "line": 204, "column": 82 } }, "expression": { "type": "AssignmentExpression", - "start": 9305, - "end": 9378, + "start": 9372, + "end": 9445, "loc": { "start": { - "line": 202, + "line": 204, "column": 8 }, "end": { - "line": 202, + "line": 204, "column": 81 } }, "operator": "=", "left": { "type": "Identifier", - "start": 9305, - "end": 9317, + "start": 9372, + "end": 9384, "loc": { "start": { - "line": 202, + "line": 204, "column": 8 }, "end": { - "line": 202, + "line": 204, "column": 20 }, "identifierName": "includeTypes" @@ -31824,29 +32032,29 @@ }, "right": { "type": "CallExpression", - "start": 9320, - "end": 9378, + "start": 9387, + "end": 9445, "loc": { "start": { - "line": 202, + "line": 204, "column": 23 }, "end": { - "line": 202, + "line": 204, "column": 81 } }, "callee": { "type": "Identifier", - "start": 9320, - "end": 9334, + "start": 9387, + "end": 9401, "loc": { "start": { - "line": 202, + "line": 204, "column": 23 }, "end": { - "line": 202, + "line": 204, "column": 37 }, "identifierName": "overrideOption" @@ -31856,29 +32064,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 9335, - "end": 9363, + "start": 9402, + "end": 9430, "loc": { "start": { - "line": 202, + "line": 204, "column": 38 }, "end": { - "line": 202, + "line": 204, "column": 66 } }, "object": { "type": "Identifier", - "start": 9335, - "end": 9350, + "start": 9402, + "end": 9417, "loc": { "start": { - "line": 202, + "line": 204, "column": 38 }, "end": { - "line": 202, + "line": 204, "column": 53 }, "identifierName": "fileTypeConfigs" @@ -31887,15 +32095,15 @@ }, "property": { "type": "Identifier", - "start": 9351, - "end": 9363, + "start": 9418, + "end": 9430, "loc": { "start": { - "line": 202, + "line": 204, "column": 54 }, "end": { - "line": 202, + "line": 204, "column": 66 }, "identifierName": "includeTypes" @@ -31906,15 +32114,15 @@ }, { "type": "Identifier", - "start": 9365, - "end": 9377, + "start": 9432, + "end": 9444, "loc": { "start": { - "line": 202, + "line": 204, "column": 68 }, "end": { - "line": 202, + "line": 204, "column": 80 }, "identifierName": "includeTypes" @@ -31927,44 +32135,44 @@ }, { "type": "ExpressionStatement", - "start": 9388, - "end": 9462, + "start": 9455, + "end": 9529, "loc": { "start": { - "line": 203, + "line": 205, "column": 8 }, "end": { - "line": 203, + "line": 205, "column": 82 } }, "expression": { "type": "AssignmentExpression", - "start": 9388, - "end": 9461, + "start": 9455, + "end": 9528, "loc": { "start": { - "line": 203, + "line": 205, "column": 8 }, "end": { - "line": 203, + "line": 205, "column": 81 } }, "operator": "=", "left": { "type": "Identifier", - "start": 9388, - "end": 9400, + "start": 9455, + "end": 9467, "loc": { "start": { - "line": 203, + "line": 205, "column": 8 }, "end": { - "line": 203, + "line": 205, "column": 20 }, "identifierName": "excludeTypes" @@ -31973,29 +32181,29 @@ }, "right": { "type": "CallExpression", - "start": 9403, - "end": 9461, + "start": 9470, + "end": 9528, "loc": { "start": { - "line": 203, + "line": 205, "column": 23 }, "end": { - "line": 203, + "line": 205, "column": 81 } }, "callee": { "type": "Identifier", - "start": 9403, - "end": 9417, + "start": 9470, + "end": 9484, "loc": { "start": { - "line": 203, + "line": 205, "column": 23 }, "end": { - "line": 203, + "line": 205, "column": 37 }, "identifierName": "overrideOption" @@ -32005,29 +32213,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 9418, - "end": 9446, + "start": 9485, + "end": 9513, "loc": { "start": { - "line": 203, + "line": 205, "column": 38 }, "end": { - "line": 203, + "line": 205, "column": 66 } }, "object": { "type": "Identifier", - "start": 9418, - "end": 9433, + "start": 9485, + "end": 9500, "loc": { "start": { - "line": 203, + "line": 205, "column": 38 }, "end": { - "line": 203, + "line": 205, "column": 53 }, "identifierName": "fileTypeConfigs" @@ -32036,15 +32244,15 @@ }, "property": { "type": "Identifier", - "start": 9434, - "end": 9446, + "start": 9501, + "end": 9513, "loc": { "start": { - "line": 203, + "line": 205, "column": 54 }, "end": { - "line": 203, + "line": 205, "column": 66 }, "identifierName": "excludeTypes" @@ -32055,15 +32263,15 @@ }, { "type": "Identifier", - "start": 9448, - "end": 9460, + "start": 9515, + "end": 9527, "loc": { "start": { - "line": 203, + "line": 205, "column": 68 }, "end": { - "line": 203, + "line": 205, "column": 80 }, "identifierName": "excludeTypes" @@ -32076,43 +32284,43 @@ }, { "type": "IfStatement", - "start": 9472, - "end": 9561, + "start": 9539, + "end": 9628, "loc": { "start": { - "line": 205, + "line": 207, "column": 8 }, "end": { - "line": 207, + "line": 209, "column": 9 } }, "test": { "type": "BinaryExpression", - "start": 9476, - "end": 9501, + "start": 9543, + "end": 9568, "loc": { "start": { - "line": 205, + "line": 207, "column": 12 }, "end": { - "line": 205, + "line": 207, "column": 37 } }, "left": { "type": "Identifier", - "start": 9476, - "end": 9491, + "start": 9543, + "end": 9558, "loc": { "start": { - "line": 205, + "line": 207, "column": 12 }, "end": { - "line": 205, + "line": 207, "column": 27 }, "identifierName": "reuseGeometries" @@ -32122,15 +32330,15 @@ "operator": "===", "right": { "type": "BooleanLiteral", - "start": 9496, - "end": 9501, + "start": 9563, + "end": 9568, "loc": { "start": { - "line": 205, + "line": 207, "column": 32 }, "end": { - "line": 205, + "line": 207, "column": 37 } }, @@ -32139,58 +32347,58 @@ }, "consequent": { "type": "BlockStatement", - "start": 9503, - "end": 9561, + "start": 9570, + "end": 9628, "loc": { "start": { - "line": 205, + "line": 207, "column": 39 }, "end": { - "line": 207, + "line": 209, "column": 9 } }, "body": [ { "type": "ExpressionStatement", - "start": 9517, - "end": 9551, + "start": 9584, + "end": 9618, "loc": { "start": { - "line": 206, + "line": 208, "column": 12 }, "end": { - "line": 206, + "line": 208, "column": 46 } }, "expression": { "type": "CallExpression", - "start": 9517, - "end": 9550, + "start": 9584, + "end": 9617, "loc": { "start": { - "line": 206, + "line": 208, "column": 12 }, "end": { - "line": 206, + "line": 208, "column": 45 } }, "callee": { "type": "Identifier", - "start": 9517, - "end": 9520, + "start": 9584, + "end": 9587, "loc": { "start": { - "line": 206, + "line": 208, "column": 12 }, "end": { - "line": 206, + "line": 208, "column": 15 }, "identifierName": "log" @@ -32200,15 +32408,15 @@ "arguments": [ { "type": "StringLiteral", - "start": 9521, - "end": 9549, + "start": 9588, + "end": 9616, "loc": { "start": { - "line": 206, + "line": 208, "column": 16 }, "end": { - "line": 206, + "line": 208, "column": 44 } }, @@ -32228,44 +32436,44 @@ }, { "type": "VariableDeclaration", - "start": 9571, - "end": 9638, + "start": 9638, + "end": 9705, "loc": { "start": { - "line": 209, + "line": 211, "column": 8 }, "end": { - "line": 211, + "line": 213, "column": 11 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 9577, - "end": 9637, + "start": 9644, + "end": 9704, "loc": { "start": { - "line": 209, + "line": 211, "column": 14 }, "end": { - "line": 211, + "line": 213, "column": 10 } }, "id": { "type": "Identifier", - "start": 9577, - "end": 9585, + "start": 9644, + "end": 9652, "loc": { "start": { - "line": 209, + "line": 211, "column": 14 }, "end": { - "line": 209, + "line": 211, "column": 22 }, "identifierName": "xktModel" @@ -32274,29 +32482,29 @@ }, "init": { "type": "NewExpression", - "start": 9588, - "end": 9637, + "start": 9655, + "end": 9704, "loc": { "start": { - "line": 209, + "line": 211, "column": 25 }, "end": { - "line": 211, + "line": 213, "column": 10 } }, "callee": { "type": "Identifier", - "start": 9592, - "end": 9600, + "start": 9659, + "end": 9667, "loc": { "start": { - "line": 209, + "line": 211, "column": 29 }, "end": { - "line": 209, + "line": 211, "column": 37 }, "identifierName": "XKTModel" @@ -32306,30 +32514,30 @@ "arguments": [ { "type": "ObjectExpression", - "start": 9601, - "end": 9636, + "start": 9668, + "end": 9703, "loc": { "start": { - "line": 209, + "line": 211, "column": 38 }, "end": { - "line": 211, + "line": 213, "column": 9 } }, "properties": [ { "type": "ObjectProperty", - "start": 9615, - "end": 9626, + "start": 9682, + "end": 9693, "loc": { "start": { - "line": 210, + "line": 212, "column": 12 }, "end": { - "line": 210, + "line": 212, "column": 23 } }, @@ -32338,15 +32546,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 9615, - "end": 9626, + "start": 9682, + "end": 9693, "loc": { "start": { - "line": 210, + "line": 212, "column": 12 }, "end": { - "line": 210, + "line": 212, "column": 23 }, "identifierName": "minTileSize" @@ -32355,15 +32563,15 @@ }, "value": { "type": "Identifier", - "start": 9615, - "end": 9626, + "start": 9682, + "end": 9693, "loc": { "start": { - "line": 210, + "line": 212, "column": 12 }, "end": { - "line": 210, + "line": 212, "column": 23 }, "identifierName": "minTileSize" @@ -32384,29 +32592,29 @@ }, { "type": "SwitchStatement", - "start": 9648, - "end": 13693, + "start": 9715, + "end": 13760, "loc": { "start": { - "line": 213, + "line": 215, "column": 8 }, "end": { - "line": 334, + "line": 336, "column": 9 } }, "discriminant": { "type": "Identifier", - "start": 9656, - "end": 9659, + "start": 9723, + "end": 9726, "loc": { "start": { - "line": 213, + "line": 215, "column": 16 }, "end": { - "line": 213, + "line": 215, "column": 19 }, "identifierName": "ext" @@ -32416,58 +32624,58 @@ "cases": [ { "type": "SwitchCase", - "start": 9675, - "end": 10053, + "start": 9742, + "end": 10120, "loc": { "start": { - "line": 214, + "line": 216, "column": 12 }, "end": { - "line": 224, + "line": 226, "column": 22 } }, "consequent": [ { "type": "ExpressionStatement", - "start": 9704, - "end": 10030, + "start": 9771, + "end": 10097, "loc": { "start": { - "line": 215, + "line": 217, "column": 16 }, "end": { - "line": 223, + "line": 225, "column": 19 } }, "expression": { "type": "CallExpression", - "start": 9704, - "end": 10029, + "start": 9771, + "end": 10096, "loc": { "start": { - "line": 215, + "line": 217, "column": 16 }, "end": { - "line": 223, + "line": 225, "column": 18 } }, "callee": { "type": "Identifier", - "start": 9704, - "end": 9711, + "start": 9771, + "end": 9778, "loc": { "start": { - "line": 215, + "line": 217, "column": 16 }, "end": { - "line": 215, + "line": 217, "column": 23 }, "identifierName": "convert" @@ -32477,15 +32685,15 @@ "arguments": [ { "type": "Identifier", - "start": 9712, - "end": 9737, + "start": 9779, + "end": 9804, "loc": { "start": { - "line": 215, + "line": 217, "column": 24 }, "end": { - "line": 215, + "line": 217, "column": 49 }, "identifierName": "parseCityJSONIntoXKTModel" @@ -32494,30 +32702,30 @@ }, { "type": "ObjectExpression", - "start": 9739, - "end": 10028, + "start": 9806, + "end": 10095, "loc": { "start": { - "line": 215, + "line": 217, "column": 51 }, "end": { - "line": 223, + "line": 225, "column": 17 } }, "properties": [ { "type": "ObjectProperty", - "start": 9761, - "end": 9789, + "start": 9828, + "end": 9856, "loc": { "start": { - "line": 216, + "line": 218, "column": 20 }, "end": { - "line": 216, + "line": 218, "column": 48 } }, @@ -32526,15 +32734,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 9761, - "end": 9765, + "start": 9828, + "end": 9832, "loc": { "start": { - "line": 216, + "line": 218, "column": 20 }, "end": { - "line": 216, + "line": 218, "column": 24 }, "identifierName": "data" @@ -32543,43 +32751,43 @@ }, "value": { "type": "CallExpression", - "start": 9767, - "end": 9789, + "start": 9834, + "end": 9856, "loc": { "start": { - "line": 216, + "line": 218, "column": 26 }, "end": { - "line": 216, + "line": 218, "column": 48 } }, "callee": { "type": "MemberExpression", - "start": 9767, - "end": 9777, + "start": 9834, + "end": 9844, "loc": { "start": { - "line": 216, + "line": 218, "column": 26 }, "end": { - "line": 216, + "line": 218, "column": 36 } }, "object": { "type": "Identifier", - "start": 9767, - "end": 9771, + "start": 9834, + "end": 9838, "loc": { "start": { - "line": 216, + "line": 218, "column": 26 }, "end": { - "line": 216, + "line": 218, "column": 30 }, "identifierName": "JSON" @@ -32588,15 +32796,15 @@ }, "property": { "type": "Identifier", - "start": 9772, - "end": 9777, + "start": 9839, + "end": 9844, "loc": { "start": { - "line": 216, + "line": 218, "column": 31 }, "end": { - "line": 216, + "line": 218, "column": 36 }, "identifierName": "parse" @@ -32608,15 +32816,15 @@ "arguments": [ { "type": "Identifier", - "start": 9778, - "end": 9788, + "start": 9845, + "end": 9855, "loc": { "start": { - "line": 216, + "line": 218, "column": 37 }, "end": { - "line": 216, + "line": 218, "column": 47 }, "identifierName": "sourceData" @@ -32628,15 +32836,15 @@ }, { "type": "ObjectProperty", - "start": 9811, - "end": 9819, + "start": 9878, + "end": 9886, "loc": { "start": { - "line": 217, + "line": 219, "column": 20 }, "end": { - "line": 217, + "line": 219, "column": 28 } }, @@ -32645,15 +32853,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 9811, - "end": 9819, + "start": 9878, + "end": 9886, "loc": { "start": { - "line": 217, + "line": 219, "column": 20 }, "end": { - "line": 217, + "line": 219, "column": 28 }, "identifierName": "xktModel" @@ -32662,15 +32870,15 @@ }, "value": { "type": "Identifier", - "start": 9811, - "end": 9819, + "start": 9878, + "end": 9886, "loc": { "start": { - "line": 217, + "line": 219, "column": 20 }, "end": { - "line": 217, + "line": 219, "column": 28 }, "identifierName": "xktModel" @@ -32683,15 +32891,15 @@ }, { "type": "ObjectProperty", - "start": 9841, - "end": 9846, + "start": 9908, + "end": 9913, "loc": { "start": { - "line": 218, + "line": 220, "column": 20 }, "end": { - "line": 218, + "line": 220, "column": 25 } }, @@ -32700,15 +32908,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 9841, - "end": 9846, + "start": 9908, + "end": 9913, "loc": { "start": { - "line": 218, + "line": 220, "column": 20 }, "end": { - "line": 218, + "line": 220, "column": 25 }, "identifierName": "stats" @@ -32717,15 +32925,15 @@ }, "value": { "type": "Identifier", - "start": 9841, - "end": 9846, + "start": 9908, + "end": 9913, "loc": { "start": { - "line": 218, + "line": 220, "column": 20 }, "end": { - "line": 218, + "line": 220, "column": 25 }, "identifierName": "stats" @@ -32738,15 +32946,15 @@ }, { "type": "ObjectProperty", - "start": 9868, - "end": 9875, + "start": 9935, + "end": 9942, "loc": { "start": { - "line": 219, + "line": 221, "column": 20 }, "end": { - "line": 219, + "line": 221, "column": 27 } }, @@ -32755,15 +32963,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 9868, - "end": 9875, + "start": 9935, + "end": 9942, "loc": { "start": { - "line": 219, + "line": 221, "column": 20 }, "end": { - "line": 219, + "line": 221, "column": 27 }, "identifierName": "rotateX" @@ -32772,15 +32980,15 @@ }, "value": { "type": "Identifier", - "start": 9868, - "end": 9875, + "start": 9935, + "end": 9942, "loc": { "start": { - "line": 219, + "line": 221, "column": 20 }, "end": { - "line": 219, + "line": 221, "column": 27 }, "identifierName": "rotateX" @@ -32793,15 +33001,15 @@ }, { "type": "ObjectProperty", - "start": 9897, - "end": 9927, + "start": 9964, + "end": 9994, "loc": { "start": { - "line": 220, + "line": 222, "column": 20 }, "end": { - "line": 220, + "line": 222, "column": 50 } }, @@ -32810,15 +33018,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 9897, - "end": 9903, + "start": 9964, + "end": 9970, "loc": { "start": { - "line": 220, + "line": 222, "column": 20 }, "end": { - "line": 220, + "line": 222, "column": 26 }, "identifierName": "center" @@ -32827,29 +33035,29 @@ }, "value": { "type": "MemberExpression", - "start": 9905, - "end": 9927, + "start": 9972, + "end": 9994, "loc": { "start": { - "line": 220, + "line": 222, "column": 28 }, "end": { - "line": 220, + "line": 222, "column": 50 } }, "object": { "type": "Identifier", - "start": 9905, - "end": 9920, + "start": 9972, + "end": 9987, "loc": { "start": { - "line": 220, + "line": 222, "column": 28 }, "end": { - "line": 220, + "line": 222, "column": 43 }, "identifierName": "fileTypeConfigs" @@ -32858,15 +33066,15 @@ }, "property": { "type": "Identifier", - "start": 9921, - "end": 9927, + "start": 9988, + "end": 9994, "loc": { "start": { - "line": 220, + "line": 222, "column": 44 }, "end": { - "line": 220, + "line": 222, "column": 50 }, "identifierName": "center" @@ -32878,15 +33086,15 @@ }, { "type": "ObjectProperty", - "start": 9949, - "end": 9985, + "start": 10016, + "end": 10052, "loc": { "start": { - "line": 221, + "line": 223, "column": 20 }, "end": { - "line": 221, + "line": 223, "column": 56 } }, @@ -32895,15 +33103,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 9949, - "end": 9958, + "start": 10016, + "end": 10025, "loc": { "start": { - "line": 221, + "line": 223, "column": 20 }, "end": { - "line": 221, + "line": 223, "column": 29 }, "identifierName": "transform" @@ -32912,29 +33120,29 @@ }, "value": { "type": "MemberExpression", - "start": 9960, - "end": 9985, + "start": 10027, + "end": 10052, "loc": { "start": { - "line": 221, + "line": 223, "column": 31 }, "end": { - "line": 221, + "line": 223, "column": 56 } }, "object": { "type": "Identifier", - "start": 9960, - "end": 9975, + "start": 10027, + "end": 10042, "loc": { "start": { - "line": 221, + "line": 223, "column": 31 }, "end": { - "line": 221, + "line": 223, "column": 46 }, "identifierName": "fileTypeConfigs" @@ -32943,15 +33151,15 @@ }, "property": { "type": "Identifier", - "start": 9976, - "end": 9985, + "start": 10043, + "end": 10052, "loc": { "start": { - "line": 221, + "line": 223, "column": 47 }, "end": { - "line": 221, + "line": 223, "column": 56 }, "identifierName": "transform" @@ -32963,15 +33171,15 @@ }, { "type": "ObjectProperty", - "start": 10007, - "end": 10010, + "start": 10074, + "end": 10077, "loc": { "start": { - "line": 222, + "line": 224, "column": 20 }, "end": { - "line": 222, + "line": 224, "column": 23 } }, @@ -32980,15 +33188,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10007, - "end": 10010, + "start": 10074, + "end": 10077, "loc": { "start": { - "line": 222, + "line": 224, "column": 20 }, "end": { - "line": 222, + "line": 224, "column": 23 }, "identifierName": "log" @@ -32997,15 +33205,15 @@ }, "value": { "type": "Identifier", - "start": 10007, - "end": 10010, + "start": 10074, + "end": 10077, "loc": { "start": { - "line": 222, + "line": 224, "column": 20 }, "end": { - "line": 222, + "line": 224, "column": 23 }, "identifierName": "log" @@ -33023,15 +33231,15 @@ }, { "type": "BreakStatement", - "start": 10047, - "end": 10053, + "start": 10114, + "end": 10120, "loc": { "start": { - "line": 224, + "line": 226, "column": 16 }, "end": { - "line": 224, + "line": 226, "column": 22 } }, @@ -33040,15 +33248,15 @@ ], "test": { "type": "StringLiteral", - "start": 9680, - "end": 9686, + "start": 9747, + "end": 9753, "loc": { "start": { - "line": 214, + "line": 216, "column": 17 }, "end": { - "line": 214, + "line": 216, "column": 23 } }, @@ -33061,59 +33269,59 @@ }, { "type": "SwitchCase", - "start": 10067, - "end": 10505, + "start": 10134, + "end": 10572, "loc": { "start": { - "line": 226, + "line": 228, "column": 12 }, "end": { - "line": 238, + "line": 240, "column": 22 } }, "consequent": [ { "type": "ExpressionStatement", - "start": 10095, - "end": 10134, + "start": 10162, + "end": 10201, "loc": { "start": { - "line": 227, + "line": 229, "column": 16 }, "end": { - "line": 227, + "line": 229, "column": 55 } }, "expression": { "type": "AssignmentExpression", - "start": 10095, - "end": 10133, + "start": 10162, + "end": 10200, "loc": { "start": { - "line": 227, + "line": 229, "column": 16 }, "end": { - "line": 227, + "line": 229, "column": 54 } }, "operator": "=", "left": { "type": "Identifier", - "start": 10095, - "end": 10105, + "start": 10162, + "end": 10172, "loc": { "start": { - "line": 227, + "line": 229, "column": 16 }, "end": { - "line": 227, + "line": 229, "column": 26 }, "identifierName": "sourceData" @@ -33122,29 +33330,29 @@ }, "right": { "type": "CallExpression", - "start": 10108, - "end": 10133, + "start": 10175, + "end": 10200, "loc": { "start": { - "line": 227, + "line": 229, "column": 29 }, "end": { - "line": 227, + "line": 229, "column": 54 } }, "callee": { "type": "Identifier", - "start": 10108, - "end": 10121, + "start": 10175, + "end": 10188, "loc": { "start": { - "line": 227, + "line": 229, "column": 29 }, "end": { - "line": 227, + "line": 229, "column": 42 }, "identifierName": "toArrayBuffer" @@ -33154,15 +33362,15 @@ "arguments": [ { "type": "Identifier", - "start": 10122, - "end": 10132, + "start": 10189, + "end": 10199, "loc": { "start": { - "line": 227, + "line": 229, "column": 43 }, "end": { - "line": 227, + "line": 229, "column": 53 }, "identifierName": "sourceData" @@ -33175,43 +33383,43 @@ }, { "type": "ExpressionStatement", - "start": 10151, - "end": 10482, + "start": 10218, + "end": 10549, "loc": { "start": { - "line": 228, + "line": 230, "column": 16 }, "end": { - "line": 237, + "line": 239, "column": 19 } }, "expression": { "type": "CallExpression", - "start": 10151, - "end": 10481, + "start": 10218, + "end": 10548, "loc": { "start": { - "line": 228, + "line": 230, "column": 16 }, "end": { - "line": 237, + "line": 239, "column": 18 } }, "callee": { "type": "Identifier", - "start": 10151, - "end": 10158, + "start": 10218, + "end": 10225, "loc": { "start": { - "line": 228, + "line": 230, "column": 16 }, "end": { - "line": 228, + "line": 230, "column": 23 }, "identifierName": "convert" @@ -33221,15 +33429,15 @@ "arguments": [ { "type": "Identifier", - "start": 10159, - "end": 10180, + "start": 10226, + "end": 10247, "loc": { "start": { - "line": 228, + "line": 230, "column": 24 }, "end": { - "line": 228, + "line": 230, "column": 45 }, "identifierName": "parseGLTFIntoXKTModel" @@ -33238,30 +33446,30 @@ }, { "type": "ObjectExpression", - "start": 10182, - "end": 10480, + "start": 10249, + "end": 10547, "loc": { "start": { - "line": 228, + "line": 230, "column": 47 }, "end": { - "line": 237, + "line": 239, "column": 17 } }, "properties": [ { "type": "ObjectProperty", - "start": 10204, - "end": 10220, + "start": 10271, + "end": 10287, "loc": { "start": { - "line": 229, + "line": 231, "column": 20 }, "end": { - "line": 229, + "line": 231, "column": 36 } }, @@ -33270,15 +33478,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10204, - "end": 10208, + "start": 10271, + "end": 10275, "loc": { "start": { - "line": 229, + "line": 231, "column": 20 }, "end": { - "line": 229, + "line": 231, "column": 24 }, "identifierName": "data" @@ -33287,15 +33495,15 @@ }, "value": { "type": "Identifier", - "start": 10210, - "end": 10220, + "start": 10277, + "end": 10287, "loc": { "start": { - "line": 229, + "line": 231, "column": 26 }, "end": { - "line": 229, + "line": 231, "column": 36 }, "identifierName": "sourceData" @@ -33305,15 +33513,15 @@ }, { "type": "ObjectProperty", - "start": 10242, - "end": 10257, + "start": 10309, + "end": 10324, "loc": { "start": { - "line": 230, + "line": 232, "column": 20 }, "end": { - "line": 230, + "line": 232, "column": 35 } }, @@ -33322,15 +33530,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10242, - "end": 10257, + "start": 10309, + "end": 10324, "loc": { "start": { - "line": 230, + "line": 232, "column": 20 }, "end": { - "line": 230, + "line": 232, "column": 35 }, "identifierName": "reuseGeometries" @@ -33339,15 +33547,15 @@ }, "value": { "type": "Identifier", - "start": 10242, - "end": 10257, + "start": 10309, + "end": 10324, "loc": { "start": { - "line": 230, + "line": 232, "column": 20 }, "end": { - "line": 230, + "line": 232, "column": 35 }, "identifierName": "reuseGeometries" @@ -33360,15 +33568,15 @@ }, { "type": "ObjectProperty", - "start": 10279, - "end": 10294, + "start": 10346, + "end": 10361, "loc": { "start": { - "line": 231, + "line": 233, "column": 20 }, "end": { - "line": 231, + "line": 233, "column": 35 } }, @@ -33377,15 +33585,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10279, - "end": 10294, + "start": 10346, + "end": 10361, "loc": { "start": { - "line": 231, + "line": 233, "column": 20 }, "end": { - "line": 231, + "line": 233, "column": 35 }, "identifierName": "includeTextures" @@ -33394,15 +33602,15 @@ }, "value": { "type": "Identifier", - "start": 10279, - "end": 10294, + "start": 10346, + "end": 10361, "loc": { "start": { - "line": 231, + "line": 233, "column": 20 }, "end": { - "line": 231, + "line": 233, "column": 35 }, "identifierName": "includeTextures" @@ -33415,15 +33623,15 @@ }, { "type": "ObjectProperty", - "start": 10316, - "end": 10330, + "start": 10383, + "end": 10397, "loc": { "start": { - "line": 232, + "line": 234, "column": 20 }, "end": { - "line": 232, + "line": 234, "column": 34 } }, @@ -33432,15 +33640,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10316, - "end": 10330, + "start": 10383, + "end": 10397, "loc": { "start": { - "line": 232, + "line": 234, "column": 20 }, "end": { - "line": 232, + "line": 234, "column": 34 }, "identifierName": "includeNormals" @@ -33449,15 +33657,15 @@ }, "value": { "type": "Identifier", - "start": 10316, - "end": 10330, + "start": 10383, + "end": 10397, "loc": { "start": { - "line": 232, + "line": 234, "column": 20 }, "end": { - "line": 232, + "line": 234, "column": 34 }, "identifierName": "includeNormals" @@ -33470,15 +33678,15 @@ }, { "type": "ObjectProperty", - "start": 10352, - "end": 10380, + "start": 10419, + "end": 10447, "loc": { "start": { - "line": 233, + "line": 235, "column": 20 }, "end": { - "line": 233, + "line": 235, "column": 48 } }, @@ -33487,15 +33695,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10352, - "end": 10365, + "start": 10419, + "end": 10432, "loc": { "start": { - "line": 233, + "line": 235, "column": 20 }, "end": { - "line": 233, + "line": 235, "column": 33 }, "identifierName": "metaModelData" @@ -33504,15 +33712,15 @@ }, "value": { "type": "Identifier", - "start": 10367, - "end": 10380, + "start": 10434, + "end": 10447, "loc": { "start": { - "line": 233, + "line": 235, "column": 35 }, "end": { - "line": 233, + "line": 235, "column": 48 }, "identifierName": "metaModelJSON" @@ -33522,15 +33730,15 @@ }, { "type": "ObjectProperty", - "start": 10402, - "end": 10410, + "start": 10469, + "end": 10477, "loc": { "start": { - "line": 234, + "line": 236, "column": 20 }, "end": { - "line": 234, + "line": 236, "column": 28 } }, @@ -33539,15 +33747,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10402, - "end": 10410, + "start": 10469, + "end": 10477, "loc": { "start": { - "line": 234, + "line": 236, "column": 20 }, "end": { - "line": 234, + "line": 236, "column": 28 }, "identifierName": "xktModel" @@ -33556,15 +33764,15 @@ }, "value": { "type": "Identifier", - "start": 10402, - "end": 10410, + "start": 10469, + "end": 10477, "loc": { "start": { - "line": 234, + "line": 236, "column": 20 }, "end": { - "line": 234, + "line": 236, "column": 28 }, "identifierName": "xktModel" @@ -33577,15 +33785,15 @@ }, { "type": "ObjectProperty", - "start": 10432, - "end": 10437, + "start": 10499, + "end": 10504, "loc": { "start": { - "line": 235, + "line": 237, "column": 20 }, "end": { - "line": 235, + "line": 237, "column": 25 } }, @@ -33594,15 +33802,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10432, - "end": 10437, + "start": 10499, + "end": 10504, "loc": { "start": { - "line": 235, + "line": 237, "column": 20 }, "end": { - "line": 235, + "line": 237, "column": 25 }, "identifierName": "stats" @@ -33611,15 +33819,15 @@ }, "value": { "type": "Identifier", - "start": 10432, - "end": 10437, + "start": 10499, + "end": 10504, "loc": { "start": { - "line": 235, + "line": 237, "column": 20 }, "end": { - "line": 235, + "line": 237, "column": 25 }, "identifierName": "stats" @@ -33632,15 +33840,15 @@ }, { "type": "ObjectProperty", - "start": 10459, - "end": 10462, + "start": 10526, + "end": 10529, "loc": { "start": { - "line": 236, + "line": 238, "column": 20 }, "end": { - "line": 236, + "line": 238, "column": 23 } }, @@ -33649,15 +33857,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10459, - "end": 10462, + "start": 10526, + "end": 10529, "loc": { "start": { - "line": 236, + "line": 238, "column": 20 }, "end": { - "line": 236, + "line": 238, "column": 23 }, "identifierName": "log" @@ -33666,15 +33874,15 @@ }, "value": { "type": "Identifier", - "start": 10459, - "end": 10462, + "start": 10526, + "end": 10529, "loc": { "start": { - "line": 236, + "line": 238, "column": 20 }, "end": { - "line": 236, + "line": 238, "column": 23 }, "identifierName": "log" @@ -33692,15 +33900,15 @@ }, { "type": "BreakStatement", - "start": 10499, - "end": 10505, + "start": 10566, + "end": 10572, "loc": { "start": { - "line": 238, + "line": 240, "column": 16 }, "end": { - "line": 238, + "line": 240, "column": 22 } }, @@ -33709,15 +33917,15 @@ ], "test": { "type": "StringLiteral", - "start": 10072, - "end": 10077, + "start": 10139, + "end": 10144, "loc": { "start": { - "line": 226, + "line": 228, "column": 17 }, "end": { - "line": 226, + "line": 228, "column": 22 } }, @@ -33730,59 +33938,59 @@ }, { "type": "SwitchCase", - "start": 10519, - "end": 11454, + "start": 10586, + "end": 11521, "loc": { "start": { - "line": 240, + "line": 242, "column": 12 }, "end": { - "line": 261, + "line": 263, "column": 22 } }, "consequent": [ { "type": "VariableDeclaration", - "start": 10548, - "end": 10588, + "start": 10615, + "end": 10655, "loc": { "start": { - "line": 241, + "line": 243, "column": 16 }, "end": { - "line": 241, + "line": 243, "column": 56 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 10554, - "end": 10587, + "start": 10621, + "end": 10654, "loc": { "start": { - "line": 241, + "line": 243, "column": 22 }, "end": { - "line": 241, + "line": 243, "column": 55 } }, "id": { "type": "Identifier", - "start": 10554, - "end": 10562, + "start": 10621, + "end": 10629, "loc": { "start": { - "line": 241, + "line": 243, "column": 22 }, "end": { - "line": 241, + "line": 243, "column": 30 }, "identifierName": "gltfJSON" @@ -33791,43 +33999,43 @@ }, "init": { "type": "CallExpression", - "start": 10565, - "end": 10587, + "start": 10632, + "end": 10654, "loc": { "start": { - "line": 241, + "line": 243, "column": 33 }, "end": { - "line": 241, + "line": 243, "column": 55 } }, "callee": { "type": "MemberExpression", - "start": 10565, - "end": 10575, + "start": 10632, + "end": 10642, "loc": { "start": { - "line": 241, + "line": 243, "column": 33 }, "end": { - "line": 241, + "line": 243, "column": 43 } }, "object": { "type": "Identifier", - "start": 10565, - "end": 10569, + "start": 10632, + "end": 10636, "loc": { "start": { - "line": 241, + "line": 243, "column": 33 }, "end": { - "line": 241, + "line": 243, "column": 37 }, "identifierName": "JSON" @@ -33836,15 +34044,15 @@ }, "property": { "type": "Identifier", - "start": 10570, - "end": 10575, + "start": 10637, + "end": 10642, "loc": { "start": { - "line": 241, + "line": 243, "column": 38 }, "end": { - "line": 241, + "line": 243, "column": 43 }, "identifierName": "parse" @@ -33856,15 +34064,15 @@ "arguments": [ { "type": "Identifier", - "start": 10576, - "end": 10586, + "start": 10643, + "end": 10653, "loc": { "start": { - "line": 241, + "line": 243, "column": 44 }, "end": { - "line": 241, + "line": 243, "column": 54 }, "identifierName": "sourceData" @@ -33879,44 +34087,44 @@ }, { "type": "VariableDeclaration", - "start": 10605, - "end": 10660, + "start": 10672, + "end": 10727, "loc": { "start": { - "line": 242, + "line": 244, "column": 16 }, "end": { - "line": 242, + "line": 244, "column": 71 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 10611, - "end": 10659, + "start": 10678, + "end": 10726, "loc": { "start": { - "line": 242, + "line": 244, "column": 22 }, "end": { - "line": 242, + "line": 244, "column": 70 } }, "id": { "type": "Identifier", - "start": 10611, - "end": 10623, + "start": 10678, + "end": 10690, "loc": { "start": { - "line": 242, + "line": 244, "column": 22 }, "end": { - "line": 242, + "line": 244, "column": 34 }, "identifierName": "gltfBasePath" @@ -33925,29 +34133,29 @@ }, "init": { "type": "ConditionalExpression", - "start": 10626, - "end": 10659, + "start": 10693, + "end": 10726, "loc": { "start": { - "line": 242, + "line": 244, "column": 37 }, "end": { - "line": 242, + "line": 244, "column": 70 } }, "test": { "type": "Identifier", - "start": 10626, - "end": 10632, + "start": 10693, + "end": 10699, "loc": { "start": { - "line": 242, + "line": 244, "column": 37 }, "end": { - "line": 242, + "line": 244, "column": 43 }, "identifierName": "source" @@ -33956,29 +34164,29 @@ }, "consequent": { "type": "CallExpression", - "start": 10635, - "end": 10654, + "start": 10702, + "end": 10721, "loc": { "start": { - "line": 242, + "line": 244, "column": 46 }, "end": { - "line": 242, + "line": 244, "column": 65 } }, "callee": { "type": "Identifier", - "start": 10635, - "end": 10646, + "start": 10702, + "end": 10713, "loc": { "start": { - "line": 242, + "line": 244, "column": 46 }, "end": { - "line": 242, + "line": 244, "column": 57 }, "identifierName": "getBasePath" @@ -33988,15 +34196,15 @@ "arguments": [ { "type": "Identifier", - "start": 10647, - "end": 10653, + "start": 10714, + "end": 10720, "loc": { "start": { - "line": 242, + "line": 244, "column": 58 }, "end": { - "line": 242, + "line": 244, "column": 64 }, "identifierName": "source" @@ -34007,15 +34215,15 @@ }, "alternate": { "type": "StringLiteral", - "start": 10657, - "end": 10659, + "start": 10724, + "end": 10726, "loc": { "start": { - "line": 242, + "line": 244, "column": 68 }, "end": { - "line": 242, + "line": 244, "column": 70 } }, @@ -34032,43 +34240,43 @@ }, { "type": "ExpressionStatement", - "start": 10677, - "end": 11431, + "start": 10744, + "end": 11498, "loc": { "start": { - "line": 243, + "line": 245, "column": 16 }, "end": { - "line": 260, + "line": 262, "column": 19 } }, "expression": { "type": "CallExpression", - "start": 10677, - "end": 11430, + "start": 10744, + "end": 11497, "loc": { "start": { - "line": 243, + "line": 245, "column": 16 }, "end": { - "line": 260, + "line": 262, "column": 18 } }, "callee": { "type": "Identifier", - "start": 10677, - "end": 10684, + "start": 10744, + "end": 10751, "loc": { "start": { - "line": 243, + "line": 245, "column": 16 }, "end": { - "line": 243, + "line": 245, "column": 23 }, "identifierName": "convert" @@ -34078,15 +34286,15 @@ "arguments": [ { "type": "Identifier", - "start": 10685, - "end": 10710, + "start": 10752, + "end": 10777, "loc": { "start": { - "line": 243, + "line": 245, "column": 24 }, "end": { - "line": 243, + "line": 245, "column": 49 }, "identifierName": "parseGLTFJSONIntoXKTModel" @@ -34095,30 +34303,30 @@ }, { "type": "ObjectExpression", - "start": 10712, - "end": 11429, + "start": 10779, + "end": 11496, "loc": { "start": { - "line": 243, + "line": 245, "column": 51 }, "end": { - "line": 260, + "line": 262, "column": 17 } }, "properties": [ { "type": "ObjectProperty", - "start": 10734, - "end": 10755, + "start": 10801, + "end": 10822, "loc": { "start": { - "line": 244, + "line": 246, "column": 20 }, "end": { - "line": 244, + "line": 246, "column": 41 } }, @@ -34127,15 +34335,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10734, - "end": 10741, + "start": 10801, + "end": 10808, "loc": { "start": { - "line": 244, + "line": 246, "column": 20 }, "end": { - "line": 244, + "line": 246, "column": 27 }, "identifierName": "baseUri" @@ -34144,15 +34352,15 @@ }, "value": { "type": "Identifier", - "start": 10743, - "end": 10755, + "start": 10810, + "end": 10822, "loc": { "start": { - "line": 244, + "line": 246, "column": 29 }, "end": { - "line": 244, + "line": 246, "column": 41 }, "identifierName": "gltfBasePath" @@ -34162,15 +34370,15 @@ }, { "type": "ObjectProperty", - "start": 10777, - "end": 10791, + "start": 10844, + "end": 10858, "loc": { "start": { - "line": 245, + "line": 247, "column": 20 }, "end": { - "line": 245, + "line": 247, "column": 34 } }, @@ -34179,15 +34387,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10777, - "end": 10781, + "start": 10844, + "end": 10848, "loc": { "start": { - "line": 245, + "line": 247, "column": 20 }, "end": { - "line": 245, + "line": 247, "column": 24 }, "identifierName": "data" @@ -34196,15 +34404,15 @@ }, "value": { "type": "Identifier", - "start": 10783, - "end": 10791, + "start": 10850, + "end": 10858, "loc": { "start": { - "line": 245, + "line": 247, "column": 26 }, "end": { - "line": 245, + "line": 247, "column": 34 }, "identifierName": "gltfJSON" @@ -34214,15 +34422,15 @@ }, { "type": "ObjectProperty", - "start": 10813, - "end": 10828, + "start": 10880, + "end": 10895, "loc": { "start": { - "line": 246, + "line": 248, "column": 20 }, "end": { - "line": 246, + "line": 248, "column": 35 } }, @@ -34231,15 +34439,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10813, - "end": 10828, + "start": 10880, + "end": 10895, "loc": { "start": { - "line": 246, + "line": 248, "column": 20 }, "end": { - "line": 246, + "line": 248, "column": 35 }, "identifierName": "reuseGeometries" @@ -34248,15 +34456,15 @@ }, "value": { "type": "Identifier", - "start": 10813, - "end": 10828, + "start": 10880, + "end": 10895, "loc": { "start": { - "line": 246, + "line": 248, "column": 20 }, "end": { - "line": 246, + "line": 248, "column": 35 }, "identifierName": "reuseGeometries" @@ -34269,15 +34477,15 @@ }, { "type": "ObjectProperty", - "start": 10850, - "end": 10865, + "start": 10917, + "end": 10932, "loc": { "start": { - "line": 247, + "line": 249, "column": 20 }, "end": { - "line": 247, + "line": 249, "column": 35 } }, @@ -34286,15 +34494,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10850, - "end": 10865, + "start": 10917, + "end": 10932, "loc": { "start": { - "line": 247, + "line": 249, "column": 20 }, "end": { - "line": 247, + "line": 249, "column": 35 }, "identifierName": "includeTextures" @@ -34303,15 +34511,15 @@ }, "value": { "type": "Identifier", - "start": 10850, - "end": 10865, + "start": 10917, + "end": 10932, "loc": { "start": { - "line": 247, + "line": 249, "column": 20 }, "end": { - "line": 247, + "line": 249, "column": 35 }, "identifierName": "includeTextures" @@ -34324,15 +34532,15 @@ }, { "type": "ObjectProperty", - "start": 10887, - "end": 10901, + "start": 10954, + "end": 10968, "loc": { "start": { - "line": 248, + "line": 250, "column": 20 }, "end": { - "line": 248, + "line": 250, "column": 34 } }, @@ -34341,15 +34549,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10887, - "end": 10901, + "start": 10954, + "end": 10968, "loc": { "start": { - "line": 248, + "line": 250, "column": 20 }, "end": { - "line": 248, + "line": 250, "column": 34 }, "identifierName": "includeNormals" @@ -34358,15 +34566,15 @@ }, "value": { "type": "Identifier", - "start": 10887, - "end": 10901, + "start": 10954, + "end": 10968, "loc": { "start": { - "line": 248, + "line": 250, "column": 20 }, "end": { - "line": 248, + "line": 250, "column": 34 }, "identifierName": "includeNormals" @@ -34379,15 +34587,15 @@ }, { "type": "ObjectProperty", - "start": 10923, - "end": 10951, + "start": 10990, + "end": 11018, "loc": { "start": { - "line": 249, + "line": 251, "column": 20 }, "end": { - "line": 249, + "line": 251, "column": 48 } }, @@ -34396,15 +34604,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10923, - "end": 10936, + "start": 10990, + "end": 11003, "loc": { "start": { - "line": 249, + "line": 251, "column": 20 }, "end": { - "line": 249, + "line": 251, "column": 33 }, "identifierName": "metaModelData" @@ -34413,15 +34621,15 @@ }, "value": { "type": "Identifier", - "start": 10938, - "end": 10951, + "start": 11005, + "end": 11018, "loc": { "start": { - "line": 249, + "line": 251, "column": 35 }, "end": { - "line": 249, + "line": 251, "column": 48 }, "identifierName": "metaModelJSON" @@ -34431,15 +34639,15 @@ }, { "type": "ObjectProperty", - "start": 10973, - "end": 10981, + "start": 11040, + "end": 11048, "loc": { "start": { - "line": 250, + "line": 252, "column": 20 }, "end": { - "line": 250, + "line": 252, "column": 28 } }, @@ -34448,15 +34656,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 10973, - "end": 10981, + "start": 11040, + "end": 11048, "loc": { "start": { - "line": 250, + "line": 252, "column": 20 }, "end": { - "line": 250, + "line": 252, "column": 28 }, "identifierName": "xktModel" @@ -34465,15 +34673,15 @@ }, "value": { "type": "Identifier", - "start": 10973, - "end": 10981, + "start": 11040, + "end": 11048, "loc": { "start": { - "line": 250, + "line": 252, "column": 20 }, "end": { - "line": 250, + "line": 252, "column": 28 }, "identifierName": "xktModel" @@ -34486,15 +34694,15 @@ }, { "type": "ObjectProperty", - "start": 11003, - "end": 11359, + "start": 11070, + "end": 11426, "loc": { "start": { - "line": 251, + "line": 253, "column": 20 }, "end": { - "line": 257, + "line": 259, "column": 21 } }, @@ -34503,15 +34711,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11003, - "end": 11016, + "start": 11070, + "end": 11083, "loc": { "start": { - "line": 251, + "line": 253, "column": 20 }, "end": { - "line": 251, + "line": 253, "column": 33 }, "identifierName": "getAttachment" @@ -34520,15 +34728,15 @@ }, "value": { "type": "ArrowFunctionExpression", - "start": 11018, - "end": 11359, + "start": 11085, + "end": 11426, "loc": { "start": { - "line": 251, + "line": 253, "column": 35 }, "end": { - "line": 257, + "line": 259, "column": 21 } }, @@ -34539,15 +34747,15 @@ "params": [ { "type": "Identifier", - "start": 11025, - "end": 11029, + "start": 11092, + "end": 11096, "loc": { "start": { - "line": 251, + "line": 253, "column": 42 }, "end": { - "line": 251, + "line": 253, "column": 46 }, "identifierName": "name" @@ -34557,59 +34765,59 @@ ], "body": { "type": "BlockStatement", - "start": 11034, - "end": 11359, + "start": 11101, + "end": 11426, "loc": { "start": { - "line": 251, + "line": 253, "column": 51 }, "end": { - "line": 257, + "line": 259, "column": 21 } }, "body": [ { "type": "VariableDeclaration", - "start": 11060, - "end": 11097, + "start": 11127, + "end": 11164, "loc": { "start": { - "line": 252, + "line": 254, "column": 24 }, "end": { - "line": 252, + "line": 254, "column": 61 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 11066, - "end": 11096, + "start": 11133, + "end": 11163, "loc": { "start": { - "line": 252, + "line": 254, "column": 30 }, "end": { - "line": 252, + "line": 254, "column": 60 } }, "id": { "type": "Identifier", - "start": 11066, - "end": 11074, + "start": 11133, + "end": 11141, "loc": { "start": { - "line": 252, + "line": 254, "column": 30 }, "end": { - "line": 252, + "line": 254, "column": 38 }, "identifierName": "filePath" @@ -34618,29 +34826,29 @@ }, "init": { "type": "BinaryExpression", - "start": 11077, - "end": 11096, + "start": 11144, + "end": 11163, "loc": { "start": { - "line": 252, + "line": 254, "column": 41 }, "end": { - "line": 252, + "line": 254, "column": 60 } }, "left": { "type": "Identifier", - "start": 11077, - "end": 11089, + "start": 11144, + "end": 11156, "loc": { "start": { - "line": 252, + "line": 254, "column": 41 }, "end": { - "line": 252, + "line": 254, "column": 53 }, "identifierName": "gltfBasePath" @@ -34650,15 +34858,15 @@ "operator": "+", "right": { "type": "Identifier", - "start": 11092, - "end": 11096, + "start": 11159, + "end": 11163, "loc": { "start": { - "line": 252, + "line": 254, "column": 56 }, "end": { - "line": 252, + "line": 254, "column": 60 }, "identifierName": "name" @@ -34672,43 +34880,43 @@ }, { "type": "ExpressionStatement", - "start": 11122, - "end": 11166, + "start": 11189, + "end": 11233, "loc": { "start": { - "line": 253, + "line": 255, "column": 24 }, "end": { - "line": 253, + "line": 255, "column": 68 } }, "expression": { "type": "CallExpression", - "start": 11122, - "end": 11165, + "start": 11189, + "end": 11232, "loc": { "start": { - "line": 253, + "line": 255, "column": 24 }, "end": { - "line": 253, + "line": 255, "column": 67 } }, "callee": { "type": "Identifier", - "start": 11122, - "end": 11125, + "start": 11189, + "end": 11192, "loc": { "start": { - "line": 253, + "line": 255, "column": 24 }, "end": { - "line": 253, + "line": 255, "column": 27 }, "identifierName": "log" @@ -34718,30 +34926,30 @@ "arguments": [ { "type": "TemplateLiteral", - "start": 11126, - "end": 11164, + "start": 11193, + "end": 11231, "loc": { "start": { - "line": 253, + "line": 255, "column": 28 }, "end": { - "line": 253, + "line": 255, "column": 66 } }, "expressions": [ { "type": "Identifier", - "start": 11154, - "end": 11162, + "start": 11221, + "end": 11229, "loc": { "start": { - "line": 253, + "line": 255, "column": 56 }, "end": { - "line": 253, + "line": 255, "column": 64 }, "identifierName": "filePath" @@ -34752,15 +34960,15 @@ "quasis": [ { "type": "TemplateElement", - "start": 11127, - "end": 11152, + "start": 11194, + "end": 11219, "loc": { "start": { - "line": 253, + "line": 255, "column": 29 }, "end": { - "line": 253, + "line": 255, "column": 54 } }, @@ -34772,15 +34980,15 @@ }, { "type": "TemplateElement", - "start": 11163, - "end": 11163, + "start": 11230, + "end": 11230, "loc": { "start": { - "line": 253, + "line": 255, "column": 65 }, "end": { - "line": 253, + "line": 255, "column": 65 } }, @@ -34797,44 +35005,44 @@ }, { "type": "VariableDeclaration", - "start": 11191, - "end": 11232, + "start": 11258, + "end": 11299, "loc": { "start": { - "line": 254, + "line": 256, "column": 24 }, "end": { - "line": 254, + "line": 256, "column": 65 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 11197, - "end": 11231, + "start": 11264, + "end": 11298, "loc": { "start": { - "line": 254, + "line": 256, "column": 30 }, "end": { - "line": 254, + "line": 256, "column": 64 } }, "id": { "type": "Identifier", - "start": 11197, - "end": 11203, + "start": 11264, + "end": 11270, "loc": { "start": { - "line": 254, + "line": 256, "column": 30 }, "end": { - "line": 254, + "line": 256, "column": 36 }, "identifierName": "buffer" @@ -34843,43 +35051,43 @@ }, "init": { "type": "CallExpression", - "start": 11206, - "end": 11231, + "start": 11273, + "end": 11298, "loc": { "start": { - "line": 254, + "line": 256, "column": 39 }, "end": { - "line": 254, + "line": 256, "column": 64 } }, "callee": { "type": "MemberExpression", - "start": 11206, - "end": 11221, + "start": 11273, + "end": 11288, "loc": { "start": { - "line": 254, + "line": 256, "column": 39 }, "end": { - "line": 254, + "line": 256, "column": 54 } }, "object": { "type": "Identifier", - "start": 11206, - "end": 11208, + "start": 11273, + "end": 11275, "loc": { "start": { - "line": 254, + "line": 256, "column": 39 }, "end": { - "line": 254, + "line": 256, "column": 41 }, "identifierName": "fs" @@ -34888,15 +35096,15 @@ }, "property": { "type": "Identifier", - "start": 11209, - "end": 11221, + "start": 11276, + "end": 11288, "loc": { "start": { - "line": 254, + "line": 256, "column": 42 }, "end": { - "line": 254, + "line": 256, "column": 54 }, "identifierName": "readFileSync" @@ -34908,15 +35116,15 @@ "arguments": [ { "type": "Identifier", - "start": 11222, - "end": 11230, + "start": 11289, + "end": 11297, "loc": { "start": { - "line": 254, + "line": 256, "column": 55 }, "end": { - "line": 254, + "line": 256, "column": 63 }, "identifierName": "filePath" @@ -34931,44 +35139,44 @@ }, { "type": "VariableDeclaration", - "start": 11257, - "end": 11296, + "start": 11324, + "end": 11363, "loc": { "start": { - "line": 255, + "line": 257, "column": 24 }, "end": { - "line": 255, + "line": 257, "column": 63 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 11263, - "end": 11295, + "start": 11330, + "end": 11362, "loc": { "start": { - "line": 255, + "line": 257, "column": 30 }, "end": { - "line": 255, + "line": 257, "column": 62 } }, "id": { "type": "Identifier", - "start": 11263, - "end": 11271, + "start": 11330, + "end": 11338, "loc": { "start": { - "line": 255, + "line": 257, "column": 30 }, "end": { - "line": 255, + "line": 257, "column": 38 }, "identifierName": "arrayBuf" @@ -34977,29 +35185,29 @@ }, "init": { "type": "CallExpression", - "start": 11274, - "end": 11295, + "start": 11341, + "end": 11362, "loc": { "start": { - "line": 255, + "line": 257, "column": 41 }, "end": { - "line": 255, + "line": 257, "column": 62 } }, "callee": { "type": "Identifier", - "start": 11274, - "end": 11287, + "start": 11341, + "end": 11354, "loc": { "start": { - "line": 255, + "line": 257, "column": 41 }, "end": { - "line": 255, + "line": 257, "column": 54 }, "identifierName": "toArrayBuffer" @@ -35009,15 +35217,15 @@ "arguments": [ { "type": "Identifier", - "start": 11288, - "end": 11294, + "start": 11355, + "end": 11361, "loc": { "start": { - "line": 255, + "line": 257, "column": 55 }, "end": { - "line": 255, + "line": 257, "column": 61 }, "identifierName": "buffer" @@ -35032,29 +35240,29 @@ }, { "type": "ReturnStatement", - "start": 11321, - "end": 11337, + "start": 11388, + "end": 11404, "loc": { "start": { - "line": 256, + "line": 258, "column": 24 }, "end": { - "line": 256, + "line": 258, "column": 40 } }, "argument": { "type": "Identifier", - "start": 11328, - "end": 11336, + "start": 11395, + "end": 11403, "loc": { "start": { - "line": 256, + "line": 258, "column": 31 }, "end": { - "line": 256, + "line": 258, "column": 39 }, "identifierName": "arrayBuf" @@ -35069,15 +35277,15 @@ }, { "type": "ObjectProperty", - "start": 11381, - "end": 11386, + "start": 11448, + "end": 11453, "loc": { "start": { - "line": 258, + "line": 260, "column": 20 }, "end": { - "line": 258, + "line": 260, "column": 25 } }, @@ -35086,15 +35294,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11381, - "end": 11386, + "start": 11448, + "end": 11453, "loc": { "start": { - "line": 258, + "line": 260, "column": 20 }, "end": { - "line": 258, + "line": 260, "column": 25 }, "identifierName": "stats" @@ -35103,15 +35311,15 @@ }, "value": { "type": "Identifier", - "start": 11381, - "end": 11386, + "start": 11448, + "end": 11453, "loc": { "start": { - "line": 258, + "line": 260, "column": 20 }, "end": { - "line": 258, + "line": 260, "column": 25 }, "identifierName": "stats" @@ -35124,15 +35332,15 @@ }, { "type": "ObjectProperty", - "start": 11408, - "end": 11411, + "start": 11475, + "end": 11478, "loc": { "start": { - "line": 259, + "line": 261, "column": 20 }, "end": { - "line": 259, + "line": 261, "column": 23 } }, @@ -35141,15 +35349,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11408, - "end": 11411, + "start": 11475, + "end": 11478, "loc": { "start": { - "line": 259, + "line": 261, "column": 20 }, "end": { - "line": 259, + "line": 261, "column": 23 }, "identifierName": "log" @@ -35158,15 +35366,15 @@ }, "value": { "type": "Identifier", - "start": 11408, - "end": 11411, + "start": 11475, + "end": 11478, "loc": { "start": { - "line": 259, + "line": 261, "column": 20 }, "end": { - "line": 259, + "line": 261, "column": 23 }, "identifierName": "log" @@ -35184,15 +35392,15 @@ }, { "type": "BreakStatement", - "start": 11448, - "end": 11454, + "start": 11515, + "end": 11521, "loc": { "start": { - "line": 261, + "line": 263, "column": 16 }, "end": { - "line": 261, + "line": 263, "column": 22 } }, @@ -35201,15 +35409,15 @@ ], "test": { "type": "StringLiteral", - "start": 10524, - "end": 10530, + "start": 10591, + "end": 10597, "loc": { "start": { - "line": 240, + "line": 242, "column": 17 }, "end": { - "line": 240, + "line": 242, "column": 23 } }, @@ -35222,58 +35430,58 @@ }, { "type": "SwitchCase", - "start": 11468, - "end": 11821, + "start": 11535, + "end": 11888, "loc": { "start": { - "line": 263, + "line": 265, "column": 12 }, "end": { - "line": 274, + "line": 276, "column": 22 } }, "consequent": [ { "type": "ExpressionStatement", - "start": 11496, - "end": 11798, + "start": 11563, + "end": 11865, "loc": { "start": { - "line": 264, + "line": 266, "column": 16 }, "end": { - "line": 273, + "line": 275, "column": 19 } }, "expression": { "type": "CallExpression", - "start": 11496, - "end": 11797, + "start": 11563, + "end": 11864, "loc": { "start": { - "line": 264, + "line": 266, "column": 16 }, "end": { - "line": 273, + "line": 275, "column": 18 } }, "callee": { "type": "Identifier", - "start": 11496, - "end": 11503, + "start": 11563, + "end": 11570, "loc": { "start": { - "line": 264, + "line": 266, "column": 16 }, "end": { - "line": 264, + "line": 266, "column": 23 }, "identifierName": "convert" @@ -35283,15 +35491,15 @@ "arguments": [ { "type": "Identifier", - "start": 11504, - "end": 11524, + "start": 11571, + "end": 11591, "loc": { "start": { - "line": 264, + "line": 266, "column": 24 }, "end": { - "line": 264, + "line": 266, "column": 44 }, "identifierName": "parseIFCIntoXKTModel" @@ -35300,30 +35508,30 @@ }, { "type": "ObjectExpression", - "start": 11526, - "end": 11796, + "start": 11593, + "end": 11863, "loc": { "start": { - "line": 264, + "line": 266, "column": 46 }, "end": { - "line": 273, + "line": 275, "column": 17 } }, "properties": [ { "type": "ObjectProperty", - "start": 11548, - "end": 11554, + "start": 11615, + "end": 11621, "loc": { "start": { - "line": 265, + "line": 267, "column": 20 }, "end": { - "line": 265, + "line": 267, "column": 26 } }, @@ -35332,15 +35540,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11548, - "end": 11554, + "start": 11615, + "end": 11621, "loc": { "start": { - "line": 265, + "line": 267, "column": 20 }, "end": { - "line": 265, + "line": 267, "column": 26 }, "identifierName": "WebIFC" @@ -35349,15 +35557,15 @@ }, "value": { "type": "Identifier", - "start": 11548, - "end": 11554, + "start": 11615, + "end": 11621, "loc": { "start": { - "line": 265, + "line": 267, "column": 20 }, "end": { - "line": 265, + "line": 267, "column": 26 }, "identifierName": "WebIFC" @@ -35370,15 +35578,15 @@ }, { "type": "ObjectProperty", - "start": 11576, - "end": 11592, + "start": 11643, + "end": 11659, "loc": { "start": { - "line": 266, + "line": 268, "column": 20 }, "end": { - "line": 266, + "line": 268, "column": 36 } }, @@ -35387,15 +35595,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11576, - "end": 11580, + "start": 11643, + "end": 11647, "loc": { "start": { - "line": 266, + "line": 268, "column": 20 }, "end": { - "line": 266, + "line": 268, "column": 24 }, "identifierName": "data" @@ -35404,15 +35612,15 @@ }, "value": { "type": "Identifier", - "start": 11582, - "end": 11592, + "start": 11649, + "end": 11659, "loc": { "start": { - "line": 266, + "line": 268, "column": 26 }, "end": { - "line": 266, + "line": 268, "column": 36 }, "identifierName": "sourceData" @@ -35422,15 +35630,15 @@ }, { "type": "ObjectProperty", - "start": 11614, - "end": 11622, + "start": 11681, + "end": 11689, "loc": { "start": { - "line": 267, + "line": 269, "column": 20 }, "end": { - "line": 267, + "line": 269, "column": 28 } }, @@ -35439,15 +35647,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11614, - "end": 11622, + "start": 11681, + "end": 11689, "loc": { "start": { - "line": 267, + "line": 269, "column": 20 }, "end": { - "line": 267, + "line": 269, "column": 28 }, "identifierName": "xktModel" @@ -35456,15 +35664,15 @@ }, "value": { "type": "Identifier", - "start": 11614, - "end": 11622, + "start": 11681, + "end": 11689, "loc": { "start": { - "line": 267, + "line": 269, "column": 20 }, "end": { - "line": 267, + "line": 269, "column": 28 }, "identifierName": "xktModel" @@ -35477,15 +35685,15 @@ }, { "type": "ObjectProperty", - "start": 11644, - "end": 11658, + "start": 11711, + "end": 11725, "loc": { "start": { - "line": 268, + "line": 270, "column": 20 }, "end": { - "line": 268, + "line": 270, "column": 34 } }, @@ -35494,15 +35702,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11644, - "end": 11652, + "start": 11711, + "end": 11719, "loc": { "start": { - "line": 268, + "line": 270, "column": 20 }, "end": { - "line": 268, + "line": 270, "column": 28 }, "identifierName": "wasmPath" @@ -35511,15 +35719,15 @@ }, "value": { "type": "StringLiteral", - "start": 11654, - "end": 11658, + "start": 11721, + "end": 11725, "loc": { "start": { - "line": 268, + "line": 270, "column": 30 }, "end": { - "line": 268, + "line": 270, "column": 34 } }, @@ -35532,15 +35740,15 @@ }, { "type": "ObjectProperty", - "start": 11680, - "end": 11692, + "start": 11747, + "end": 11759, "loc": { "start": { - "line": 269, + "line": 271, "column": 20 }, "end": { - "line": 269, + "line": 271, "column": 32 } }, @@ -35549,15 +35757,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11680, - "end": 11692, + "start": 11747, + "end": 11759, "loc": { "start": { - "line": 269, + "line": 271, "column": 20 }, "end": { - "line": 269, + "line": 271, "column": 32 }, "identifierName": "includeTypes" @@ -35566,15 +35774,15 @@ }, "value": { "type": "Identifier", - "start": 11680, - "end": 11692, + "start": 11747, + "end": 11759, "loc": { "start": { - "line": 269, + "line": 271, "column": 20 }, "end": { - "line": 269, + "line": 271, "column": 32 }, "identifierName": "includeTypes" @@ -35587,15 +35795,15 @@ }, { "type": "ObjectProperty", - "start": 11714, - "end": 11726, + "start": 11781, + "end": 11793, "loc": { "start": { - "line": 270, + "line": 272, "column": 20 }, "end": { - "line": 270, + "line": 272, "column": 32 } }, @@ -35604,15 +35812,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11714, - "end": 11726, + "start": 11781, + "end": 11793, "loc": { "start": { - "line": 270, + "line": 272, "column": 20 }, "end": { - "line": 270, + "line": 272, "column": 32 }, "identifierName": "excludeTypes" @@ -35621,15 +35829,15 @@ }, "value": { "type": "Identifier", - "start": 11714, - "end": 11726, + "start": 11781, + "end": 11793, "loc": { "start": { - "line": 270, + "line": 272, "column": 20 }, "end": { - "line": 270, + "line": 272, "column": 32 }, "identifierName": "excludeTypes" @@ -35642,15 +35850,15 @@ }, { "type": "ObjectProperty", - "start": 11748, - "end": 11753, + "start": 11815, + "end": 11820, "loc": { "start": { - "line": 271, + "line": 273, "column": 20 }, "end": { - "line": 271, + "line": 273, "column": 25 } }, @@ -35659,15 +35867,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11748, - "end": 11753, + "start": 11815, + "end": 11820, "loc": { "start": { - "line": 271, + "line": 273, "column": 20 }, "end": { - "line": 271, + "line": 273, "column": 25 }, "identifierName": "stats" @@ -35676,15 +35884,15 @@ }, "value": { "type": "Identifier", - "start": 11748, - "end": 11753, + "start": 11815, + "end": 11820, "loc": { "start": { - "line": 271, + "line": 273, "column": 20 }, "end": { - "line": 271, + "line": 273, "column": 25 }, "identifierName": "stats" @@ -35697,15 +35905,15 @@ }, { "type": "ObjectProperty", - "start": 11775, - "end": 11778, + "start": 11842, + "end": 11845, "loc": { "start": { - "line": 272, + "line": 274, "column": 20 }, "end": { - "line": 272, + "line": 274, "column": 23 } }, @@ -35714,15 +35922,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11775, - "end": 11778, + "start": 11842, + "end": 11845, "loc": { "start": { - "line": 272, + "line": 274, "column": 20 }, "end": { - "line": 272, + "line": 274, "column": 23 }, "identifierName": "log" @@ -35731,15 +35939,15 @@ }, "value": { "type": "Identifier", - "start": 11775, - "end": 11778, + "start": 11842, + "end": 11845, "loc": { "start": { - "line": 272, + "line": 274, "column": 20 }, "end": { - "line": 272, + "line": 274, "column": 23 }, "identifierName": "log" @@ -35757,15 +35965,15 @@ }, { "type": "BreakStatement", - "start": 11815, - "end": 11821, + "start": 11882, + "end": 11888, "loc": { "start": { - "line": 274, + "line": 276, "column": 16 }, "end": { - "line": 274, + "line": 276, "column": 22 } }, @@ -35774,15 +35982,15 @@ ], "test": { "type": "StringLiteral", - "start": 11473, - "end": 11478, + "start": 11540, + "end": 11545, "loc": { "start": { - "line": 263, + "line": 265, "column": 17 }, "end": { - "line": 263, + "line": 265, "column": 22 } }, @@ -35795,58 +36003,58 @@ }, { "type": "SwitchCase", - "start": 11835, - "end": 12341, + "start": 11902, + "end": 12408, "loc": { "start": { - "line": 276, + "line": 278, "column": 12 }, "end": { - "line": 288, + "line": 290, "column": 22 } }, "consequent": [ { "type": "ExpressionStatement", - "start": 11863, - "end": 12318, + "start": 11930, + "end": 12385, "loc": { "start": { - "line": 277, + "line": 279, "column": 16 }, "end": { - "line": 287, + "line": 289, "column": 19 } }, "expression": { "type": "CallExpression", - "start": 11863, - "end": 12317, + "start": 11930, + "end": 12384, "loc": { "start": { - "line": 277, + "line": 279, "column": 16 }, "end": { - "line": 287, + "line": 289, "column": 18 } }, "callee": { "type": "Identifier", - "start": 11863, - "end": 11870, + "start": 11930, + "end": 11937, "loc": { "start": { - "line": 277, + "line": 279, "column": 16 }, "end": { - "line": 277, + "line": 279, "column": 23 }, "identifierName": "convert" @@ -35856,15 +36064,15 @@ "arguments": [ { "type": "Identifier", - "start": 11871, - "end": 11891, + "start": 11938, + "end": 11958, "loc": { "start": { - "line": 277, + "line": 279, "column": 24 }, "end": { - "line": 277, + "line": 279, "column": 44 }, "identifierName": "parseLASIntoXKTModel" @@ -35873,30 +36081,30 @@ }, { "type": "ObjectExpression", - "start": 11893, - "end": 12316, + "start": 11960, + "end": 12383, "loc": { "start": { - "line": 277, + "line": 279, "column": 46 }, "end": { - "line": 287, + "line": 289, "column": 17 } }, "properties": [ { "type": "ObjectProperty", - "start": 11915, - "end": 11931, + "start": 11982, + "end": 11998, "loc": { "start": { - "line": 278, + "line": 280, "column": 20 }, "end": { - "line": 278, + "line": 280, "column": 36 } }, @@ -35905,15 +36113,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11915, - "end": 11919, + "start": 11982, + "end": 11986, "loc": { "start": { - "line": 278, + "line": 280, "column": 20 }, "end": { - "line": 278, + "line": 280, "column": 24 }, "identifierName": "data" @@ -35922,15 +36130,15 @@ }, "value": { "type": "Identifier", - "start": 11921, - "end": 11931, + "start": 11988, + "end": 11998, "loc": { "start": { - "line": 278, + "line": 280, "column": 26 }, "end": { - "line": 278, + "line": 280, "column": 36 }, "identifierName": "sourceData" @@ -35940,15 +36148,15 @@ }, { "type": "ObjectProperty", - "start": 11953, - "end": 11961, + "start": 12020, + "end": 12028, "loc": { "start": { - "line": 279, + "line": 281, "column": 20 }, "end": { - "line": 279, + "line": 281, "column": 28 } }, @@ -35957,15 +36165,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11953, - "end": 11961, + "start": 12020, + "end": 12028, "loc": { "start": { - "line": 279, + "line": 281, "column": 20 }, "end": { - "line": 279, + "line": 281, "column": 28 }, "identifierName": "xktModel" @@ -35974,15 +36182,15 @@ }, "value": { "type": "Identifier", - "start": 11953, - "end": 11961, + "start": 12020, + "end": 12028, "loc": { "start": { - "line": 279, + "line": 281, "column": 20 }, "end": { - "line": 279, + "line": 281, "column": 28 }, "identifierName": "xktModel" @@ -35995,15 +36203,15 @@ }, { "type": "ObjectProperty", - "start": 11983, - "end": 11988, + "start": 12050, + "end": 12055, "loc": { "start": { - "line": 280, + "line": 282, "column": 20 }, "end": { - "line": 280, + "line": 282, "column": 25 } }, @@ -36012,15 +36220,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 11983, - "end": 11988, + "start": 12050, + "end": 12055, "loc": { "start": { - "line": 280, + "line": 282, "column": 20 }, "end": { - "line": 280, + "line": 282, "column": 25 }, "identifierName": "stats" @@ -36029,15 +36237,15 @@ }, "value": { "type": "Identifier", - "start": 11983, - "end": 11988, + "start": 12050, + "end": 12055, "loc": { "start": { - "line": 280, + "line": 282, "column": 20 }, "end": { - "line": 280, + "line": 282, "column": 25 }, "identifierName": "stats" @@ -36050,15 +36258,15 @@ }, { "type": "ObjectProperty", - "start": 12010, - "end": 12036, + "start": 12077, + "end": 12103, "loc": { "start": { - "line": 281, + "line": 283, "column": 20 }, "end": { - "line": 281, + "line": 283, "column": 46 } }, @@ -36067,15 +36275,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12010, - "end": 12014, + "start": 12077, + "end": 12081, "loc": { "start": { - "line": 281, + "line": 283, "column": 20 }, "end": { - "line": 281, + "line": 283, "column": 24 }, "identifierName": "fp64" @@ -36084,29 +36292,29 @@ }, "value": { "type": "MemberExpression", - "start": 12016, - "end": 12036, + "start": 12083, + "end": 12103, "loc": { "start": { - "line": 281, + "line": 283, "column": 26 }, "end": { - "line": 281, + "line": 283, "column": 46 } }, "object": { "type": "Identifier", - "start": 12016, - "end": 12031, + "start": 12083, + "end": 12098, "loc": { "start": { - "line": 281, + "line": 283, "column": 26 }, "end": { - "line": 281, + "line": 283, "column": 41 }, "identifierName": "fileTypeConfigs" @@ -36115,15 +36323,15 @@ }, "property": { "type": "Identifier", - "start": 12032, - "end": 12036, + "start": 12099, + "end": 12103, "loc": { "start": { - "line": 281, + "line": 283, "column": 42 }, "end": { - "line": 281, + "line": 283, "column": 46 }, "identifierName": "fp64" @@ -36135,15 +36343,15 @@ }, { "type": "ObjectProperty", - "start": 12058, - "end": 12096, + "start": 12125, + "end": 12163, "loc": { "start": { - "line": 282, + "line": 284, "column": 20 }, "end": { - "line": 282, + "line": 284, "column": 58 } }, @@ -36152,15 +36360,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12058, - "end": 12068, + "start": 12125, + "end": 12135, "loc": { "start": { - "line": 282, + "line": 284, "column": 20 }, "end": { - "line": 282, + "line": 284, "column": 30 }, "identifierName": "colorDepth" @@ -36169,29 +36377,29 @@ }, "value": { "type": "MemberExpression", - "start": 12070, - "end": 12096, + "start": 12137, + "end": 12163, "loc": { "start": { - "line": 282, + "line": 284, "column": 32 }, "end": { - "line": 282, + "line": 284, "column": 58 } }, "object": { "type": "Identifier", - "start": 12070, - "end": 12085, + "start": 12137, + "end": 12152, "loc": { "start": { - "line": 282, + "line": 284, "column": 32 }, "end": { - "line": 282, + "line": 284, "column": 47 }, "identifierName": "fileTypeConfigs" @@ -36200,15 +36408,15 @@ }, "property": { "type": "Identifier", - "start": 12086, - "end": 12096, + "start": 12153, + "end": 12163, "loc": { "start": { - "line": 282, + "line": 284, "column": 48 }, "end": { - "line": 282, + "line": 284, "column": 58 }, "identifierName": "colorDepth" @@ -36220,15 +36428,15 @@ }, { "type": "ObjectProperty", - "start": 12118, - "end": 12148, + "start": 12185, + "end": 12215, "loc": { "start": { - "line": 283, + "line": 285, "column": 20 }, "end": { - "line": 283, + "line": 285, "column": 50 } }, @@ -36237,15 +36445,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12118, - "end": 12124, + "start": 12185, + "end": 12191, "loc": { "start": { - "line": 283, + "line": 285, "column": 20 }, "end": { - "line": 283, + "line": 285, "column": 26 }, "identifierName": "center" @@ -36254,29 +36462,29 @@ }, "value": { "type": "MemberExpression", - "start": 12126, - "end": 12148, + "start": 12193, + "end": 12215, "loc": { "start": { - "line": 283, + "line": 285, "column": 28 }, "end": { - "line": 283, + "line": 285, "column": 50 } }, "object": { "type": "Identifier", - "start": 12126, - "end": 12141, + "start": 12193, + "end": 12208, "loc": { "start": { - "line": 283, + "line": 285, "column": 28 }, "end": { - "line": 283, + "line": 285, "column": 43 }, "identifierName": "fileTypeConfigs" @@ -36285,15 +36493,15 @@ }, "property": { "type": "Identifier", - "start": 12142, - "end": 12148, + "start": 12209, + "end": 12215, "loc": { "start": { - "line": 283, + "line": 285, "column": 44 }, "end": { - "line": 283, + "line": 285, "column": 50 }, "identifierName": "center" @@ -36305,15 +36513,15 @@ }, { "type": "ObjectProperty", - "start": 12170, - "end": 12206, + "start": 12237, + "end": 12273, "loc": { "start": { - "line": 284, + "line": 286, "column": 20 }, "end": { - "line": 284, + "line": 286, "column": 56 } }, @@ -36322,15 +36530,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12170, - "end": 12179, + "start": 12237, + "end": 12246, "loc": { "start": { - "line": 284, + "line": 286, "column": 20 }, "end": { - "line": 284, + "line": 286, "column": 29 }, "identifierName": "transform" @@ -36339,29 +36547,29 @@ }, "value": { "type": "MemberExpression", - "start": 12181, - "end": 12206, + "start": 12248, + "end": 12273, "loc": { "start": { - "line": 284, + "line": 286, "column": 31 }, "end": { - "line": 284, + "line": 286, "column": 56 } }, "object": { "type": "Identifier", - "start": 12181, - "end": 12196, + "start": 12248, + "end": 12263, "loc": { "start": { - "line": 284, + "line": 286, "column": 31 }, "end": { - "line": 284, + "line": 286, "column": 46 }, "identifierName": "fileTypeConfigs" @@ -36370,15 +36578,15 @@ }, "property": { "type": "Identifier", - "start": 12197, - "end": 12206, + "start": 12264, + "end": 12273, "loc": { "start": { - "line": 284, + "line": 286, "column": 47 }, "end": { - "line": 284, + "line": 286, "column": 56 }, "identifierName": "transform" @@ -36390,15 +36598,15 @@ }, { "type": "ObjectProperty", - "start": 12228, - "end": 12273, + "start": 12295, + "end": 12340, "loc": { "start": { - "line": 285, + "line": 287, "column": 20 }, "end": { - "line": 285, + "line": 287, "column": 65 } }, @@ -36407,15 +36615,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12228, - "end": 12232, + "start": 12295, + "end": 12299, "loc": { "start": { - "line": 285, + "line": 287, "column": 20 }, "end": { - "line": 285, + "line": 287, "column": 24 }, "identifierName": "skip" @@ -36424,29 +36632,29 @@ }, "value": { "type": "CallExpression", - "start": 12234, - "end": 12273, + "start": 12301, + "end": 12340, "loc": { "start": { - "line": 285, + "line": 287, "column": 26 }, "end": { - "line": 285, + "line": 287, "column": 65 } }, "callee": { "type": "Identifier", - "start": 12234, - "end": 12248, + "start": 12301, + "end": 12315, "loc": { "start": { - "line": 285, + "line": 287, "column": 26 }, "end": { - "line": 285, + "line": 287, "column": 40 }, "identifierName": "overrideOption" @@ -36456,29 +36664,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 12249, - "end": 12269, + "start": 12316, + "end": 12336, "loc": { "start": { - "line": 285, + "line": 287, "column": 41 }, "end": { - "line": 285, + "line": 287, "column": 61 } }, "object": { "type": "Identifier", - "start": 12249, - "end": 12264, + "start": 12316, + "end": 12331, "loc": { "start": { - "line": 285, + "line": 287, "column": 41 }, "end": { - "line": 285, + "line": 287, "column": 56 }, "identifierName": "fileTypeConfigs" @@ -36487,15 +36695,15 @@ }, "property": { "type": "Identifier", - "start": 12265, - "end": 12269, + "start": 12332, + "end": 12336, "loc": { "start": { - "line": 285, + "line": 287, "column": 57 }, "end": { - "line": 285, + "line": 287, "column": 61 }, "identifierName": "skip" @@ -36506,15 +36714,15 @@ }, { "type": "NumericLiteral", - "start": 12271, - "end": 12272, + "start": 12338, + "end": 12339, "loc": { "start": { - "line": 285, + "line": 287, "column": 63 }, "end": { - "line": 285, + "line": 287, "column": 64 } }, @@ -36529,15 +36737,15 @@ }, { "type": "ObjectProperty", - "start": 12295, - "end": 12298, + "start": 12362, + "end": 12365, "loc": { "start": { - "line": 286, + "line": 288, "column": 20 }, "end": { - "line": 286, + "line": 288, "column": 23 } }, @@ -36546,15 +36754,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12295, - "end": 12298, + "start": 12362, + "end": 12365, "loc": { "start": { - "line": 286, + "line": 288, "column": 20 }, "end": { - "line": 286, + "line": 288, "column": 23 }, "identifierName": "log" @@ -36563,15 +36771,15 @@ }, "value": { "type": "Identifier", - "start": 12295, - "end": 12298, + "start": 12362, + "end": 12365, "loc": { "start": { - "line": 286, + "line": 288, "column": 20 }, "end": { - "line": 286, + "line": 288, "column": 23 }, "identifierName": "log" @@ -36589,15 +36797,15 @@ }, { "type": "BreakStatement", - "start": 12335, - "end": 12341, + "start": 12402, + "end": 12408, "loc": { "start": { - "line": 288, + "line": 290, "column": 16 }, "end": { - "line": 288, + "line": 290, "column": 22 } }, @@ -36606,15 +36814,15 @@ ], "test": { "type": "StringLiteral", - "start": 11840, - "end": 11845, + "start": 11907, + "end": 11912, "loc": { "start": { - "line": 276, + "line": 278, "column": 17 }, "end": { - "line": 276, + "line": 278, "column": 22 } }, @@ -36627,58 +36835,58 @@ }, { "type": "SwitchCase", - "start": 12355, - "end": 12861, + "start": 12422, + "end": 12928, "loc": { "start": { - "line": 290, + "line": 292, "column": 12 }, "end": { - "line": 302, + "line": 304, "column": 22 } }, "consequent": [ { "type": "ExpressionStatement", - "start": 12383, - "end": 12838, + "start": 12450, + "end": 12905, "loc": { "start": { - "line": 291, + "line": 293, "column": 16 }, "end": { - "line": 301, + "line": 303, "column": 19 } }, "expression": { "type": "CallExpression", - "start": 12383, - "end": 12837, + "start": 12450, + "end": 12904, "loc": { "start": { - "line": 291, + "line": 293, "column": 16 }, "end": { - "line": 301, + "line": 303, "column": 18 } }, "callee": { "type": "Identifier", - "start": 12383, - "end": 12390, + "start": 12450, + "end": 12457, "loc": { "start": { - "line": 291, + "line": 293, "column": 16 }, "end": { - "line": 291, + "line": 293, "column": 23 }, "identifierName": "convert" @@ -36688,15 +36896,15 @@ "arguments": [ { "type": "Identifier", - "start": 12391, - "end": 12411, + "start": 12458, + "end": 12478, "loc": { "start": { - "line": 291, + "line": 293, "column": 24 }, "end": { - "line": 291, + "line": 293, "column": 44 }, "identifierName": "parseLASIntoXKTModel" @@ -36705,30 +36913,30 @@ }, { "type": "ObjectExpression", - "start": 12413, - "end": 12836, + "start": 12480, + "end": 12903, "loc": { "start": { - "line": 291, + "line": 293, "column": 46 }, "end": { - "line": 301, + "line": 303, "column": 17 } }, "properties": [ { "type": "ObjectProperty", - "start": 12435, - "end": 12451, + "start": 12502, + "end": 12518, "loc": { "start": { - "line": 292, + "line": 294, "column": 20 }, "end": { - "line": 292, + "line": 294, "column": 36 } }, @@ -36737,15 +36945,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12435, - "end": 12439, + "start": 12502, + "end": 12506, "loc": { "start": { - "line": 292, + "line": 294, "column": 20 }, "end": { - "line": 292, + "line": 294, "column": 24 }, "identifierName": "data" @@ -36754,15 +36962,15 @@ }, "value": { "type": "Identifier", - "start": 12441, - "end": 12451, + "start": 12508, + "end": 12518, "loc": { "start": { - "line": 292, + "line": 294, "column": 26 }, "end": { - "line": 292, + "line": 294, "column": 36 }, "identifierName": "sourceData" @@ -36772,15 +36980,15 @@ }, { "type": "ObjectProperty", - "start": 12473, - "end": 12481, + "start": 12540, + "end": 12548, "loc": { "start": { - "line": 293, + "line": 295, "column": 20 }, "end": { - "line": 293, + "line": 295, "column": 28 } }, @@ -36789,15 +36997,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12473, - "end": 12481, + "start": 12540, + "end": 12548, "loc": { "start": { - "line": 293, + "line": 295, "column": 20 }, "end": { - "line": 293, + "line": 295, "column": 28 }, "identifierName": "xktModel" @@ -36806,15 +37014,15 @@ }, "value": { "type": "Identifier", - "start": 12473, - "end": 12481, + "start": 12540, + "end": 12548, "loc": { "start": { - "line": 293, + "line": 295, "column": 20 }, "end": { - "line": 293, + "line": 295, "column": 28 }, "identifierName": "xktModel" @@ -36827,15 +37035,15 @@ }, { "type": "ObjectProperty", - "start": 12503, - "end": 12508, + "start": 12570, + "end": 12575, "loc": { "start": { - "line": 294, + "line": 296, "column": 20 }, "end": { - "line": 294, + "line": 296, "column": 25 } }, @@ -36844,15 +37052,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12503, - "end": 12508, + "start": 12570, + "end": 12575, "loc": { "start": { - "line": 294, + "line": 296, "column": 20 }, "end": { - "line": 294, + "line": 296, "column": 25 }, "identifierName": "stats" @@ -36861,15 +37069,15 @@ }, "value": { "type": "Identifier", - "start": 12503, - "end": 12508, + "start": 12570, + "end": 12575, "loc": { "start": { - "line": 294, + "line": 296, "column": 20 }, "end": { - "line": 294, + "line": 296, "column": 25 }, "identifierName": "stats" @@ -36882,15 +37090,15 @@ }, { "type": "ObjectProperty", - "start": 12530, - "end": 12556, + "start": 12597, + "end": 12623, "loc": { "start": { - "line": 295, + "line": 297, "column": 20 }, "end": { - "line": 295, + "line": 297, "column": 46 } }, @@ -36899,15 +37107,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12530, - "end": 12534, + "start": 12597, + "end": 12601, "loc": { "start": { - "line": 295, + "line": 297, "column": 20 }, "end": { - "line": 295, + "line": 297, "column": 24 }, "identifierName": "fp64" @@ -36916,29 +37124,29 @@ }, "value": { "type": "MemberExpression", - "start": 12536, - "end": 12556, + "start": 12603, + "end": 12623, "loc": { "start": { - "line": 295, + "line": 297, "column": 26 }, "end": { - "line": 295, + "line": 297, "column": 46 } }, "object": { "type": "Identifier", - "start": 12536, - "end": 12551, + "start": 12603, + "end": 12618, "loc": { "start": { - "line": 295, + "line": 297, "column": 26 }, "end": { - "line": 295, + "line": 297, "column": 41 }, "identifierName": "fileTypeConfigs" @@ -36947,15 +37155,15 @@ }, "property": { "type": "Identifier", - "start": 12552, - "end": 12556, + "start": 12619, + "end": 12623, "loc": { "start": { - "line": 295, + "line": 297, "column": 42 }, "end": { - "line": 295, + "line": 297, "column": 46 }, "identifierName": "fp64" @@ -36967,15 +37175,15 @@ }, { "type": "ObjectProperty", - "start": 12578, - "end": 12616, + "start": 12645, + "end": 12683, "loc": { "start": { - "line": 296, + "line": 298, "column": 20 }, "end": { - "line": 296, + "line": 298, "column": 58 } }, @@ -36984,15 +37192,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12578, - "end": 12588, + "start": 12645, + "end": 12655, "loc": { "start": { - "line": 296, + "line": 298, "column": 20 }, "end": { - "line": 296, + "line": 298, "column": 30 }, "identifierName": "colorDepth" @@ -37001,29 +37209,29 @@ }, "value": { "type": "MemberExpression", - "start": 12590, - "end": 12616, + "start": 12657, + "end": 12683, "loc": { "start": { - "line": 296, + "line": 298, "column": 32 }, "end": { - "line": 296, + "line": 298, "column": 58 } }, "object": { "type": "Identifier", - "start": 12590, - "end": 12605, + "start": 12657, + "end": 12672, "loc": { "start": { - "line": 296, + "line": 298, "column": 32 }, "end": { - "line": 296, + "line": 298, "column": 47 }, "identifierName": "fileTypeConfigs" @@ -37032,15 +37240,15 @@ }, "property": { "type": "Identifier", - "start": 12606, - "end": 12616, + "start": 12673, + "end": 12683, "loc": { "start": { - "line": 296, + "line": 298, "column": 48 }, "end": { - "line": 296, + "line": 298, "column": 58 }, "identifierName": "colorDepth" @@ -37052,15 +37260,15 @@ }, { "type": "ObjectProperty", - "start": 12638, - "end": 12668, + "start": 12705, + "end": 12735, "loc": { "start": { - "line": 297, + "line": 299, "column": 20 }, "end": { - "line": 297, + "line": 299, "column": 50 } }, @@ -37069,15 +37277,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12638, - "end": 12644, + "start": 12705, + "end": 12711, "loc": { "start": { - "line": 297, + "line": 299, "column": 20 }, "end": { - "line": 297, + "line": 299, "column": 26 }, "identifierName": "center" @@ -37086,29 +37294,29 @@ }, "value": { "type": "MemberExpression", - "start": 12646, - "end": 12668, + "start": 12713, + "end": 12735, "loc": { "start": { - "line": 297, + "line": 299, "column": 28 }, "end": { - "line": 297, + "line": 299, "column": 50 } }, "object": { "type": "Identifier", - "start": 12646, - "end": 12661, + "start": 12713, + "end": 12728, "loc": { "start": { - "line": 297, + "line": 299, "column": 28 }, "end": { - "line": 297, + "line": 299, "column": 43 }, "identifierName": "fileTypeConfigs" @@ -37117,15 +37325,15 @@ }, "property": { "type": "Identifier", - "start": 12662, - "end": 12668, + "start": 12729, + "end": 12735, "loc": { "start": { - "line": 297, + "line": 299, "column": 44 }, "end": { - "line": 297, + "line": 299, "column": 50 }, "identifierName": "center" @@ -37137,15 +37345,15 @@ }, { "type": "ObjectProperty", - "start": 12690, - "end": 12726, + "start": 12757, + "end": 12793, "loc": { "start": { - "line": 298, + "line": 300, "column": 20 }, "end": { - "line": 298, + "line": 300, "column": 56 } }, @@ -37154,15 +37362,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12690, - "end": 12699, + "start": 12757, + "end": 12766, "loc": { "start": { - "line": 298, + "line": 300, "column": 20 }, "end": { - "line": 298, + "line": 300, "column": 29 }, "identifierName": "transform" @@ -37171,29 +37379,29 @@ }, "value": { "type": "MemberExpression", - "start": 12701, - "end": 12726, + "start": 12768, + "end": 12793, "loc": { "start": { - "line": 298, + "line": 300, "column": 31 }, "end": { - "line": 298, + "line": 300, "column": 56 } }, "object": { "type": "Identifier", - "start": 12701, - "end": 12716, + "start": 12768, + "end": 12783, "loc": { "start": { - "line": 298, + "line": 300, "column": 31 }, "end": { - "line": 298, + "line": 300, "column": 46 }, "identifierName": "fileTypeConfigs" @@ -37202,15 +37410,15 @@ }, "property": { "type": "Identifier", - "start": 12717, - "end": 12726, + "start": 12784, + "end": 12793, "loc": { "start": { - "line": 298, + "line": 300, "column": 47 }, "end": { - "line": 298, + "line": 300, "column": 56 }, "identifierName": "transform" @@ -37222,15 +37430,15 @@ }, { "type": "ObjectProperty", - "start": 12748, - "end": 12793, + "start": 12815, + "end": 12860, "loc": { "start": { - "line": 299, + "line": 301, "column": 20 }, "end": { - "line": 299, + "line": 301, "column": 65 } }, @@ -37239,15 +37447,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12748, - "end": 12752, + "start": 12815, + "end": 12819, "loc": { "start": { - "line": 299, + "line": 301, "column": 20 }, "end": { - "line": 299, + "line": 301, "column": 24 }, "identifierName": "skip" @@ -37256,29 +37464,29 @@ }, "value": { "type": "CallExpression", - "start": 12754, - "end": 12793, + "start": 12821, + "end": 12860, "loc": { "start": { - "line": 299, + "line": 301, "column": 26 }, "end": { - "line": 299, + "line": 301, "column": 65 } }, "callee": { "type": "Identifier", - "start": 12754, - "end": 12768, + "start": 12821, + "end": 12835, "loc": { "start": { - "line": 299, + "line": 301, "column": 26 }, "end": { - "line": 299, + "line": 301, "column": 40 }, "identifierName": "overrideOption" @@ -37288,29 +37496,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 12769, - "end": 12789, + "start": 12836, + "end": 12856, "loc": { "start": { - "line": 299, + "line": 301, "column": 41 }, "end": { - "line": 299, + "line": 301, "column": 61 } }, "object": { "type": "Identifier", - "start": 12769, - "end": 12784, + "start": 12836, + "end": 12851, "loc": { "start": { - "line": 299, + "line": 301, "column": 41 }, "end": { - "line": 299, + "line": 301, "column": 56 }, "identifierName": "fileTypeConfigs" @@ -37319,15 +37527,15 @@ }, "property": { "type": "Identifier", - "start": 12785, - "end": 12789, + "start": 12852, + "end": 12856, "loc": { "start": { - "line": 299, + "line": 301, "column": 57 }, "end": { - "line": 299, + "line": 301, "column": 61 }, "identifierName": "skip" @@ -37338,15 +37546,15 @@ }, { "type": "NumericLiteral", - "start": 12791, - "end": 12792, + "start": 12858, + "end": 12859, "loc": { "start": { - "line": 299, + "line": 301, "column": 63 }, "end": { - "line": 299, + "line": 301, "column": 64 } }, @@ -37361,15 +37569,15 @@ }, { "type": "ObjectProperty", - "start": 12815, - "end": 12818, + "start": 12882, + "end": 12885, "loc": { "start": { - "line": 300, + "line": 302, "column": 20 }, "end": { - "line": 300, + "line": 302, "column": 23 } }, @@ -37378,15 +37586,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12815, - "end": 12818, + "start": 12882, + "end": 12885, "loc": { "start": { - "line": 300, + "line": 302, "column": 20 }, "end": { - "line": 300, + "line": 302, "column": 23 }, "identifierName": "log" @@ -37395,15 +37603,15 @@ }, "value": { "type": "Identifier", - "start": 12815, - "end": 12818, + "start": 12882, + "end": 12885, "loc": { "start": { - "line": 300, + "line": 302, "column": 20 }, "end": { - "line": 300, + "line": 302, "column": 23 }, "identifierName": "log" @@ -37421,15 +37629,15 @@ }, { "type": "BreakStatement", - "start": 12855, - "end": 12861, + "start": 12922, + "end": 12928, "loc": { "start": { - "line": 302, + "line": 304, "column": 16 }, "end": { - "line": 302, + "line": 304, "column": 22 } }, @@ -37438,15 +37646,15 @@ ], "test": { "type": "StringLiteral", - "start": 12360, - "end": 12365, + "start": 12427, + "end": 12432, "loc": { "start": { - "line": 290, + "line": 292, "column": 17 }, "end": { - "line": 290, + "line": 292, "column": 22 } }, @@ -37459,58 +37667,58 @@ }, { "type": "SwitchCase", - "start": 12875, - "end": 13096, + "start": 12942, + "end": 13163, "loc": { "start": { - "line": 304, + "line": 306, "column": 12 }, "end": { - "line": 311, + "line": 313, "column": 22 } }, "consequent": [ { "type": "ExpressionStatement", - "start": 12903, - "end": 13073, + "start": 12970, + "end": 13140, "loc": { "start": { - "line": 305, + "line": 307, "column": 16 }, "end": { - "line": 310, + "line": 312, "column": 19 } }, "expression": { "type": "CallExpression", - "start": 12903, - "end": 13072, + "start": 12970, + "end": 13139, "loc": { "start": { - "line": 305, + "line": 307, "column": 16 }, "end": { - "line": 310, + "line": 312, "column": 18 } }, "callee": { "type": "Identifier", - "start": 12903, - "end": 12910, + "start": 12970, + "end": 12977, "loc": { "start": { - "line": 305, + "line": 307, "column": 16 }, "end": { - "line": 305, + "line": 307, "column": 23 }, "identifierName": "convert" @@ -37520,15 +37728,15 @@ "arguments": [ { "type": "Identifier", - "start": 12911, - "end": 12931, + "start": 12978, + "end": 12998, "loc": { "start": { - "line": 305, + "line": 307, "column": 24 }, "end": { - "line": 305, + "line": 307, "column": 44 }, "identifierName": "parsePCDIntoXKTModel" @@ -37537,30 +37745,30 @@ }, { "type": "ObjectExpression", - "start": 12933, - "end": 13071, + "start": 13000, + "end": 13138, "loc": { "start": { - "line": 305, + "line": 307, "column": 46 }, "end": { - "line": 310, + "line": 312, "column": 17 } }, "properties": [ { "type": "ObjectProperty", - "start": 12955, - "end": 12971, + "start": 13022, + "end": 13038, "loc": { "start": { - "line": 306, + "line": 308, "column": 20 }, "end": { - "line": 306, + "line": 308, "column": 36 } }, @@ -37569,15 +37777,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12955, - "end": 12959, + "start": 13022, + "end": 13026, "loc": { "start": { - "line": 306, + "line": 308, "column": 20 }, "end": { - "line": 306, + "line": 308, "column": 24 }, "identifierName": "data" @@ -37586,15 +37794,15 @@ }, "value": { "type": "Identifier", - "start": 12961, - "end": 12971, + "start": 13028, + "end": 13038, "loc": { "start": { - "line": 306, + "line": 308, "column": 26 }, "end": { - "line": 306, + "line": 308, "column": 36 }, "identifierName": "sourceData" @@ -37604,15 +37812,15 @@ }, { "type": "ObjectProperty", - "start": 12993, - "end": 13001, + "start": 13060, + "end": 13068, "loc": { "start": { - "line": 307, + "line": 309, "column": 20 }, "end": { - "line": 307, + "line": 309, "column": 28 } }, @@ -37621,15 +37829,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 12993, - "end": 13001, + "start": 13060, + "end": 13068, "loc": { "start": { - "line": 307, + "line": 309, "column": 20 }, "end": { - "line": 307, + "line": 309, "column": 28 }, "identifierName": "xktModel" @@ -37638,15 +37846,15 @@ }, "value": { "type": "Identifier", - "start": 12993, - "end": 13001, + "start": 13060, + "end": 13068, "loc": { "start": { - "line": 307, + "line": 309, "column": 20 }, "end": { - "line": 307, + "line": 309, "column": 28 }, "identifierName": "xktModel" @@ -37659,15 +37867,15 @@ }, { "type": "ObjectProperty", - "start": 13023, - "end": 13028, + "start": 13090, + "end": 13095, "loc": { "start": { - "line": 308, + "line": 310, "column": 20 }, "end": { - "line": 308, + "line": 310, "column": 25 } }, @@ -37676,15 +37884,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 13023, - "end": 13028, + "start": 13090, + "end": 13095, "loc": { "start": { - "line": 308, + "line": 310, "column": 20 }, "end": { - "line": 308, + "line": 310, "column": 25 }, "identifierName": "stats" @@ -37693,15 +37901,15 @@ }, "value": { "type": "Identifier", - "start": 13023, - "end": 13028, + "start": 13090, + "end": 13095, "loc": { "start": { - "line": 308, + "line": 310, "column": 20 }, "end": { - "line": 308, + "line": 310, "column": 25 }, "identifierName": "stats" @@ -37714,15 +37922,15 @@ }, { "type": "ObjectProperty", - "start": 13050, - "end": 13053, + "start": 13117, + "end": 13120, "loc": { "start": { - "line": 309, + "line": 311, "column": 20 }, "end": { - "line": 309, + "line": 311, "column": 23 } }, @@ -37731,15 +37939,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 13050, - "end": 13053, + "start": 13117, + "end": 13120, "loc": { "start": { - "line": 309, + "line": 311, "column": 20 }, "end": { - "line": 309, + "line": 311, "column": 23 }, "identifierName": "log" @@ -37748,15 +37956,15 @@ }, "value": { "type": "Identifier", - "start": 13050, - "end": 13053, + "start": 13117, + "end": 13120, "loc": { "start": { - "line": 309, + "line": 311, "column": 20 }, "end": { - "line": 309, + "line": 311, "column": 23 }, "identifierName": "log" @@ -37774,15 +37982,15 @@ }, { "type": "BreakStatement", - "start": 13090, - "end": 13096, + "start": 13157, + "end": 13163, "loc": { "start": { - "line": 311, + "line": 313, "column": 16 }, "end": { - "line": 311, + "line": 313, "column": 22 } }, @@ -37791,15 +37999,15 @@ ], "test": { "type": "StringLiteral", - "start": 12880, - "end": 12885, + "start": 12947, + "end": 12952, "loc": { "start": { - "line": 304, + "line": 306, "column": 17 }, "end": { - "line": 304, + "line": 306, "column": 22 } }, @@ -37812,58 +38020,58 @@ }, { "type": "SwitchCase", - "start": 13110, - "end": 13331, + "start": 13177, + "end": 13398, "loc": { "start": { - "line": 313, + "line": 315, "column": 12 }, "end": { - "line": 320, + "line": 322, "column": 22 } }, "consequent": [ { "type": "ExpressionStatement", - "start": 13138, - "end": 13308, + "start": 13205, + "end": 13375, "loc": { "start": { - "line": 314, + "line": 316, "column": 16 }, "end": { - "line": 319, + "line": 321, "column": 19 } }, "expression": { "type": "CallExpression", - "start": 13138, - "end": 13307, + "start": 13205, + "end": 13374, "loc": { "start": { - "line": 314, + "line": 316, "column": 16 }, "end": { - "line": 319, + "line": 321, "column": 18 } }, "callee": { "type": "Identifier", - "start": 13138, - "end": 13145, + "start": 13205, + "end": 13212, "loc": { "start": { - "line": 314, + "line": 316, "column": 16 }, "end": { - "line": 314, + "line": 316, "column": 23 }, "identifierName": "convert" @@ -37873,15 +38081,15 @@ "arguments": [ { "type": "Identifier", - "start": 13146, - "end": 13166, + "start": 13213, + "end": 13233, "loc": { "start": { - "line": 314, + "line": 316, "column": 24 }, "end": { - "line": 314, + "line": 316, "column": 44 }, "identifierName": "parsePLYIntoXKTModel" @@ -37890,30 +38098,30 @@ }, { "type": "ObjectExpression", - "start": 13168, - "end": 13306, + "start": 13235, + "end": 13373, "loc": { "start": { - "line": 314, + "line": 316, "column": 46 }, "end": { - "line": 319, + "line": 321, "column": 17 } }, "properties": [ { "type": "ObjectProperty", - "start": 13190, - "end": 13206, + "start": 13257, + "end": 13273, "loc": { "start": { - "line": 315, + "line": 317, "column": 20 }, "end": { - "line": 315, + "line": 317, "column": 36 } }, @@ -37922,15 +38130,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 13190, - "end": 13194, + "start": 13257, + "end": 13261, "loc": { "start": { - "line": 315, + "line": 317, "column": 20 }, "end": { - "line": 315, + "line": 317, "column": 24 }, "identifierName": "data" @@ -37939,15 +38147,15 @@ }, "value": { "type": "Identifier", - "start": 13196, - "end": 13206, + "start": 13263, + "end": 13273, "loc": { "start": { - "line": 315, + "line": 317, "column": 26 }, "end": { - "line": 315, + "line": 317, "column": 36 }, "identifierName": "sourceData" @@ -37957,15 +38165,15 @@ }, { "type": "ObjectProperty", - "start": 13228, - "end": 13236, + "start": 13295, + "end": 13303, "loc": { "start": { - "line": 316, + "line": 318, "column": 20 }, "end": { - "line": 316, + "line": 318, "column": 28 } }, @@ -37974,15 +38182,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 13228, - "end": 13236, + "start": 13295, + "end": 13303, "loc": { "start": { - "line": 316, + "line": 318, "column": 20 }, "end": { - "line": 316, + "line": 318, "column": 28 }, "identifierName": "xktModel" @@ -37991,15 +38199,15 @@ }, "value": { "type": "Identifier", - "start": 13228, - "end": 13236, + "start": 13295, + "end": 13303, "loc": { "start": { - "line": 316, + "line": 318, "column": 20 }, "end": { - "line": 316, + "line": 318, "column": 28 }, "identifierName": "xktModel" @@ -38012,15 +38220,15 @@ }, { "type": "ObjectProperty", - "start": 13258, - "end": 13263, + "start": 13325, + "end": 13330, "loc": { "start": { - "line": 317, + "line": 319, "column": 20 }, "end": { - "line": 317, + "line": 319, "column": 25 } }, @@ -38029,15 +38237,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 13258, - "end": 13263, + "start": 13325, + "end": 13330, "loc": { "start": { - "line": 317, + "line": 319, "column": 20 }, "end": { - "line": 317, + "line": 319, "column": 25 }, "identifierName": "stats" @@ -38046,15 +38254,15 @@ }, "value": { "type": "Identifier", - "start": 13258, - "end": 13263, + "start": 13325, + "end": 13330, "loc": { "start": { - "line": 317, + "line": 319, "column": 20 }, "end": { - "line": 317, + "line": 319, "column": 25 }, "identifierName": "stats" @@ -38067,15 +38275,15 @@ }, { "type": "ObjectProperty", - "start": 13285, - "end": 13288, + "start": 13352, + "end": 13355, "loc": { "start": { - "line": 318, + "line": 320, "column": 20 }, "end": { - "line": 318, + "line": 320, "column": 23 } }, @@ -38084,15 +38292,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 13285, - "end": 13288, + "start": 13352, + "end": 13355, "loc": { "start": { - "line": 318, + "line": 320, "column": 20 }, "end": { - "line": 318, + "line": 320, "column": 23 }, "identifierName": "log" @@ -38101,15 +38309,15 @@ }, "value": { "type": "Identifier", - "start": 13285, - "end": 13288, + "start": 13352, + "end": 13355, "loc": { "start": { - "line": 318, + "line": 320, "column": 20 }, "end": { - "line": 318, + "line": 320, "column": 23 }, "identifierName": "log" @@ -38127,15 +38335,15 @@ }, { "type": "BreakStatement", - "start": 13325, - "end": 13331, + "start": 13392, + "end": 13398, "loc": { "start": { - "line": 320, + "line": 322, "column": 16 }, "end": { - "line": 320, + "line": 322, "column": 22 } }, @@ -38144,15 +38352,15 @@ ], "test": { "type": "StringLiteral", - "start": 13115, - "end": 13120, + "start": 13182, + "end": 13187, "loc": { "start": { - "line": 313, + "line": 315, "column": 17 }, "end": { - "line": 313, + "line": 315, "column": 22 } }, @@ -38165,58 +38373,58 @@ }, { "type": "SwitchCase", - "start": 13345, - "end": 13566, + "start": 13412, + "end": 13633, "loc": { "start": { - "line": 322, + "line": 324, "column": 12 }, "end": { - "line": 329, + "line": 331, "column": 22 } }, "consequent": [ { "type": "ExpressionStatement", - "start": 13373, - "end": 13543, + "start": 13440, + "end": 13610, "loc": { "start": { - "line": 323, + "line": 325, "column": 16 }, "end": { - "line": 328, + "line": 330, "column": 19 } }, "expression": { "type": "CallExpression", - "start": 13373, - "end": 13542, + "start": 13440, + "end": 13609, "loc": { "start": { - "line": 323, + "line": 325, "column": 16 }, "end": { - "line": 328, + "line": 330, "column": 18 } }, "callee": { "type": "Identifier", - "start": 13373, - "end": 13380, + "start": 13440, + "end": 13447, "loc": { "start": { - "line": 323, + "line": 325, "column": 16 }, "end": { - "line": 323, + "line": 325, "column": 23 }, "identifierName": "convert" @@ -38226,15 +38434,15 @@ "arguments": [ { "type": "Identifier", - "start": 13381, - "end": 13401, + "start": 13448, + "end": 13468, "loc": { "start": { - "line": 323, + "line": 325, "column": 24 }, "end": { - "line": 323, + "line": 325, "column": 44 }, "identifierName": "parseSTLIntoXKTModel" @@ -38243,30 +38451,30 @@ }, { "type": "ObjectExpression", - "start": 13403, - "end": 13541, + "start": 13470, + "end": 13608, "loc": { "start": { - "line": 323, + "line": 325, "column": 46 }, "end": { - "line": 328, + "line": 330, "column": 17 } }, "properties": [ { "type": "ObjectProperty", - "start": 13425, - "end": 13441, + "start": 13492, + "end": 13508, "loc": { "start": { - "line": 324, + "line": 326, "column": 20 }, "end": { - "line": 324, + "line": 326, "column": 36 } }, @@ -38275,15 +38483,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 13425, - "end": 13429, + "start": 13492, + "end": 13496, "loc": { "start": { - "line": 324, + "line": 326, "column": 20 }, "end": { - "line": 324, + "line": 326, "column": 24 }, "identifierName": "data" @@ -38292,15 +38500,15 @@ }, "value": { "type": "Identifier", - "start": 13431, - "end": 13441, + "start": 13498, + "end": 13508, "loc": { "start": { - "line": 324, + "line": 326, "column": 26 }, "end": { - "line": 324, + "line": 326, "column": 36 }, "identifierName": "sourceData" @@ -38310,15 +38518,15 @@ }, { "type": "ObjectProperty", - "start": 13463, - "end": 13471, + "start": 13530, + "end": 13538, "loc": { "start": { - "line": 325, + "line": 327, "column": 20 }, "end": { - "line": 325, + "line": 327, "column": 28 } }, @@ -38327,15 +38535,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 13463, - "end": 13471, + "start": 13530, + "end": 13538, "loc": { "start": { - "line": 325, + "line": 327, "column": 20 }, "end": { - "line": 325, + "line": 327, "column": 28 }, "identifierName": "xktModel" @@ -38344,15 +38552,15 @@ }, "value": { "type": "Identifier", - "start": 13463, - "end": 13471, + "start": 13530, + "end": 13538, "loc": { "start": { - "line": 325, + "line": 327, "column": 20 }, "end": { - "line": 325, + "line": 327, "column": 28 }, "identifierName": "xktModel" @@ -38365,15 +38573,15 @@ }, { "type": "ObjectProperty", - "start": 13493, - "end": 13498, + "start": 13560, + "end": 13565, "loc": { "start": { - "line": 326, + "line": 328, "column": 20 }, "end": { - "line": 326, + "line": 328, "column": 25 } }, @@ -38382,15 +38590,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 13493, - "end": 13498, + "start": 13560, + "end": 13565, "loc": { "start": { - "line": 326, + "line": 328, "column": 20 }, "end": { - "line": 326, + "line": 328, "column": 25 }, "identifierName": "stats" @@ -38399,15 +38607,15 @@ }, "value": { "type": "Identifier", - "start": 13493, - "end": 13498, + "start": 13560, + "end": 13565, "loc": { "start": { - "line": 326, + "line": 328, "column": 20 }, "end": { - "line": 326, + "line": 328, "column": 25 }, "identifierName": "stats" @@ -38420,15 +38628,15 @@ }, { "type": "ObjectProperty", - "start": 13520, - "end": 13523, + "start": 13587, + "end": 13590, "loc": { "start": { - "line": 327, + "line": 329, "column": 20 }, "end": { - "line": 327, + "line": 329, "column": 23 } }, @@ -38437,15 +38645,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 13520, - "end": 13523, + "start": 13587, + "end": 13590, "loc": { "start": { - "line": 327, + "line": 329, "column": 20 }, "end": { - "line": 327, + "line": 329, "column": 23 }, "identifierName": "log" @@ -38454,15 +38662,15 @@ }, "value": { "type": "Identifier", - "start": 13520, - "end": 13523, + "start": 13587, + "end": 13590, "loc": { "start": { - "line": 327, + "line": 329, "column": 20 }, "end": { - "line": 327, + "line": 329, "column": 23 }, "identifierName": "log" @@ -38480,15 +38688,15 @@ }, { "type": "BreakStatement", - "start": 13560, - "end": 13566, + "start": 13627, + "end": 13633, "loc": { "start": { - "line": 329, + "line": 331, "column": 16 }, "end": { - "line": 329, + "line": 331, "column": 22 } }, @@ -38497,15 +38705,15 @@ ], "test": { "type": "StringLiteral", - "start": 13350, - "end": 13355, + "start": 13417, + "end": 13422, "loc": { "start": { - "line": 322, + "line": 324, "column": 17 }, "end": { - "line": 322, + "line": 324, "column": 22 } }, @@ -38518,58 +38726,58 @@ }, { "type": "SwitchCase", - "start": 13580, - "end": 13683, + "start": 13647, + "end": 13750, "loc": { "start": { - "line": 331, + "line": 333, "column": 12 }, "end": { - "line": 333, + "line": 335, "column": 23 } }, "consequent": [ { "type": "ExpressionStatement", - "start": 13605, - "end": 13659, + "start": 13672, + "end": 13726, "loc": { "start": { - "line": 332, + "line": 334, "column": 16 }, "end": { - "line": 332, + "line": 334, "column": 70 } }, "expression": { "type": "CallExpression", - "start": 13605, - "end": 13658, + "start": 13672, + "end": 13725, "loc": { "start": { - "line": 332, + "line": 334, "column": 16 }, "end": { - "line": 332, + "line": 334, "column": 69 } }, "callee": { "type": "Identifier", - "start": 13605, - "end": 13611, + "start": 13672, + "end": 13678, "loc": { "start": { - "line": 332, + "line": 334, "column": 16 }, "end": { - "line": 332, + "line": 334, "column": 22 }, "identifierName": "reject" @@ -38579,30 +38787,30 @@ "arguments": [ { "type": "TemplateLiteral", - "start": 13612, - "end": 13657, + "start": 13679, + "end": 13724, "loc": { "start": { - "line": 332, + "line": 334, "column": 23 }, "end": { - "line": 332, + "line": 334, "column": 68 } }, "expressions": [ { "type": "Identifier", - "start": 13650, - "end": 13653, + "start": 13717, + "end": 13720, "loc": { "start": { - "line": 332, + "line": 334, "column": 61 }, "end": { - "line": 332, + "line": 334, "column": 64 }, "identifierName": "ext" @@ -38613,15 +38821,15 @@ "quasis": [ { "type": "TemplateElement", - "start": 13613, - "end": 13648, + "start": 13680, + "end": 13715, "loc": { "start": { - "line": 332, + "line": 334, "column": 24 }, "end": { - "line": 332, + "line": 334, "column": 59 } }, @@ -38633,15 +38841,15 @@ }, { "type": "TemplateElement", - "start": 13654, - "end": 13656, + "start": 13721, + "end": 13723, "loc": { "start": { - "line": 332, + "line": 334, "column": 65 }, "end": { - "line": 332, + "line": 334, "column": 67 } }, @@ -38658,15 +38866,15 @@ }, { "type": "ReturnStatement", - "start": 13676, - "end": 13683, + "start": 13743, + "end": 13750, "loc": { "start": { - "line": 333, + "line": 335, "column": 16 }, "end": { - "line": 333, + "line": 335, "column": 23 } }, @@ -38679,29 +38887,29 @@ }, { "type": "FunctionDeclaration", - "start": 13703, - "end": 17242, + "start": 13770, + "end": 17309, "loc": { "start": { - "line": 336, + "line": 338, "column": 8 }, "end": { - "line": 412, + "line": 414, "column": 9 } }, "id": { "type": "Identifier", - "start": 13712, - "end": 13719, + "start": 13779, + "end": 13786, "loc": { "start": { - "line": 336, + "line": 338, "column": 17 }, "end": { - "line": 336, + "line": 338, "column": 24 }, "identifierName": "convert" @@ -38714,15 +38922,15 @@ "params": [ { "type": "Identifier", - "start": 13720, - "end": 13726, + "start": 13787, + "end": 13793, "loc": { "start": { - "line": 336, + "line": 338, "column": 25 }, "end": { - "line": 336, + "line": 338, "column": 31 }, "identifierName": "parser" @@ -38731,15 +38939,15 @@ }, { "type": "Identifier", - "start": 13728, - "end": 13743, + "start": 13795, + "end": 13810, "loc": { "start": { - "line": 336, + "line": 338, "column": 33 }, "end": { - "line": 336, + "line": 338, "column": 48 }, "identifierName": "converterParams" @@ -38749,86 +38957,86 @@ ], "body": { "type": "BlockStatement", - "start": 13745, - "end": 17242, + "start": 13812, + "end": 17309, "loc": { "start": { - "line": 336, + "line": 338, "column": 50 }, "end": { - "line": 412, + "line": 414, "column": 9 } }, "body": [ { "type": "ExpressionStatement", - "start": 13760, - "end": 17232, + "start": 13827, + "end": 17299, "loc": { "start": { - "line": 338, + "line": 340, "column": 12 }, "end": { - "line": 411, + "line": 413, "column": 15 } }, "expression": { "type": "CallExpression", - "start": 13760, - "end": 17231, + "start": 13827, + "end": 17298, "loc": { "start": { - "line": 338, + "line": 340, "column": 12 }, "end": { - "line": 411, + "line": 413, "column": 14 } }, "callee": { "type": "MemberExpression", - "start": 13760, - "end": 13788, + "start": 13827, + "end": 13855, "loc": { "start": { - "line": 338, + "line": 340, "column": 12 }, "end": { - "line": 338, + "line": 340, "column": 40 } }, "object": { "type": "CallExpression", - "start": 13760, - "end": 13783, + "start": 13827, + "end": 13850, "loc": { "start": { - "line": 338, + "line": 340, "column": 12 }, "end": { - "line": 338, + "line": 340, "column": 35 } }, "callee": { "type": "Identifier", - "start": 13760, - "end": 13766, + "start": 13827, + "end": 13833, "loc": { "start": { - "line": 338, + "line": 340, "column": 12 }, "end": { - "line": 338, + "line": 340, "column": 18 }, "identifierName": "parser" @@ -38838,15 +39046,15 @@ "arguments": [ { "type": "Identifier", - "start": 13767, - "end": 13782, + "start": 13834, + "end": 13849, "loc": { "start": { - "line": 338, + "line": 340, "column": 19 }, "end": { - "line": 338, + "line": 340, "column": 34 }, "identifierName": "converterParams" @@ -38857,15 +39065,15 @@ }, "property": { "type": "Identifier", - "start": 13784, - "end": 13788, + "start": 13851, + "end": 13855, "loc": { "start": { - "line": 338, + "line": 340, "column": 36 }, "end": { - "line": 338, + "line": 340, "column": 40 }, "identifierName": "then" @@ -38877,15 +39085,15 @@ "arguments": [ { "type": "ArrowFunctionExpression", - "start": 13789, - "end": 17175, + "start": 13856, + "end": 17242, "loc": { "start": { - "line": 338, + "line": 340, "column": 41 }, "end": { - "line": 409, + "line": 411, "column": 13 } }, @@ -38896,44 +39104,44 @@ "params": [], "body": { "type": "BlockStatement", - "start": 13795, - "end": 17175, + "start": 13862, + "end": 17242, "loc": { "start": { - "line": 338, + "line": 340, "column": 47 }, "end": { - "line": 409, + "line": 411, "column": 13 } }, "body": [ { "type": "IfStatement", - "start": 13814, - "end": 13910, + "start": 13881, + "end": 13977, "loc": { "start": { - "line": 340, + "line": 342, "column": 16 }, "end": { - "line": 342, + "line": 344, "column": 17 } }, "test": { "type": "UnaryExpression", - "start": 13818, - "end": 13832, + "start": 13885, + "end": 13899, "loc": { "start": { - "line": 340, + "line": 342, "column": 20 }, "end": { - "line": 340, + "line": 342, "column": 34 } }, @@ -38941,15 +39149,15 @@ "prefix": true, "argument": { "type": "Identifier", - "start": 13819, - "end": 13832, + "start": 13886, + "end": 13899, "loc": { "start": { - "line": 340, + "line": 342, "column": 21 }, "end": { - "line": 340, + "line": 342, "column": 34 }, "identifierName": "metaModelJSON" @@ -38962,72 +39170,72 @@ }, "consequent": { "type": "BlockStatement", - "start": 13834, - "end": 13910, + "start": 13901, + "end": 13977, "loc": { "start": { - "line": 340, + "line": 342, "column": 36 }, "end": { - "line": 342, + "line": 344, "column": 17 } }, "body": [ { "type": "ExpressionStatement", - "start": 13856, - "end": 13892, + "start": 13923, + "end": 13959, "loc": { "start": { - "line": 341, + "line": 343, "column": 20 }, "end": { - "line": 341, + "line": 343, "column": 56 } }, "expression": { "type": "CallExpression", - "start": 13856, - "end": 13891, + "start": 13923, + "end": 13958, "loc": { "start": { - "line": 341, + "line": 343, "column": 20 }, "end": { - "line": 341, + "line": 343, "column": 55 } }, "callee": { "type": "MemberExpression", - "start": 13856, - "end": 13889, + "start": 13923, + "end": 13956, "loc": { "start": { - "line": 341, + "line": 343, "column": 20 }, "end": { - "line": 341, + "line": 343, "column": 53 } }, "object": { "type": "Identifier", - "start": 13856, - "end": 13864, + "start": 13923, + "end": 13931, "loc": { "start": { - "line": 341, + "line": 343, "column": 20 }, "end": { - "line": 341, + "line": 343, "column": 28 }, "identifierName": "xktModel" @@ -39036,15 +39244,15 @@ }, "property": { "type": "Identifier", - "start": 13865, - "end": 13889, + "start": 13932, + "end": 13956, "loc": { "start": { - "line": 341, + "line": 343, "column": 29 }, "end": { - "line": 341, + "line": 343, "column": 53 }, "identifierName": "createDefaultMetaObjects" @@ -39063,43 +39271,43 @@ }, { "type": "ExpressionStatement", - "start": 13928, - "end": 13982, + "start": 13995, + "end": 14049, "loc": { "start": { - "line": 344, + "line": 346, "column": 16 }, "end": { - "line": 344, + "line": 346, "column": 70 } }, "expression": { "type": "CallExpression", - "start": 13928, - "end": 13981, + "start": 13995, + "end": 14048, "loc": { "start": { - "line": 344, + "line": 346, "column": 16 }, "end": { - "line": 344, + "line": 346, "column": 69 } }, "callee": { "type": "Identifier", - "start": 13928, - "end": 13931, + "start": 13995, + "end": 13998, "loc": { "start": { - "line": 344, + "line": 346, "column": 16 }, "end": { - "line": 344, + "line": 346, "column": 19 }, "identifierName": "log" @@ -39109,15 +39317,15 @@ "arguments": [ { "type": "StringLiteral", - "start": 13932, - "end": 13980, + "start": 13999, + "end": 14047, "loc": { "start": { - "line": 344, + "line": 346, "column": 20 }, "end": { - "line": 344, + "line": 346, "column": 68 } }, @@ -39132,85 +39340,85 @@ }, { "type": "ExpressionStatement", - "start": 14000, - "end": 17161, + "start": 14067, + "end": 17228, "loc": { "start": { - "line": 346, + "line": 348, "column": 16 }, "end": { - "line": 408, + "line": 410, "column": 19 } }, "expression": { "type": "CallExpression", - "start": 14000, - "end": 17160, + "start": 14067, + "end": 17227, "loc": { "start": { - "line": 346, + "line": 348, "column": 16 }, "end": { - "line": 408, + "line": 410, "column": 18 } }, "callee": { "type": "MemberExpression", - "start": 14000, - "end": 14024, + "start": 14067, + "end": 14091, "loc": { "start": { - "line": 346, + "line": 348, "column": 16 }, "end": { - "line": 346, + "line": 348, "column": 40 } }, "object": { "type": "CallExpression", - "start": 14000, - "end": 14019, + "start": 14067, + "end": 14086, "loc": { "start": { - "line": 346, + "line": 348, "column": 16 }, "end": { - "line": 346, + "line": 348, "column": 35 } }, "callee": { "type": "MemberExpression", - "start": 14000, - "end": 14017, + "start": 14067, + "end": 14084, "loc": { "start": { - "line": 346, + "line": 348, "column": 16 }, "end": { - "line": 346, + "line": 348, "column": 33 } }, "object": { "type": "Identifier", - "start": 14000, - "end": 14008, + "start": 14067, + "end": 14075, "loc": { "start": { - "line": 346, + "line": 348, "column": 16 }, "end": { - "line": 346, + "line": 348, "column": 24 }, "identifierName": "xktModel" @@ -39219,15 +39427,15 @@ }, "property": { "type": "Identifier", - "start": 14009, - "end": 14017, + "start": 14076, + "end": 14084, "loc": { "start": { - "line": 346, + "line": 348, "column": 25 }, "end": { - "line": 346, + "line": 348, "column": 33 }, "identifierName": "finalize" @@ -39240,15 +39448,15 @@ }, "property": { "type": "Identifier", - "start": 14020, - "end": 14024, + "start": 14087, + "end": 14091, "loc": { "start": { - "line": 346, + "line": 348, "column": 36 }, "end": { - "line": 346, + "line": 348, "column": 40 }, "identifierName": "then" @@ -39260,15 +39468,15 @@ "arguments": [ { "type": "ArrowFunctionExpression", - "start": 14025, - "end": 17159, + "start": 14092, + "end": 17226, "loc": { "start": { - "line": 346, + "line": 348, "column": 41 }, "end": { - "line": 408, + "line": 410, "column": 17 } }, @@ -39279,58 +39487,58 @@ "params": [], "body": { "type": "BlockStatement", - "start": 14031, - "end": 17159, + "start": 14098, + "end": 17226, "loc": { "start": { - "line": 346, + "line": 348, "column": 47 }, "end": { - "line": 408, + "line": 410, "column": 17 } }, "body": [ { "type": "ExpressionStatement", - "start": 14054, - "end": 14107, + "start": 14121, + "end": 14174, "loc": { "start": { - "line": 348, + "line": 350, "column": 20 }, "end": { - "line": 348, + "line": 350, "column": 73 } }, "expression": { "type": "CallExpression", - "start": 14054, - "end": 14106, + "start": 14121, + "end": 14173, "loc": { "start": { - "line": 348, + "line": 350, "column": 20 }, "end": { - "line": 348, + "line": 350, "column": 72 } }, "callee": { "type": "Identifier", - "start": 14054, - "end": 14057, + "start": 14121, + "end": 14124, "loc": { "start": { - "line": 348, + "line": 350, "column": 20 }, "end": { - "line": 348, + "line": 350, "column": 23 }, "identifierName": "log" @@ -39340,15 +39548,15 @@ "arguments": [ { "type": "StringLiteral", - "start": 14058, - "end": 14105, + "start": 14125, + "end": 14172, "loc": { "start": { - "line": 348, + "line": 350, "column": 24 }, "end": { - "line": 348, + "line": 350, "column": 71 } }, @@ -39363,44 +39571,44 @@ }, { "type": "VariableDeclaration", - "start": 14129, - "end": 14224, + "start": 14196, + "end": 14291, "loc": { "start": { - "line": 350, + "line": 352, "column": 20 }, "end": { - "line": 350, + "line": 352, "column": 115 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 14135, - "end": 14223, + "start": 14202, + "end": 14290, "loc": { "start": { - "line": 350, + "line": 352, "column": 26 }, "end": { - "line": 350, + "line": 352, "column": 114 } }, "id": { "type": "Identifier", - "start": 14135, - "end": 14149, + "start": 14202, + "end": 14216, "loc": { "start": { - "line": 350, + "line": 352, "column": 26 }, "end": { - "line": 350, + "line": 352, "column": 40 }, "identifierName": "xktArrayBuffer" @@ -39409,29 +39617,29 @@ }, "init": { "type": "CallExpression", - "start": 14152, - "end": 14223, + "start": 14219, + "end": 14290, "loc": { "start": { - "line": 350, + "line": 352, "column": 43 }, "end": { - "line": 350, + "line": 352, "column": 114 } }, "callee": { "type": "Identifier", - "start": 14152, - "end": 14178, + "start": 14219, + "end": 14245, "loc": { "start": { - "line": 350, + "line": 352, "column": 43 }, "end": { - "line": 350, + "line": 352, "column": 69 }, "identifierName": "writeXKTModelToArrayBuffer" @@ -39441,15 +39649,15 @@ "arguments": [ { "type": "Identifier", - "start": 14179, - "end": 14187, + "start": 14246, + "end": 14254, "loc": { "start": { - "line": 350, + "line": 352, "column": 70 }, "end": { - "line": 350, + "line": 352, "column": 78 }, "identifierName": "xktModel" @@ -39458,15 +39666,15 @@ }, { "type": "Identifier", - "start": 14189, - "end": 14202, + "start": 14256, + "end": 14269, "loc": { "start": { - "line": 350, + "line": 352, "column": 80 }, "end": { - "line": 350, + "line": 352, "column": 93 }, "identifierName": "metaModelJSON" @@ -39475,15 +39683,15 @@ }, { "type": "Identifier", - "start": 14204, - "end": 14209, + "start": 14271, + "end": 14276, "loc": { "start": { - "line": 350, + "line": 352, "column": 95 }, "end": { - "line": 350, + "line": 352, "column": 100 }, "identifierName": "stats" @@ -39492,30 +39700,30 @@ }, { "type": "ObjectExpression", - "start": 14211, - "end": 14222, + "start": 14278, + "end": 14289, "loc": { "start": { - "line": 350, + "line": 352, "column": 102 }, "end": { - "line": 350, + "line": 352, "column": 113 } }, "properties": [ { "type": "ObjectProperty", - "start": 14212, - "end": 14221, + "start": 14279, + "end": 14288, "loc": { "start": { - "line": 350, + "line": 352, "column": 103 }, "end": { - "line": 350, + "line": 352, "column": 112 } }, @@ -39524,15 +39732,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 14212, - "end": 14215, + "start": 14279, + "end": 14282, "loc": { "start": { - "line": 350, + "line": 352, "column": 103 }, "end": { - "line": 350, + "line": 352, "column": 106 }, "identifierName": "zip" @@ -39541,15 +39749,15 @@ }, "value": { "type": "BooleanLiteral", - "start": 14217, - "end": 14221, + "start": 14284, + "end": 14288, "loc": { "start": { - "line": 350, + "line": 352, "column": 108 }, "end": { - "line": 350, + "line": 352, "column": 112 } }, @@ -39566,44 +39774,44 @@ }, { "type": "VariableDeclaration", - "start": 14246, - "end": 14293, + "start": 14313, + "end": 14360, "loc": { "start": { - "line": 352, + "line": 354, "column": 20 }, "end": { - "line": 352, + "line": 354, "column": 67 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 14252, - "end": 14292, + "start": 14319, + "end": 14359, "loc": { "start": { - "line": 352, + "line": 354, "column": 26 }, "end": { - "line": 352, + "line": 354, "column": 66 } }, "id": { "type": "Identifier", - "start": 14252, - "end": 14262, + "start": 14319, + "end": 14329, "loc": { "start": { - "line": 352, + "line": 354, "column": 26 }, "end": { - "line": 352, + "line": 354, "column": 36 }, "identifierName": "xktContent" @@ -39612,43 +39820,43 @@ }, "init": { "type": "CallExpression", - "start": 14265, - "end": 14292, + "start": 14332, + "end": 14359, "loc": { "start": { - "line": 352, + "line": 354, "column": 39 }, "end": { - "line": 352, + "line": 354, "column": 66 } }, "callee": { "type": "MemberExpression", - "start": 14265, - "end": 14276, + "start": 14332, + "end": 14343, "loc": { "start": { - "line": 352, + "line": 354, "column": 39 }, "end": { - "line": 352, + "line": 354, "column": 50 } }, "object": { "type": "Identifier", - "start": 14265, - "end": 14271, + "start": 14332, + "end": 14338, "loc": { "start": { - "line": 352, + "line": 354, "column": 39 }, "end": { - "line": 352, + "line": 354, "column": 45 }, "identifierName": "Buffer" @@ -39657,15 +39865,15 @@ }, "property": { "type": "Identifier", - "start": 14272, - "end": 14276, + "start": 14339, + "end": 14343, "loc": { "start": { - "line": 352, + "line": 354, "column": 46 }, "end": { - "line": 352, + "line": 354, "column": 50 }, "identifierName": "from" @@ -39677,15 +39885,15 @@ "arguments": [ { "type": "Identifier", - "start": 14277, - "end": 14291, + "start": 14344, + "end": 14358, "loc": { "start": { - "line": 352, + "line": 354, "column": 51 }, "end": { - "line": 352, + "line": 354, "column": 65 }, "identifierName": "xktArrayBuffer" @@ -39700,44 +39908,44 @@ }, { "type": "VariableDeclaration", - "start": 14315, - "end": 14369, + "start": 14382, + "end": 14436, "loc": { "start": { - "line": 354, + "line": 356, "column": 20 }, "end": { - "line": 354, + "line": 356, "column": 74 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 14321, - "end": 14368, + "start": 14388, + "end": 14435, "loc": { "start": { - "line": 354, + "line": 356, "column": 26 }, "end": { - "line": 354, + "line": 356, "column": 73 } }, "id": { "type": "Identifier", - "start": 14321, - "end": 14340, + "start": 14388, + "end": 14407, "loc": { "start": { - "line": 354, + "line": 356, "column": 26 }, "end": { - "line": 354, + "line": 356, "column": 45 }, "identifierName": "targetFileSizeBytes" @@ -39746,29 +39954,29 @@ }, "init": { "type": "MemberExpression", - "start": 14343, - "end": 14368, + "start": 14410, + "end": 14435, "loc": { "start": { - "line": 354, + "line": 356, "column": 48 }, "end": { - "line": 354, + "line": 356, "column": 73 } }, "object": { "type": "Identifier", - "start": 14343, - "end": 14357, + "start": 14410, + "end": 14424, "loc": { "start": { - "line": 354, + "line": 356, "column": 48 }, "end": { - "line": 354, + "line": 356, "column": 62 }, "identifierName": "xktArrayBuffer" @@ -39777,15 +39985,15 @@ }, "property": { "type": "Identifier", - "start": 14358, - "end": 14368, + "start": 14425, + "end": 14435, "loc": { "start": { - "line": 354, + "line": 356, "column": 63 }, "end": { - "line": 354, + "line": 356, "column": 73 }, "identifierName": "byteLength" @@ -39800,58 +40008,58 @@ }, { "type": "ExpressionStatement", - "start": 14391, - "end": 14430, + "start": 14458, + "end": 14497, "loc": { "start": { - "line": 356, + "line": 358, "column": 20 }, "end": { - "line": 356, + "line": 358, "column": 59 } }, "expression": { "type": "AssignmentExpression", - "start": 14391, - "end": 14429, + "start": 14458, + "end": 14496, "loc": { "start": { - "line": 356, + "line": 358, "column": 20 }, "end": { - "line": 356, + "line": 358, "column": 58 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 14391, - "end": 14408, + "start": 14458, + "end": 14475, "loc": { "start": { - "line": 356, + "line": 358, "column": 20 }, "end": { - "line": 356, + "line": 358, "column": 37 } }, "object": { "type": "Identifier", - "start": 14391, - "end": 14396, + "start": 14458, + "end": 14463, "loc": { "start": { - "line": 356, + "line": 358, "column": 20 }, "end": { - "line": 356, + "line": 358, "column": 25 }, "identifierName": "stats" @@ -39860,15 +40068,15 @@ }, "property": { "type": "Identifier", - "start": 14397, - "end": 14408, + "start": 14464, + "end": 14475, "loc": { "start": { - "line": 356, + "line": 358, "column": 26 }, "end": { - "line": 356, + "line": 358, "column": 37 }, "identifierName": "minTileSize" @@ -39879,29 +40087,29 @@ }, "right": { "type": "LogicalExpression", - "start": 14411, - "end": 14429, + "start": 14478, + "end": 14496, "loc": { "start": { - "line": 356, + "line": 358, "column": 40 }, "end": { - "line": 356, + "line": 358, "column": 58 } }, "left": { "type": "Identifier", - "start": 14411, - "end": 14422, + "start": 14478, + "end": 14489, "loc": { "start": { - "line": 356, + "line": 358, "column": 40 }, "end": { - "line": 356, + "line": 358, "column": 51 }, "identifierName": "minTileSize" @@ -39911,15 +40119,15 @@ "operator": "||", "right": { "type": "NumericLiteral", - "start": 14426, - "end": 14429, + "start": 14493, + "end": 14496, "loc": { "start": { - "line": 356, + "line": 358, "column": 55 }, "end": { - "line": 356, + "line": 358, "column": 58 } }, @@ -39934,58 +40142,58 @@ }, { "type": "ExpressionStatement", - "start": 14451, - "end": 14510, + "start": 14518, + "end": 14577, "loc": { "start": { - "line": 357, + "line": 359, "column": 20 }, "end": { - "line": 357, + "line": 359, "column": 79 } }, "expression": { "type": "AssignmentExpression", - "start": 14451, - "end": 14509, + "start": 14518, + "end": 14576, "loc": { "start": { - "line": 357, + "line": 359, "column": 20 }, "end": { - "line": 357, + "line": 359, "column": 78 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 14451, - "end": 14467, + "start": 14518, + "end": 14534, "loc": { "start": { - "line": 357, + "line": 359, "column": 20 }, "end": { - "line": 357, + "line": 359, "column": 36 } }, "object": { "type": "Identifier", - "start": 14451, - "end": 14456, + "start": 14518, + "end": 14523, "loc": { "start": { - "line": 357, + "line": 359, "column": 20 }, "end": { - "line": 357, + "line": 359, "column": 25 }, "identifierName": "stats" @@ -39994,15 +40202,15 @@ }, "property": { "type": "Identifier", - "start": 14457, - "end": 14467, + "start": 14524, + "end": 14534, "loc": { "start": { - "line": 357, + "line": 359, "column": 26 }, "end": { - "line": 357, + "line": 359, "column": 36 }, "identifierName": "sourceSize" @@ -40013,57 +40221,57 @@ }, "right": { "type": "CallExpression", - "start": 14470, - "end": 14509, + "start": 14537, + "end": 14576, "loc": { "start": { - "line": 357, + "line": 359, "column": 39 }, "end": { - "line": 357, + "line": 359, "column": 78 } }, "callee": { "type": "MemberExpression", - "start": 14470, - "end": 14506, + "start": 14537, + "end": 14573, "loc": { "start": { - "line": 357, + "line": 359, "column": 39 }, "end": { - "line": 357, + "line": 359, "column": 75 } }, "object": { "type": "BinaryExpression", - "start": 14471, - "end": 14497, + "start": 14538, + "end": 14564, "loc": { "start": { - "line": 357, + "line": 359, "column": 40 }, "end": { - "line": 357, + "line": 359, "column": 66 } }, "left": { "type": "Identifier", - "start": 14471, - "end": 14490, + "start": 14538, + "end": 14557, "loc": { "start": { - "line": 357, + "line": 359, "column": 40 }, "end": { - "line": 357, + "line": 359, "column": 59 }, "identifierName": "sourceFileSizeBytes" @@ -40073,15 +40281,15 @@ "operator": "/", "right": { "type": "NumericLiteral", - "start": 14493, - "end": 14497, + "start": 14560, + "end": 14564, "loc": { "start": { - "line": 357, + "line": 359, "column": 62 }, "end": { - "line": 357, + "line": 359, "column": 66 } }, @@ -40093,20 +40301,20 @@ }, "extra": { "parenthesized": true, - "parenStart": 14470 + "parenStart": 14537 } }, "property": { "type": "Identifier", - "start": 14499, - "end": 14506, + "start": 14566, + "end": 14573, "loc": { "start": { - "line": 357, + "line": 359, "column": 68 }, "end": { - "line": 357, + "line": 359, "column": 75 }, "identifierName": "toFixed" @@ -40118,15 +40326,15 @@ "arguments": [ { "type": "NumericLiteral", - "start": 14507, - "end": 14508, + "start": 14574, + "end": 14575, "loc": { "start": { - "line": 357, + "line": 359, "column": 76 }, "end": { - "line": 357, + "line": 359, "column": 77 } }, @@ -40142,58 +40350,58 @@ }, { "type": "ExpressionStatement", - "start": 14531, - "end": 14587, + "start": 14598, + "end": 14654, "loc": { "start": { - "line": 358, + "line": 360, "column": 20 }, "end": { - "line": 358, + "line": 360, "column": 76 } }, "expression": { "type": "AssignmentExpression", - "start": 14531, - "end": 14586, + "start": 14598, + "end": 14653, "loc": { "start": { - "line": 358, + "line": 360, "column": 20 }, "end": { - "line": 358, + "line": 360, "column": 75 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 14531, - "end": 14544, + "start": 14598, + "end": 14611, "loc": { "start": { - "line": 358, + "line": 360, "column": 20 }, "end": { - "line": 358, + "line": 360, "column": 33 } }, "object": { "type": "Identifier", - "start": 14531, - "end": 14536, + "start": 14598, + "end": 14603, "loc": { "start": { - "line": 358, + "line": 360, "column": 20 }, "end": { - "line": 358, + "line": 360, "column": 25 }, "identifierName": "stats" @@ -40202,15 +40410,15 @@ }, "property": { "type": "Identifier", - "start": 14537, - "end": 14544, + "start": 14604, + "end": 14611, "loc": { "start": { - "line": 358, + "line": 360, "column": 26 }, "end": { - "line": 358, + "line": 360, "column": 33 }, "identifierName": "xktSize" @@ -40221,57 +40429,57 @@ }, "right": { "type": "CallExpression", - "start": 14547, - "end": 14586, + "start": 14614, + "end": 14653, "loc": { "start": { - "line": 358, + "line": 360, "column": 36 }, "end": { - "line": 358, + "line": 360, "column": 75 } }, "callee": { "type": "MemberExpression", - "start": 14547, - "end": 14583, + "start": 14614, + "end": 14650, "loc": { "start": { - "line": 358, + "line": 360, "column": 36 }, "end": { - "line": 358, + "line": 360, "column": 72 } }, "object": { "type": "BinaryExpression", - "start": 14548, - "end": 14574, + "start": 14615, + "end": 14641, "loc": { "start": { - "line": 358, + "line": 360, "column": 37 }, "end": { - "line": 358, + "line": 360, "column": 63 } }, "left": { "type": "Identifier", - "start": 14548, - "end": 14567, + "start": 14615, + "end": 14634, "loc": { "start": { - "line": 358, + "line": 360, "column": 37 }, "end": { - "line": 358, + "line": 360, "column": 56 }, "identifierName": "targetFileSizeBytes" @@ -40281,15 +40489,15 @@ "operator": "/", "right": { "type": "NumericLiteral", - "start": 14570, - "end": 14574, + "start": 14637, + "end": 14641, "loc": { "start": { - "line": 358, + "line": 360, "column": 59 }, "end": { - "line": 358, + "line": 360, "column": 63 } }, @@ -40301,20 +40509,20 @@ }, "extra": { "parenthesized": true, - "parenStart": 14547 + "parenStart": 14614 } }, "property": { "type": "Identifier", - "start": 14576, - "end": 14583, + "start": 14643, + "end": 14650, "loc": { "start": { - "line": 358, + "line": 360, "column": 65 }, "end": { - "line": 358, + "line": 360, "column": 72 }, "identifierName": "toFixed" @@ -40326,15 +40534,15 @@ "arguments": [ { "type": "NumericLiteral", - "start": 14584, - "end": 14585, + "start": 14651, + "end": 14652, "loc": { "start": { - "line": 358, + "line": 360, "column": 73 }, "end": { - "line": 358, + "line": 360, "column": 74 } }, @@ -40350,58 +40558,58 @@ }, { "type": "ExpressionStatement", - "start": 14608, - "end": 14647, + "start": 14675, + "end": 14714, "loc": { "start": { - "line": 359, + "line": 361, "column": 20 }, "end": { - "line": 359, + "line": 361, "column": 59 } }, "expression": { "type": "AssignmentExpression", - "start": 14608, - "end": 14646, + "start": 14675, + "end": 14713, "loc": { "start": { - "line": 359, + "line": 361, "column": 20 }, "end": { - "line": 359, + "line": 361, "column": 58 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 14608, - "end": 14624, + "start": 14675, + "end": 14691, "loc": { "start": { - "line": 359, + "line": 361, "column": 20 }, "end": { - "line": 359, + "line": 361, "column": 36 } }, "object": { "type": "Identifier", - "start": 14608, - "end": 14613, + "start": 14675, + "end": 14680, "loc": { "start": { - "line": 359, + "line": 361, "column": 20 }, "end": { - "line": 359, + "line": 361, "column": 25 }, "identifierName": "stats" @@ -40410,15 +40618,15 @@ }, "property": { "type": "Identifier", - "start": 14614, - "end": 14624, + "start": 14681, + "end": 14691, "loc": { "start": { - "line": 359, + "line": 361, "column": 26 }, "end": { - "line": 359, + "line": 361, "column": 36 }, "identifierName": "xktVersion" @@ -40429,29 +40637,29 @@ }, "right": { "type": "MemberExpression", - "start": 14627, - "end": 14646, + "start": 14694, + "end": 14713, "loc": { "start": { - "line": 359, + "line": 361, "column": 39 }, "end": { - "line": 359, + "line": 361, "column": 58 } }, "object": { "type": "Identifier", - "start": 14627, - "end": 14635, + "start": 14694, + "end": 14702, "loc": { "start": { - "line": 359, + "line": 361, "column": 39 }, "end": { - "line": 359, + "line": 361, "column": 47 }, "identifierName": "XKT_INFO" @@ -40460,15 +40668,15 @@ }, "property": { "type": "Identifier", - "start": 14636, - "end": 14646, + "start": 14703, + "end": 14713, "loc": { "start": { - "line": 359, + "line": 361, "column": 48 }, "end": { - "line": 359, + "line": 361, "column": 58 }, "identifierName": "xktVersion" @@ -40481,58 +40689,58 @@ }, { "type": "ExpressionStatement", - "start": 14668, - "end": 14748, + "start": 14735, + "end": 14815, "loc": { "start": { - "line": 360, + "line": 362, "column": 20 }, "end": { - "line": 360, + "line": 362, "column": 100 } }, "expression": { "type": "AssignmentExpression", - "start": 14668, - "end": 14747, + "start": 14735, + "end": 14814, "loc": { "start": { - "line": 360, + "line": 362, "column": 20 }, "end": { - "line": 360, + "line": 362, "column": 99 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 14668, - "end": 14690, + "start": 14735, + "end": 14757, "loc": { "start": { - "line": 360, + "line": 362, "column": 20 }, "end": { - "line": 360, + "line": 362, "column": 42 } }, "object": { "type": "Identifier", - "start": 14668, - "end": 14673, + "start": 14735, + "end": 14740, "loc": { "start": { - "line": 360, + "line": 362, "column": 20 }, "end": { - "line": 360, + "line": 362, "column": 25 }, "identifierName": "stats" @@ -40541,15 +40749,15 @@ }, "property": { "type": "Identifier", - "start": 14674, - "end": 14690, + "start": 14741, + "end": 14757, "loc": { "start": { - "line": 360, + "line": 362, "column": 26 }, "end": { - "line": 360, + "line": 362, "column": 42 }, "identifierName": "compressionRatio" @@ -40560,57 +40768,57 @@ }, "right": { "type": "CallExpression", - "start": 14693, - "end": 14747, + "start": 14760, + "end": 14814, "loc": { "start": { - "line": 360, + "line": 362, "column": 45 }, "end": { - "line": 360, + "line": 362, "column": 99 } }, "callee": { "type": "MemberExpression", - "start": 14693, - "end": 14744, + "start": 14760, + "end": 14811, "loc": { "start": { - "line": 360, + "line": 362, "column": 45 }, "end": { - "line": 360, + "line": 362, "column": 96 } }, "object": { "type": "BinaryExpression", - "start": 14694, - "end": 14735, + "start": 14761, + "end": 14802, "loc": { "start": { - "line": 360, + "line": 362, "column": 46 }, "end": { - "line": 360, + "line": 362, "column": 87 } }, "left": { "type": "Identifier", - "start": 14694, - "end": 14713, + "start": 14761, + "end": 14780, "loc": { "start": { - "line": 360, + "line": 362, "column": 46 }, "end": { - "line": 360, + "line": 362, "column": 65 }, "identifierName": "sourceFileSizeBytes" @@ -40620,15 +40828,15 @@ "operator": "/", "right": { "type": "Identifier", - "start": 14716, - "end": 14735, + "start": 14783, + "end": 14802, "loc": { "start": { - "line": 360, + "line": 362, "column": 68 }, "end": { - "line": 360, + "line": 362, "column": 87 }, "identifierName": "targetFileSizeBytes" @@ -40637,20 +40845,20 @@ }, "extra": { "parenthesized": true, - "parenStart": 14693 + "parenStart": 14760 } }, "property": { "type": "Identifier", - "start": 14737, - "end": 14744, + "start": 14804, + "end": 14811, "loc": { "start": { - "line": 360, + "line": 362, "column": 89 }, "end": { - "line": 360, + "line": 362, "column": 96 }, "identifierName": "toFixed" @@ -40662,15 +40870,15 @@ "arguments": [ { "type": "NumericLiteral", - "start": 14745, - "end": 14746, + "start": 14812, + "end": 14813, "loc": { "start": { - "line": 360, + "line": 362, "column": 97 }, "end": { - "line": 360, + "line": 362, "column": 98 } }, @@ -40686,58 +40894,58 @@ }, { "type": "ExpressionStatement", - "start": 14769, - "end": 14839, + "start": 14836, + "end": 14906, "loc": { "start": { - "line": 361, + "line": 363, "column": 20 }, "end": { - "line": 361, + "line": 363, "column": 90 } }, "expression": { "type": "AssignmentExpression", - "start": 14769, - "end": 14838, + "start": 14836, + "end": 14905, "loc": { "start": { - "line": 361, + "line": 363, "column": 20 }, "end": { - "line": 361, + "line": 363, "column": 89 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 14769, - "end": 14789, + "start": 14836, + "end": 14856, "loc": { "start": { - "line": 361, + "line": 363, "column": 20 }, "end": { - "line": 361, + "line": 363, "column": 40 } }, "object": { "type": "Identifier", - "start": 14769, - "end": 14774, + "start": 14836, + "end": 14841, "loc": { "start": { - "line": 361, + "line": 363, "column": 20 }, "end": { - "line": 361, + "line": 363, "column": 25 }, "identifierName": "stats" @@ -40746,15 +40954,15 @@ }, "property": { "type": "Identifier", - "start": 14775, - "end": 14789, + "start": 14842, + "end": 14856, "loc": { "start": { - "line": 361, + "line": 363, "column": 26 }, "end": { - "line": 361, + "line": 363, "column": 40 }, "identifierName": "conversionTime" @@ -40765,85 +40973,85 @@ }, "right": { "type": "CallExpression", - "start": 14792, - "end": 14838, + "start": 14859, + "end": 14905, "loc": { "start": { - "line": 361, + "line": 363, "column": 43 }, "end": { - "line": 361, + "line": 363, "column": 89 } }, "callee": { "type": "MemberExpression", - "start": 14792, - "end": 14835, + "start": 14859, + "end": 14902, "loc": { "start": { - "line": 361, + "line": 363, "column": 43 }, "end": { - "line": 361, + "line": 363, "column": 86 } }, "object": { "type": "BinaryExpression", - "start": 14793, - "end": 14826, + "start": 14860, + "end": 14893, "loc": { "start": { - "line": 361, + "line": 363, "column": 44 }, "end": { - "line": 361, + "line": 363, "column": 77 } }, "left": { "type": "BinaryExpression", - "start": 14794, - "end": 14816, + "start": 14861, + "end": 14883, "loc": { "start": { - "line": 361, + "line": 363, "column": 45 }, "end": { - "line": 361, + "line": 363, "column": 67 } }, "left": { "type": "NewExpression", - "start": 14794, - "end": 14804, + "start": 14861, + "end": 14871, "loc": { "start": { - "line": 361, + "line": 363, "column": 45 }, "end": { - "line": 361, + "line": 363, "column": 55 } }, "callee": { "type": "Identifier", - "start": 14798, - "end": 14802, + "start": 14865, + "end": 14869, "loc": { "start": { - "line": 361, + "line": 363, "column": 49 }, "end": { - "line": 361, + "line": 363, "column": 53 }, "identifierName": "Date" @@ -40855,15 +41063,15 @@ "operator": "-", "right": { "type": "Identifier", - "start": 14807, - "end": 14816, + "start": 14874, + "end": 14883, "loc": { "start": { - "line": 361, + "line": 363, "column": 58 }, "end": { - "line": 361, + "line": 363, "column": 67 }, "identifierName": "startTime" @@ -40872,21 +41080,21 @@ }, "extra": { "parenthesized": true, - "parenStart": 14793 + "parenStart": 14860 } }, "operator": "/", "right": { "type": "NumericLiteral", - "start": 14820, - "end": 14826, + "start": 14887, + "end": 14893, "loc": { "start": { - "line": 361, + "line": 363, "column": 71 }, "end": { - "line": 361, + "line": 363, "column": 77 } }, @@ -40898,20 +41106,20 @@ }, "extra": { "parenthesized": true, - "parenStart": 14792 + "parenStart": 14859 } }, "property": { "type": "Identifier", - "start": 14828, - "end": 14835, + "start": 14895, + "end": 14902, "loc": { "start": { - "line": 361, + "line": 363, "column": 79 }, "end": { - "line": 361, + "line": 363, "column": 86 }, "identifierName": "toFixed" @@ -40923,15 +41131,15 @@ "arguments": [ { "type": "NumericLiteral", - "start": 14836, - "end": 14837, + "start": 14903, + "end": 14904, "loc": { "start": { - "line": 361, + "line": 363, "column": 87 }, "end": { - "line": 361, + "line": 363, "column": 88 } }, @@ -40947,58 +41155,58 @@ }, { "type": "ExpressionStatement", - "start": 14860, - "end": 14887, + "start": 14927, + "end": 14954, "loc": { "start": { - "line": 362, + "line": 364, "column": 20 }, "end": { - "line": 362, + "line": 364, "column": 47 } }, "expression": { "type": "AssignmentExpression", - "start": 14860, - "end": 14886, + "start": 14927, + "end": 14953, "loc": { "start": { - "line": 362, + "line": 364, "column": 20 }, "end": { - "line": 362, + "line": 364, "column": 46 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 14860, - "end": 14870, + "start": 14927, + "end": 14937, "loc": { "start": { - "line": 362, + "line": 364, "column": 20 }, "end": { - "line": 362, + "line": 364, "column": 30 } }, "object": { "type": "Identifier", - "start": 14860, - "end": 14865, + "start": 14927, + "end": 14932, "loc": { "start": { - "line": 362, + "line": 364, "column": 20 }, "end": { - "line": 362, + "line": 364, "column": 25 }, "identifierName": "stats" @@ -41007,15 +41215,15 @@ }, "property": { "type": "Identifier", - "start": 14866, - "end": 14870, + "start": 14933, + "end": 14937, "loc": { "start": { - "line": 362, + "line": 364, "column": 26 }, "end": { - "line": 362, + "line": 364, "column": 30 }, "identifierName": "aabb" @@ -41026,29 +41234,29 @@ }, "right": { "type": "MemberExpression", - "start": 14873, - "end": 14886, + "start": 14940, + "end": 14953, "loc": { "start": { - "line": 362, + "line": 364, "column": 33 }, "end": { - "line": 362, + "line": 364, "column": 46 } }, "object": { "type": "Identifier", - "start": 14873, - "end": 14881, + "start": 14940, + "end": 14948, "loc": { "start": { - "line": 362, + "line": 364, "column": 33 }, "end": { - "line": 362, + "line": 364, "column": 41 }, "identifierName": "xktModel" @@ -41057,15 +41265,15 @@ }, "property": { "type": "Identifier", - "start": 14882, - "end": 14886, + "start": 14949, + "end": 14953, "loc": { "start": { - "line": 362, + "line": 364, "column": 42 }, "end": { - "line": 362, + "line": 364, "column": 46 }, "identifierName": "aabb" @@ -41078,43 +41286,43 @@ }, { "type": "ExpressionStatement", - "start": 14908, - "end": 14954, + "start": 14975, + "end": 15021, "loc": { "start": { - "line": 363, + "line": 365, "column": 20 }, "end": { - "line": 363, + "line": 365, "column": 66 } }, "expression": { "type": "CallExpression", - "start": 14908, - "end": 14953, + "start": 14975, + "end": 15020, "loc": { "start": { - "line": 363, + "line": 365, "column": 20 }, "end": { - "line": 363, + "line": 365, "column": 65 } }, "callee": { "type": "Identifier", - "start": 14908, - "end": 14911, + "start": 14975, + "end": 14978, "loc": { "start": { - "line": 363, + "line": 365, "column": 20 }, "end": { - "line": 363, + "line": 365, "column": 23 }, "identifierName": "log" @@ -41124,44 +41332,44 @@ "arguments": [ { "type": "TemplateLiteral", - "start": 14912, - "end": 14952, + "start": 14979, + "end": 15019, "loc": { "start": { - "line": 363, + "line": 365, "column": 24 }, "end": { - "line": 363, + "line": 365, "column": 64 } }, "expressions": [ { "type": "MemberExpression", - "start": 14934, - "end": 14950, + "start": 15001, + "end": 15017, "loc": { "start": { - "line": 363, + "line": 365, "column": 46 }, "end": { - "line": 363, + "line": 365, "column": 62 } }, "object": { "type": "Identifier", - "start": 14934, - "end": 14939, + "start": 15001, + "end": 15006, "loc": { "start": { - "line": 363, + "line": 365, "column": 46 }, "end": { - "line": 363, + "line": 365, "column": 51 }, "identifierName": "stats" @@ -41170,15 +41378,15 @@ }, "property": { "type": "Identifier", - "start": 14940, - "end": 14950, + "start": 15007, + "end": 15017, "loc": { "start": { - "line": 363, + "line": 365, "column": 52 }, "end": { - "line": 363, + "line": 365, "column": 62 }, "identifierName": "xktVersion" @@ -41191,15 +41399,15 @@ "quasis": [ { "type": "TemplateElement", - "start": 14913, - "end": 14932, + "start": 14980, + "end": 14999, "loc": { "start": { - "line": 363, + "line": 365, "column": 25 }, "end": { - "line": 363, + "line": 365, "column": 44 } }, @@ -41211,15 +41419,15 @@ }, { "type": "TemplateElement", - "start": 14951, - "end": 14951, + "start": 15018, + "end": 15018, "loc": { "start": { - "line": 363, + "line": 365, "column": 63 }, "end": { - "line": 363, + "line": 365, "column": 63 } }, @@ -41236,29 +41444,29 @@ }, { "type": "IfStatement", - "start": 14975, - "end": 15114, + "start": 15042, + "end": 15181, "loc": { "start": { - "line": 364, + "line": 366, "column": 20 }, "end": { - "line": 366, + "line": 368, "column": 21 } }, "test": { "type": "Identifier", - "start": 14979, - "end": 14991, + "start": 15046, + "end": 15058, "loc": { "start": { - "line": 364, + "line": 366, "column": 24 }, "end": { - "line": 364, + "line": 366, "column": 36 }, "identifierName": "includeTypes" @@ -41267,58 +41475,58 @@ }, "consequent": { "type": "BlockStatement", - "start": 14993, - "end": 15114, + "start": 15060, + "end": 15181, "loc": { "start": { - "line": 364, + "line": 366, "column": 38 }, "end": { - "line": 366, + "line": 368, "column": 21 } }, "body": [ { "type": "ExpressionStatement", - "start": 15019, - "end": 15092, + "start": 15086, + "end": 15159, "loc": { "start": { - "line": 365, + "line": 367, "column": 24 }, "end": { - "line": 365, + "line": 367, "column": 97 } }, "expression": { "type": "CallExpression", - "start": 15019, - "end": 15091, + "start": 15086, + "end": 15158, "loc": { "start": { - "line": 365, + "line": 367, "column": 24 }, "end": { - "line": 365, + "line": 367, "column": 96 } }, "callee": { "type": "Identifier", - "start": 15019, - "end": 15022, + "start": 15086, + "end": 15089, "loc": { "start": { - "line": 365, + "line": 367, "column": 24 }, "end": { - "line": 365, + "line": 367, "column": 27 }, "identifierName": "log" @@ -41328,29 +41536,29 @@ "arguments": [ { "type": "BinaryExpression", - "start": 15023, - "end": 15090, + "start": 15090, + "end": 15157, "loc": { "start": { - "line": 365, + "line": 367, "column": 28 }, "end": { - "line": 365, + "line": 367, "column": 95 } }, "left": { "type": "StringLiteral", - "start": 15023, - "end": 15040, + "start": 15090, + "end": 15107, "loc": { "start": { - "line": 365, + "line": 367, "column": 28 }, "end": { - "line": 365, + "line": 367, "column": 45 } }, @@ -41363,29 +41571,29 @@ "operator": "+", "right": { "type": "ConditionalExpression", - "start": 15044, - "end": 15089, + "start": 15111, + "end": 15156, "loc": { "start": { - "line": 365, + "line": 367, "column": 49 }, "end": { - "line": 365, + "line": 367, "column": 94 } }, "test": { "type": "Identifier", - "start": 15044, - "end": 15056, + "start": 15111, + "end": 15123, "loc": { "start": { - "line": 365, + "line": 367, "column": 49 }, "end": { - "line": 365, + "line": 367, "column": 61 }, "identifierName": "includeTypes" @@ -41394,15 +41602,15 @@ }, "consequent": { "type": "Identifier", - "start": 15059, - "end": 15071, + "start": 15126, + "end": 15138, "loc": { "start": { - "line": 365, + "line": 367, "column": 64 }, "end": { - "line": 365, + "line": 367, "column": 76 }, "identifierName": "includeTypes" @@ -41411,15 +41619,15 @@ }, "alternate": { "type": "StringLiteral", - "start": 15074, - "end": 15089, + "start": 15141, + "end": 15156, "loc": { "start": { - "line": 365, + "line": 367, "column": 79 }, "end": { - "line": 365, + "line": 367, "column": 94 } }, @@ -41431,7 +41639,7 @@ }, "extra": { "parenthesized": true, - "parenStart": 15043 + "parenStart": 15110 } } } @@ -41445,29 +41653,29 @@ }, { "type": "IfStatement", - "start": 15135, - "end": 15275, + "start": 15202, + "end": 15342, "loc": { "start": { - "line": 367, + "line": 369, "column": 20 }, "end": { - "line": 369, + "line": 371, "column": 21 } }, "test": { "type": "Identifier", - "start": 15139, - "end": 15151, + "start": 15206, + "end": 15218, "loc": { "start": { - "line": 367, + "line": 369, "column": 24 }, "end": { - "line": 367, + "line": 369, "column": 36 }, "identifierName": "excludeTypes" @@ -41476,58 +41684,58 @@ }, "consequent": { "type": "BlockStatement", - "start": 15153, - "end": 15275, + "start": 15220, + "end": 15342, "loc": { "start": { - "line": 367, + "line": 369, "column": 38 }, "end": { - "line": 369, + "line": 371, "column": 21 } }, "body": [ { "type": "ExpressionStatement", - "start": 15179, - "end": 15253, + "start": 15246, + "end": 15320, "loc": { "start": { - "line": 368, + "line": 370, "column": 24 }, "end": { - "line": 368, + "line": 370, "column": 98 } }, "expression": { "type": "CallExpression", - "start": 15179, - "end": 15252, + "start": 15246, + "end": 15319, "loc": { "start": { - "line": 368, + "line": 370, "column": 24 }, "end": { - "line": 368, + "line": 370, "column": 97 } }, "callee": { "type": "Identifier", - "start": 15179, - "end": 15182, + "start": 15246, + "end": 15249, "loc": { "start": { - "line": 368, + "line": 370, "column": 24 }, "end": { - "line": 368, + "line": 370, "column": 27 }, "identifierName": "log" @@ -41537,29 +41745,29 @@ "arguments": [ { "type": "BinaryExpression", - "start": 15183, - "end": 15251, + "start": 15250, + "end": 15318, "loc": { "start": { - "line": 368, + "line": 370, "column": 28 }, "end": { - "line": 368, + "line": 370, "column": 96 } }, "left": { "type": "StringLiteral", - "start": 15183, - "end": 15200, + "start": 15250, + "end": 15267, "loc": { "start": { - "line": 368, + "line": 370, "column": 28 }, "end": { - "line": 368, + "line": 370, "column": 45 } }, @@ -41572,29 +41780,29 @@ "operator": "+", "right": { "type": "ConditionalExpression", - "start": 15204, - "end": 15250, + "start": 15271, + "end": 15317, "loc": { "start": { - "line": 368, + "line": 370, "column": 49 }, "end": { - "line": 368, + "line": 370, "column": 95 } }, "test": { "type": "Identifier", - "start": 15204, - "end": 15216, + "start": 15271, + "end": 15283, "loc": { "start": { - "line": 368, + "line": 370, "column": 49 }, "end": { - "line": 368, + "line": 370, "column": 61 }, "identifierName": "excludeTypes" @@ -41603,15 +41811,15 @@ }, "consequent": { "type": "Identifier", - "start": 15219, - "end": 15231, + "start": 15286, + "end": 15298, "loc": { "start": { - "line": 368, + "line": 370, "column": 64 }, "end": { - "line": 368, + "line": 370, "column": 76 }, "identifierName": "excludeTypes" @@ -41620,15 +41828,15 @@ }, "alternate": { "type": "StringLiteral", - "start": 15234, - "end": 15250, + "start": 15301, + "end": 15317, "loc": { "start": { - "line": 368, + "line": 370, "column": 79 }, "end": { - "line": 368, + "line": 370, "column": 95 } }, @@ -41640,7 +41848,7 @@ }, "extra": { "parenthesized": true, - "parenStart": 15203 + "parenStart": 15270 } } } @@ -41654,43 +41862,43 @@ }, { "type": "ExpressionStatement", - "start": 15296, - "end": 15338, + "start": 15363, + "end": 15405, "loc": { "start": { - "line": 370, + "line": 372, "column": 20 }, "end": { - "line": 370, + "line": 372, "column": 62 } }, "expression": { "type": "CallExpression", - "start": 15296, - "end": 15337, + "start": 15363, + "end": 15404, "loc": { "start": { - "line": 370, + "line": 372, "column": 20 }, "end": { - "line": 370, + "line": 372, "column": 61 } }, "callee": { "type": "Identifier", - "start": 15296, - "end": 15299, + "start": 15363, + "end": 15366, "loc": { "start": { - "line": 370, + "line": 372, "column": 20 }, "end": { - "line": 370, + "line": 372, "column": 23 }, "identifierName": "log" @@ -41700,43 +41908,43 @@ "arguments": [ { "type": "BinaryExpression", - "start": 15300, - "end": 15336, + "start": 15367, + "end": 15403, "loc": { "start": { - "line": 370, + "line": 372, "column": 24 }, "end": { - "line": 370, + "line": 372, "column": 60 } }, "left": { "type": "BinaryExpression", - "start": 15300, - "end": 15328, + "start": 15367, + "end": 15395, "loc": { "start": { - "line": 370, + "line": 372, "column": 24 }, "end": { - "line": 370, + "line": 372, "column": 52 } }, "left": { "type": "StringLiteral", - "start": 15300, - "end": 15312, + "start": 15367, + "end": 15379, "loc": { "start": { - "line": 370, + "line": 372, "column": 24 }, "end": { - "line": 370, + "line": 372, "column": 36 } }, @@ -41749,29 +41957,29 @@ "operator": "+", "right": { "type": "MemberExpression", - "start": 15315, - "end": 15328, + "start": 15382, + "end": 15395, "loc": { "start": { - "line": 370, + "line": 372, "column": 39 }, "end": { - "line": 370, + "line": 372, "column": 52 } }, "object": { "type": "Identifier", - "start": 15315, - "end": 15320, + "start": 15382, + "end": 15387, "loc": { "start": { - "line": 370, + "line": 372, "column": 39 }, "end": { - "line": 370, + "line": 372, "column": 44 }, "identifierName": "stats" @@ -41780,15 +41988,15 @@ }, "property": { "type": "Identifier", - "start": 15321, - "end": 15328, + "start": 15388, + "end": 15395, "loc": { "start": { - "line": 370, + "line": 372, "column": 45 }, "end": { - "line": 370, + "line": 372, "column": 52 }, "identifierName": "xktSize" @@ -41801,15 +42009,15 @@ "operator": "+", "right": { "type": "StringLiteral", - "start": 15331, - "end": 15336, + "start": 15398, + "end": 15403, "loc": { "start": { - "line": 370, + "line": 372, "column": 55 }, "end": { - "line": 370, + "line": 372, "column": 60 } }, @@ -41825,43 +42033,43 @@ }, { "type": "ExpressionStatement", - "start": 15359, - "end": 15434, + "start": 15426, + "end": 15501, "loc": { "start": { - "line": 371, + "line": 373, "column": 20 }, "end": { - "line": 371, + "line": 373, "column": 95 } }, "expression": { "type": "CallExpression", - "start": 15359, - "end": 15433, + "start": 15426, + "end": 15500, "loc": { "start": { - "line": 371, + "line": 373, "column": 20 }, "end": { - "line": 371, + "line": 373, "column": 94 } }, "callee": { "type": "Identifier", - "start": 15359, - "end": 15362, + "start": 15426, + "end": 15429, "loc": { "start": { - "line": 371, + "line": 373, "column": 20 }, "end": { - "line": 371, + "line": 373, "column": 23 }, "identifierName": "log" @@ -41871,43 +42079,43 @@ "arguments": [ { "type": "BinaryExpression", - "start": 15363, - "end": 15432, + "start": 15430, + "end": 15499, "loc": { "start": { - "line": 371, + "line": 373, "column": 24 }, "end": { - "line": 371, + "line": 373, "column": 93 } }, "left": { "type": "BinaryExpression", - "start": 15363, - "end": 15425, + "start": 15430, + "end": 15492, "loc": { "start": { - "line": 371, + "line": 373, "column": 24 }, "end": { - "line": 371, + "line": 373, "column": 86 } }, "left": { "type": "StringLiteral", - "start": 15363, - "end": 15384, + "start": 15430, + "end": 15451, "loc": { "start": { - "line": 371, + "line": 373, "column": 24 }, "end": { - "line": 371, + "line": 373, "column": 45 } }, @@ -41920,71 +42128,71 @@ "operator": "+", "right": { "type": "CallExpression", - "start": 15387, - "end": 15425, + "start": 15454, + "end": 15492, "loc": { "start": { - "line": 371, + "line": 373, "column": 48 }, "end": { - "line": 371, + "line": 373, "column": 86 } }, "callee": { "type": "MemberExpression", - "start": 15387, - "end": 15422, + "start": 15454, + "end": 15489, "loc": { "start": { - "line": 371, + "line": 373, "column": 48 }, "end": { - "line": 371, + "line": 373, "column": 83 } }, "object": { "type": "BinaryExpression", - "start": 15388, - "end": 15413, + "start": 15455, + "end": 15480, "loc": { "start": { - "line": 371, + "line": 373, "column": 49 }, "end": { - "line": 371, + "line": 373, "column": 74 } }, "left": { "type": "MemberExpression", - "start": 15388, - "end": 15406, + "start": 15455, + "end": 15473, "loc": { "start": { - "line": 371, + "line": 373, "column": 49 }, "end": { - "line": 371, + "line": 373, "column": 67 } }, "object": { "type": "Identifier", - "start": 15388, - "end": 15393, + "start": 15455, + "end": 15460, "loc": { "start": { - "line": 371, + "line": 373, "column": 49 }, "end": { - "line": 371, + "line": 373, "column": 54 }, "identifierName": "stats" @@ -41993,15 +42201,15 @@ }, "property": { "type": "Identifier", - "start": 15394, - "end": 15406, + "start": 15461, + "end": 15473, "loc": { "start": { - "line": 371, + "line": 373, "column": 55 }, "end": { - "line": 371, + "line": 373, "column": 67 }, "identifierName": "texturesSize" @@ -42013,15 +42221,15 @@ "operator": "/", "right": { "type": "NumericLiteral", - "start": 15409, - "end": 15413, + "start": 15476, + "end": 15480, "loc": { "start": { - "line": 371, + "line": 373, "column": 70 }, "end": { - "line": 371, + "line": 373, "column": 74 } }, @@ -42033,20 +42241,20 @@ }, "extra": { "parenthesized": true, - "parenStart": 15387 + "parenStart": 15454 } }, "property": { "type": "Identifier", - "start": 15415, - "end": 15422, + "start": 15482, + "end": 15489, "loc": { "start": { - "line": 371, + "line": 373, "column": 76 }, "end": { - "line": 371, + "line": 373, "column": 83 }, "identifierName": "toFixed" @@ -42058,15 +42266,15 @@ "arguments": [ { "type": "NumericLiteral", - "start": 15423, - "end": 15424, + "start": 15490, + "end": 15491, "loc": { "start": { - "line": 371, + "line": 373, "column": 84 }, "end": { - "line": 371, + "line": 373, "column": 85 } }, @@ -42082,15 +42290,15 @@ "operator": "+", "right": { "type": "StringLiteral", - "start": 15428, - "end": 15432, + "start": 15495, + "end": 15499, "loc": { "start": { - "line": 371, + "line": 373, "column": 89 }, "end": { - "line": 371, + "line": 373, "column": 93 } }, @@ -42106,43 +42314,43 @@ }, { "type": "ExpressionStatement", - "start": 15455, - "end": 15507, + "start": 15522, + "end": 15574, "loc": { "start": { - "line": 372, + "line": 374, "column": 20 }, "end": { - "line": 372, + "line": 374, "column": 72 } }, "expression": { "type": "CallExpression", - "start": 15455, - "end": 15506, + "start": 15522, + "end": 15573, "loc": { "start": { - "line": 372, + "line": 374, "column": 20 }, "end": { - "line": 372, + "line": 374, "column": 71 } }, "callee": { "type": "Identifier", - "start": 15455, - "end": 15458, + "start": 15522, + "end": 15525, "loc": { "start": { - "line": 372, + "line": 374, "column": 20 }, "end": { - "line": 372, + "line": 374, "column": 23 }, "identifierName": "log" @@ -42152,29 +42360,29 @@ "arguments": [ { "type": "BinaryExpression", - "start": 15459, - "end": 15505, + "start": 15526, + "end": 15572, "loc": { "start": { - "line": 372, + "line": 374, "column": 24 }, "end": { - "line": 372, + "line": 374, "column": 70 } }, "left": { "type": "StringLiteral", - "start": 15459, - "end": 15480, + "start": 15526, + "end": 15547, "loc": { "start": { - "line": 372, + "line": 374, "column": 24 }, "end": { - "line": 372, + "line": 374, "column": 45 } }, @@ -42187,29 +42395,29 @@ "operator": "+", "right": { "type": "MemberExpression", - "start": 15483, - "end": 15505, + "start": 15550, + "end": 15572, "loc": { "start": { - "line": 372, + "line": 374, "column": 48 }, "end": { - "line": 372, + "line": 374, "column": 70 } }, "object": { "type": "Identifier", - "start": 15483, - "end": 15488, + "start": 15550, + "end": 15555, "loc": { "start": { - "line": 372, + "line": 374, "column": 48 }, "end": { - "line": 372, + "line": 374, "column": 53 }, "identifierName": "stats" @@ -42218,15 +42426,15 @@ }, "property": { "type": "Identifier", - "start": 15489, - "end": 15505, + "start": 15556, + "end": 15572, "loc": { "start": { - "line": 372, + "line": 374, "column": 54 }, "end": { - "line": 372, + "line": 374, "column": 70 }, "identifierName": "compressionRatio" @@ -42241,43 +42449,43 @@ }, { "type": "ExpressionStatement", - "start": 15528, - "end": 15583, + "start": 15595, + "end": 15650, "loc": { "start": { - "line": 373, + "line": 375, "column": 20 }, "end": { - "line": 373, + "line": 375, "column": 75 } }, "expression": { "type": "CallExpression", - "start": 15528, - "end": 15582, + "start": 15595, + "end": 15649, "loc": { "start": { - "line": 373, + "line": 375, "column": 20 }, "end": { - "line": 373, + "line": 375, "column": 74 } }, "callee": { "type": "Identifier", - "start": 15528, - "end": 15531, + "start": 15595, + "end": 15598, "loc": { "start": { - "line": 373, + "line": 375, "column": 20 }, "end": { - "line": 373, + "line": 375, "column": 23 }, "identifierName": "log" @@ -42287,43 +42495,43 @@ "arguments": [ { "type": "BinaryExpression", - "start": 15532, - "end": 15581, + "start": 15599, + "end": 15648, "loc": { "start": { - "line": 373, + "line": 375, "column": 24 }, "end": { - "line": 373, + "line": 375, "column": 73 } }, "left": { "type": "BinaryExpression", - "start": 15532, - "end": 15574, + "start": 15599, + "end": 15641, "loc": { "start": { - "line": 373, + "line": 375, "column": 24 }, "end": { - "line": 373, + "line": 375, "column": 66 } }, "left": { "type": "StringLiteral", - "start": 15532, - "end": 15551, + "start": 15599, + "end": 15618, "loc": { "start": { - "line": 373, + "line": 375, "column": 24 }, "end": { - "line": 373, + "line": 375, "column": 43 } }, @@ -42336,29 +42544,29 @@ "operator": "+", "right": { "type": "MemberExpression", - "start": 15554, - "end": 15574, + "start": 15621, + "end": 15641, "loc": { "start": { - "line": 373, + "line": 375, "column": 46 }, "end": { - "line": 373, + "line": 375, "column": 66 } }, "object": { "type": "Identifier", - "start": 15554, - "end": 15559, + "start": 15621, + "end": 15626, "loc": { "start": { - "line": 373, + "line": 375, "column": 46 }, "end": { - "line": 373, + "line": 375, "column": 51 }, "identifierName": "stats" @@ -42367,15 +42575,15 @@ }, "property": { "type": "Identifier", - "start": 15560, - "end": 15574, + "start": 15627, + "end": 15641, "loc": { "start": { - "line": 373, + "line": 375, "column": 52 }, "end": { - "line": 373, + "line": 375, "column": 66 }, "identifierName": "conversionTime" @@ -42388,15 +42596,15 @@ "operator": "+", "right": { "type": "StringLiteral", - "start": 15577, - "end": 15581, + "start": 15644, + "end": 15648, "loc": { "start": { - "line": 373, + "line": 375, "column": 69 }, "end": { - "line": 373, + "line": 375, "column": 73 } }, @@ -42412,43 +42620,43 @@ }, { "type": "ExpressionStatement", - "start": 15604, - "end": 15658, + "start": 15671, + "end": 15725, "loc": { "start": { - "line": 374, + "line": 376, "column": 20 }, "end": { - "line": 374, + "line": 376, "column": 74 } }, "expression": { "type": "CallExpression", - "start": 15604, - "end": 15657, + "start": 15671, + "end": 15724, "loc": { "start": { - "line": 374, + "line": 376, "column": 20 }, "end": { - "line": 374, + "line": 376, "column": 73 } }, "callee": { "type": "Identifier", - "start": 15604, - "end": 15607, + "start": 15671, + "end": 15674, "loc": { "start": { - "line": 374, + "line": 376, "column": 20 }, "end": { - "line": 374, + "line": 376, "column": 23 }, "identifierName": "log" @@ -42458,29 +42666,29 @@ "arguments": [ { "type": "BinaryExpression", - "start": 15608, - "end": 15656, + "start": 15675, + "end": 15723, "loc": { "start": { - "line": 374, + "line": 376, "column": 24 }, "end": { - "line": 374, + "line": 376, "column": 72 } }, "left": { "type": "StringLiteral", - "start": 15608, - "end": 15633, + "start": 15675, + "end": 15700, "loc": { "start": { - "line": 374, + "line": 376, "column": 24 }, "end": { - "line": 374, + "line": 376, "column": 49 } }, @@ -42493,29 +42701,29 @@ "operator": "+", "right": { "type": "MemberExpression", - "start": 15636, - "end": 15656, + "start": 15703, + "end": 15723, "loc": { "start": { - "line": 374, + "line": 376, "column": 52 }, "end": { - "line": 374, + "line": 376, "column": 72 } }, "object": { "type": "Identifier", - "start": 15636, - "end": 15641, + "start": 15703, + "end": 15708, "loc": { "start": { - "line": 374, + "line": 376, "column": 52 }, "end": { - "line": 374, + "line": 376, "column": 57 }, "identifierName": "stats" @@ -42524,15 +42732,15 @@ }, "property": { "type": "Identifier", - "start": 15642, - "end": 15656, + "start": 15709, + "end": 15723, "loc": { "start": { - "line": 374, + "line": 376, "column": 58 }, "end": { - "line": 374, + "line": 376, "column": 72 }, "identifierName": "numMetaObjects" @@ -42547,43 +42755,43 @@ }, { "type": "ExpressionStatement", - "start": 15679, - "end": 15736, + "start": 15746, + "end": 15803, "loc": { "start": { - "line": 375, + "line": 377, "column": 20 }, "end": { - "line": 375, + "line": 377, "column": 77 } }, "expression": { "type": "CallExpression", - "start": 15679, - "end": 15735, + "start": 15746, + "end": 15802, "loc": { "start": { - "line": 375, + "line": 377, "column": 20 }, "end": { - "line": 375, + "line": 377, "column": 76 } }, "callee": { "type": "Identifier", - "start": 15679, - "end": 15682, + "start": 15746, + "end": 15749, "loc": { "start": { - "line": 375, + "line": 377, "column": 20 }, "end": { - "line": 375, + "line": 377, "column": 23 }, "identifierName": "log" @@ -42593,29 +42801,29 @@ "arguments": [ { "type": "BinaryExpression", - "start": 15683, - "end": 15734, + "start": 15750, + "end": 15801, "loc": { "start": { - "line": 375, + "line": 377, "column": 24 }, "end": { - "line": 375, + "line": 377, "column": 75 } }, "left": { "type": "StringLiteral", - "start": 15683, - "end": 15710, + "start": 15750, + "end": 15777, "loc": { "start": { - "line": 375, + "line": 377, "column": 24 }, "end": { - "line": 375, + "line": 377, "column": 51 } }, @@ -42628,29 +42836,29 @@ "operator": "+", "right": { "type": "MemberExpression", - "start": 15713, - "end": 15734, + "start": 15780, + "end": 15801, "loc": { "start": { - "line": 375, + "line": 377, "column": 54 }, "end": { - "line": 375, + "line": 377, "column": 75 } }, "object": { "type": "Identifier", - "start": 15713, - "end": 15718, + "start": 15780, + "end": 15785, "loc": { "start": { - "line": 375, + "line": 377, "column": 54 }, "end": { - "line": 375, + "line": 377, "column": 59 }, "identifierName": "stats" @@ -42659,15 +42867,15 @@ }, "property": { "type": "Identifier", - "start": 15719, - "end": 15734, + "start": 15786, + "end": 15801, "loc": { "start": { - "line": 375, + "line": 377, "column": 60 }, "end": { - "line": 375, + "line": 377, "column": 75 }, "identifierName": "numPropertySets" @@ -42682,43 +42890,43 @@ }, { "type": "ExpressionStatement", - "start": 15757, - "end": 15812, + "start": 15824, + "end": 15879, "loc": { "start": { - "line": 376, + "line": 378, "column": 20 }, "end": { - "line": 376, + "line": 378, "column": 75 } }, "expression": { "type": "CallExpression", - "start": 15757, - "end": 15811, + "start": 15824, + "end": 15878, "loc": { "start": { - "line": 376, + "line": 378, "column": 20 }, "end": { - "line": 376, + "line": 378, "column": 74 } }, "callee": { "type": "Identifier", - "start": 15757, - "end": 15760, + "start": 15824, + "end": 15827, "loc": { "start": { - "line": 376, + "line": 378, "column": 20 }, "end": { - "line": 376, + "line": 378, "column": 23 }, "identifierName": "log" @@ -42728,29 +42936,29 @@ "arguments": [ { "type": "BinaryExpression", - "start": 15761, - "end": 15810, + "start": 15828, + "end": 15877, "loc": { "start": { - "line": 376, + "line": 378, "column": 24 }, "end": { - "line": 376, + "line": 378, "column": 73 } }, "left": { "type": "StringLiteral", - "start": 15761, - "end": 15791, + "start": 15828, + "end": 15858, "loc": { "start": { - "line": 376, + "line": 378, "column": 24 }, "end": { - "line": 376, + "line": 378, "column": 54 } }, @@ -42763,29 +42971,29 @@ "operator": "+", "right": { "type": "MemberExpression", - "start": 15794, - "end": 15810, + "start": 15861, + "end": 15877, "loc": { "start": { - "line": 376, + "line": 378, "column": 57 }, "end": { - "line": 376, + "line": 378, "column": 73 } }, "object": { "type": "Identifier", - "start": 15794, - "end": 15799, + "start": 15861, + "end": 15866, "loc": { "start": { - "line": 376, + "line": 378, "column": 57 }, "end": { - "line": 376, + "line": 378, "column": 62 }, "identifierName": "stats" @@ -42794,15 +43002,15 @@ }, "property": { "type": "Identifier", - "start": 15800, - "end": 15810, + "start": 15867, + "end": 15877, "loc": { "start": { - "line": 376, + "line": 378, "column": 63 }, "end": { - "line": 376, + "line": 378, "column": 73 }, "identifierName": "numObjects" @@ -42817,43 +43025,43 @@ }, { "type": "ExpressionStatement", - "start": 15833, - "end": 15885, + "start": 15900, + "end": 15952, "loc": { "start": { - "line": 377, + "line": 379, "column": 20 }, "end": { - "line": 377, + "line": 379, "column": 72 } }, "expression": { "type": "CallExpression", - "start": 15833, - "end": 15884, + "start": 15900, + "end": 15951, "loc": { "start": { - "line": 377, + "line": 379, "column": 20 }, "end": { - "line": 377, + "line": 379, "column": 71 } }, "callee": { "type": "Identifier", - "start": 15833, - "end": 15836, + "start": 15900, + "end": 15903, "loc": { "start": { - "line": 377, + "line": 379, "column": 20 }, "end": { - "line": 377, + "line": 379, "column": 23 }, "identifierName": "log" @@ -42863,29 +43071,29 @@ "arguments": [ { "type": "BinaryExpression", - "start": 15837, - "end": 15883, + "start": 15904, + "end": 15950, "loc": { "start": { - "line": 377, + "line": 379, "column": 24 }, "end": { - "line": 377, + "line": 379, "column": 70 } }, "left": { "type": "StringLiteral", - "start": 15837, - "end": 15861, + "start": 15904, + "end": 15928, "loc": { "start": { - "line": 377, + "line": 379, "column": 24 }, "end": { - "line": 377, + "line": 379, "column": 48 } }, @@ -42898,29 +43106,29 @@ "operator": "+", "right": { "type": "MemberExpression", - "start": 15864, - "end": 15883, + "start": 15931, + "end": 15950, "loc": { "start": { - "line": 377, + "line": 379, "column": 51 }, "end": { - "line": 377, + "line": 379, "column": 70 } }, "object": { "type": "Identifier", - "start": 15864, - "end": 15869, + "start": 15931, + "end": 15936, "loc": { "start": { - "line": 377, + "line": 379, "column": 51 }, "end": { - "line": 377, + "line": 379, "column": 56 }, "identifierName": "stats" @@ -42929,15 +43137,15 @@ }, "property": { "type": "Identifier", - "start": 15870, - "end": 15883, + "start": 15937, + "end": 15950, "loc": { "start": { - "line": 377, + "line": 379, "column": 57 }, "end": { - "line": 377, + "line": 379, "column": 70 }, "identifierName": "numGeometries" @@ -42952,43 +43160,43 @@ }, { "type": "ExpressionStatement", - "start": 15906, - "end": 15954, + "start": 15973, + "end": 16021, "loc": { "start": { - "line": 378, + "line": 380, "column": 20 }, "end": { - "line": 378, + "line": 380, "column": 68 } }, "expression": { "type": "CallExpression", - "start": 15906, - "end": 15953, + "start": 15973, + "end": 16020, "loc": { "start": { - "line": 378, + "line": 380, "column": 20 }, "end": { - "line": 378, + "line": 380, "column": 67 } }, "callee": { "type": "Identifier", - "start": 15906, - "end": 15909, + "start": 15973, + "end": 15976, "loc": { "start": { - "line": 378, + "line": 380, "column": 20 }, "end": { - "line": 378, + "line": 380, "column": 23 }, "identifierName": "log" @@ -42998,29 +43206,29 @@ "arguments": [ { "type": "BinaryExpression", - "start": 15910, - "end": 15952, + "start": 15977, + "end": 16019, "loc": { "start": { - "line": 378, + "line": 380, "column": 24 }, "end": { - "line": 378, + "line": 380, "column": 66 } }, "left": { "type": "StringLiteral", - "start": 15910, - "end": 15932, + "start": 15977, + "end": 15999, "loc": { "start": { - "line": 378, + "line": 380, "column": 24 }, "end": { - "line": 378, + "line": 380, "column": 46 } }, @@ -43033,29 +43241,29 @@ "operator": "+", "right": { "type": "MemberExpression", - "start": 15935, - "end": 15952, + "start": 16002, + "end": 16019, "loc": { "start": { - "line": 378, + "line": 380, "column": 49 }, "end": { - "line": 378, + "line": 380, "column": 66 } }, "object": { "type": "Identifier", - "start": 15935, - "end": 15940, + "start": 16002, + "end": 16007, "loc": { "start": { - "line": 378, + "line": 380, "column": 49 }, "end": { - "line": 378, + "line": 380, "column": 54 }, "identifierName": "stats" @@ -43064,15 +43272,15 @@ }, "property": { "type": "Identifier", - "start": 15941, - "end": 15952, + "start": 16008, + "end": 16019, "loc": { "start": { - "line": 378, + "line": 380, "column": 55 }, "end": { - "line": 378, + "line": 380, "column": 66 }, "identifierName": "numTextures" @@ -43087,43 +43295,43 @@ }, { "type": "ExpressionStatement", - "start": 15975, - "end": 16029, + "start": 16042, + "end": 16096, "loc": { "start": { - "line": 379, + "line": 381, "column": 20 }, "end": { - "line": 379, + "line": 381, "column": 74 } }, "expression": { "type": "CallExpression", - "start": 15975, - "end": 16028, + "start": 16042, + "end": 16095, "loc": { "start": { - "line": 379, + "line": 381, "column": 20 }, "end": { - "line": 379, + "line": 381, "column": 73 } }, "callee": { "type": "Identifier", - "start": 15975, - "end": 15978, + "start": 16042, + "end": 16045, "loc": { "start": { - "line": 379, + "line": 381, "column": 20 }, "end": { - "line": 379, + "line": 381, "column": 23 }, "identifierName": "log" @@ -43133,29 +43341,29 @@ "arguments": [ { "type": "BinaryExpression", - "start": 15979, - "end": 16027, + "start": 16046, + "end": 16094, "loc": { "start": { - "line": 379, + "line": 381, "column": 24 }, "end": { - "line": 379, + "line": 381, "column": 72 } }, "left": { "type": "StringLiteral", - "start": 15979, - "end": 16004, + "start": 16046, + "end": 16071, "loc": { "start": { - "line": 379, + "line": 381, "column": 24 }, "end": { - "line": 379, + "line": 381, "column": 49 } }, @@ -43168,29 +43376,29 @@ "operator": "+", "right": { "type": "MemberExpression", - "start": 16007, - "end": 16027, + "start": 16074, + "end": 16094, "loc": { "start": { - "line": 379, + "line": 381, "column": 52 }, "end": { - "line": 379, + "line": 381, "column": 72 } }, "object": { "type": "Identifier", - "start": 16007, - "end": 16012, + "start": 16074, + "end": 16079, "loc": { "start": { - "line": 379, + "line": 381, "column": 52 }, "end": { - "line": 379, + "line": 381, "column": 57 }, "identifierName": "stats" @@ -43199,15 +43407,15 @@ }, "property": { "type": "Identifier", - "start": 16013, - "end": 16027, + "start": 16080, + "end": 16094, "loc": { "start": { - "line": 379, + "line": 381, "column": 58 }, "end": { - "line": 379, + "line": 381, "column": 72 }, "identifierName": "numTextureSets" @@ -43222,43 +43430,43 @@ }, { "type": "ExpressionStatement", - "start": 16050, - "end": 16100, + "start": 16117, + "end": 16167, "loc": { "start": { - "line": 380, + "line": 382, "column": 20 }, "end": { - "line": 380, + "line": 382, "column": 70 } }, "expression": { "type": "CallExpression", - "start": 16050, - "end": 16099, + "start": 16117, + "end": 16166, "loc": { "start": { - "line": 380, + "line": 382, "column": 20 }, "end": { - "line": 380, + "line": 382, "column": 69 } }, "callee": { "type": "Identifier", - "start": 16050, - "end": 16053, + "start": 16117, + "end": 16120, "loc": { "start": { - "line": 380, + "line": 382, "column": 20 }, "end": { - "line": 380, + "line": 382, "column": 23 }, "identifierName": "log" @@ -43268,29 +43476,29 @@ "arguments": [ { "type": "BinaryExpression", - "start": 16054, - "end": 16098, + "start": 16121, + "end": 16165, "loc": { "start": { - "line": 380, + "line": 382, "column": 24 }, "end": { - "line": 380, + "line": 382, "column": 68 } }, "left": { "type": "StringLiteral", - "start": 16054, - "end": 16077, + "start": 16121, + "end": 16144, "loc": { "start": { - "line": 380, + "line": 382, "column": 24 }, "end": { - "line": 380, + "line": 382, "column": 47 } }, @@ -43303,29 +43511,29 @@ "operator": "+", "right": { "type": "MemberExpression", - "start": 16080, - "end": 16098, + "start": 16147, + "end": 16165, "loc": { "start": { - "line": 380, + "line": 382, "column": 50 }, "end": { - "line": 380, + "line": 382, "column": 68 } }, "object": { "type": "Identifier", - "start": 16080, - "end": 16085, + "start": 16147, + "end": 16152, "loc": { "start": { - "line": 380, + "line": 382, "column": 50 }, "end": { - "line": 380, + "line": 382, "column": 55 }, "identifierName": "stats" @@ -43334,15 +43542,15 @@ }, "property": { "type": "Identifier", - "start": 16086, - "end": 16098, + "start": 16153, + "end": 16165, "loc": { "start": { - "line": 380, + "line": 382, "column": 56 }, "end": { - "line": 380, + "line": 382, "column": 68 }, "identifierName": "numTriangles" @@ -43357,43 +43565,43 @@ }, { "type": "ExpressionStatement", - "start": 16121, - "end": 16169, + "start": 16188, + "end": 16236, "loc": { "start": { - "line": 381, + "line": 383, "column": 20 }, "end": { - "line": 381, + "line": 383, "column": 68 } }, "expression": { "type": "CallExpression", - "start": 16121, - "end": 16168, + "start": 16188, + "end": 16235, "loc": { "start": { - "line": 381, + "line": 383, "column": 20 }, "end": { - "line": 381, + "line": 383, "column": 67 } }, "callee": { "type": "Identifier", - "start": 16121, - "end": 16124, + "start": 16188, + "end": 16191, "loc": { "start": { - "line": 381, + "line": 383, "column": 20 }, "end": { - "line": 381, + "line": 383, "column": 23 }, "identifierName": "log" @@ -43403,29 +43611,29 @@ "arguments": [ { "type": "BinaryExpression", - "start": 16125, - "end": 16167, + "start": 16192, + "end": 16234, "loc": { "start": { - "line": 381, + "line": 383, "column": 24 }, "end": { - "line": 381, + "line": 383, "column": 66 } }, "left": { "type": "StringLiteral", - "start": 16125, - "end": 16147, + "start": 16192, + "end": 16214, "loc": { "start": { - "line": 381, + "line": 383, "column": 24 }, "end": { - "line": 381, + "line": 383, "column": 46 } }, @@ -43438,29 +43646,29 @@ "operator": "+", "right": { "type": "MemberExpression", - "start": 16150, - "end": 16167, + "start": 16217, + "end": 16234, "loc": { "start": { - "line": 381, + "line": 383, "column": 49 }, "end": { - "line": 381, + "line": 383, "column": 66 } }, "object": { "type": "Identifier", - "start": 16150, - "end": 16155, + "start": 16217, + "end": 16222, "loc": { "start": { - "line": 381, + "line": 383, "column": 49 }, "end": { - "line": 381, + "line": 383, "column": 54 }, "identifierName": "stats" @@ -43469,15 +43677,15 @@ }, "property": { "type": "Identifier", - "start": 16156, - "end": 16167, + "start": 16223, + "end": 16234, "loc": { "start": { - "line": 381, + "line": 383, "column": 55 }, "end": { - "line": 381, + "line": 383, "column": 66 }, "identifierName": "numVertices" @@ -43492,43 +43700,43 @@ }, { "type": "ExpressionStatement", - "start": 16190, - "end": 16228, + "start": 16257, + "end": 16295, "loc": { "start": { - "line": 382, + "line": 384, "column": 20 }, "end": { - "line": 382, + "line": 384, "column": 58 } }, "expression": { "type": "CallExpression", - "start": 16190, - "end": 16227, + "start": 16257, + "end": 16294, "loc": { "start": { - "line": 382, + "line": 384, "column": 20 }, "end": { - "line": 382, + "line": 384, "column": 57 } }, "callee": { "type": "Identifier", - "start": 16190, - "end": 16193, + "start": 16257, + "end": 16260, "loc": { "start": { - "line": 382, + "line": 384, "column": 20 }, "end": { - "line": 382, + "line": 384, "column": 23 }, "identifierName": "log" @@ -43538,29 +43746,29 @@ "arguments": [ { "type": "BinaryExpression", - "start": 16194, - "end": 16226, + "start": 16261, + "end": 16293, "loc": { "start": { - "line": 382, + "line": 384, "column": 24 }, "end": { - "line": 382, + "line": 384, "column": 56 } }, "left": { "type": "StringLiteral", - "start": 16194, - "end": 16211, + "start": 16261, + "end": 16278, "loc": { "start": { - "line": 382, + "line": 384, "column": 24 }, "end": { - "line": 382, + "line": 384, "column": 41 } }, @@ -43573,29 +43781,29 @@ "operator": "+", "right": { "type": "MemberExpression", - "start": 16214, - "end": 16226, + "start": 16281, + "end": 16293, "loc": { "start": { - "line": 382, + "line": 384, "column": 44 }, "end": { - "line": 382, + "line": 384, "column": 56 } }, "object": { "type": "Identifier", - "start": 16214, - "end": 16219, + "start": 16281, + "end": 16286, "loc": { "start": { - "line": 382, + "line": 384, "column": 44 }, "end": { - "line": 382, + "line": 384, "column": 49 }, "identifierName": "stats" @@ -43604,15 +43812,15 @@ }, "property": { "type": "Identifier", - "start": 16220, - "end": 16226, + "start": 16287, + "end": 16293, "loc": { "start": { - "line": 382, + "line": 384, "column": 50 }, "end": { - "line": 382, + "line": 384, "column": 56 }, "identifierName": "numUVs" @@ -43627,43 +43835,43 @@ }, { "type": "ExpressionStatement", - "start": 16249, - "end": 16295, + "start": 16316, + "end": 16362, "loc": { "start": { - "line": 383, + "line": 385, "column": 20 }, "end": { - "line": 383, + "line": 385, "column": 66 } }, "expression": { "type": "CallExpression", - "start": 16249, - "end": 16294, + "start": 16316, + "end": 16361, "loc": { "start": { - "line": 383, + "line": 385, "column": 20 }, "end": { - "line": 383, + "line": 385, "column": 65 } }, "callee": { "type": "Identifier", - "start": 16249, - "end": 16252, + "start": 16316, + "end": 16319, "loc": { "start": { - "line": 383, + "line": 385, "column": 20 }, "end": { - "line": 383, + "line": 385, "column": 23 }, "identifierName": "log" @@ -43673,29 +43881,29 @@ "arguments": [ { "type": "BinaryExpression", - "start": 16253, - "end": 16293, + "start": 16320, + "end": 16360, "loc": { "start": { - "line": 383, + "line": 385, "column": 24 }, "end": { - "line": 383, + "line": 385, "column": 64 } }, "left": { "type": "StringLiteral", - "start": 16253, - "end": 16274, + "start": 16320, + "end": 16341, "loc": { "start": { - "line": 383, + "line": 385, "column": 24 }, "end": { - "line": 383, + "line": 385, "column": 45 } }, @@ -43708,29 +43916,29 @@ "operator": "+", "right": { "type": "MemberExpression", - "start": 16277, - "end": 16293, + "start": 16344, + "end": 16360, "loc": { "start": { - "line": 383, + "line": 385, "column": 48 }, "end": { - "line": 383, + "line": 385, "column": 64 } }, "object": { "type": "Identifier", - "start": 16277, - "end": 16282, + "start": 16344, + "end": 16349, "loc": { "start": { - "line": 383, + "line": 385, "column": 48 }, "end": { - "line": 383, + "line": 385, "column": 53 }, "identifierName": "stats" @@ -43739,15 +43947,15 @@ }, "property": { "type": "Identifier", - "start": 16283, - "end": 16293, + "start": 16350, + "end": 16360, "loc": { "start": { - "line": 383, + "line": 385, "column": 54 }, "end": { - "line": 383, + "line": 385, "column": 64 }, "identifierName": "numNormals" @@ -43762,43 +43970,43 @@ }, { "type": "ExpressionStatement", - "start": 16316, - "end": 16357, + "start": 16383, + "end": 16424, "loc": { "start": { - "line": 384, + "line": 386, "column": 20 }, "end": { - "line": 384, + "line": 386, "column": 61 } }, "expression": { "type": "CallExpression", - "start": 16316, - "end": 16356, + "start": 16383, + "end": 16423, "loc": { "start": { - "line": 384, + "line": 386, "column": 20 }, "end": { - "line": 384, + "line": 386, "column": 60 } }, "callee": { "type": "Identifier", - "start": 16316, - "end": 16319, + "start": 16383, + "end": 16386, "loc": { "start": { - "line": 384, + "line": 386, "column": 20 }, "end": { - "line": 384, + "line": 386, "column": 23 }, "identifierName": "log" @@ -43808,29 +44016,29 @@ "arguments": [ { "type": "BinaryExpression", - "start": 16320, - "end": 16355, + "start": 16387, + "end": 16422, "loc": { "start": { - "line": 384, + "line": 386, "column": 24 }, "end": { - "line": 384, + "line": 386, "column": 59 } }, "left": { "type": "StringLiteral", - "start": 16320, - "end": 16335, + "start": 16387, + "end": 16402, "loc": { "start": { - "line": 384, + "line": 386, "column": 24 }, "end": { - "line": 384, + "line": 386, "column": 39 } }, @@ -43843,29 +44051,29 @@ "operator": "+", "right": { "type": "MemberExpression", - "start": 16338, - "end": 16355, + "start": 16405, + "end": 16422, "loc": { "start": { - "line": 384, + "line": 386, "column": 42 }, "end": { - "line": 384, + "line": 386, "column": 59 } }, "object": { "type": "Identifier", - "start": 16338, - "end": 16343, + "start": 16405, + "end": 16410, "loc": { "start": { - "line": 384, + "line": 386, "column": 42 }, "end": { - "line": 384, + "line": 386, "column": 47 }, "identifierName": "stats" @@ -43874,15 +44082,15 @@ }, "property": { "type": "Identifier", - "start": 16344, - "end": 16355, + "start": 16411, + "end": 16422, "loc": { "start": { - "line": 384, + "line": 386, "column": 48 }, "end": { - "line": 384, + "line": 386, "column": 59 }, "identifierName": "minTileSize" @@ -43897,29 +44105,29 @@ }, { "type": "IfStatement", - "start": 16379, - "end": 16781, + "start": 16446, + "end": 16848, "loc": { "start": { - "line": 386, + "line": 388, "column": 20 }, "end": { - "line": 393, + "line": 395, "column": 21 } }, "test": { "type": "Identifier", - "start": 16383, - "end": 16389, + "start": 16450, + "end": 16456, "loc": { "start": { - "line": 386, + "line": 388, "column": 24 }, "end": { - "line": 386, + "line": 388, "column": 30 }, "identifierName": "output" @@ -43928,59 +44136,59 @@ }, "consequent": { "type": "BlockStatement", - "start": 16391, - "end": 16781, + "start": 16458, + "end": 16848, "loc": { "start": { - "line": 386, + "line": 388, "column": 32 }, "end": { - "line": 393, + "line": 395, "column": 21 } }, "body": [ { "type": "VariableDeclaration", - "start": 16417, - "end": 16462, + "start": 16484, + "end": 16529, "loc": { "start": { - "line": 387, + "line": 389, "column": 24 }, "end": { - "line": 387, + "line": 389, "column": 69 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 16423, - "end": 16461, + "start": 16490, + "end": 16528, "loc": { "start": { - "line": 387, + "line": 389, "column": 30 }, "end": { - "line": 387, + "line": 389, "column": 68 } }, "id": { "type": "Identifier", - "start": 16423, - "end": 16432, + "start": 16490, + "end": 16499, "loc": { "start": { - "line": 387, + "line": 389, "column": 30 }, "end": { - "line": 387, + "line": 389, "column": 39 }, "identifierName": "outputDir" @@ -43989,57 +44197,57 @@ }, "init": { "type": "CallExpression", - "start": 16435, - "end": 16461, + "start": 16502, + "end": 16528, "loc": { "start": { - "line": 387, + "line": 389, "column": 42 }, "end": { - "line": 387, + "line": 389, "column": 68 } }, "callee": { "type": "MemberExpression", - "start": 16435, - "end": 16459, + "start": 16502, + "end": 16526, "loc": { "start": { - "line": 387, + "line": 389, "column": 42 }, "end": { - "line": 387, + "line": 389, "column": 66 } }, "object": { "type": "CallExpression", - "start": 16435, - "end": 16454, + "start": 16502, + "end": 16521, "loc": { "start": { - "line": 387, + "line": 389, "column": 42 }, "end": { - "line": 387, + "line": 389, "column": 61 } }, "callee": { "type": "Identifier", - "start": 16435, - "end": 16446, + "start": 16502, + "end": 16513, "loc": { "start": { - "line": 387, + "line": 389, "column": 42 }, "end": { - "line": 387, + "line": 389, "column": 53 }, "identifierName": "getBasePath" @@ -44049,15 +44257,15 @@ "arguments": [ { "type": "Identifier", - "start": 16447, - "end": 16453, + "start": 16514, + "end": 16520, "loc": { "start": { - "line": 387, + "line": 389, "column": 54 }, "end": { - "line": 387, + "line": 389, "column": 60 }, "identifierName": "output" @@ -44068,15 +44276,15 @@ }, "property": { "type": "Identifier", - "start": 16455, - "end": 16459, + "start": 16522, + "end": 16526, "loc": { "start": { - "line": 387, + "line": 389, "column": 62 }, "end": { - "line": 387, + "line": 389, "column": 66 }, "identifierName": "trim" @@ -44093,57 +44301,57 @@ }, { "type": "IfStatement", - "start": 16487, - "end": 16637, + "start": 16554, + "end": 16704, "loc": { "start": { - "line": 388, + "line": 390, "column": 24 }, "end": { - "line": 390, + "line": 392, "column": 25 } }, "test": { "type": "LogicalExpression", - "start": 16491, - "end": 16536, + "start": 16558, + "end": 16603, "loc": { "start": { - "line": 388, + "line": 390, "column": 28 }, "end": { - "line": 388, + "line": 390, "column": 73 } }, "left": { "type": "BinaryExpression", - "start": 16491, - "end": 16507, + "start": 16558, + "end": 16574, "loc": { "start": { - "line": 388, + "line": 390, "column": 28 }, "end": { - "line": 388, + "line": 390, "column": 44 } }, "left": { "type": "Identifier", - "start": 16491, - "end": 16500, + "start": 16558, + "end": 16567, "loc": { "start": { - "line": 388, + "line": 390, "column": 28 }, "end": { - "line": 388, + "line": 390, "column": 37 }, "identifierName": "outputDir" @@ -44153,15 +44361,15 @@ "operator": "!==", "right": { "type": "StringLiteral", - "start": 16505, - "end": 16507, + "start": 16572, + "end": 16574, "loc": { "start": { - "line": 388, + "line": 390, "column": 42 }, "end": { - "line": 388, + "line": 390, "column": 44 } }, @@ -44175,15 +44383,15 @@ "operator": "&&", "right": { "type": "UnaryExpression", - "start": 16511, - "end": 16536, + "start": 16578, + "end": 16603, "loc": { "start": { - "line": 388, + "line": 390, "column": 48 }, "end": { - "line": 388, + "line": 390, "column": 73 } }, @@ -44191,43 +44399,43 @@ "prefix": true, "argument": { "type": "CallExpression", - "start": 16512, - "end": 16536, + "start": 16579, + "end": 16603, "loc": { "start": { - "line": 388, + "line": 390, "column": 49 }, "end": { - "line": 388, + "line": 390, "column": 73 } }, "callee": { "type": "MemberExpression", - "start": 16512, - "end": 16525, + "start": 16579, + "end": 16592, "loc": { "start": { - "line": 388, + "line": 390, "column": 49 }, "end": { - "line": 388, + "line": 390, "column": 62 } }, "object": { "type": "Identifier", - "start": 16512, - "end": 16514, + "start": 16579, + "end": 16581, "loc": { "start": { - "line": 388, + "line": 390, "column": 49 }, "end": { - "line": 388, + "line": 390, "column": 51 }, "identifierName": "fs" @@ -44236,15 +44444,15 @@ }, "property": { "type": "Identifier", - "start": 16515, - "end": 16525, + "start": 16582, + "end": 16592, "loc": { "start": { - "line": 388, + "line": 390, "column": 52 }, "end": { - "line": 388, + "line": 390, "column": 62 }, "identifierName": "existsSync" @@ -44256,15 +44464,15 @@ "arguments": [ { "type": "Identifier", - "start": 16526, - "end": 16535, + "start": 16593, + "end": 16602, "loc": { "start": { - "line": 388, + "line": 390, "column": 63 }, "end": { - "line": 388, + "line": 390, "column": 72 }, "identifierName": "outputDir" @@ -44280,72 +44488,72 @@ }, "consequent": { "type": "BlockStatement", - "start": 16538, - "end": 16637, + "start": 16605, + "end": 16704, "loc": { "start": { - "line": 388, + "line": 390, "column": 75 }, "end": { - "line": 390, + "line": 392, "column": 25 } }, "body": [ { "type": "ExpressionStatement", - "start": 16568, - "end": 16611, + "start": 16635, + "end": 16678, "loc": { "start": { - "line": 389, + "line": 391, "column": 28 }, "end": { - "line": 389, + "line": 391, "column": 71 } }, "expression": { "type": "CallExpression", - "start": 16568, - "end": 16610, + "start": 16635, + "end": 16677, "loc": { "start": { - "line": 389, + "line": 391, "column": 28 }, "end": { - "line": 389, + "line": 391, "column": 70 } }, "callee": { "type": "MemberExpression", - "start": 16568, - "end": 16580, + "start": 16635, + "end": 16647, "loc": { "start": { - "line": 389, + "line": 391, "column": 28 }, "end": { - "line": 389, + "line": 391, "column": 40 } }, "object": { "type": "Identifier", - "start": 16568, - "end": 16570, + "start": 16635, + "end": 16637, "loc": { "start": { - "line": 389, + "line": 391, "column": 28 }, "end": { - "line": 389, + "line": 391, "column": 30 }, "identifierName": "fs" @@ -44354,15 +44562,15 @@ }, "property": { "type": "Identifier", - "start": 16571, - "end": 16580, + "start": 16638, + "end": 16647, "loc": { "start": { - "line": 389, + "line": 391, "column": 31 }, "end": { - "line": 389, + "line": 391, "column": 40 }, "identifierName": "mkdirSync" @@ -44374,15 +44582,15 @@ "arguments": [ { "type": "Identifier", - "start": 16581, - "end": 16590, + "start": 16648, + "end": 16657, "loc": { "start": { - "line": 389, + "line": 391, "column": 41 }, "end": { - "line": 389, + "line": 391, "column": 50 }, "identifierName": "outputDir" @@ -44391,30 +44599,30 @@ }, { "type": "ObjectExpression", - "start": 16592, - "end": 16609, + "start": 16659, + "end": 16676, "loc": { "start": { - "line": 389, + "line": 391, "column": 52 }, "end": { - "line": 389, + "line": 391, "column": 69 } }, "properties": [ { "type": "ObjectProperty", - "start": 16593, - "end": 16608, + "start": 16660, + "end": 16675, "loc": { "start": { - "line": 389, + "line": 391, "column": 53 }, "end": { - "line": 389, + "line": 391, "column": 68 } }, @@ -44423,15 +44631,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 16593, - "end": 16602, + "start": 16660, + "end": 16669, "loc": { "start": { - "line": 389, + "line": 391, "column": 53 }, "end": { - "line": 389, + "line": 391, "column": 62 }, "identifierName": "recursive" @@ -44440,15 +44648,15 @@ }, "value": { "type": "BooleanLiteral", - "start": 16604, - "end": 16608, + "start": 16671, + "end": 16675, "loc": { "start": { - "line": 389, + "line": 391, "column": 64 }, "end": { - "line": 389, + "line": 391, "column": 68 } }, @@ -44467,43 +44675,43 @@ }, { "type": "ExpressionStatement", - "start": 16662, - "end": 16697, + "start": 16729, + "end": 16764, "loc": { "start": { - "line": 391, + "line": 393, "column": 24 }, "end": { - "line": 391, + "line": 393, "column": 59 } }, "expression": { "type": "CallExpression", - "start": 16662, - "end": 16696, + "start": 16729, + "end": 16763, "loc": { "start": { - "line": 391, + "line": 393, "column": 24 }, "end": { - "line": 391, + "line": 393, "column": 58 } }, "callee": { "type": "Identifier", - "start": 16662, - "end": 16665, + "start": 16729, + "end": 16732, "loc": { "start": { - "line": 391, + "line": 393, "column": 24 }, "end": { - "line": 391, + "line": 393, "column": 27 }, "identifierName": "log" @@ -44513,29 +44721,29 @@ "arguments": [ { "type": "BinaryExpression", - "start": 16666, - "end": 16695, + "start": 16733, + "end": 16762, "loc": { "start": { - "line": 391, + "line": 393, "column": 28 }, "end": { - "line": 391, + "line": 393, "column": 57 } }, "left": { "type": "StringLiteral", - "start": 16666, - "end": 16686, + "start": 16733, + "end": 16753, "loc": { "start": { - "line": 391, + "line": 393, "column": 28 }, "end": { - "line": 391, + "line": 393, "column": 48 } }, @@ -44548,15 +44756,15 @@ "operator": "+", "right": { "type": "Identifier", - "start": 16689, - "end": 16695, + "start": 16756, + "end": 16762, "loc": { "start": { - "line": 391, + "line": 393, "column": 51 }, "end": { - "line": 391, + "line": 393, "column": 57 }, "identifierName": "output" @@ -44569,57 +44777,57 @@ }, { "type": "ExpressionStatement", - "start": 16722, - "end": 16759, + "start": 16789, + "end": 16826, "loc": { "start": { - "line": 392, + "line": 394, "column": 24 }, "end": { - "line": 392, + "line": 394, "column": 61 } }, "expression": { "type": "CallExpression", - "start": 16722, - "end": 16758, + "start": 16789, + "end": 16825, "loc": { "start": { - "line": 392, + "line": 394, "column": 24 }, "end": { - "line": 392, + "line": 394, "column": 60 } }, "callee": { "type": "MemberExpression", - "start": 16722, - "end": 16738, + "start": 16789, + "end": 16805, "loc": { "start": { - "line": 392, + "line": 394, "column": 24 }, "end": { - "line": 392, + "line": 394, "column": 40 } }, "object": { "type": "Identifier", - "start": 16722, - "end": 16724, + "start": 16789, + "end": 16791, "loc": { "start": { - "line": 392, + "line": 394, "column": 24 }, "end": { - "line": 392, + "line": 394, "column": 26 }, "identifierName": "fs" @@ -44628,15 +44836,15 @@ }, "property": { "type": "Identifier", - "start": 16725, - "end": 16738, + "start": 16792, + "end": 16805, "loc": { "start": { - "line": 392, + "line": 394, "column": 27 }, "end": { - "line": 392, + "line": 394, "column": 40 }, "identifierName": "writeFileSync" @@ -44648,15 +44856,15 @@ "arguments": [ { "type": "Identifier", - "start": 16739, - "end": 16745, + "start": 16806, + "end": 16812, "loc": { "start": { - "line": 392, + "line": 394, "column": 41 }, "end": { - "line": 392, + "line": 394, "column": 47 }, "identifierName": "output" @@ -44665,15 +44873,15 @@ }, { "type": "Identifier", - "start": 16747, - "end": 16757, + "start": 16814, + "end": 16824, "loc": { "start": { - "line": 392, + "line": 394, "column": 49 }, "end": { - "line": 392, + "line": 394, "column": 59 }, "identifierName": "xktContent" @@ -44690,29 +44898,29 @@ }, { "type": "IfStatement", - "start": 16803, - "end": 16896, + "start": 16870, + "end": 16963, "loc": { "start": { - "line": 395, + "line": 397, "column": 20 }, "end": { - "line": 397, + "line": 399, "column": 21 } }, "test": { "type": "Identifier", - "start": 16807, - "end": 16821, + "start": 16874, + "end": 16888, "loc": { "start": { - "line": 395, + "line": 397, "column": 24 }, "end": { - "line": 395, + "line": 397, "column": 38 }, "identifierName": "outputXKTModel" @@ -44721,58 +44929,58 @@ }, "consequent": { "type": "BlockStatement", - "start": 16823, - "end": 16896, + "start": 16890, + "end": 16963, "loc": { "start": { - "line": 395, + "line": 397, "column": 40 }, "end": { - "line": 397, + "line": 399, "column": 21 } }, "body": [ { "type": "ExpressionStatement", - "start": 16849, - "end": 16874, + "start": 16916, + "end": 16941, "loc": { "start": { - "line": 396, + "line": 398, "column": 24 }, "end": { - "line": 396, + "line": 398, "column": 49 } }, "expression": { "type": "CallExpression", - "start": 16849, - "end": 16873, + "start": 16916, + "end": 16940, "loc": { "start": { - "line": 396, + "line": 398, "column": 24 }, "end": { - "line": 396, + "line": 398, "column": 48 } }, "callee": { "type": "Identifier", - "start": 16849, - "end": 16863, + "start": 16916, + "end": 16930, "loc": { "start": { - "line": 396, + "line": 398, "column": 24 }, "end": { - "line": 396, + "line": 398, "column": 38 }, "identifierName": "outputXKTModel" @@ -44782,15 +44990,15 @@ "arguments": [ { "type": "Identifier", - "start": 16864, - "end": 16872, + "start": 16931, + "end": 16939, "loc": { "start": { - "line": 396, + "line": 398, "column": 39 }, "end": { - "line": 396, + "line": 398, "column": 47 }, "identifierName": "xktModel" @@ -44807,29 +45015,29 @@ }, { "type": "IfStatement", - "start": 16918, - "end": 17003, + "start": 16985, + "end": 17070, "loc": { "start": { - "line": 399, + "line": 401, "column": 20 }, "end": { - "line": 401, + "line": 403, "column": 21 } }, "test": { "type": "Identifier", - "start": 16922, - "end": 16931, + "start": 16989, + "end": 16998, "loc": { "start": { - "line": 399, + "line": 401, "column": 24 }, "end": { - "line": 399, + "line": 401, "column": 33 }, "identifierName": "outputXKT" @@ -44838,58 +45046,58 @@ }, "consequent": { "type": "BlockStatement", - "start": 16933, - "end": 17003, + "start": 17000, + "end": 17070, "loc": { "start": { - "line": 399, + "line": 401, "column": 35 }, "end": { - "line": 401, + "line": 403, "column": 21 } }, "body": [ { "type": "ExpressionStatement", - "start": 16959, - "end": 16981, + "start": 17026, + "end": 17048, "loc": { "start": { - "line": 400, + "line": 402, "column": 24 }, "end": { - "line": 400, + "line": 402, "column": 46 } }, "expression": { "type": "CallExpression", - "start": 16959, - "end": 16980, + "start": 17026, + "end": 17047, "loc": { "start": { - "line": 400, + "line": 402, "column": 24 }, "end": { - "line": 400, + "line": 402, "column": 45 } }, "callee": { "type": "Identifier", - "start": 16959, - "end": 16968, + "start": 17026, + "end": 17035, "loc": { "start": { - "line": 400, + "line": 402, "column": 24 }, "end": { - "line": 400, + "line": 402, "column": 33 }, "identifierName": "outputXKT" @@ -44899,15 +45107,15 @@ "arguments": [ { "type": "Identifier", - "start": 16969, - "end": 16979, + "start": 17036, + "end": 17046, "loc": { "start": { - "line": 400, + "line": 402, "column": 34 }, "end": { - "line": 400, + "line": 402, "column": 44 }, "identifierName": "xktContent" @@ -44924,29 +45132,29 @@ }, { "type": "IfStatement", - "start": 17025, - "end": 17109, + "start": 17092, + "end": 17176, "loc": { "start": { - "line": 403, + "line": 405, "column": 20 }, "end": { - "line": 405, + "line": 407, "column": 21 } }, "test": { "type": "Identifier", - "start": 17029, - "end": 17040, + "start": 17096, + "end": 17107, "loc": { "start": { - "line": 403, + "line": 405, "column": 24 }, "end": { - "line": 403, + "line": 405, "column": 35 }, "identifierName": "outputStats" @@ -44955,58 +45163,58 @@ }, "consequent": { "type": "BlockStatement", - "start": 17042, - "end": 17109, + "start": 17109, + "end": 17176, "loc": { "start": { - "line": 403, + "line": 405, "column": 37 }, "end": { - "line": 405, + "line": 407, "column": 21 } }, "body": [ { "type": "ExpressionStatement", - "start": 17068, - "end": 17087, + "start": 17135, + "end": 17154, "loc": { "start": { - "line": 404, + "line": 406, "column": 24 }, "end": { - "line": 404, + "line": 406, "column": 43 } }, "expression": { "type": "CallExpression", - "start": 17068, - "end": 17086, + "start": 17135, + "end": 17153, "loc": { "start": { - "line": 404, + "line": 406, "column": 24 }, "end": { - "line": 404, + "line": 406, "column": 42 } }, "callee": { "type": "Identifier", - "start": 17068, - "end": 17079, + "start": 17135, + "end": 17146, "loc": { "start": { - "line": 404, + "line": 406, "column": 24 }, "end": { - "line": 404, + "line": 406, "column": 35 }, "identifierName": "outputStats" @@ -45016,15 +45224,15 @@ "arguments": [ { "type": "Identifier", - "start": 17080, - "end": 17085, + "start": 17147, + "end": 17152, "loc": { "start": { - "line": 404, + "line": 406, "column": 36 }, "end": { - "line": 404, + "line": 406, "column": 41 }, "identifierName": "stats" @@ -45041,43 +45249,43 @@ }, { "type": "ExpressionStatement", - "start": 17131, - "end": 17141, + "start": 17198, + "end": 17208, "loc": { "start": { - "line": 407, + "line": 409, "column": 20 }, "end": { - "line": 407, + "line": 409, "column": 30 } }, "expression": { "type": "CallExpression", - "start": 17131, - "end": 17140, + "start": 17198, + "end": 17207, "loc": { "start": { - "line": 407, + "line": 409, "column": 20 }, "end": { - "line": 407, + "line": 409, "column": 29 } }, "callee": { "type": "Identifier", - "start": 17131, - "end": 17138, + "start": 17198, + "end": 17205, "loc": { "start": { - "line": 407, + "line": 409, "column": 20 }, "end": { - "line": 407, + "line": 409, "column": 27 }, "identifierName": "resolve" @@ -45100,15 +45308,15 @@ }, { "type": "ArrowFunctionExpression", - "start": 17177, - "end": 17230, + "start": 17244, + "end": 17297, "loc": { "start": { - "line": 409, + "line": 411, "column": 15 }, "end": { - "line": 411, + "line": 413, "column": 13 } }, @@ -45119,15 +45327,15 @@ "params": [ { "type": "Identifier", - "start": 17178, - "end": 17181, + "start": 17245, + "end": 17248, "loc": { "start": { - "line": 409, + "line": 411, "column": 16 }, "end": { - "line": 409, + "line": 411, "column": 19 }, "identifierName": "err" @@ -45137,58 +45345,58 @@ ], "body": { "type": "BlockStatement", - "start": 17186, - "end": 17230, + "start": 17253, + "end": 17297, "loc": { "start": { - "line": 409, + "line": 411, "column": 24 }, "end": { - "line": 411, + "line": 413, "column": 13 } }, "body": [ { "type": "ExpressionStatement", - "start": 17204, - "end": 17216, + "start": 17271, + "end": 17283, "loc": { "start": { - "line": 410, + "line": 412, "column": 16 }, "end": { - "line": 410, + "line": 412, "column": 28 } }, "expression": { "type": "CallExpression", - "start": 17204, - "end": 17215, + "start": 17271, + "end": 17282, "loc": { "start": { - "line": 410, + "line": 412, "column": 16 }, "end": { - "line": 410, + "line": 412, "column": 27 } }, "callee": { "type": "Identifier", - "start": 17204, - "end": 17210, + "start": 17271, + "end": 17277, "loc": { "start": { - "line": 410, + "line": 412, "column": 16 }, "end": { - "line": 410, + "line": 412, "column": 22 }, "identifierName": "reject" @@ -45198,15 +45406,15 @@ "arguments": [ { "type": "Identifier", - "start": 17211, - "end": 17214, + "start": 17278, + "end": 17281, "loc": { "start": { - "line": 410, + "line": 412, "column": 23 }, "end": { - "line": 410, + "line": 412, "column": 26 }, "identifierName": "err" @@ -60266,6 +60474,263 @@ } } }, + { + "type": { + "label": "else", + "keyword": "else", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "else", + "start": 8626, + "end": 8630, + "loc": { + "start": { + "line": 185, + "column": 10 + }, + "end": { + "line": 185, + "column": 14 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 8631, + "end": 8632, + "loc": { + "start": { + "line": 185, + "column": 15 + }, + "end": { + "line": 185, + "column": 16 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "log", + "start": 8645, + "end": 8648, + "loc": { + "start": { + "line": 186, + "column": 12 + }, + "end": { + "line": 186, + "column": 15 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 8648, + "end": 8649, + "loc": { + "start": { + "line": 186, + "column": 15 + }, + "end": { + "line": 186, + "column": 16 + } + } + }, + { + "type": { + "label": "`", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 8649, + "end": 8650, + "loc": { + "start": { + "line": 186, + "column": 16 + }, + "end": { + "line": 186, + "column": 17 + } + } + }, + { + "type": { + "label": "template", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "Not embedding metadata in XKT", + "start": 8650, + "end": 8679, + "loc": { + "start": { + "line": 186, + "column": 17 + }, + "end": { + "line": 186, + "column": 46 + } + } + }, + { + "type": { + "label": "`", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 8679, + "end": 8680, + "loc": { + "start": { + "line": 186, + "column": 46 + }, + "end": { + "line": 186, + "column": 47 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 8680, + "end": 8681, + "loc": { + "start": { + "line": 186, + "column": 47 + }, + "end": { + "line": 186, + "column": 48 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 8681, + "end": 8682, + "loc": { + "start": { + "line": 186, + "column": 48 + }, + "end": { + "line": 186, + "column": 49 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 8691, + "end": 8692, + "loc": { + "start": { + "line": 187, + "column": 8 + }, + "end": { + "line": 187, + "column": 9 + } + } + }, { "type": { "label": "let", @@ -60281,15 +60746,15 @@ "updateContext": null }, "value": "let", - "start": 8635, - "end": 8638, + "start": 8702, + "end": 8705, "loc": { "start": { - "line": 187, + "line": 189, "column": 8 }, "end": { - "line": 187, + "line": 189, "column": 11 } } @@ -60307,15 +60772,15 @@ "binop": null }, "value": "metaModelJSON", - "start": 8639, - "end": 8652, + "start": 8706, + "end": 8719, "loc": { "start": { - "line": 187, + "line": 189, "column": 12 }, "end": { - "line": 187, + "line": 189, "column": 25 } } @@ -60333,15 +60798,15 @@ "binop": null, "updateContext": null }, - "start": 8652, - "end": 8653, + "start": 8719, + "end": 8720, "loc": { "start": { - "line": 187, + "line": 189, "column": 25 }, "end": { - "line": 187, + "line": 189, "column": 26 } } @@ -60361,15 +60826,15 @@ "updateContext": null }, "value": "if", - "start": 8663, - "end": 8665, + "start": 8730, + "end": 8732, "loc": { "start": { - "line": 189, + "line": 191, "column": 8 }, "end": { - "line": 189, + "line": 191, "column": 10 } } @@ -60386,15 +60851,15 @@ "postfix": false, "binop": null }, - "start": 8666, - "end": 8667, + "start": 8733, + "end": 8734, "loc": { "start": { - "line": 189, + "line": 191, "column": 11 }, "end": { - "line": 189, + "line": 191, "column": 12 } } @@ -60412,15 +60877,15 @@ "binop": null }, "value": "metaModelDataStr", - "start": 8667, - "end": 8683, + "start": 8734, + "end": 8750, "loc": { "start": { - "line": 189, + "line": 191, "column": 12 }, "end": { - "line": 189, + "line": 191, "column": 28 } } @@ -60437,15 +60902,15 @@ "postfix": false, "binop": null }, - "start": 8683, - "end": 8684, + "start": 8750, + "end": 8751, "loc": { "start": { - "line": 189, + "line": 191, "column": 28 }, "end": { - "line": 189, + "line": 191, "column": 29 } } @@ -60462,15 +60927,15 @@ "postfix": false, "binop": null }, - "start": 8685, - "end": 8686, + "start": 8752, + "end": 8753, "loc": { "start": { - "line": 189, + "line": 191, "column": 30 }, "end": { - "line": 189, + "line": 191, "column": 31 } } @@ -60490,15 +60955,15 @@ "updateContext": null }, "value": "try", - "start": 8699, - "end": 8702, + "start": 8766, + "end": 8769, "loc": { "start": { - "line": 190, + "line": 192, "column": 12 }, "end": { - "line": 190, + "line": 192, "column": 15 } } @@ -60515,15 +60980,15 @@ "postfix": false, "binop": null }, - "start": 8703, - "end": 8704, + "start": 8770, + "end": 8771, "loc": { "start": { - "line": 190, + "line": 192, "column": 16 }, "end": { - "line": 190, + "line": 192, "column": 17 } } @@ -60541,15 +61006,15 @@ "binop": null }, "value": "metaModelJSON", - "start": 8721, - "end": 8734, + "start": 8788, + "end": 8801, "loc": { "start": { - "line": 191, + "line": 193, "column": 16 }, "end": { - "line": 191, + "line": 193, "column": 29 } } @@ -60568,15 +61033,15 @@ "updateContext": null }, "value": "=", - "start": 8735, - "end": 8736, + "start": 8802, + "end": 8803, "loc": { "start": { - "line": 191, + "line": 193, "column": 30 }, "end": { - "line": 191, + "line": 193, "column": 31 } } @@ -60594,15 +61059,15 @@ "binop": null }, "value": "JSON", - "start": 8737, - "end": 8741, + "start": 8804, + "end": 8808, "loc": { "start": { - "line": 191, + "line": 193, "column": 32 }, "end": { - "line": 191, + "line": 193, "column": 36 } } @@ -60620,15 +61085,15 @@ "binop": null, "updateContext": null }, - "start": 8741, - "end": 8742, + "start": 8808, + "end": 8809, "loc": { "start": { - "line": 191, + "line": 193, "column": 36 }, "end": { - "line": 191, + "line": 193, "column": 37 } } @@ -60646,15 +61111,15 @@ "binop": null }, "value": "parse", - "start": 8742, - "end": 8747, + "start": 8809, + "end": 8814, "loc": { "start": { - "line": 191, + "line": 193, "column": 37 }, "end": { - "line": 191, + "line": 193, "column": 42 } } @@ -60671,15 +61136,15 @@ "postfix": false, "binop": null }, - "start": 8747, - "end": 8748, + "start": 8814, + "end": 8815, "loc": { "start": { - "line": 191, + "line": 193, "column": 42 }, "end": { - "line": 191, + "line": 193, "column": 43 } } @@ -60697,15 +61162,15 @@ "binop": null }, "value": "metaModelDataStr", - "start": 8748, - "end": 8764, + "start": 8815, + "end": 8831, "loc": { "start": { - "line": 191, + "line": 193, "column": 43 }, "end": { - "line": 191, + "line": 193, "column": 59 } } @@ -60722,15 +61187,15 @@ "postfix": false, "binop": null }, - "start": 8764, - "end": 8765, + "start": 8831, + "end": 8832, "loc": { "start": { - "line": 191, + "line": 193, "column": 59 }, "end": { - "line": 191, + "line": 193, "column": 60 } } @@ -60748,15 +61213,15 @@ "binop": null, "updateContext": null }, - "start": 8765, - "end": 8766, + "start": 8832, + "end": 8833, "loc": { "start": { - "line": 191, + "line": 193, "column": 60 }, "end": { - "line": 191, + "line": 193, "column": 61 } } @@ -60773,15 +61238,15 @@ "postfix": false, "binop": null }, - "start": 8779, - "end": 8780, + "start": 8846, + "end": 8847, "loc": { "start": { - "line": 192, + "line": 194, "column": 12 }, "end": { - "line": 192, + "line": 194, "column": 13 } } @@ -60801,15 +61266,15 @@ "updateContext": null }, "value": "catch", - "start": 8781, - "end": 8786, + "start": 8848, + "end": 8853, "loc": { "start": { - "line": 192, + "line": 194, "column": 14 }, "end": { - "line": 192, + "line": 194, "column": 19 } } @@ -60826,15 +61291,15 @@ "postfix": false, "binop": null }, - "start": 8787, - "end": 8788, + "start": 8854, + "end": 8855, "loc": { "start": { - "line": 192, + "line": 194, "column": 20 }, "end": { - "line": 192, + "line": 194, "column": 21 } } @@ -60852,15 +61317,15 @@ "binop": null }, "value": "e", - "start": 8788, - "end": 8789, + "start": 8855, + "end": 8856, "loc": { "start": { - "line": 192, + "line": 194, "column": 21 }, "end": { - "line": 192, + "line": 194, "column": 22 } } @@ -60877,15 +61342,15 @@ "postfix": false, "binop": null }, - "start": 8789, - "end": 8790, + "start": 8856, + "end": 8857, "loc": { "start": { - "line": 192, + "line": 194, "column": 22 }, "end": { - "line": 192, + "line": 194, "column": 23 } } @@ -60902,15 +61367,15 @@ "postfix": false, "binop": null }, - "start": 8791, - "end": 8792, + "start": 8858, + "end": 8859, "loc": { "start": { - "line": 192, + "line": 194, "column": 24 }, "end": { - "line": 192, + "line": 194, "column": 25 } } @@ -60928,15 +61393,15 @@ "binop": null }, "value": "log", - "start": 8809, - "end": 8812, + "start": 8876, + "end": 8879, "loc": { "start": { - "line": 193, + "line": 195, "column": 16 }, "end": { - "line": 193, + "line": 195, "column": 19 } } @@ -60953,15 +61418,15 @@ "postfix": false, "binop": null }, - "start": 8812, - "end": 8813, + "start": 8879, + "end": 8880, "loc": { "start": { - "line": 193, + "line": 195, "column": 19 }, "end": { - "line": 193, + "line": 195, "column": 20 } } @@ -60978,15 +61443,15 @@ "postfix": false, "binop": null }, - "start": 8813, - "end": 8814, + "start": 8880, + "end": 8881, "loc": { "start": { - "line": 193, + "line": 195, "column": 20 }, "end": { - "line": 193, + "line": 195, "column": 21 } } @@ -61005,15 +61470,15 @@ "updateContext": null }, "value": "Error parsing metadata JSON: ", - "start": 8814, - "end": 8843, + "start": 8881, + "end": 8910, "loc": { "start": { - "line": 193, + "line": 195, "column": 21 }, "end": { - "line": 193, + "line": 195, "column": 50 } } @@ -61030,15 +61495,15 @@ "postfix": false, "binop": null }, - "start": 8843, - "end": 8845, + "start": 8910, + "end": 8912, "loc": { "start": { - "line": 193, + "line": 195, "column": 50 }, "end": { - "line": 193, + "line": 195, "column": 52 } } @@ -61056,15 +61521,15 @@ "binop": null }, "value": "e", - "start": 8845, - "end": 8846, + "start": 8912, + "end": 8913, "loc": { "start": { - "line": 193, + "line": 195, "column": 52 }, "end": { - "line": 193, + "line": 195, "column": 53 } } @@ -61081,15 +61546,15 @@ "postfix": false, "binop": null }, - "start": 8846, - "end": 8847, + "start": 8913, + "end": 8914, "loc": { "start": { - "line": 193, + "line": 195, "column": 53 }, "end": { - "line": 193, + "line": 195, "column": 54 } } @@ -61108,15 +61573,15 @@ "updateContext": null }, "value": "", - "start": 8847, - "end": 8847, + "start": 8914, + "end": 8914, "loc": { "start": { - "line": 193, + "line": 195, "column": 54 }, "end": { - "line": 193, + "line": 195, "column": 54 } } @@ -61133,15 +61598,15 @@ "postfix": false, "binop": null }, - "start": 8847, - "end": 8848, + "start": 8914, + "end": 8915, "loc": { "start": { - "line": 193, + "line": 195, "column": 54 }, "end": { - "line": 193, + "line": 195, "column": 55 } } @@ -61158,15 +61623,15 @@ "postfix": false, "binop": null }, - "start": 8848, - "end": 8849, + "start": 8915, + "end": 8916, "loc": { "start": { - "line": 193, + "line": 195, "column": 55 }, "end": { - "line": 193, + "line": 195, "column": 56 } } @@ -61184,15 +61649,15 @@ "binop": null, "updateContext": null }, - "start": 8849, - "end": 8850, + "start": 8916, + "end": 8917, "loc": { "start": { - "line": 193, + "line": 195, "column": 56 }, "end": { - "line": 193, + "line": 195, "column": 57 } } @@ -61209,15 +61674,15 @@ "postfix": false, "binop": null }, - "start": 8863, - "end": 8864, + "start": 8930, + "end": 8931, "loc": { "start": { - "line": 194, + "line": 196, "column": 12 }, "end": { - "line": 194, + "line": 196, "column": 13 } } @@ -61234,15 +61699,15 @@ "postfix": false, "binop": null }, - "start": 8873, - "end": 8874, + "start": 8940, + "end": 8941, "loc": { "start": { - "line": 195, + "line": 197, "column": 8 }, "end": { - "line": 195, + "line": 197, "column": 9 } } @@ -61260,15 +61725,15 @@ "binop": null }, "value": "minTileSize", - "start": 8884, - "end": 8895, + "start": 8951, + "end": 8962, "loc": { "start": { - "line": 197, + "line": 199, "column": 8 }, "end": { - "line": 197, + "line": 199, "column": 19 } } @@ -61287,15 +61752,15 @@ "updateContext": null }, "value": "=", - "start": 8896, - "end": 8897, + "start": 8963, + "end": 8964, "loc": { "start": { - "line": 197, + "line": 199, "column": 20 }, "end": { - "line": 197, + "line": 199, "column": 21 } } @@ -61313,15 +61778,15 @@ "binop": null }, "value": "overrideOption", - "start": 8898, - "end": 8912, + "start": 8965, + "end": 8979, "loc": { "start": { - "line": 197, + "line": 199, "column": 22 }, "end": { - "line": 197, + "line": 199, "column": 36 } } @@ -61338,15 +61803,15 @@ "postfix": false, "binop": null }, - "start": 8912, - "end": 8913, + "start": 8979, + "end": 8980, "loc": { "start": { - "line": 197, + "line": 199, "column": 36 }, "end": { - "line": 197, + "line": 199, "column": 37 } } @@ -61364,15 +61829,15 @@ "binop": null }, "value": "fileTypeConfigs", - "start": 8913, - "end": 8928, + "start": 8980, + "end": 8995, "loc": { "start": { - "line": 197, + "line": 199, "column": 37 }, "end": { - "line": 197, + "line": 199, "column": 52 } } @@ -61390,15 +61855,15 @@ "binop": null, "updateContext": null }, - "start": 8928, - "end": 8929, + "start": 8995, + "end": 8996, "loc": { "start": { - "line": 197, + "line": 199, "column": 52 }, "end": { - "line": 197, + "line": 199, "column": 53 } } @@ -61416,15 +61881,15 @@ "binop": null }, "value": "minTileSize", - "start": 8929, - "end": 8940, + "start": 8996, + "end": 9007, "loc": { "start": { - "line": 197, + "line": 199, "column": 53 }, "end": { - "line": 197, + "line": 199, "column": 64 } } @@ -61442,15 +61907,15 @@ "binop": null, "updateContext": null }, - "start": 8940, - "end": 8941, + "start": 9007, + "end": 9008, "loc": { "start": { - "line": 197, + "line": 199, "column": 64 }, "end": { - "line": 197, + "line": 199, "column": 65 } } @@ -61468,15 +61933,15 @@ "binop": null }, "value": "minTileSize", - "start": 8942, - "end": 8953, + "start": 9009, + "end": 9020, "loc": { "start": { - "line": 197, + "line": 199, "column": 66 }, "end": { - "line": 197, + "line": 199, "column": 77 } } @@ -61493,15 +61958,15 @@ "postfix": false, "binop": null }, - "start": 8953, - "end": 8954, + "start": 9020, + "end": 9021, "loc": { "start": { - "line": 197, + "line": 199, "column": 77 }, "end": { - "line": 197, + "line": 199, "column": 78 } } @@ -61519,15 +61984,15 @@ "binop": null, "updateContext": null }, - "start": 8954, - "end": 8955, + "start": 9021, + "end": 9022, "loc": { "start": { - "line": 197, + "line": 199, "column": 78 }, "end": { - "line": 197, + "line": 199, "column": 79 } } @@ -61545,15 +62010,15 @@ "binop": null }, "value": "rotateX", - "start": 8964, - "end": 8971, + "start": 9031, + "end": 9038, "loc": { "start": { - "line": 198, + "line": 200, "column": 8 }, "end": { - "line": 198, + "line": 200, "column": 15 } } @@ -61572,15 +62037,15 @@ "updateContext": null }, "value": "=", - "start": 8972, - "end": 8973, + "start": 9039, + "end": 9040, "loc": { "start": { - "line": 198, + "line": 200, "column": 16 }, "end": { - "line": 198, + "line": 200, "column": 17 } } @@ -61598,15 +62063,15 @@ "binop": null }, "value": "overrideOption", - "start": 8974, - "end": 8988, + "start": 9041, + "end": 9055, "loc": { "start": { - "line": 198, + "line": 200, "column": 18 }, "end": { - "line": 198, + "line": 200, "column": 32 } } @@ -61623,15 +62088,15 @@ "postfix": false, "binop": null }, - "start": 8988, - "end": 8989, + "start": 9055, + "end": 9056, "loc": { "start": { - "line": 198, + "line": 200, "column": 32 }, "end": { - "line": 198, + "line": 200, "column": 33 } } @@ -61649,15 +62114,15 @@ "binop": null }, "value": "fileTypeConfigs", - "start": 8989, - "end": 9004, + "start": 9056, + "end": 9071, "loc": { "start": { - "line": 198, + "line": 200, "column": 33 }, "end": { - "line": 198, + "line": 200, "column": 48 } } @@ -61675,15 +62140,15 @@ "binop": null, "updateContext": null }, - "start": 9004, - "end": 9005, + "start": 9071, + "end": 9072, "loc": { "start": { - "line": 198, + "line": 200, "column": 48 }, "end": { - "line": 198, + "line": 200, "column": 49 } } @@ -61701,15 +62166,15 @@ "binop": null }, "value": "rotateX", - "start": 9005, - "end": 9012, + "start": 9072, + "end": 9079, "loc": { "start": { - "line": 198, + "line": 200, "column": 49 }, "end": { - "line": 198, + "line": 200, "column": 56 } } @@ -61727,15 +62192,15 @@ "binop": null, "updateContext": null }, - "start": 9012, - "end": 9013, + "start": 9079, + "end": 9080, "loc": { "start": { - "line": 198, + "line": 200, "column": 56 }, "end": { - "line": 198, + "line": 200, "column": 57 } } @@ -61753,15 +62218,15 @@ "binop": null }, "value": "rotateX", - "start": 9014, - "end": 9021, + "start": 9081, + "end": 9088, "loc": { "start": { - "line": 198, + "line": 200, "column": 58 }, "end": { - "line": 198, + "line": 200, "column": 65 } } @@ -61778,15 +62243,15 @@ "postfix": false, "binop": null }, - "start": 9021, - "end": 9022, + "start": 9088, + "end": 9089, "loc": { "start": { - "line": 198, + "line": 200, "column": 65 }, "end": { - "line": 198, + "line": 200, "column": 66 } } @@ -61804,15 +62269,15 @@ "binop": null, "updateContext": null }, - "start": 9022, - "end": 9023, + "start": 9089, + "end": 9090, "loc": { "start": { - "line": 198, + "line": 200, "column": 66 }, "end": { - "line": 198, + "line": 200, "column": 67 } } @@ -61830,15 +62295,15 @@ "binop": null }, "value": "reuseGeometries", - "start": 9032, - "end": 9047, + "start": 9099, + "end": 9114, "loc": { "start": { - "line": 199, + "line": 201, "column": 8 }, "end": { - "line": 199, + "line": 201, "column": 23 } } @@ -61857,15 +62322,15 @@ "updateContext": null }, "value": "=", - "start": 9048, - "end": 9049, + "start": 9115, + "end": 9116, "loc": { "start": { - "line": 199, + "line": 201, "column": 24 }, "end": { - "line": 199, + "line": 201, "column": 25 } } @@ -61883,15 +62348,15 @@ "binop": null }, "value": "overrideOption", - "start": 9050, - "end": 9064, + "start": 9117, + "end": 9131, "loc": { "start": { - "line": 199, + "line": 201, "column": 26 }, "end": { - "line": 199, + "line": 201, "column": 40 } } @@ -61908,15 +62373,15 @@ "postfix": false, "binop": null }, - "start": 9064, - "end": 9065, + "start": 9131, + "end": 9132, "loc": { "start": { - "line": 199, + "line": 201, "column": 40 }, "end": { - "line": 199, + "line": 201, "column": 41 } } @@ -61934,15 +62399,15 @@ "binop": null }, "value": "fileTypeConfigs", - "start": 9065, - "end": 9080, + "start": 9132, + "end": 9147, "loc": { "start": { - "line": 199, + "line": 201, "column": 41 }, "end": { - "line": 199, + "line": 201, "column": 56 } } @@ -61960,15 +62425,15 @@ "binop": null, "updateContext": null }, - "start": 9080, - "end": 9081, + "start": 9147, + "end": 9148, "loc": { "start": { - "line": 199, + "line": 201, "column": 56 }, "end": { - "line": 199, + "line": 201, "column": 57 } } @@ -61986,15 +62451,15 @@ "binop": null }, "value": "reuseGeometries", - "start": 9081, - "end": 9096, + "start": 9148, + "end": 9163, "loc": { "start": { - "line": 199, + "line": 201, "column": 57 }, "end": { - "line": 199, + "line": 201, "column": 72 } } @@ -62012,15 +62477,15 @@ "binop": null, "updateContext": null }, - "start": 9096, - "end": 9097, + "start": 9163, + "end": 9164, "loc": { "start": { - "line": 199, + "line": 201, "column": 72 }, "end": { - "line": 199, + "line": 201, "column": 73 } } @@ -62038,15 +62503,15 @@ "binop": null }, "value": "reuseGeometries", - "start": 9098, - "end": 9113, + "start": 9165, + "end": 9180, "loc": { "start": { - "line": 199, + "line": 201, "column": 74 }, "end": { - "line": 199, + "line": 201, "column": 89 } } @@ -62063,15 +62528,15 @@ "postfix": false, "binop": null }, - "start": 9113, - "end": 9114, + "start": 9180, + "end": 9181, "loc": { "start": { - "line": 199, + "line": 201, "column": 89 }, "end": { - "line": 199, + "line": 201, "column": 90 } } @@ -62089,15 +62554,15 @@ "binop": null, "updateContext": null }, - "start": 9114, - "end": 9115, + "start": 9181, + "end": 9182, "loc": { "start": { - "line": 199, + "line": 201, "column": 90 }, "end": { - "line": 199, + "line": 201, "column": 91 } } @@ -62115,15 +62580,15 @@ "binop": null }, "value": "includeTextures", - "start": 9124, - "end": 9139, + "start": 9191, + "end": 9206, "loc": { "start": { - "line": 200, + "line": 202, "column": 8 }, "end": { - "line": 200, + "line": 202, "column": 23 } } @@ -62142,15 +62607,15 @@ "updateContext": null }, "value": "=", - "start": 9140, - "end": 9141, + "start": 9207, + "end": 9208, "loc": { "start": { - "line": 200, + "line": 202, "column": 24 }, "end": { - "line": 200, + "line": 202, "column": 25 } } @@ -62168,15 +62633,15 @@ "binop": null }, "value": "overrideOption", - "start": 9142, - "end": 9156, + "start": 9209, + "end": 9223, "loc": { "start": { - "line": 200, + "line": 202, "column": 26 }, "end": { - "line": 200, + "line": 202, "column": 40 } } @@ -62193,15 +62658,15 @@ "postfix": false, "binop": null }, - "start": 9156, - "end": 9157, + "start": 9223, + "end": 9224, "loc": { "start": { - "line": 200, + "line": 202, "column": 40 }, "end": { - "line": 200, + "line": 202, "column": 41 } } @@ -62219,15 +62684,15 @@ "binop": null }, "value": "fileTypeConfigs", - "start": 9157, - "end": 9172, + "start": 9224, + "end": 9239, "loc": { "start": { - "line": 200, + "line": 202, "column": 41 }, "end": { - "line": 200, + "line": 202, "column": 56 } } @@ -62245,15 +62710,15 @@ "binop": null, "updateContext": null }, - "start": 9172, - "end": 9173, + "start": 9239, + "end": 9240, "loc": { "start": { - "line": 200, + "line": 202, "column": 56 }, "end": { - "line": 200, + "line": 202, "column": 57 } } @@ -62271,15 +62736,15 @@ "binop": null }, "value": "includeTextures", - "start": 9173, - "end": 9188, + "start": 9240, + "end": 9255, "loc": { "start": { - "line": 200, + "line": 202, "column": 57 }, "end": { - "line": 200, + "line": 202, "column": 72 } } @@ -62297,15 +62762,15 @@ "binop": null, "updateContext": null }, - "start": 9188, - "end": 9189, + "start": 9255, + "end": 9256, "loc": { "start": { - "line": 200, + "line": 202, "column": 72 }, "end": { - "line": 200, + "line": 202, "column": 73 } } @@ -62323,15 +62788,15 @@ "binop": null }, "value": "includeTextures", - "start": 9190, - "end": 9205, + "start": 9257, + "end": 9272, "loc": { "start": { - "line": 200, + "line": 202, "column": 74 }, "end": { - "line": 200, + "line": 202, "column": 89 } } @@ -62348,15 +62813,15 @@ "postfix": false, "binop": null }, - "start": 9205, - "end": 9206, + "start": 9272, + "end": 9273, "loc": { "start": { - "line": 200, + "line": 202, "column": 89 }, "end": { - "line": 200, + "line": 202, "column": 90 } } @@ -62374,15 +62839,15 @@ "binop": null, "updateContext": null }, - "start": 9206, - "end": 9207, + "start": 9273, + "end": 9274, "loc": { "start": { - "line": 200, + "line": 202, "column": 90 }, "end": { - "line": 200, + "line": 202, "column": 91 } } @@ -62400,15 +62865,15 @@ "binop": null }, "value": "includeNormals", - "start": 9216, - "end": 9230, + "start": 9283, + "end": 9297, "loc": { "start": { - "line": 201, + "line": 203, "column": 8 }, "end": { - "line": 201, + "line": 203, "column": 22 } } @@ -62427,15 +62892,15 @@ "updateContext": null }, "value": "=", - "start": 9231, - "end": 9232, + "start": 9298, + "end": 9299, "loc": { "start": { - "line": 201, + "line": 203, "column": 23 }, "end": { - "line": 201, + "line": 203, "column": 24 } } @@ -62453,15 +62918,15 @@ "binop": null }, "value": "overrideOption", - "start": 9233, - "end": 9247, + "start": 9300, + "end": 9314, "loc": { "start": { - "line": 201, + "line": 203, "column": 25 }, "end": { - "line": 201, + "line": 203, "column": 39 } } @@ -62478,15 +62943,15 @@ "postfix": false, "binop": null }, - "start": 9247, - "end": 9248, + "start": 9314, + "end": 9315, "loc": { "start": { - "line": 201, + "line": 203, "column": 39 }, "end": { - "line": 201, + "line": 203, "column": 40 } } @@ -62504,15 +62969,15 @@ "binop": null }, "value": "fileTypeConfigs", - "start": 9248, - "end": 9263, + "start": 9315, + "end": 9330, "loc": { "start": { - "line": 201, + "line": 203, "column": 40 }, "end": { - "line": 201, + "line": 203, "column": 55 } } @@ -62530,15 +62995,15 @@ "binop": null, "updateContext": null }, - "start": 9263, - "end": 9264, + "start": 9330, + "end": 9331, "loc": { "start": { - "line": 201, + "line": 203, "column": 55 }, "end": { - "line": 201, + "line": 203, "column": 56 } } @@ -62556,15 +63021,15 @@ "binop": null }, "value": "includeNormals", - "start": 9264, - "end": 9278, + "start": 9331, + "end": 9345, "loc": { "start": { - "line": 201, + "line": 203, "column": 56 }, "end": { - "line": 201, + "line": 203, "column": 70 } } @@ -62582,15 +63047,15 @@ "binop": null, "updateContext": null }, - "start": 9278, - "end": 9279, + "start": 9345, + "end": 9346, "loc": { "start": { - "line": 201, + "line": 203, "column": 70 }, "end": { - "line": 201, + "line": 203, "column": 71 } } @@ -62608,15 +63073,15 @@ "binop": null }, "value": "includeNormals", - "start": 9280, - "end": 9294, + "start": 9347, + "end": 9361, "loc": { "start": { - "line": 201, + "line": 203, "column": 72 }, "end": { - "line": 201, + "line": 203, "column": 86 } } @@ -62633,15 +63098,15 @@ "postfix": false, "binop": null }, - "start": 9294, - "end": 9295, + "start": 9361, + "end": 9362, "loc": { "start": { - "line": 201, + "line": 203, "column": 86 }, "end": { - "line": 201, + "line": 203, "column": 87 } } @@ -62659,15 +63124,15 @@ "binop": null, "updateContext": null }, - "start": 9295, - "end": 9296, + "start": 9362, + "end": 9363, "loc": { "start": { - "line": 201, + "line": 203, "column": 87 }, "end": { - "line": 201, + "line": 203, "column": 88 } } @@ -62685,15 +63150,15 @@ "binop": null }, "value": "includeTypes", - "start": 9305, - "end": 9317, + "start": 9372, + "end": 9384, "loc": { "start": { - "line": 202, + "line": 204, "column": 8 }, "end": { - "line": 202, + "line": 204, "column": 20 } } @@ -62712,15 +63177,15 @@ "updateContext": null }, "value": "=", - "start": 9318, - "end": 9319, + "start": 9385, + "end": 9386, "loc": { "start": { - "line": 202, + "line": 204, "column": 21 }, "end": { - "line": 202, + "line": 204, "column": 22 } } @@ -62738,15 +63203,15 @@ "binop": null }, "value": "overrideOption", - "start": 9320, - "end": 9334, + "start": 9387, + "end": 9401, "loc": { "start": { - "line": 202, + "line": 204, "column": 23 }, "end": { - "line": 202, + "line": 204, "column": 37 } } @@ -62763,15 +63228,15 @@ "postfix": false, "binop": null }, - "start": 9334, - "end": 9335, + "start": 9401, + "end": 9402, "loc": { "start": { - "line": 202, + "line": 204, "column": 37 }, "end": { - "line": 202, + "line": 204, "column": 38 } } @@ -62789,15 +63254,15 @@ "binop": null }, "value": "fileTypeConfigs", - "start": 9335, - "end": 9350, + "start": 9402, + "end": 9417, "loc": { "start": { - "line": 202, + "line": 204, "column": 38 }, "end": { - "line": 202, + "line": 204, "column": 53 } } @@ -62815,15 +63280,15 @@ "binop": null, "updateContext": null }, - "start": 9350, - "end": 9351, + "start": 9417, + "end": 9418, "loc": { "start": { - "line": 202, + "line": 204, "column": 53 }, "end": { - "line": 202, + "line": 204, "column": 54 } } @@ -62841,15 +63306,15 @@ "binop": null }, "value": "includeTypes", - "start": 9351, - "end": 9363, + "start": 9418, + "end": 9430, "loc": { "start": { - "line": 202, + "line": 204, "column": 54 }, "end": { - "line": 202, + "line": 204, "column": 66 } } @@ -62867,15 +63332,15 @@ "binop": null, "updateContext": null }, - "start": 9363, - "end": 9364, + "start": 9430, + "end": 9431, "loc": { "start": { - "line": 202, + "line": 204, "column": 66 }, "end": { - "line": 202, + "line": 204, "column": 67 } } @@ -62893,15 +63358,15 @@ "binop": null }, "value": "includeTypes", - "start": 9365, - "end": 9377, + "start": 9432, + "end": 9444, "loc": { "start": { - "line": 202, + "line": 204, "column": 68 }, "end": { - "line": 202, + "line": 204, "column": 80 } } @@ -62918,15 +63383,15 @@ "postfix": false, "binop": null }, - "start": 9377, - "end": 9378, + "start": 9444, + "end": 9445, "loc": { "start": { - "line": 202, + "line": 204, "column": 80 }, "end": { - "line": 202, + "line": 204, "column": 81 } } @@ -62944,15 +63409,15 @@ "binop": null, "updateContext": null }, - "start": 9378, - "end": 9379, + "start": 9445, + "end": 9446, "loc": { "start": { - "line": 202, + "line": 204, "column": 81 }, "end": { - "line": 202, + "line": 204, "column": 82 } } @@ -62970,15 +63435,15 @@ "binop": null }, "value": "excludeTypes", - "start": 9388, - "end": 9400, + "start": 9455, + "end": 9467, "loc": { "start": { - "line": 203, + "line": 205, "column": 8 }, "end": { - "line": 203, + "line": 205, "column": 20 } } @@ -62997,15 +63462,15 @@ "updateContext": null }, "value": "=", - "start": 9401, - "end": 9402, + "start": 9468, + "end": 9469, "loc": { "start": { - "line": 203, + "line": 205, "column": 21 }, "end": { - "line": 203, + "line": 205, "column": 22 } } @@ -63023,15 +63488,15 @@ "binop": null }, "value": "overrideOption", - "start": 9403, - "end": 9417, + "start": 9470, + "end": 9484, "loc": { "start": { - "line": 203, + "line": 205, "column": 23 }, "end": { - "line": 203, + "line": 205, "column": 37 } } @@ -63048,15 +63513,15 @@ "postfix": false, "binop": null }, - "start": 9417, - "end": 9418, + "start": 9484, + "end": 9485, "loc": { "start": { - "line": 203, + "line": 205, "column": 37 }, "end": { - "line": 203, + "line": 205, "column": 38 } } @@ -63074,15 +63539,15 @@ "binop": null }, "value": "fileTypeConfigs", - "start": 9418, - "end": 9433, + "start": 9485, + "end": 9500, "loc": { "start": { - "line": 203, + "line": 205, "column": 38 }, "end": { - "line": 203, + "line": 205, "column": 53 } } @@ -63100,15 +63565,15 @@ "binop": null, "updateContext": null }, - "start": 9433, - "end": 9434, + "start": 9500, + "end": 9501, "loc": { "start": { - "line": 203, + "line": 205, "column": 53 }, "end": { - "line": 203, + "line": 205, "column": 54 } } @@ -63126,15 +63591,15 @@ "binop": null }, "value": "excludeTypes", - "start": 9434, - "end": 9446, + "start": 9501, + "end": 9513, "loc": { "start": { - "line": 203, + "line": 205, "column": 54 }, "end": { - "line": 203, + "line": 205, "column": 66 } } @@ -63152,15 +63617,15 @@ "binop": null, "updateContext": null }, - "start": 9446, - "end": 9447, + "start": 9513, + "end": 9514, "loc": { "start": { - "line": 203, + "line": 205, "column": 66 }, "end": { - "line": 203, + "line": 205, "column": 67 } } @@ -63178,15 +63643,15 @@ "binop": null }, "value": "excludeTypes", - "start": 9448, - "end": 9460, + "start": 9515, + "end": 9527, "loc": { "start": { - "line": 203, + "line": 205, "column": 68 }, "end": { - "line": 203, + "line": 205, "column": 80 } } @@ -63203,15 +63668,15 @@ "postfix": false, "binop": null }, - "start": 9460, - "end": 9461, + "start": 9527, + "end": 9528, "loc": { "start": { - "line": 203, + "line": 205, "column": 80 }, "end": { - "line": 203, + "line": 205, "column": 81 } } @@ -63229,15 +63694,15 @@ "binop": null, "updateContext": null }, - "start": 9461, - "end": 9462, + "start": 9528, + "end": 9529, "loc": { "start": { - "line": 203, + "line": 205, "column": 81 }, "end": { - "line": 203, + "line": 205, "column": 82 } } @@ -63257,15 +63722,15 @@ "updateContext": null }, "value": "if", - "start": 9472, - "end": 9474, + "start": 9539, + "end": 9541, "loc": { "start": { - "line": 205, + "line": 207, "column": 8 }, "end": { - "line": 205, + "line": 207, "column": 10 } } @@ -63282,15 +63747,15 @@ "postfix": false, "binop": null }, - "start": 9475, - "end": 9476, + "start": 9542, + "end": 9543, "loc": { "start": { - "line": 205, + "line": 207, "column": 11 }, "end": { - "line": 205, + "line": 207, "column": 12 } } @@ -63308,15 +63773,15 @@ "binop": null }, "value": "reuseGeometries", - "start": 9476, - "end": 9491, + "start": 9543, + "end": 9558, "loc": { "start": { - "line": 205, + "line": 207, "column": 12 }, "end": { - "line": 205, + "line": 207, "column": 27 } } @@ -63335,15 +63800,15 @@ "updateContext": null }, "value": "===", - "start": 9492, - "end": 9495, + "start": 9559, + "end": 9562, "loc": { "start": { - "line": 205, + "line": 207, "column": 28 }, "end": { - "line": 205, + "line": 207, "column": 31 } } @@ -63363,15 +63828,15 @@ "updateContext": null }, "value": "false", - "start": 9496, - "end": 9501, + "start": 9563, + "end": 9568, "loc": { "start": { - "line": 205, + "line": 207, "column": 32 }, "end": { - "line": 205, + "line": 207, "column": 37 } } @@ -63388,15 +63853,15 @@ "postfix": false, "binop": null }, - "start": 9501, - "end": 9502, + "start": 9568, + "end": 9569, "loc": { "start": { - "line": 205, + "line": 207, "column": 37 }, "end": { - "line": 205, + "line": 207, "column": 38 } } @@ -63413,15 +63878,15 @@ "postfix": false, "binop": null }, - "start": 9503, - "end": 9504, + "start": 9570, + "end": 9571, "loc": { "start": { - "line": 205, + "line": 207, "column": 39 }, "end": { - "line": 205, + "line": 207, "column": 40 } } @@ -63439,15 +63904,15 @@ "binop": null }, "value": "log", - "start": 9517, - "end": 9520, + "start": 9584, + "end": 9587, "loc": { "start": { - "line": 206, + "line": 208, "column": 12 }, "end": { - "line": 206, + "line": 208, "column": 15 } } @@ -63464,15 +63929,15 @@ "postfix": false, "binop": null }, - "start": 9520, - "end": 9521, + "start": 9587, + "end": 9588, "loc": { "start": { - "line": 206, + "line": 208, "column": 15 }, "end": { - "line": 206, + "line": 208, "column": 16 } } @@ -63491,15 +63956,15 @@ "updateContext": null }, "value": "Geometry reuse is disabled", - "start": 9521, - "end": 9549, + "start": 9588, + "end": 9616, "loc": { "start": { - "line": 206, + "line": 208, "column": 16 }, "end": { - "line": 206, + "line": 208, "column": 44 } } @@ -63516,15 +63981,15 @@ "postfix": false, "binop": null }, - "start": 9549, - "end": 9550, + "start": 9616, + "end": 9617, "loc": { "start": { - "line": 206, + "line": 208, "column": 44 }, "end": { - "line": 206, + "line": 208, "column": 45 } } @@ -63542,15 +64007,15 @@ "binop": null, "updateContext": null }, - "start": 9550, - "end": 9551, + "start": 9617, + "end": 9618, "loc": { "start": { - "line": 206, + "line": 208, "column": 45 }, "end": { - "line": 206, + "line": 208, "column": 46 } } @@ -63567,15 +64032,15 @@ "postfix": false, "binop": null }, - "start": 9560, - "end": 9561, + "start": 9627, + "end": 9628, "loc": { "start": { - "line": 207, + "line": 209, "column": 8 }, "end": { - "line": 207, + "line": 209, "column": 9 } } @@ -63595,15 +64060,15 @@ "updateContext": null }, "value": "const", - "start": 9571, - "end": 9576, + "start": 9638, + "end": 9643, "loc": { "start": { - "line": 209, + "line": 211, "column": 8 }, "end": { - "line": 209, + "line": 211, "column": 13 } } @@ -63621,15 +64086,15 @@ "binop": null }, "value": "xktModel", - "start": 9577, - "end": 9585, + "start": 9644, + "end": 9652, "loc": { "start": { - "line": 209, + "line": 211, "column": 14 }, "end": { - "line": 209, + "line": 211, "column": 22 } } @@ -63648,15 +64113,15 @@ "updateContext": null }, "value": "=", - "start": 9586, - "end": 9587, + "start": 9653, + "end": 9654, "loc": { "start": { - "line": 209, + "line": 211, "column": 23 }, "end": { - "line": 209, + "line": 211, "column": 24 } } @@ -63676,15 +64141,15 @@ "updateContext": null }, "value": "new", - "start": 9588, - "end": 9591, + "start": 9655, + "end": 9658, "loc": { "start": { - "line": 209, + "line": 211, "column": 25 }, "end": { - "line": 209, + "line": 211, "column": 28 } } @@ -63702,15 +64167,15 @@ "binop": null }, "value": "XKTModel", - "start": 9592, - "end": 9600, + "start": 9659, + "end": 9667, "loc": { "start": { - "line": 209, + "line": 211, "column": 29 }, "end": { - "line": 209, + "line": 211, "column": 37 } } @@ -63727,15 +64192,15 @@ "postfix": false, "binop": null }, - "start": 9600, - "end": 9601, + "start": 9667, + "end": 9668, "loc": { "start": { - "line": 209, + "line": 211, "column": 37 }, "end": { - "line": 209, + "line": 211, "column": 38 } } @@ -63752,15 +64217,15 @@ "postfix": false, "binop": null }, - "start": 9601, - "end": 9602, + "start": 9668, + "end": 9669, "loc": { "start": { - "line": 209, + "line": 211, "column": 38 }, "end": { - "line": 209, + "line": 211, "column": 39 } } @@ -63778,15 +64243,15 @@ "binop": null }, "value": "minTileSize", - "start": 9615, - "end": 9626, + "start": 9682, + "end": 9693, "loc": { "start": { - "line": 210, + "line": 212, "column": 12 }, "end": { - "line": 210, + "line": 212, "column": 23 } } @@ -63803,15 +64268,15 @@ "postfix": false, "binop": null }, - "start": 9635, - "end": 9636, + "start": 9702, + "end": 9703, "loc": { "start": { - "line": 211, + "line": 213, "column": 8 }, "end": { - "line": 211, + "line": 213, "column": 9 } } @@ -63828,15 +64293,15 @@ "postfix": false, "binop": null }, - "start": 9636, - "end": 9637, + "start": 9703, + "end": 9704, "loc": { "start": { - "line": 211, + "line": 213, "column": 9 }, "end": { - "line": 211, + "line": 213, "column": 10 } } @@ -63854,15 +64319,15 @@ "binop": null, "updateContext": null }, - "start": 9637, - "end": 9638, + "start": 9704, + "end": 9705, "loc": { "start": { - "line": 211, + "line": 213, "column": 10 }, "end": { - "line": 211, + "line": 213, "column": 11 } } @@ -63882,15 +64347,15 @@ "updateContext": null }, "value": "switch", - "start": 9648, - "end": 9654, + "start": 9715, + "end": 9721, "loc": { "start": { - "line": 213, + "line": 215, "column": 8 }, "end": { - "line": 213, + "line": 215, "column": 14 } } @@ -63907,15 +64372,15 @@ "postfix": false, "binop": null }, - "start": 9655, - "end": 9656, + "start": 9722, + "end": 9723, "loc": { "start": { - "line": 213, + "line": 215, "column": 15 }, "end": { - "line": 213, + "line": 215, "column": 16 } } @@ -63933,15 +64398,15 @@ "binop": null }, "value": "ext", - "start": 9656, - "end": 9659, + "start": 9723, + "end": 9726, "loc": { "start": { - "line": 213, + "line": 215, "column": 16 }, "end": { - "line": 213, + "line": 215, "column": 19 } } @@ -63958,15 +64423,15 @@ "postfix": false, "binop": null }, - "start": 9659, - "end": 9660, + "start": 9726, + "end": 9727, "loc": { "start": { - "line": 213, + "line": 215, "column": 19 }, "end": { - "line": 213, + "line": 215, "column": 20 } } @@ -63983,15 +64448,15 @@ "postfix": false, "binop": null }, - "start": 9661, - "end": 9662, + "start": 9728, + "end": 9729, "loc": { "start": { - "line": 213, + "line": 215, "column": 21 }, "end": { - "line": 213, + "line": 215, "column": 22 } } @@ -64011,15 +64476,15 @@ "updateContext": null }, "value": "case", - "start": 9675, - "end": 9679, + "start": 9742, + "end": 9746, "loc": { "start": { - "line": 214, + "line": 216, "column": 12 }, "end": { - "line": 214, + "line": 216, "column": 16 } } @@ -64038,15 +64503,15 @@ "updateContext": null }, "value": "json", - "start": 9680, - "end": 9686, + "start": 9747, + "end": 9753, "loc": { "start": { - "line": 214, + "line": 216, "column": 17 }, "end": { - "line": 214, + "line": 216, "column": 23 } } @@ -64064,15 +64529,15 @@ "binop": null, "updateContext": null }, - "start": 9686, - "end": 9687, + "start": 9753, + "end": 9754, "loc": { "start": { - "line": 214, + "line": 216, "column": 23 }, "end": { - "line": 214, + "line": 216, "column": 24 } } @@ -64090,15 +64555,15 @@ "binop": null }, "value": "convert", - "start": 9704, - "end": 9711, + "start": 9771, + "end": 9778, "loc": { "start": { - "line": 215, + "line": 217, "column": 16 }, "end": { - "line": 215, + "line": 217, "column": 23 } } @@ -64115,15 +64580,15 @@ "postfix": false, "binop": null }, - "start": 9711, - "end": 9712, + "start": 9778, + "end": 9779, "loc": { "start": { - "line": 215, + "line": 217, "column": 23 }, "end": { - "line": 215, + "line": 217, "column": 24 } } @@ -64141,15 +64606,15 @@ "binop": null }, "value": "parseCityJSONIntoXKTModel", - "start": 9712, - "end": 9737, + "start": 9779, + "end": 9804, "loc": { "start": { - "line": 215, + "line": 217, "column": 24 }, "end": { - "line": 215, + "line": 217, "column": 49 } } @@ -64167,15 +64632,15 @@ "binop": null, "updateContext": null }, - "start": 9737, - "end": 9738, + "start": 9804, + "end": 9805, "loc": { "start": { - "line": 215, + "line": 217, "column": 49 }, "end": { - "line": 215, + "line": 217, "column": 50 } } @@ -64192,15 +64657,15 @@ "postfix": false, "binop": null }, - "start": 9739, - "end": 9740, + "start": 9806, + "end": 9807, "loc": { "start": { - "line": 215, + "line": 217, "column": 51 }, "end": { - "line": 215, + "line": 217, "column": 52 } } @@ -64218,15 +64683,15 @@ "binop": null }, "value": "data", - "start": 9761, - "end": 9765, + "start": 9828, + "end": 9832, "loc": { "start": { - "line": 216, + "line": 218, "column": 20 }, "end": { - "line": 216, + "line": 218, "column": 24 } } @@ -64244,15 +64709,15 @@ "binop": null, "updateContext": null }, - "start": 9765, - "end": 9766, + "start": 9832, + "end": 9833, "loc": { "start": { - "line": 216, + "line": 218, "column": 24 }, "end": { - "line": 216, + "line": 218, "column": 25 } } @@ -64270,15 +64735,15 @@ "binop": null }, "value": "JSON", - "start": 9767, - "end": 9771, + "start": 9834, + "end": 9838, "loc": { "start": { - "line": 216, + "line": 218, "column": 26 }, "end": { - "line": 216, + "line": 218, "column": 30 } } @@ -64296,15 +64761,15 @@ "binop": null, "updateContext": null }, - "start": 9771, - "end": 9772, + "start": 9838, + "end": 9839, "loc": { "start": { - "line": 216, + "line": 218, "column": 30 }, "end": { - "line": 216, + "line": 218, "column": 31 } } @@ -64322,15 +64787,15 @@ "binop": null }, "value": "parse", - "start": 9772, - "end": 9777, + "start": 9839, + "end": 9844, "loc": { "start": { - "line": 216, + "line": 218, "column": 31 }, "end": { - "line": 216, + "line": 218, "column": 36 } } @@ -64347,15 +64812,15 @@ "postfix": false, "binop": null }, - "start": 9777, - "end": 9778, + "start": 9844, + "end": 9845, "loc": { "start": { - "line": 216, + "line": 218, "column": 36 }, "end": { - "line": 216, + "line": 218, "column": 37 } } @@ -64373,15 +64838,15 @@ "binop": null }, "value": "sourceData", - "start": 9778, - "end": 9788, + "start": 9845, + "end": 9855, "loc": { "start": { - "line": 216, + "line": 218, "column": 37 }, "end": { - "line": 216, + "line": 218, "column": 47 } } @@ -64398,15 +64863,15 @@ "postfix": false, "binop": null }, - "start": 9788, - "end": 9789, + "start": 9855, + "end": 9856, "loc": { "start": { - "line": 216, + "line": 218, "column": 47 }, "end": { - "line": 216, + "line": 218, "column": 48 } } @@ -64424,15 +64889,15 @@ "binop": null, "updateContext": null }, - "start": 9789, - "end": 9790, + "start": 9856, + "end": 9857, "loc": { "start": { - "line": 216, + "line": 218, "column": 48 }, "end": { - "line": 216, + "line": 218, "column": 49 } } @@ -64450,15 +64915,15 @@ "binop": null }, "value": "xktModel", - "start": 9811, - "end": 9819, + "start": 9878, + "end": 9886, "loc": { "start": { - "line": 217, + "line": 219, "column": 20 }, "end": { - "line": 217, + "line": 219, "column": 28 } } @@ -64476,15 +64941,15 @@ "binop": null, "updateContext": null }, - "start": 9819, - "end": 9820, + "start": 9886, + "end": 9887, "loc": { "start": { - "line": 217, + "line": 219, "column": 28 }, "end": { - "line": 217, + "line": 219, "column": 29 } } @@ -64502,15 +64967,15 @@ "binop": null }, "value": "stats", - "start": 9841, - "end": 9846, + "start": 9908, + "end": 9913, "loc": { "start": { - "line": 218, + "line": 220, "column": 20 }, "end": { - "line": 218, + "line": 220, "column": 25 } } @@ -64528,15 +64993,15 @@ "binop": null, "updateContext": null }, - "start": 9846, - "end": 9847, + "start": 9913, + "end": 9914, "loc": { "start": { - "line": 218, + "line": 220, "column": 25 }, "end": { - "line": 218, + "line": 220, "column": 26 } } @@ -64554,15 +65019,15 @@ "binop": null }, "value": "rotateX", - "start": 9868, - "end": 9875, + "start": 9935, + "end": 9942, "loc": { "start": { - "line": 219, + "line": 221, "column": 20 }, "end": { - "line": 219, + "line": 221, "column": 27 } } @@ -64580,15 +65045,15 @@ "binop": null, "updateContext": null }, - "start": 9875, - "end": 9876, + "start": 9942, + "end": 9943, "loc": { "start": { - "line": 219, + "line": 221, "column": 27 }, "end": { - "line": 219, + "line": 221, "column": 28 } } @@ -64606,15 +65071,15 @@ "binop": null }, "value": "center", - "start": 9897, - "end": 9903, + "start": 9964, + "end": 9970, "loc": { "start": { - "line": 220, + "line": 222, "column": 20 }, "end": { - "line": 220, + "line": 222, "column": 26 } } @@ -64632,15 +65097,15 @@ "binop": null, "updateContext": null }, - "start": 9903, - "end": 9904, + "start": 9970, + "end": 9971, "loc": { "start": { - "line": 220, + "line": 222, "column": 26 }, "end": { - "line": 220, + "line": 222, "column": 27 } } @@ -64658,15 +65123,15 @@ "binop": null }, "value": "fileTypeConfigs", - "start": 9905, - "end": 9920, + "start": 9972, + "end": 9987, "loc": { "start": { - "line": 220, + "line": 222, "column": 28 }, "end": { - "line": 220, + "line": 222, "column": 43 } } @@ -64684,15 +65149,15 @@ "binop": null, "updateContext": null }, - "start": 9920, - "end": 9921, + "start": 9987, + "end": 9988, "loc": { "start": { - "line": 220, + "line": 222, "column": 43 }, "end": { - "line": 220, + "line": 222, "column": 44 } } @@ -64710,15 +65175,15 @@ "binop": null }, "value": "center", - "start": 9921, - "end": 9927, + "start": 9988, + "end": 9994, "loc": { "start": { - "line": 220, + "line": 222, "column": 44 }, "end": { - "line": 220, + "line": 222, "column": 50 } } @@ -64736,15 +65201,15 @@ "binop": null, "updateContext": null }, - "start": 9927, - "end": 9928, + "start": 9994, + "end": 9995, "loc": { "start": { - "line": 220, + "line": 222, "column": 50 }, "end": { - "line": 220, + "line": 222, "column": 51 } } @@ -64762,15 +65227,15 @@ "binop": null }, "value": "transform", - "start": 9949, - "end": 9958, + "start": 10016, + "end": 10025, "loc": { "start": { - "line": 221, + "line": 223, "column": 20 }, "end": { - "line": 221, + "line": 223, "column": 29 } } @@ -64788,15 +65253,15 @@ "binop": null, "updateContext": null }, - "start": 9958, - "end": 9959, + "start": 10025, + "end": 10026, "loc": { "start": { - "line": 221, + "line": 223, "column": 29 }, "end": { - "line": 221, + "line": 223, "column": 30 } } @@ -64814,15 +65279,15 @@ "binop": null }, "value": "fileTypeConfigs", - "start": 9960, - "end": 9975, + "start": 10027, + "end": 10042, "loc": { "start": { - "line": 221, + "line": 223, "column": 31 }, "end": { - "line": 221, + "line": 223, "column": 46 } } @@ -64840,15 +65305,15 @@ "binop": null, "updateContext": null }, - "start": 9975, - "end": 9976, + "start": 10042, + "end": 10043, "loc": { "start": { - "line": 221, + "line": 223, "column": 46 }, "end": { - "line": 221, + "line": 223, "column": 47 } } @@ -64866,15 +65331,15 @@ "binop": null }, "value": "transform", - "start": 9976, - "end": 9985, + "start": 10043, + "end": 10052, "loc": { "start": { - "line": 221, + "line": 223, "column": 47 }, "end": { - "line": 221, + "line": 223, "column": 56 } } @@ -64892,15 +65357,15 @@ "binop": null, "updateContext": null }, - "start": 9985, - "end": 9986, + "start": 10052, + "end": 10053, "loc": { "start": { - "line": 221, + "line": 223, "column": 56 }, "end": { - "line": 221, + "line": 223, "column": 57 } } @@ -64918,15 +65383,15 @@ "binop": null }, "value": "log", - "start": 10007, - "end": 10010, + "start": 10074, + "end": 10077, "loc": { "start": { - "line": 222, + "line": 224, "column": 20 }, "end": { - "line": 222, + "line": 224, "column": 23 } } @@ -64943,15 +65408,15 @@ "postfix": false, "binop": null }, - "start": 10027, - "end": 10028, + "start": 10094, + "end": 10095, "loc": { "start": { - "line": 223, + "line": 225, "column": 16 }, "end": { - "line": 223, + "line": 225, "column": 17 } } @@ -64968,15 +65433,15 @@ "postfix": false, "binop": null }, - "start": 10028, - "end": 10029, + "start": 10095, + "end": 10096, "loc": { "start": { - "line": 223, + "line": 225, "column": 17 }, "end": { - "line": 223, + "line": 225, "column": 18 } } @@ -64994,15 +65459,15 @@ "binop": null, "updateContext": null }, - "start": 10029, - "end": 10030, + "start": 10096, + "end": 10097, "loc": { "start": { - "line": 223, + "line": 225, "column": 18 }, "end": { - "line": 223, + "line": 225, "column": 19 } } @@ -65022,15 +65487,15 @@ "updateContext": null }, "value": "break", - "start": 10047, - "end": 10052, + "start": 10114, + "end": 10119, "loc": { "start": { - "line": 224, + "line": 226, "column": 16 }, "end": { - "line": 224, + "line": 226, "column": 21 } } @@ -65048,15 +65513,15 @@ "binop": null, "updateContext": null }, - "start": 10052, - "end": 10053, + "start": 10119, + "end": 10120, "loc": { "start": { - "line": 224, + "line": 226, "column": 21 }, "end": { - "line": 224, + "line": 226, "column": 22 } } @@ -65076,15 +65541,15 @@ "updateContext": null }, "value": "case", - "start": 10067, - "end": 10071, + "start": 10134, + "end": 10138, "loc": { "start": { - "line": 226, + "line": 228, "column": 12 }, "end": { - "line": 226, + "line": 228, "column": 16 } } @@ -65103,15 +65568,15 @@ "updateContext": null }, "value": "glb", - "start": 10072, - "end": 10077, + "start": 10139, + "end": 10144, "loc": { "start": { - "line": 226, + "line": 228, "column": 17 }, "end": { - "line": 226, + "line": 228, "column": 22 } } @@ -65129,15 +65594,15 @@ "binop": null, "updateContext": null }, - "start": 10077, - "end": 10078, + "start": 10144, + "end": 10145, "loc": { "start": { - "line": 226, + "line": 228, "column": 22 }, "end": { - "line": 226, + "line": 228, "column": 23 } } @@ -65155,15 +65620,15 @@ "binop": null }, "value": "sourceData", - "start": 10095, - "end": 10105, + "start": 10162, + "end": 10172, "loc": { "start": { - "line": 227, + "line": 229, "column": 16 }, "end": { - "line": 227, + "line": 229, "column": 26 } } @@ -65182,15 +65647,15 @@ "updateContext": null }, "value": "=", - "start": 10106, - "end": 10107, + "start": 10173, + "end": 10174, "loc": { "start": { - "line": 227, + "line": 229, "column": 27 }, "end": { - "line": 227, + "line": 229, "column": 28 } } @@ -65208,15 +65673,15 @@ "binop": null }, "value": "toArrayBuffer", - "start": 10108, - "end": 10121, + "start": 10175, + "end": 10188, "loc": { "start": { - "line": 227, + "line": 229, "column": 29 }, "end": { - "line": 227, + "line": 229, "column": 42 } } @@ -65233,15 +65698,15 @@ "postfix": false, "binop": null }, - "start": 10121, - "end": 10122, + "start": 10188, + "end": 10189, "loc": { "start": { - "line": 227, + "line": 229, "column": 42 }, "end": { - "line": 227, + "line": 229, "column": 43 } } @@ -65259,15 +65724,15 @@ "binop": null }, "value": "sourceData", - "start": 10122, - "end": 10132, + "start": 10189, + "end": 10199, "loc": { "start": { - "line": 227, + "line": 229, "column": 43 }, "end": { - "line": 227, + "line": 229, "column": 53 } } @@ -65284,15 +65749,15 @@ "postfix": false, "binop": null }, - "start": 10132, - "end": 10133, + "start": 10199, + "end": 10200, "loc": { "start": { - "line": 227, + "line": 229, "column": 53 }, "end": { - "line": 227, + "line": 229, "column": 54 } } @@ -65310,15 +65775,15 @@ "binop": null, "updateContext": null }, - "start": 10133, - "end": 10134, + "start": 10200, + "end": 10201, "loc": { "start": { - "line": 227, + "line": 229, "column": 54 }, "end": { - "line": 227, + "line": 229, "column": 55 } } @@ -65336,15 +65801,15 @@ "binop": null }, "value": "convert", - "start": 10151, - "end": 10158, + "start": 10218, + "end": 10225, "loc": { "start": { - "line": 228, + "line": 230, "column": 16 }, "end": { - "line": 228, + "line": 230, "column": 23 } } @@ -65361,15 +65826,15 @@ "postfix": false, "binop": null }, - "start": 10158, - "end": 10159, + "start": 10225, + "end": 10226, "loc": { "start": { - "line": 228, + "line": 230, "column": 23 }, "end": { - "line": 228, + "line": 230, "column": 24 } } @@ -65387,15 +65852,15 @@ "binop": null }, "value": "parseGLTFIntoXKTModel", - "start": 10159, - "end": 10180, + "start": 10226, + "end": 10247, "loc": { "start": { - "line": 228, + "line": 230, "column": 24 }, "end": { - "line": 228, + "line": 230, "column": 45 } } @@ -65413,15 +65878,15 @@ "binop": null, "updateContext": null }, - "start": 10180, - "end": 10181, + "start": 10247, + "end": 10248, "loc": { "start": { - "line": 228, + "line": 230, "column": 45 }, "end": { - "line": 228, + "line": 230, "column": 46 } } @@ -65438,15 +65903,15 @@ "postfix": false, "binop": null }, - "start": 10182, - "end": 10183, + "start": 10249, + "end": 10250, "loc": { "start": { - "line": 228, + "line": 230, "column": 47 }, "end": { - "line": 228, + "line": 230, "column": 48 } } @@ -65464,15 +65929,15 @@ "binop": null }, "value": "data", - "start": 10204, - "end": 10208, + "start": 10271, + "end": 10275, "loc": { "start": { - "line": 229, + "line": 231, "column": 20 }, "end": { - "line": 229, + "line": 231, "column": 24 } } @@ -65490,15 +65955,15 @@ "binop": null, "updateContext": null }, - "start": 10208, - "end": 10209, + "start": 10275, + "end": 10276, "loc": { "start": { - "line": 229, + "line": 231, "column": 24 }, "end": { - "line": 229, + "line": 231, "column": 25 } } @@ -65516,15 +65981,15 @@ "binop": null }, "value": "sourceData", - "start": 10210, - "end": 10220, + "start": 10277, + "end": 10287, "loc": { "start": { - "line": 229, + "line": 231, "column": 26 }, "end": { - "line": 229, + "line": 231, "column": 36 } } @@ -65542,15 +66007,15 @@ "binop": null, "updateContext": null }, - "start": 10220, - "end": 10221, + "start": 10287, + "end": 10288, "loc": { "start": { - "line": 229, + "line": 231, "column": 36 }, "end": { - "line": 229, + "line": 231, "column": 37 } } @@ -65568,15 +66033,15 @@ "binop": null }, "value": "reuseGeometries", - "start": 10242, - "end": 10257, + "start": 10309, + "end": 10324, "loc": { "start": { - "line": 230, + "line": 232, "column": 20 }, "end": { - "line": 230, + "line": 232, "column": 35 } } @@ -65594,15 +66059,15 @@ "binop": null, "updateContext": null }, - "start": 10257, - "end": 10258, + "start": 10324, + "end": 10325, "loc": { "start": { - "line": 230, + "line": 232, "column": 35 }, "end": { - "line": 230, + "line": 232, "column": 36 } } @@ -65620,15 +66085,15 @@ "binop": null }, "value": "includeTextures", - "start": 10279, - "end": 10294, + "start": 10346, + "end": 10361, "loc": { "start": { - "line": 231, + "line": 233, "column": 20 }, "end": { - "line": 231, + "line": 233, "column": 35 } } @@ -65646,15 +66111,15 @@ "binop": null, "updateContext": null }, - "start": 10294, - "end": 10295, + "start": 10361, + "end": 10362, "loc": { "start": { - "line": 231, + "line": 233, "column": 35 }, "end": { - "line": 231, + "line": 233, "column": 36 } } @@ -65672,15 +66137,15 @@ "binop": null }, "value": "includeNormals", - "start": 10316, - "end": 10330, + "start": 10383, + "end": 10397, "loc": { "start": { - "line": 232, + "line": 234, "column": 20 }, "end": { - "line": 232, + "line": 234, "column": 34 } } @@ -65698,15 +66163,15 @@ "binop": null, "updateContext": null }, - "start": 10330, - "end": 10331, + "start": 10397, + "end": 10398, "loc": { "start": { - "line": 232, + "line": 234, "column": 34 }, "end": { - "line": 232, + "line": 234, "column": 35 } } @@ -65724,15 +66189,15 @@ "binop": null }, "value": "metaModelData", - "start": 10352, - "end": 10365, + "start": 10419, + "end": 10432, "loc": { "start": { - "line": 233, + "line": 235, "column": 20 }, "end": { - "line": 233, + "line": 235, "column": 33 } } @@ -65750,15 +66215,15 @@ "binop": null, "updateContext": null }, - "start": 10365, - "end": 10366, + "start": 10432, + "end": 10433, "loc": { "start": { - "line": 233, + "line": 235, "column": 33 }, "end": { - "line": 233, + "line": 235, "column": 34 } } @@ -65776,15 +66241,15 @@ "binop": null }, "value": "metaModelJSON", - "start": 10367, - "end": 10380, + "start": 10434, + "end": 10447, "loc": { "start": { - "line": 233, + "line": 235, "column": 35 }, "end": { - "line": 233, + "line": 235, "column": 48 } } @@ -65802,15 +66267,15 @@ "binop": null, "updateContext": null }, - "start": 10380, - "end": 10381, + "start": 10447, + "end": 10448, "loc": { "start": { - "line": 233, + "line": 235, "column": 48 }, "end": { - "line": 233, + "line": 235, "column": 49 } } @@ -65828,15 +66293,15 @@ "binop": null }, "value": "xktModel", - "start": 10402, - "end": 10410, + "start": 10469, + "end": 10477, "loc": { "start": { - "line": 234, + "line": 236, "column": 20 }, "end": { - "line": 234, + "line": 236, "column": 28 } } @@ -65854,15 +66319,15 @@ "binop": null, "updateContext": null }, - "start": 10410, - "end": 10411, + "start": 10477, + "end": 10478, "loc": { "start": { - "line": 234, + "line": 236, "column": 28 }, "end": { - "line": 234, + "line": 236, "column": 29 } } @@ -65880,15 +66345,15 @@ "binop": null }, "value": "stats", - "start": 10432, - "end": 10437, + "start": 10499, + "end": 10504, "loc": { "start": { - "line": 235, + "line": 237, "column": 20 }, "end": { - "line": 235, + "line": 237, "column": 25 } } @@ -65906,15 +66371,15 @@ "binop": null, "updateContext": null }, - "start": 10437, - "end": 10438, + "start": 10504, + "end": 10505, "loc": { "start": { - "line": 235, + "line": 237, "column": 25 }, "end": { - "line": 235, + "line": 237, "column": 26 } } @@ -65932,15 +66397,15 @@ "binop": null }, "value": "log", - "start": 10459, - "end": 10462, + "start": 10526, + "end": 10529, "loc": { "start": { - "line": 236, + "line": 238, "column": 20 }, "end": { - "line": 236, + "line": 238, "column": 23 } } @@ -65957,15 +66422,15 @@ "postfix": false, "binop": null }, - "start": 10479, - "end": 10480, + "start": 10546, + "end": 10547, "loc": { "start": { - "line": 237, + "line": 239, "column": 16 }, "end": { - "line": 237, + "line": 239, "column": 17 } } @@ -65982,15 +66447,15 @@ "postfix": false, "binop": null }, - "start": 10480, - "end": 10481, + "start": 10547, + "end": 10548, "loc": { "start": { - "line": 237, + "line": 239, "column": 17 }, "end": { - "line": 237, + "line": 239, "column": 18 } } @@ -66008,15 +66473,15 @@ "binop": null, "updateContext": null }, - "start": 10481, - "end": 10482, + "start": 10548, + "end": 10549, "loc": { "start": { - "line": 237, + "line": 239, "column": 18 }, "end": { - "line": 237, + "line": 239, "column": 19 } } @@ -66036,15 +66501,15 @@ "updateContext": null }, "value": "break", - "start": 10499, - "end": 10504, + "start": 10566, + "end": 10571, "loc": { "start": { - "line": 238, + "line": 240, "column": 16 }, "end": { - "line": 238, + "line": 240, "column": 21 } } @@ -66062,15 +66527,15 @@ "binop": null, "updateContext": null }, - "start": 10504, - "end": 10505, + "start": 10571, + "end": 10572, "loc": { "start": { - "line": 238, + "line": 240, "column": 21 }, "end": { - "line": 238, + "line": 240, "column": 22 } } @@ -66090,15 +66555,15 @@ "updateContext": null }, "value": "case", - "start": 10519, - "end": 10523, + "start": 10586, + "end": 10590, "loc": { "start": { - "line": 240, + "line": 242, "column": 12 }, "end": { - "line": 240, + "line": 242, "column": 16 } } @@ -66117,15 +66582,15 @@ "updateContext": null }, "value": "gltf", - "start": 10524, - "end": 10530, + "start": 10591, + "end": 10597, "loc": { "start": { - "line": 240, + "line": 242, "column": 17 }, "end": { - "line": 240, + "line": 242, "column": 23 } } @@ -66143,15 +66608,15 @@ "binop": null, "updateContext": null }, - "start": 10530, - "end": 10531, + "start": 10597, + "end": 10598, "loc": { "start": { - "line": 240, + "line": 242, "column": 23 }, "end": { - "line": 240, + "line": 242, "column": 24 } } @@ -66171,15 +66636,15 @@ "updateContext": null }, "value": "const", - "start": 10548, - "end": 10553, + "start": 10615, + "end": 10620, "loc": { "start": { - "line": 241, + "line": 243, "column": 16 }, "end": { - "line": 241, + "line": 243, "column": 21 } } @@ -66197,15 +66662,15 @@ "binop": null }, "value": "gltfJSON", - "start": 10554, - "end": 10562, + "start": 10621, + "end": 10629, "loc": { "start": { - "line": 241, + "line": 243, "column": 22 }, "end": { - "line": 241, + "line": 243, "column": 30 } } @@ -66224,15 +66689,15 @@ "updateContext": null }, "value": "=", - "start": 10563, - "end": 10564, + "start": 10630, + "end": 10631, "loc": { "start": { - "line": 241, + "line": 243, "column": 31 }, "end": { - "line": 241, + "line": 243, "column": 32 } } @@ -66250,15 +66715,15 @@ "binop": null }, "value": "JSON", - "start": 10565, - "end": 10569, + "start": 10632, + "end": 10636, "loc": { "start": { - "line": 241, + "line": 243, "column": 33 }, "end": { - "line": 241, + "line": 243, "column": 37 } } @@ -66276,15 +66741,15 @@ "binop": null, "updateContext": null }, - "start": 10569, - "end": 10570, + "start": 10636, + "end": 10637, "loc": { "start": { - "line": 241, + "line": 243, "column": 37 }, "end": { - "line": 241, + "line": 243, "column": 38 } } @@ -66302,15 +66767,15 @@ "binop": null }, "value": "parse", - "start": 10570, - "end": 10575, + "start": 10637, + "end": 10642, "loc": { "start": { - "line": 241, + "line": 243, "column": 38 }, "end": { - "line": 241, + "line": 243, "column": 43 } } @@ -66327,15 +66792,15 @@ "postfix": false, "binop": null }, - "start": 10575, - "end": 10576, + "start": 10642, + "end": 10643, "loc": { "start": { - "line": 241, + "line": 243, "column": 43 }, "end": { - "line": 241, + "line": 243, "column": 44 } } @@ -66353,15 +66818,15 @@ "binop": null }, "value": "sourceData", - "start": 10576, - "end": 10586, + "start": 10643, + "end": 10653, "loc": { "start": { - "line": 241, + "line": 243, "column": 44 }, "end": { - "line": 241, + "line": 243, "column": 54 } } @@ -66378,15 +66843,15 @@ "postfix": false, "binop": null }, - "start": 10586, - "end": 10587, + "start": 10653, + "end": 10654, "loc": { "start": { - "line": 241, + "line": 243, "column": 54 }, "end": { - "line": 241, + "line": 243, "column": 55 } } @@ -66404,15 +66869,15 @@ "binop": null, "updateContext": null }, - "start": 10587, - "end": 10588, + "start": 10654, + "end": 10655, "loc": { "start": { - "line": 241, + "line": 243, "column": 55 }, "end": { - "line": 241, + "line": 243, "column": 56 } } @@ -66432,15 +66897,15 @@ "updateContext": null }, "value": "const", - "start": 10605, - "end": 10610, + "start": 10672, + "end": 10677, "loc": { "start": { - "line": 242, + "line": 244, "column": 16 }, "end": { - "line": 242, + "line": 244, "column": 21 } } @@ -66458,15 +66923,15 @@ "binop": null }, "value": "gltfBasePath", - "start": 10611, - "end": 10623, + "start": 10678, + "end": 10690, "loc": { "start": { - "line": 242, + "line": 244, "column": 22 }, "end": { - "line": 242, + "line": 244, "column": 34 } } @@ -66485,15 +66950,15 @@ "updateContext": null }, "value": "=", - "start": 10624, - "end": 10625, + "start": 10691, + "end": 10692, "loc": { "start": { - "line": 242, + "line": 244, "column": 35 }, "end": { - "line": 242, + "line": 244, "column": 36 } } @@ -66511,15 +66976,15 @@ "binop": null }, "value": "source", - "start": 10626, - "end": 10632, + "start": 10693, + "end": 10699, "loc": { "start": { - "line": 242, + "line": 244, "column": 37 }, "end": { - "line": 242, + "line": 244, "column": 43 } } @@ -66537,15 +67002,15 @@ "binop": null, "updateContext": null }, - "start": 10633, - "end": 10634, + "start": 10700, + "end": 10701, "loc": { "start": { - "line": 242, + "line": 244, "column": 44 }, "end": { - "line": 242, + "line": 244, "column": 45 } } @@ -66563,15 +67028,15 @@ "binop": null }, "value": "getBasePath", - "start": 10635, - "end": 10646, + "start": 10702, + "end": 10713, "loc": { "start": { - "line": 242, + "line": 244, "column": 46 }, "end": { - "line": 242, + "line": 244, "column": 57 } } @@ -66588,15 +67053,15 @@ "postfix": false, "binop": null }, - "start": 10646, - "end": 10647, + "start": 10713, + "end": 10714, "loc": { "start": { - "line": 242, + "line": 244, "column": 57 }, "end": { - "line": 242, + "line": 244, "column": 58 } } @@ -66614,15 +67079,15 @@ "binop": null }, "value": "source", - "start": 10647, - "end": 10653, + "start": 10714, + "end": 10720, "loc": { "start": { - "line": 242, + "line": 244, "column": 58 }, "end": { - "line": 242, + "line": 244, "column": 64 } } @@ -66639,15 +67104,15 @@ "postfix": false, "binop": null }, - "start": 10653, - "end": 10654, + "start": 10720, + "end": 10721, "loc": { "start": { - "line": 242, + "line": 244, "column": 64 }, "end": { - "line": 242, + "line": 244, "column": 65 } } @@ -66665,15 +67130,15 @@ "binop": null, "updateContext": null }, - "start": 10655, - "end": 10656, + "start": 10722, + "end": 10723, "loc": { "start": { - "line": 242, + "line": 244, "column": 66 }, "end": { - "line": 242, + "line": 244, "column": 67 } } @@ -66692,15 +67157,15 @@ "updateContext": null }, "value": "", - "start": 10657, - "end": 10659, + "start": 10724, + "end": 10726, "loc": { "start": { - "line": 242, + "line": 244, "column": 68 }, "end": { - "line": 242, + "line": 244, "column": 70 } } @@ -66718,15 +67183,15 @@ "binop": null, "updateContext": null }, - "start": 10659, - "end": 10660, + "start": 10726, + "end": 10727, "loc": { "start": { - "line": 242, + "line": 244, "column": 70 }, "end": { - "line": 242, + "line": 244, "column": 71 } } @@ -66744,15 +67209,15 @@ "binop": null }, "value": "convert", - "start": 10677, - "end": 10684, + "start": 10744, + "end": 10751, "loc": { "start": { - "line": 243, + "line": 245, "column": 16 }, "end": { - "line": 243, + "line": 245, "column": 23 } } @@ -66769,15 +67234,15 @@ "postfix": false, "binop": null }, - "start": 10684, - "end": 10685, + "start": 10751, + "end": 10752, "loc": { "start": { - "line": 243, + "line": 245, "column": 23 }, "end": { - "line": 243, + "line": 245, "column": 24 } } @@ -66795,15 +67260,15 @@ "binop": null }, "value": "parseGLTFJSONIntoXKTModel", - "start": 10685, - "end": 10710, + "start": 10752, + "end": 10777, "loc": { "start": { - "line": 243, + "line": 245, "column": 24 }, "end": { - "line": 243, + "line": 245, "column": 49 } } @@ -66821,15 +67286,15 @@ "binop": null, "updateContext": null }, - "start": 10710, - "end": 10711, + "start": 10777, + "end": 10778, "loc": { "start": { - "line": 243, + "line": 245, "column": 49 }, "end": { - "line": 243, + "line": 245, "column": 50 } } @@ -66846,15 +67311,15 @@ "postfix": false, "binop": null }, - "start": 10712, - "end": 10713, + "start": 10779, + "end": 10780, "loc": { "start": { - "line": 243, + "line": 245, "column": 51 }, "end": { - "line": 243, + "line": 245, "column": 52 } } @@ -66872,15 +67337,15 @@ "binop": null }, "value": "baseUri", - "start": 10734, - "end": 10741, + "start": 10801, + "end": 10808, "loc": { "start": { - "line": 244, + "line": 246, "column": 20 }, "end": { - "line": 244, + "line": 246, "column": 27 } } @@ -66898,15 +67363,15 @@ "binop": null, "updateContext": null }, - "start": 10741, - "end": 10742, + "start": 10808, + "end": 10809, "loc": { "start": { - "line": 244, + "line": 246, "column": 27 }, "end": { - "line": 244, + "line": 246, "column": 28 } } @@ -66924,15 +67389,15 @@ "binop": null }, "value": "gltfBasePath", - "start": 10743, - "end": 10755, + "start": 10810, + "end": 10822, "loc": { "start": { - "line": 244, + "line": 246, "column": 29 }, "end": { - "line": 244, + "line": 246, "column": 41 } } @@ -66950,15 +67415,15 @@ "binop": null, "updateContext": null }, - "start": 10755, - "end": 10756, + "start": 10822, + "end": 10823, "loc": { "start": { - "line": 244, + "line": 246, "column": 41 }, "end": { - "line": 244, + "line": 246, "column": 42 } } @@ -66976,15 +67441,15 @@ "binop": null }, "value": "data", - "start": 10777, - "end": 10781, + "start": 10844, + "end": 10848, "loc": { "start": { - "line": 245, + "line": 247, "column": 20 }, "end": { - "line": 245, + "line": 247, "column": 24 } } @@ -67002,15 +67467,15 @@ "binop": null, "updateContext": null }, - "start": 10781, - "end": 10782, + "start": 10848, + "end": 10849, "loc": { "start": { - "line": 245, + "line": 247, "column": 24 }, "end": { - "line": 245, + "line": 247, "column": 25 } } @@ -67028,120 +67493,16 @@ "binop": null }, "value": "gltfJSON", - "start": 10783, - "end": 10791, - "loc": { - "start": { - "line": 245, - "column": 26 - }, - "end": { - "line": 245, - "column": 34 - } - } - }, - { - "type": { - "label": ",", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 10791, - "end": 10792, - "loc": { - "start": { - "line": 245, - "column": 34 - }, - "end": { - "line": 245, - "column": 35 - } - } - }, - { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "reuseGeometries", - "start": 10813, - "end": 10828, - "loc": { - "start": { - "line": 246, - "column": 20 - }, - "end": { - "line": 246, - "column": 35 - } - } - }, - { - "type": { - "label": ",", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 10828, - "end": 10829, - "loc": { - "start": { - "line": 246, - "column": 35 - }, - "end": { - "line": 246, - "column": 36 - } - } - }, - { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "includeTextures", "start": 10850, - "end": 10865, + "end": 10858, "loc": { "start": { "line": 247, - "column": 20 + "column": 26 }, "end": { "line": 247, - "column": 35 + "column": 34 } } }, @@ -67158,16 +67519,16 @@ "binop": null, "updateContext": null }, - "start": 10865, - "end": 10866, + "start": 10858, + "end": 10859, "loc": { "start": { "line": 247, - "column": 35 + "column": 34 }, "end": { "line": 247, - "column": 36 + "column": 35 } } }, @@ -67183,9 +67544,9 @@ "postfix": false, "binop": null }, - "value": "includeNormals", - "start": 10887, - "end": 10901, + "value": "reuseGeometries", + "start": 10880, + "end": 10895, "loc": { "start": { "line": 248, @@ -67193,7 +67554,7 @@ }, "end": { "line": 248, - "column": 34 + "column": 35 } } }, @@ -67210,16 +67571,16 @@ "binop": null, "updateContext": null }, - "start": 10901, - "end": 10902, + "start": 10895, + "end": 10896, "loc": { "start": { "line": 248, - "column": 34 + "column": 35 }, "end": { "line": 248, - "column": 35 + "column": 36 } } }, @@ -67235,69 +67596,17 @@ "postfix": false, "binop": null }, - "value": "metaModelData", - "start": 10923, - "end": 10936, + "value": "includeTextures", + "start": 10917, + "end": 10932, "loc": { "start": { "line": 249, "column": 20 }, "end": { - "line": 249, - "column": 33 - } - } - }, - { - "type": { - "label": ":", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 10936, - "end": 10937, - "loc": { - "start": { - "line": 249, - "column": 33 - }, - "end": { - "line": 249, - "column": 34 - } - } - }, - { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "metaModelJSON", - "start": 10938, - "end": 10951, - "loc": { - "start": { "line": 249, "column": 35 - }, - "end": { - "line": 249, - "column": 48 } } }, @@ -67314,16 +67623,16 @@ "binop": null, "updateContext": null }, - "start": 10951, - "end": 10952, + "start": 10932, + "end": 10933, "loc": { "start": { "line": 249, - "column": 48 + "column": 35 }, "end": { "line": 249, - "column": 49 + "column": 36 } } }, @@ -67339,9 +67648,9 @@ "postfix": false, "binop": null }, - "value": "xktModel", - "start": 10973, - "end": 10981, + "value": "includeNormals", + "start": 10954, + "end": 10968, "loc": { "start": { "line": 250, @@ -67349,7 +67658,7 @@ }, "end": { "line": 250, - "column": 28 + "column": 34 } } }, @@ -67366,16 +67675,16 @@ "binop": null, "updateContext": null }, - "start": 10981, - "end": 10982, + "start": 10968, + "end": 10969, "loc": { "start": { "line": 250, - "column": 28 + "column": 34 }, "end": { "line": 250, - "column": 29 + "column": 35 } } }, @@ -67391,9 +67700,9 @@ "postfix": false, "binop": null }, - "value": "getAttachment", - "start": 11003, - "end": 11016, + "value": "metaModelData", + "start": 10990, + "end": 11003, "loc": { "start": { "line": 251, @@ -67418,8 +67727,8 @@ "binop": null, "updateContext": null }, - "start": 11016, - "end": 11017, + "start": 11003, + "end": 11004, "loc": { "start": { "line": 251, @@ -67443,9 +67752,9 @@ "postfix": false, "binop": null }, - "value": "async", - "start": 11018, - "end": 11023, + "value": "metaModelJSON", + "start": 11005, + "end": 11018, "loc": { "start": { "line": 251, @@ -67453,6 +67762,162 @@ }, "end": { "line": 251, + "column": 48 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 11018, + "end": 11019, + "loc": { + "start": { + "line": 251, + "column": 48 + }, + "end": { + "line": 251, + "column": 49 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "xktModel", + "start": 11040, + "end": 11048, + "loc": { + "start": { + "line": 252, + "column": 20 + }, + "end": { + "line": 252, + "column": 28 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 11048, + "end": 11049, + "loc": { + "start": { + "line": 252, + "column": 28 + }, + "end": { + "line": 252, + "column": 29 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "getAttachment", + "start": 11070, + "end": 11083, + "loc": { + "start": { + "line": 253, + "column": 20 + }, + "end": { + "line": 253, + "column": 33 + } + } + }, + { + "type": { + "label": ":", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 11083, + "end": 11084, + "loc": { + "start": { + "line": 253, + "column": 33 + }, + "end": { + "line": 253, + "column": 34 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "async", + "start": 11085, + "end": 11090, + "loc": { + "start": { + "line": 253, + "column": 35 + }, + "end": { + "line": 253, "column": 40 } } @@ -67469,15 +67934,15 @@ "postfix": false, "binop": null }, - "start": 11024, - "end": 11025, + "start": 11091, + "end": 11092, "loc": { "start": { - "line": 251, + "line": 253, "column": 41 }, "end": { - "line": 251, + "line": 253, "column": 42 } } @@ -67495,15 +67960,15 @@ "binop": null }, "value": "name", - "start": 11025, - "end": 11029, + "start": 11092, + "end": 11096, "loc": { "start": { - "line": 251, + "line": 253, "column": 42 }, "end": { - "line": 251, + "line": 253, "column": 46 } } @@ -67520,15 +67985,15 @@ "postfix": false, "binop": null }, - "start": 11029, - "end": 11030, + "start": 11096, + "end": 11097, "loc": { "start": { - "line": 251, + "line": 253, "column": 46 }, "end": { - "line": 251, + "line": 253, "column": 47 } } @@ -67546,15 +68011,15 @@ "binop": null, "updateContext": null }, - "start": 11031, - "end": 11033, + "start": 11098, + "end": 11100, "loc": { "start": { - "line": 251, + "line": 253, "column": 48 }, "end": { - "line": 251, + "line": 253, "column": 50 } } @@ -67571,15 +68036,15 @@ "postfix": false, "binop": null }, - "start": 11034, - "end": 11035, + "start": 11101, + "end": 11102, "loc": { "start": { - "line": 251, + "line": 253, "column": 51 }, "end": { - "line": 251, + "line": 253, "column": 52 } } @@ -67599,15 +68064,15 @@ "updateContext": null }, "value": "const", - "start": 11060, - "end": 11065, + "start": 11127, + "end": 11132, "loc": { "start": { - "line": 252, + "line": 254, "column": 24 }, "end": { - "line": 252, + "line": 254, "column": 29 } } @@ -67625,15 +68090,15 @@ "binop": null }, "value": "filePath", - "start": 11066, - "end": 11074, + "start": 11133, + "end": 11141, "loc": { "start": { - "line": 252, + "line": 254, "column": 30 }, "end": { - "line": 252, + "line": 254, "column": 38 } } @@ -67652,15 +68117,15 @@ "updateContext": null }, "value": "=", - "start": 11075, - "end": 11076, + "start": 11142, + "end": 11143, "loc": { "start": { - "line": 252, + "line": 254, "column": 39 }, "end": { - "line": 252, + "line": 254, "column": 40 } } @@ -67678,15 +68143,15 @@ "binop": null }, "value": "gltfBasePath", - "start": 11077, - "end": 11089, + "start": 11144, + "end": 11156, "loc": { "start": { - "line": 252, + "line": 254, "column": 41 }, "end": { - "line": 252, + "line": 254, "column": 53 } } @@ -67705,15 +68170,15 @@ "updateContext": null }, "value": "+", - "start": 11090, - "end": 11091, + "start": 11157, + "end": 11158, "loc": { "start": { - "line": 252, + "line": 254, "column": 54 }, "end": { - "line": 252, + "line": 254, "column": 55 } } @@ -67731,15 +68196,15 @@ "binop": null }, "value": "name", - "start": 11092, - "end": 11096, + "start": 11159, + "end": 11163, "loc": { "start": { - "line": 252, + "line": 254, "column": 56 }, "end": { - "line": 252, + "line": 254, "column": 60 } } @@ -67757,15 +68222,15 @@ "binop": null, "updateContext": null }, - "start": 11096, - "end": 11097, + "start": 11163, + "end": 11164, "loc": { "start": { - "line": 252, + "line": 254, "column": 60 }, "end": { - "line": 252, + "line": 254, "column": 61 } } @@ -67783,15 +68248,15 @@ "binop": null }, "value": "log", - "start": 11122, - "end": 11125, + "start": 11189, + "end": 11192, "loc": { "start": { - "line": 253, + "line": 255, "column": 24 }, "end": { - "line": 253, + "line": 255, "column": 27 } } @@ -67808,15 +68273,15 @@ "postfix": false, "binop": null }, - "start": 11125, - "end": 11126, + "start": 11192, + "end": 11193, "loc": { "start": { - "line": 253, + "line": 255, "column": 27 }, "end": { - "line": 253, + "line": 255, "column": 28 } } @@ -67833,15 +68298,15 @@ "postfix": false, "binop": null }, - "start": 11126, - "end": 11127, + "start": 11193, + "end": 11194, "loc": { "start": { - "line": 253, + "line": 255, "column": 28 }, "end": { - "line": 253, + "line": 255, "column": 29 } } @@ -67860,15 +68325,15 @@ "updateContext": null }, "value": "Reading attachment file: ", - "start": 11127, - "end": 11152, + "start": 11194, + "end": 11219, "loc": { "start": { - "line": 253, + "line": 255, "column": 29 }, "end": { - "line": 253, + "line": 255, "column": 54 } } @@ -67885,15 +68350,15 @@ "postfix": false, "binop": null }, - "start": 11152, - "end": 11154, + "start": 11219, + "end": 11221, "loc": { "start": { - "line": 253, + "line": 255, "column": 54 }, "end": { - "line": 253, + "line": 255, "column": 56 } } @@ -67911,15 +68376,15 @@ "binop": null }, "value": "filePath", - "start": 11154, - "end": 11162, + "start": 11221, + "end": 11229, "loc": { "start": { - "line": 253, + "line": 255, "column": 56 }, "end": { - "line": 253, + "line": 255, "column": 64 } } @@ -67936,15 +68401,15 @@ "postfix": false, "binop": null }, - "start": 11162, - "end": 11163, + "start": 11229, + "end": 11230, "loc": { "start": { - "line": 253, + "line": 255, "column": 64 }, "end": { - "line": 253, + "line": 255, "column": 65 } } @@ -67963,15 +68428,15 @@ "updateContext": null }, "value": "", - "start": 11163, - "end": 11163, + "start": 11230, + "end": 11230, "loc": { "start": { - "line": 253, + "line": 255, "column": 65 }, "end": { - "line": 253, + "line": 255, "column": 65 } } @@ -67988,15 +68453,15 @@ "postfix": false, "binop": null }, - "start": 11163, - "end": 11164, + "start": 11230, + "end": 11231, "loc": { "start": { - "line": 253, + "line": 255, "column": 65 }, "end": { - "line": 253, + "line": 255, "column": 66 } } @@ -68013,15 +68478,15 @@ "postfix": false, "binop": null }, - "start": 11164, - "end": 11165, + "start": 11231, + "end": 11232, "loc": { "start": { - "line": 253, + "line": 255, "column": 66 }, "end": { - "line": 253, + "line": 255, "column": 67 } } @@ -68039,15 +68504,15 @@ "binop": null, "updateContext": null }, - "start": 11165, - "end": 11166, + "start": 11232, + "end": 11233, "loc": { "start": { - "line": 253, + "line": 255, "column": 67 }, "end": { - "line": 253, + "line": 255, "column": 68 } } @@ -68067,15 +68532,15 @@ "updateContext": null }, "value": "const", - "start": 11191, - "end": 11196, + "start": 11258, + "end": 11263, "loc": { "start": { - "line": 254, + "line": 256, "column": 24 }, "end": { - "line": 254, + "line": 256, "column": 29 } } @@ -68093,15 +68558,15 @@ "binop": null }, "value": "buffer", - "start": 11197, - "end": 11203, + "start": 11264, + "end": 11270, "loc": { "start": { - "line": 254, + "line": 256, "column": 30 }, "end": { - "line": 254, + "line": 256, "column": 36 } } @@ -68120,15 +68585,15 @@ "updateContext": null }, "value": "=", - "start": 11204, - "end": 11205, + "start": 11271, + "end": 11272, "loc": { "start": { - "line": 254, + "line": 256, "column": 37 }, "end": { - "line": 254, + "line": 256, "column": 38 } } @@ -68146,15 +68611,15 @@ "binop": null }, "value": "fs", - "start": 11206, - "end": 11208, + "start": 11273, + "end": 11275, "loc": { "start": { - "line": 254, + "line": 256, "column": 39 }, "end": { - "line": 254, + "line": 256, "column": 41 } } @@ -68172,15 +68637,15 @@ "binop": null, "updateContext": null }, - "start": 11208, - "end": 11209, + "start": 11275, + "end": 11276, "loc": { "start": { - "line": 254, + "line": 256, "column": 41 }, "end": { - "line": 254, + "line": 256, "column": 42 } } @@ -68198,15 +68663,15 @@ "binop": null }, "value": "readFileSync", - "start": 11209, - "end": 11221, + "start": 11276, + "end": 11288, "loc": { "start": { - "line": 254, + "line": 256, "column": 42 }, "end": { - "line": 254, + "line": 256, "column": 54 } } @@ -68223,15 +68688,15 @@ "postfix": false, "binop": null }, - "start": 11221, - "end": 11222, + "start": 11288, + "end": 11289, "loc": { "start": { - "line": 254, + "line": 256, "column": 54 }, "end": { - "line": 254, + "line": 256, "column": 55 } } @@ -68249,15 +68714,15 @@ "binop": null }, "value": "filePath", - "start": 11222, - "end": 11230, + "start": 11289, + "end": 11297, "loc": { "start": { - "line": 254, + "line": 256, "column": 55 }, "end": { - "line": 254, + "line": 256, "column": 63 } } @@ -68274,15 +68739,15 @@ "postfix": false, "binop": null }, - "start": 11230, - "end": 11231, + "start": 11297, + "end": 11298, "loc": { "start": { - "line": 254, + "line": 256, "column": 63 }, "end": { - "line": 254, + "line": 256, "column": 64 } } @@ -68300,15 +68765,15 @@ "binop": null, "updateContext": null }, - "start": 11231, - "end": 11232, + "start": 11298, + "end": 11299, "loc": { "start": { - "line": 254, + "line": 256, "column": 64 }, "end": { - "line": 254, + "line": 256, "column": 65 } } @@ -68328,15 +68793,15 @@ "updateContext": null }, "value": "const", - "start": 11257, - "end": 11262, + "start": 11324, + "end": 11329, "loc": { "start": { - "line": 255, + "line": 257, "column": 24 }, "end": { - "line": 255, + "line": 257, "column": 29 } } @@ -68354,15 +68819,15 @@ "binop": null }, "value": "arrayBuf", - "start": 11263, - "end": 11271, + "start": 11330, + "end": 11338, "loc": { "start": { - "line": 255, + "line": 257, "column": 30 }, "end": { - "line": 255, + "line": 257, "column": 38 } } @@ -68381,15 +68846,15 @@ "updateContext": null }, "value": "=", - "start": 11272, - "end": 11273, + "start": 11339, + "end": 11340, "loc": { "start": { - "line": 255, + "line": 257, "column": 39 }, "end": { - "line": 255, + "line": 257, "column": 40 } } @@ -68407,15 +68872,15 @@ "binop": null }, "value": "toArrayBuffer", - "start": 11274, - "end": 11287, + "start": 11341, + "end": 11354, "loc": { "start": { - "line": 255, + "line": 257, "column": 41 }, "end": { - "line": 255, + "line": 257, "column": 54 } } @@ -68432,15 +68897,15 @@ "postfix": false, "binop": null }, - "start": 11287, - "end": 11288, + "start": 11354, + "end": 11355, "loc": { "start": { - "line": 255, + "line": 257, "column": 54 }, "end": { - "line": 255, + "line": 257, "column": 55 } } @@ -68458,15 +68923,15 @@ "binop": null }, "value": "buffer", - "start": 11288, - "end": 11294, + "start": 11355, + "end": 11361, "loc": { "start": { - "line": 255, + "line": 257, "column": 55 }, "end": { - "line": 255, + "line": 257, "column": 61 } } @@ -68483,15 +68948,15 @@ "postfix": false, "binop": null }, - "start": 11294, - "end": 11295, + "start": 11361, + "end": 11362, "loc": { "start": { - "line": 255, + "line": 257, "column": 61 }, "end": { - "line": 255, + "line": 257, "column": 62 } } @@ -68509,15 +68974,15 @@ "binop": null, "updateContext": null }, - "start": 11295, - "end": 11296, + "start": 11362, + "end": 11363, "loc": { "start": { - "line": 255, + "line": 257, "column": 62 }, "end": { - "line": 255, + "line": 257, "column": 63 } } @@ -68537,15 +69002,15 @@ "updateContext": null }, "value": "return", - "start": 11321, - "end": 11327, + "start": 11388, + "end": 11394, "loc": { "start": { - "line": 256, + "line": 258, "column": 24 }, "end": { - "line": 256, + "line": 258, "column": 30 } } @@ -68563,15 +69028,15 @@ "binop": null }, "value": "arrayBuf", - "start": 11328, - "end": 11336, + "start": 11395, + "end": 11403, "loc": { "start": { - "line": 256, + "line": 258, "column": 31 }, "end": { - "line": 256, + "line": 258, "column": 39 } } @@ -68589,15 +69054,15 @@ "binop": null, "updateContext": null }, - "start": 11336, - "end": 11337, + "start": 11403, + "end": 11404, "loc": { "start": { - "line": 256, + "line": 258, "column": 39 }, "end": { - "line": 256, + "line": 258, "column": 40 } } @@ -68614,15 +69079,15 @@ "postfix": false, "binop": null }, - "start": 11358, - "end": 11359, + "start": 11425, + "end": 11426, "loc": { "start": { - "line": 257, + "line": 259, "column": 20 }, "end": { - "line": 257, + "line": 259, "column": 21 } } @@ -68640,15 +69105,15 @@ "binop": null, "updateContext": null }, - "start": 11359, - "end": 11360, + "start": 11426, + "end": 11427, "loc": { "start": { - "line": 257, + "line": 259, "column": 21 }, "end": { - "line": 257, + "line": 259, "column": 22 } } @@ -68666,15 +69131,15 @@ "binop": null }, "value": "stats", - "start": 11381, - "end": 11386, + "start": 11448, + "end": 11453, "loc": { "start": { - "line": 258, + "line": 260, "column": 20 }, "end": { - "line": 258, + "line": 260, "column": 25 } } @@ -68692,15 +69157,15 @@ "binop": null, "updateContext": null }, - "start": 11386, - "end": 11387, + "start": 11453, + "end": 11454, "loc": { "start": { - "line": 258, + "line": 260, "column": 25 }, "end": { - "line": 258, + "line": 260, "column": 26 } } @@ -68718,15 +69183,15 @@ "binop": null }, "value": "log", - "start": 11408, - "end": 11411, + "start": 11475, + "end": 11478, "loc": { "start": { - "line": 259, + "line": 261, "column": 20 }, "end": { - "line": 259, + "line": 261, "column": 23 } } @@ -68743,15 +69208,15 @@ "postfix": false, "binop": null }, - "start": 11428, - "end": 11429, + "start": 11495, + "end": 11496, "loc": { "start": { - "line": 260, + "line": 262, "column": 16 }, "end": { - "line": 260, + "line": 262, "column": 17 } } @@ -68768,15 +69233,15 @@ "postfix": false, "binop": null }, - "start": 11429, - "end": 11430, + "start": 11496, + "end": 11497, "loc": { "start": { - "line": 260, + "line": 262, "column": 17 }, "end": { - "line": 260, + "line": 262, "column": 18 } } @@ -68794,15 +69259,15 @@ "binop": null, "updateContext": null }, - "start": 11430, - "end": 11431, + "start": 11497, + "end": 11498, "loc": { "start": { - "line": 260, + "line": 262, "column": 18 }, "end": { - "line": 260, + "line": 262, "column": 19 } } @@ -68822,15 +69287,15 @@ "updateContext": null }, "value": "break", - "start": 11448, - "end": 11453, + "start": 11515, + "end": 11520, "loc": { "start": { - "line": 261, + "line": 263, "column": 16 }, "end": { - "line": 261, + "line": 263, "column": 21 } } @@ -68848,15 +69313,15 @@ "binop": null, "updateContext": null }, - "start": 11453, - "end": 11454, + "start": 11520, + "end": 11521, "loc": { "start": { - "line": 261, + "line": 263, "column": 21 }, "end": { - "line": 261, + "line": 263, "column": 22 } } @@ -68876,15 +69341,15 @@ "updateContext": null }, "value": "case", - "start": 11468, - "end": 11472, + "start": 11535, + "end": 11539, "loc": { "start": { - "line": 263, + "line": 265, "column": 12 }, "end": { - "line": 263, + "line": 265, "column": 16 } } @@ -68903,15 +69368,15 @@ "updateContext": null }, "value": "ifc", - "start": 11473, - "end": 11478, + "start": 11540, + "end": 11545, "loc": { "start": { - "line": 263, + "line": 265, "column": 17 }, "end": { - "line": 263, + "line": 265, "column": 22 } } @@ -68929,15 +69394,15 @@ "binop": null, "updateContext": null }, - "start": 11478, - "end": 11479, + "start": 11545, + "end": 11546, "loc": { "start": { - "line": 263, + "line": 265, "column": 22 }, "end": { - "line": 263, + "line": 265, "column": 23 } } @@ -68955,15 +69420,15 @@ "binop": null }, "value": "convert", - "start": 11496, - "end": 11503, + "start": 11563, + "end": 11570, "loc": { "start": { - "line": 264, + "line": 266, "column": 16 }, "end": { - "line": 264, + "line": 266, "column": 23 } } @@ -68980,15 +69445,15 @@ "postfix": false, "binop": null }, - "start": 11503, - "end": 11504, + "start": 11570, + "end": 11571, "loc": { "start": { - "line": 264, + "line": 266, "column": 23 }, "end": { - "line": 264, + "line": 266, "column": 24 } } @@ -69006,15 +69471,15 @@ "binop": null }, "value": "parseIFCIntoXKTModel", - "start": 11504, - "end": 11524, + "start": 11571, + "end": 11591, "loc": { "start": { - "line": 264, + "line": 266, "column": 24 }, "end": { - "line": 264, + "line": 266, "column": 44 } } @@ -69032,15 +69497,15 @@ "binop": null, "updateContext": null }, - "start": 11524, - "end": 11525, + "start": 11591, + "end": 11592, "loc": { "start": { - "line": 264, + "line": 266, "column": 44 }, "end": { - "line": 264, + "line": 266, "column": 45 } } @@ -69057,15 +69522,15 @@ "postfix": false, "binop": null }, - "start": 11526, - "end": 11527, + "start": 11593, + "end": 11594, "loc": { "start": { - "line": 264, + "line": 266, "column": 46 }, "end": { - "line": 264, + "line": 266, "column": 47 } } @@ -69083,15 +69548,15 @@ "binop": null }, "value": "WebIFC", - "start": 11548, - "end": 11554, + "start": 11615, + "end": 11621, "loc": { "start": { - "line": 265, + "line": 267, "column": 20 }, "end": { - "line": 265, + "line": 267, "column": 26 } } @@ -69109,15 +69574,15 @@ "binop": null, "updateContext": null }, - "start": 11554, - "end": 11555, + "start": 11621, + "end": 11622, "loc": { "start": { - "line": 265, + "line": 267, "column": 26 }, "end": { - "line": 265, + "line": 267, "column": 27 } } @@ -69135,15 +69600,15 @@ "binop": null }, "value": "data", - "start": 11576, - "end": 11580, + "start": 11643, + "end": 11647, "loc": { "start": { - "line": 266, + "line": 268, "column": 20 }, "end": { - "line": 266, + "line": 268, "column": 24 } } @@ -69161,15 +69626,15 @@ "binop": null, "updateContext": null }, - "start": 11580, - "end": 11581, + "start": 11647, + "end": 11648, "loc": { "start": { - "line": 266, + "line": 268, "column": 24 }, "end": { - "line": 266, + "line": 268, "column": 25 } } @@ -69187,15 +69652,15 @@ "binop": null }, "value": "sourceData", - "start": 11582, - "end": 11592, + "start": 11649, + "end": 11659, "loc": { "start": { - "line": 266, + "line": 268, "column": 26 }, "end": { - "line": 266, + "line": 268, "column": 36 } } @@ -69213,15 +69678,15 @@ "binop": null, "updateContext": null }, - "start": 11592, - "end": 11593, + "start": 11659, + "end": 11660, "loc": { "start": { - "line": 266, + "line": 268, "column": 36 }, "end": { - "line": 266, + "line": 268, "column": 37 } } @@ -69239,15 +69704,15 @@ "binop": null }, "value": "xktModel", - "start": 11614, - "end": 11622, + "start": 11681, + "end": 11689, "loc": { "start": { - "line": 267, + "line": 269, "column": 20 }, "end": { - "line": 267, + "line": 269, "column": 28 } } @@ -69265,15 +69730,15 @@ "binop": null, "updateContext": null }, - "start": 11622, - "end": 11623, + "start": 11689, + "end": 11690, "loc": { "start": { - "line": 267, + "line": 269, "column": 28 }, "end": { - "line": 267, + "line": 269, "column": 29 } } @@ -69291,15 +69756,15 @@ "binop": null }, "value": "wasmPath", - "start": 11644, - "end": 11652, + "start": 11711, + "end": 11719, "loc": { "start": { - "line": 268, + "line": 270, "column": 20 }, "end": { - "line": 268, + "line": 270, "column": 28 } } @@ -69317,15 +69782,15 @@ "binop": null, "updateContext": null }, - "start": 11652, - "end": 11653, + "start": 11719, + "end": 11720, "loc": { "start": { - "line": 268, + "line": 270, "column": 28 }, "end": { - "line": 268, + "line": 270, "column": 29 } } @@ -69344,15 +69809,15 @@ "updateContext": null }, "value": "./", - "start": 11654, - "end": 11658, + "start": 11721, + "end": 11725, "loc": { "start": { - "line": 268, + "line": 270, "column": 30 }, "end": { - "line": 268, + "line": 270, "column": 34 } } @@ -69370,15 +69835,15 @@ "binop": null, "updateContext": null }, - "start": 11658, - "end": 11659, + "start": 11725, + "end": 11726, "loc": { "start": { - "line": 268, + "line": 270, "column": 34 }, "end": { - "line": 268, + "line": 270, "column": 35 } } @@ -69396,15 +69861,15 @@ "binop": null }, "value": "includeTypes", - "start": 11680, - "end": 11692, + "start": 11747, + "end": 11759, "loc": { "start": { - "line": 269, + "line": 271, "column": 20 }, "end": { - "line": 269, + "line": 271, "column": 32 } } @@ -69422,15 +69887,15 @@ "binop": null, "updateContext": null }, - "start": 11692, - "end": 11693, + "start": 11759, + "end": 11760, "loc": { "start": { - "line": 269, + "line": 271, "column": 32 }, "end": { - "line": 269, + "line": 271, "column": 33 } } @@ -69448,15 +69913,15 @@ "binop": null }, "value": "excludeTypes", - "start": 11714, - "end": 11726, + "start": 11781, + "end": 11793, "loc": { "start": { - "line": 270, + "line": 272, "column": 20 }, "end": { - "line": 270, + "line": 272, "column": 32 } } @@ -69474,15 +69939,15 @@ "binop": null, "updateContext": null }, - "start": 11726, - "end": 11727, + "start": 11793, + "end": 11794, "loc": { "start": { - "line": 270, + "line": 272, "column": 32 }, "end": { - "line": 270, + "line": 272, "column": 33 } } @@ -69500,15 +69965,15 @@ "binop": null }, "value": "stats", - "start": 11748, - "end": 11753, + "start": 11815, + "end": 11820, "loc": { "start": { - "line": 271, + "line": 273, "column": 20 }, "end": { - "line": 271, + "line": 273, "column": 25 } } @@ -69526,15 +69991,15 @@ "binop": null, "updateContext": null }, - "start": 11753, - "end": 11754, + "start": 11820, + "end": 11821, "loc": { "start": { - "line": 271, + "line": 273, "column": 25 }, "end": { - "line": 271, + "line": 273, "column": 26 } } @@ -69552,15 +70017,15 @@ "binop": null }, "value": "log", - "start": 11775, - "end": 11778, + "start": 11842, + "end": 11845, "loc": { "start": { - "line": 272, + "line": 274, "column": 20 }, "end": { - "line": 272, + "line": 274, "column": 23 } } @@ -69577,15 +70042,15 @@ "postfix": false, "binop": null }, - "start": 11795, - "end": 11796, + "start": 11862, + "end": 11863, "loc": { "start": { - "line": 273, + "line": 275, "column": 16 }, "end": { - "line": 273, + "line": 275, "column": 17 } } @@ -69602,15 +70067,15 @@ "postfix": false, "binop": null }, - "start": 11796, - "end": 11797, + "start": 11863, + "end": 11864, "loc": { "start": { - "line": 273, + "line": 275, "column": 17 }, "end": { - "line": 273, + "line": 275, "column": 18 } } @@ -69628,15 +70093,15 @@ "binop": null, "updateContext": null }, - "start": 11797, - "end": 11798, + "start": 11864, + "end": 11865, "loc": { "start": { - "line": 273, + "line": 275, "column": 18 }, "end": { - "line": 273, + "line": 275, "column": 19 } } @@ -69656,15 +70121,15 @@ "updateContext": null }, "value": "break", - "start": 11815, - "end": 11820, + "start": 11882, + "end": 11887, "loc": { "start": { - "line": 274, + "line": 276, "column": 16 }, "end": { - "line": 274, + "line": 276, "column": 21 } } @@ -69682,15 +70147,15 @@ "binop": null, "updateContext": null }, - "start": 11820, - "end": 11821, + "start": 11887, + "end": 11888, "loc": { "start": { - "line": 274, + "line": 276, "column": 21 }, "end": { - "line": 274, + "line": 276, "column": 22 } } @@ -69710,15 +70175,15 @@ "updateContext": null }, "value": "case", - "start": 11835, - "end": 11839, + "start": 11902, + "end": 11906, "loc": { "start": { - "line": 276, + "line": 278, "column": 12 }, "end": { - "line": 276, + "line": 278, "column": 16 } } @@ -69737,15 +70202,15 @@ "updateContext": null }, "value": "laz", - "start": 11840, - "end": 11845, + "start": 11907, + "end": 11912, "loc": { "start": { - "line": 276, + "line": 278, "column": 17 }, "end": { - "line": 276, + "line": 278, "column": 22 } } @@ -69763,15 +70228,15 @@ "binop": null, "updateContext": null }, - "start": 11845, - "end": 11846, + "start": 11912, + "end": 11913, "loc": { "start": { - "line": 276, + "line": 278, "column": 22 }, "end": { - "line": 276, + "line": 278, "column": 23 } } @@ -69789,15 +70254,15 @@ "binop": null }, "value": "convert", - "start": 11863, - "end": 11870, + "start": 11930, + "end": 11937, "loc": { "start": { - "line": 277, + "line": 279, "column": 16 }, "end": { - "line": 277, + "line": 279, "column": 23 } } @@ -69814,15 +70279,15 @@ "postfix": false, "binop": null }, - "start": 11870, - "end": 11871, + "start": 11937, + "end": 11938, "loc": { "start": { - "line": 277, + "line": 279, "column": 23 }, "end": { - "line": 277, + "line": 279, "column": 24 } } @@ -69840,15 +70305,15 @@ "binop": null }, "value": "parseLASIntoXKTModel", - "start": 11871, - "end": 11891, + "start": 11938, + "end": 11958, "loc": { "start": { - "line": 277, + "line": 279, "column": 24 }, "end": { - "line": 277, + "line": 279, "column": 44 } } @@ -69866,15 +70331,15 @@ "binop": null, "updateContext": null }, - "start": 11891, - "end": 11892, + "start": 11958, + "end": 11959, "loc": { "start": { - "line": 277, + "line": 279, "column": 44 }, "end": { - "line": 277, + "line": 279, "column": 45 } } @@ -69891,15 +70356,15 @@ "postfix": false, "binop": null }, - "start": 11893, - "end": 11894, + "start": 11960, + "end": 11961, "loc": { "start": { - "line": 277, + "line": 279, "column": 46 }, "end": { - "line": 277, + "line": 279, "column": 47 } } @@ -69917,15 +70382,15 @@ "binop": null }, "value": "data", - "start": 11915, - "end": 11919, + "start": 11982, + "end": 11986, "loc": { "start": { - "line": 278, + "line": 280, "column": 20 }, "end": { - "line": 278, + "line": 280, "column": 24 } } @@ -69943,15 +70408,15 @@ "binop": null, "updateContext": null }, - "start": 11919, - "end": 11920, + "start": 11986, + "end": 11987, "loc": { "start": { - "line": 278, + "line": 280, "column": 24 }, "end": { - "line": 278, + "line": 280, "column": 25 } } @@ -69969,15 +70434,15 @@ "binop": null }, "value": "sourceData", - "start": 11921, - "end": 11931, + "start": 11988, + "end": 11998, "loc": { "start": { - "line": 278, + "line": 280, "column": 26 }, "end": { - "line": 278, + "line": 280, "column": 36 } } @@ -69995,15 +70460,15 @@ "binop": null, "updateContext": null }, - "start": 11931, - "end": 11932, + "start": 11998, + "end": 11999, "loc": { "start": { - "line": 278, + "line": 280, "column": 36 }, "end": { - "line": 278, + "line": 280, "column": 37 } } @@ -70021,15 +70486,15 @@ "binop": null }, "value": "xktModel", - "start": 11953, - "end": 11961, + "start": 12020, + "end": 12028, "loc": { "start": { - "line": 279, + "line": 281, "column": 20 }, "end": { - "line": 279, + "line": 281, "column": 28 } } @@ -70047,15 +70512,15 @@ "binop": null, "updateContext": null }, - "start": 11961, - "end": 11962, + "start": 12028, + "end": 12029, "loc": { "start": { - "line": 279, + "line": 281, "column": 28 }, "end": { - "line": 279, + "line": 281, "column": 29 } } @@ -70073,15 +70538,15 @@ "binop": null }, "value": "stats", - "start": 11983, - "end": 11988, + "start": 12050, + "end": 12055, "loc": { "start": { - "line": 280, + "line": 282, "column": 20 }, "end": { - "line": 280, + "line": 282, "column": 25 } } @@ -70099,15 +70564,15 @@ "binop": null, "updateContext": null }, - "start": 11988, - "end": 11989, + "start": 12055, + "end": 12056, "loc": { "start": { - "line": 280, + "line": 282, "column": 25 }, "end": { - "line": 280, + "line": 282, "column": 26 } } @@ -70125,15 +70590,15 @@ "binop": null }, "value": "fp64", - "start": 12010, - "end": 12014, + "start": 12077, + "end": 12081, "loc": { "start": { - "line": 281, + "line": 283, "column": 20 }, "end": { - "line": 281, + "line": 283, "column": 24 } } @@ -70151,15 +70616,15 @@ "binop": null, "updateContext": null }, - "start": 12014, - "end": 12015, + "start": 12081, + "end": 12082, "loc": { "start": { - "line": 281, + "line": 283, "column": 24 }, "end": { - "line": 281, + "line": 283, "column": 25 } } @@ -70177,15 +70642,15 @@ "binop": null }, "value": "fileTypeConfigs", - "start": 12016, - "end": 12031, + "start": 12083, + "end": 12098, "loc": { "start": { - "line": 281, + "line": 283, "column": 26 }, "end": { - "line": 281, + "line": 283, "column": 41 } } @@ -70203,15 +70668,15 @@ "binop": null, "updateContext": null }, - "start": 12031, - "end": 12032, + "start": 12098, + "end": 12099, "loc": { "start": { - "line": 281, + "line": 283, "column": 41 }, "end": { - "line": 281, + "line": 283, "column": 42 } } @@ -70229,15 +70694,15 @@ "binop": null }, "value": "fp64", - "start": 12032, - "end": 12036, + "start": 12099, + "end": 12103, "loc": { "start": { - "line": 281, + "line": 283, "column": 42 }, "end": { - "line": 281, + "line": 283, "column": 46 } } @@ -70255,15 +70720,15 @@ "binop": null, "updateContext": null }, - "start": 12036, - "end": 12037, + "start": 12103, + "end": 12104, "loc": { "start": { - "line": 281, + "line": 283, "column": 46 }, "end": { - "line": 281, + "line": 283, "column": 47 } } @@ -70281,15 +70746,15 @@ "binop": null }, "value": "colorDepth", - "start": 12058, - "end": 12068, + "start": 12125, + "end": 12135, "loc": { "start": { - "line": 282, + "line": 284, "column": 20 }, "end": { - "line": 282, + "line": 284, "column": 30 } } @@ -70307,15 +70772,15 @@ "binop": null, "updateContext": null }, - "start": 12068, - "end": 12069, + "start": 12135, + "end": 12136, "loc": { "start": { - "line": 282, + "line": 284, "column": 30 }, "end": { - "line": 282, + "line": 284, "column": 31 } } @@ -70333,15 +70798,15 @@ "binop": null }, "value": "fileTypeConfigs", - "start": 12070, - "end": 12085, + "start": 12137, + "end": 12152, "loc": { "start": { - "line": 282, + "line": 284, "column": 32 }, "end": { - "line": 282, + "line": 284, "column": 47 } } @@ -70359,15 +70824,15 @@ "binop": null, "updateContext": null }, - "start": 12085, - "end": 12086, + "start": 12152, + "end": 12153, "loc": { "start": { - "line": 282, + "line": 284, "column": 47 }, "end": { - "line": 282, + "line": 284, "column": 48 } } @@ -70385,15 +70850,15 @@ "binop": null }, "value": "colorDepth", - "start": 12086, - "end": 12096, + "start": 12153, + "end": 12163, "loc": { "start": { - "line": 282, + "line": 284, "column": 48 }, "end": { - "line": 282, + "line": 284, "column": 58 } } @@ -70411,15 +70876,15 @@ "binop": null, "updateContext": null }, - "start": 12096, - "end": 12097, + "start": 12163, + "end": 12164, "loc": { "start": { - "line": 282, + "line": 284, "column": 58 }, "end": { - "line": 282, + "line": 284, "column": 59 } } @@ -70437,15 +70902,15 @@ "binop": null }, "value": "center", - "start": 12118, - "end": 12124, + "start": 12185, + "end": 12191, "loc": { "start": { - "line": 283, + "line": 285, "column": 20 }, "end": { - "line": 283, + "line": 285, "column": 26 } } @@ -70463,15 +70928,15 @@ "binop": null, "updateContext": null }, - "start": 12124, - "end": 12125, + "start": 12191, + "end": 12192, "loc": { "start": { - "line": 283, + "line": 285, "column": 26 }, "end": { - "line": 283, + "line": 285, "column": 27 } } @@ -70489,15 +70954,15 @@ "binop": null }, "value": "fileTypeConfigs", - "start": 12126, - "end": 12141, + "start": 12193, + "end": 12208, "loc": { "start": { - "line": 283, + "line": 285, "column": 28 }, "end": { - "line": 283, + "line": 285, "column": 43 } } @@ -70515,15 +70980,15 @@ "binop": null, "updateContext": null }, - "start": 12141, - "end": 12142, + "start": 12208, + "end": 12209, "loc": { "start": { - "line": 283, + "line": 285, "column": 43 }, "end": { - "line": 283, + "line": 285, "column": 44 } } @@ -70541,15 +71006,15 @@ "binop": null }, "value": "center", - "start": 12142, - "end": 12148, + "start": 12209, + "end": 12215, "loc": { "start": { - "line": 283, + "line": 285, "column": 44 }, "end": { - "line": 283, + "line": 285, "column": 50 } } @@ -70567,15 +71032,15 @@ "binop": null, "updateContext": null }, - "start": 12148, - "end": 12149, + "start": 12215, + "end": 12216, "loc": { "start": { - "line": 283, + "line": 285, "column": 50 }, "end": { - "line": 283, + "line": 285, "column": 51 } } @@ -70593,15 +71058,15 @@ "binop": null }, "value": "transform", - "start": 12170, - "end": 12179, + "start": 12237, + "end": 12246, "loc": { "start": { - "line": 284, + "line": 286, "column": 20 }, "end": { - "line": 284, + "line": 286, "column": 29 } } @@ -70619,15 +71084,15 @@ "binop": null, "updateContext": null }, - "start": 12179, - "end": 12180, + "start": 12246, + "end": 12247, "loc": { "start": { - "line": 284, + "line": 286, "column": 29 }, "end": { - "line": 284, + "line": 286, "column": 30 } } @@ -70645,15 +71110,15 @@ "binop": null }, "value": "fileTypeConfigs", - "start": 12181, - "end": 12196, + "start": 12248, + "end": 12263, "loc": { "start": { - "line": 284, + "line": 286, "column": 31 }, "end": { - "line": 284, + "line": 286, "column": 46 } } @@ -70671,15 +71136,15 @@ "binop": null, "updateContext": null }, - "start": 12196, - "end": 12197, + "start": 12263, + "end": 12264, "loc": { "start": { - "line": 284, + "line": 286, "column": 46 }, "end": { - "line": 284, + "line": 286, "column": 47 } } @@ -70697,15 +71162,15 @@ "binop": null }, "value": "transform", - "start": 12197, - "end": 12206, + "start": 12264, + "end": 12273, "loc": { "start": { - "line": 284, + "line": 286, "column": 47 }, "end": { - "line": 284, + "line": 286, "column": 56 } } @@ -70723,15 +71188,15 @@ "binop": null, "updateContext": null }, - "start": 12206, - "end": 12207, + "start": 12273, + "end": 12274, "loc": { "start": { - "line": 284, + "line": 286, "column": 56 }, "end": { - "line": 284, + "line": 286, "column": 57 } } @@ -70749,15 +71214,15 @@ "binop": null }, "value": "skip", - "start": 12228, - "end": 12232, + "start": 12295, + "end": 12299, "loc": { "start": { - "line": 285, + "line": 287, "column": 20 }, "end": { - "line": 285, + "line": 287, "column": 24 } } @@ -70775,15 +71240,15 @@ "binop": null, "updateContext": null }, - "start": 12232, - "end": 12233, + "start": 12299, + "end": 12300, "loc": { "start": { - "line": 285, + "line": 287, "column": 24 }, "end": { - "line": 285, + "line": 287, "column": 25 } } @@ -70801,15 +71266,15 @@ "binop": null }, "value": "overrideOption", - "start": 12234, - "end": 12248, + "start": 12301, + "end": 12315, "loc": { "start": { - "line": 285, + "line": 287, "column": 26 }, "end": { - "line": 285, + "line": 287, "column": 40 } } @@ -70826,15 +71291,15 @@ "postfix": false, "binop": null }, - "start": 12248, - "end": 12249, + "start": 12315, + "end": 12316, "loc": { "start": { - "line": 285, + "line": 287, "column": 40 }, "end": { - "line": 285, + "line": 287, "column": 41 } } @@ -70852,15 +71317,15 @@ "binop": null }, "value": "fileTypeConfigs", - "start": 12249, - "end": 12264, + "start": 12316, + "end": 12331, "loc": { "start": { - "line": 285, + "line": 287, "column": 41 }, "end": { - "line": 285, + "line": 287, "column": 56 } } @@ -70878,15 +71343,15 @@ "binop": null, "updateContext": null }, - "start": 12264, - "end": 12265, + "start": 12331, + "end": 12332, "loc": { "start": { - "line": 285, + "line": 287, "column": 56 }, "end": { - "line": 285, + "line": 287, "column": 57 } } @@ -70904,15 +71369,15 @@ "binop": null }, "value": "skip", - "start": 12265, - "end": 12269, + "start": 12332, + "end": 12336, "loc": { "start": { - "line": 285, + "line": 287, "column": 57 }, "end": { - "line": 285, + "line": 287, "column": 61 } } @@ -70930,15 +71395,15 @@ "binop": null, "updateContext": null }, - "start": 12269, - "end": 12270, + "start": 12336, + "end": 12337, "loc": { "start": { - "line": 285, + "line": 287, "column": 61 }, "end": { - "line": 285, + "line": 287, "column": 62 } } @@ -70957,15 +71422,15 @@ "updateContext": null }, "value": 1, - "start": 12271, - "end": 12272, + "start": 12338, + "end": 12339, "loc": { "start": { - "line": 285, + "line": 287, "column": 63 }, "end": { - "line": 285, + "line": 287, "column": 64 } } @@ -70982,15 +71447,15 @@ "postfix": false, "binop": null }, - "start": 12272, - "end": 12273, + "start": 12339, + "end": 12340, "loc": { "start": { - "line": 285, + "line": 287, "column": 64 }, "end": { - "line": 285, + "line": 287, "column": 65 } } @@ -71008,15 +71473,15 @@ "binop": null, "updateContext": null }, - "start": 12273, - "end": 12274, + "start": 12340, + "end": 12341, "loc": { "start": { - "line": 285, + "line": 287, "column": 65 }, "end": { - "line": 285, + "line": 287, "column": 66 } } @@ -71034,15 +71499,15 @@ "binop": null }, "value": "log", - "start": 12295, - "end": 12298, + "start": 12362, + "end": 12365, "loc": { "start": { - "line": 286, + "line": 288, "column": 20 }, "end": { - "line": 286, + "line": 288, "column": 23 } } @@ -71059,15 +71524,15 @@ "postfix": false, "binop": null }, - "start": 12315, - "end": 12316, + "start": 12382, + "end": 12383, "loc": { "start": { - "line": 287, + "line": 289, "column": 16 }, "end": { - "line": 287, + "line": 289, "column": 17 } } @@ -71084,15 +71549,15 @@ "postfix": false, "binop": null }, - "start": 12316, - "end": 12317, + "start": 12383, + "end": 12384, "loc": { "start": { - "line": 287, + "line": 289, "column": 17 }, "end": { - "line": 287, + "line": 289, "column": 18 } } @@ -71110,15 +71575,15 @@ "binop": null, "updateContext": null }, - "start": 12317, - "end": 12318, + "start": 12384, + "end": 12385, "loc": { "start": { - "line": 287, + "line": 289, "column": 18 }, "end": { - "line": 287, + "line": 289, "column": 19 } } @@ -71138,15 +71603,15 @@ "updateContext": null }, "value": "break", - "start": 12335, - "end": 12340, + "start": 12402, + "end": 12407, "loc": { "start": { - "line": 288, + "line": 290, "column": 16 }, "end": { - "line": 288, + "line": 290, "column": 21 } } @@ -71164,15 +71629,15 @@ "binop": null, "updateContext": null }, - "start": 12340, - "end": 12341, + "start": 12407, + "end": 12408, "loc": { "start": { - "line": 288, + "line": 290, "column": 21 }, "end": { - "line": 288, + "line": 290, "column": 22 } } @@ -71192,15 +71657,15 @@ "updateContext": null }, "value": "case", - "start": 12355, - "end": 12359, + "start": 12422, + "end": 12426, "loc": { "start": { - "line": 290, + "line": 292, "column": 12 }, "end": { - "line": 290, + "line": 292, "column": 16 } } @@ -71219,15 +71684,15 @@ "updateContext": null }, "value": "las", - "start": 12360, - "end": 12365, + "start": 12427, + "end": 12432, "loc": { "start": { - "line": 290, + "line": 292, "column": 17 }, "end": { - "line": 290, + "line": 292, "column": 22 } } @@ -71245,15 +71710,15 @@ "binop": null, "updateContext": null }, - "start": 12365, - "end": 12366, + "start": 12432, + "end": 12433, "loc": { "start": { - "line": 290, + "line": 292, "column": 22 }, "end": { - "line": 290, + "line": 292, "column": 23 } } @@ -71271,15 +71736,15 @@ "binop": null }, "value": "convert", - "start": 12383, - "end": 12390, + "start": 12450, + "end": 12457, "loc": { "start": { - "line": 291, + "line": 293, "column": 16 }, "end": { - "line": 291, + "line": 293, "column": 23 } } @@ -71296,15 +71761,15 @@ "postfix": false, "binop": null }, - "start": 12390, - "end": 12391, + "start": 12457, + "end": 12458, "loc": { "start": { - "line": 291, + "line": 293, "column": 23 }, "end": { - "line": 291, + "line": 293, "column": 24 } } @@ -71322,15 +71787,15 @@ "binop": null }, "value": "parseLASIntoXKTModel", - "start": 12391, - "end": 12411, + "start": 12458, + "end": 12478, "loc": { "start": { - "line": 291, + "line": 293, "column": 24 }, "end": { - "line": 291, + "line": 293, "column": 44 } } @@ -71348,15 +71813,15 @@ "binop": null, "updateContext": null }, - "start": 12411, - "end": 12412, + "start": 12478, + "end": 12479, "loc": { "start": { - "line": 291, + "line": 293, "column": 44 }, "end": { - "line": 291, + "line": 293, "column": 45 } } @@ -71373,15 +71838,15 @@ "postfix": false, "binop": null }, - "start": 12413, - "end": 12414, + "start": 12480, + "end": 12481, "loc": { "start": { - "line": 291, + "line": 293, "column": 46 }, "end": { - "line": 291, + "line": 293, "column": 47 } } @@ -71399,15 +71864,15 @@ "binop": null }, "value": "data", - "start": 12435, - "end": 12439, + "start": 12502, + "end": 12506, "loc": { "start": { - "line": 292, + "line": 294, "column": 20 }, "end": { - "line": 292, + "line": 294, "column": 24 } } @@ -71425,15 +71890,15 @@ "binop": null, "updateContext": null }, - "start": 12439, - "end": 12440, + "start": 12506, + "end": 12507, "loc": { "start": { - "line": 292, + "line": 294, "column": 24 }, "end": { - "line": 292, + "line": 294, "column": 25 } } @@ -71451,15 +71916,15 @@ "binop": null }, "value": "sourceData", - "start": 12441, - "end": 12451, + "start": 12508, + "end": 12518, "loc": { "start": { - "line": 292, + "line": 294, "column": 26 }, "end": { - "line": 292, + "line": 294, "column": 36 } } @@ -71477,15 +71942,15 @@ "binop": null, "updateContext": null }, - "start": 12451, - "end": 12452, + "start": 12518, + "end": 12519, "loc": { "start": { - "line": 292, + "line": 294, "column": 36 }, "end": { - "line": 292, + "line": 294, "column": 37 } } @@ -71503,15 +71968,15 @@ "binop": null }, "value": "xktModel", - "start": 12473, - "end": 12481, + "start": 12540, + "end": 12548, "loc": { "start": { - "line": 293, + "line": 295, "column": 20 }, "end": { - "line": 293, + "line": 295, "column": 28 } } @@ -71529,15 +71994,15 @@ "binop": null, "updateContext": null }, - "start": 12481, - "end": 12482, + "start": 12548, + "end": 12549, "loc": { "start": { - "line": 293, + "line": 295, "column": 28 }, "end": { - "line": 293, + "line": 295, "column": 29 } } @@ -71555,15 +72020,15 @@ "binop": null }, "value": "stats", - "start": 12503, - "end": 12508, + "start": 12570, + "end": 12575, "loc": { "start": { - "line": 294, + "line": 296, "column": 20 }, "end": { - "line": 294, + "line": 296, "column": 25 } } @@ -71581,15 +72046,15 @@ "binop": null, "updateContext": null }, - "start": 12508, - "end": 12509, + "start": 12575, + "end": 12576, "loc": { "start": { - "line": 294, + "line": 296, "column": 25 }, "end": { - "line": 294, + "line": 296, "column": 26 } } @@ -71607,15 +72072,15 @@ "binop": null }, "value": "fp64", - "start": 12530, - "end": 12534, + "start": 12597, + "end": 12601, "loc": { "start": { - "line": 295, + "line": 297, "column": 20 }, "end": { - "line": 295, + "line": 297, "column": 24 } } @@ -71633,15 +72098,15 @@ "binop": null, "updateContext": null }, - "start": 12534, - "end": 12535, + "start": 12601, + "end": 12602, "loc": { "start": { - "line": 295, + "line": 297, "column": 24 }, "end": { - "line": 295, + "line": 297, "column": 25 } } @@ -71659,15 +72124,15 @@ "binop": null }, "value": "fileTypeConfigs", - "start": 12536, - "end": 12551, + "start": 12603, + "end": 12618, "loc": { "start": { - "line": 295, + "line": 297, "column": 26 }, "end": { - "line": 295, + "line": 297, "column": 41 } } @@ -71685,15 +72150,15 @@ "binop": null, "updateContext": null }, - "start": 12551, - "end": 12552, + "start": 12618, + "end": 12619, "loc": { "start": { - "line": 295, + "line": 297, "column": 41 }, "end": { - "line": 295, + "line": 297, "column": 42 } } @@ -71711,15 +72176,15 @@ "binop": null }, "value": "fp64", - "start": 12552, - "end": 12556, + "start": 12619, + "end": 12623, "loc": { "start": { - "line": 295, + "line": 297, "column": 42 }, "end": { - "line": 295, + "line": 297, "column": 46 } } @@ -71737,15 +72202,15 @@ "binop": null, "updateContext": null }, - "start": 12556, - "end": 12557, + "start": 12623, + "end": 12624, "loc": { "start": { - "line": 295, + "line": 297, "column": 46 }, "end": { - "line": 295, + "line": 297, "column": 47 } } @@ -71763,15 +72228,15 @@ "binop": null }, "value": "colorDepth", - "start": 12578, - "end": 12588, + "start": 12645, + "end": 12655, "loc": { "start": { - "line": 296, + "line": 298, "column": 20 }, "end": { - "line": 296, + "line": 298, "column": 30 } } @@ -71789,15 +72254,15 @@ "binop": null, "updateContext": null }, - "start": 12588, - "end": 12589, + "start": 12655, + "end": 12656, "loc": { "start": { - "line": 296, + "line": 298, "column": 30 }, "end": { - "line": 296, + "line": 298, "column": 31 } } @@ -71815,15 +72280,15 @@ "binop": null }, "value": "fileTypeConfigs", - "start": 12590, - "end": 12605, + "start": 12657, + "end": 12672, "loc": { "start": { - "line": 296, + "line": 298, "column": 32 }, "end": { - "line": 296, + "line": 298, "column": 47 } } @@ -71841,15 +72306,15 @@ "binop": null, "updateContext": null }, - "start": 12605, - "end": 12606, + "start": 12672, + "end": 12673, "loc": { "start": { - "line": 296, + "line": 298, "column": 47 }, "end": { - "line": 296, + "line": 298, "column": 48 } } @@ -71867,15 +72332,15 @@ "binop": null }, "value": "colorDepth", - "start": 12606, - "end": 12616, + "start": 12673, + "end": 12683, "loc": { "start": { - "line": 296, + "line": 298, "column": 48 }, "end": { - "line": 296, + "line": 298, "column": 58 } } @@ -71893,15 +72358,15 @@ "binop": null, "updateContext": null }, - "start": 12616, - "end": 12617, + "start": 12683, + "end": 12684, "loc": { "start": { - "line": 296, + "line": 298, "column": 58 }, "end": { - "line": 296, + "line": 298, "column": 59 } } @@ -71919,15 +72384,15 @@ "binop": null }, "value": "center", - "start": 12638, - "end": 12644, + "start": 12705, + "end": 12711, "loc": { "start": { - "line": 297, + "line": 299, "column": 20 }, "end": { - "line": 297, + "line": 299, "column": 26 } } @@ -71945,15 +72410,15 @@ "binop": null, "updateContext": null }, - "start": 12644, - "end": 12645, + "start": 12711, + "end": 12712, "loc": { "start": { - "line": 297, + "line": 299, "column": 26 }, "end": { - "line": 297, + "line": 299, "column": 27 } } @@ -71971,15 +72436,15 @@ "binop": null }, "value": "fileTypeConfigs", - "start": 12646, - "end": 12661, + "start": 12713, + "end": 12728, "loc": { "start": { - "line": 297, + "line": 299, "column": 28 }, "end": { - "line": 297, + "line": 299, "column": 43 } } @@ -71997,15 +72462,15 @@ "binop": null, "updateContext": null }, - "start": 12661, - "end": 12662, + "start": 12728, + "end": 12729, "loc": { "start": { - "line": 297, + "line": 299, "column": 43 }, "end": { - "line": 297, + "line": 299, "column": 44 } } @@ -72023,15 +72488,15 @@ "binop": null }, "value": "center", - "start": 12662, - "end": 12668, + "start": 12729, + "end": 12735, "loc": { "start": { - "line": 297, + "line": 299, "column": 44 }, "end": { - "line": 297, + "line": 299, "column": 50 } } @@ -72049,15 +72514,15 @@ "binop": null, "updateContext": null }, - "start": 12668, - "end": 12669, + "start": 12735, + "end": 12736, "loc": { "start": { - "line": 297, + "line": 299, "column": 50 }, "end": { - "line": 297, + "line": 299, "column": 51 } } @@ -72075,15 +72540,15 @@ "binop": null }, "value": "transform", - "start": 12690, - "end": 12699, + "start": 12757, + "end": 12766, "loc": { "start": { - "line": 298, + "line": 300, "column": 20 }, "end": { - "line": 298, + "line": 300, "column": 29 } } @@ -72101,15 +72566,15 @@ "binop": null, "updateContext": null }, - "start": 12699, - "end": 12700, + "start": 12766, + "end": 12767, "loc": { "start": { - "line": 298, + "line": 300, "column": 29 }, "end": { - "line": 298, + "line": 300, "column": 30 } } @@ -72127,15 +72592,15 @@ "binop": null }, "value": "fileTypeConfigs", - "start": 12701, - "end": 12716, + "start": 12768, + "end": 12783, "loc": { "start": { - "line": 298, + "line": 300, "column": 31 }, "end": { - "line": 298, + "line": 300, "column": 46 } } @@ -72153,15 +72618,15 @@ "binop": null, "updateContext": null }, - "start": 12716, - "end": 12717, + "start": 12783, + "end": 12784, "loc": { "start": { - "line": 298, + "line": 300, "column": 46 }, "end": { - "line": 298, + "line": 300, "column": 47 } } @@ -72179,15 +72644,15 @@ "binop": null }, "value": "transform", - "start": 12717, - "end": 12726, + "start": 12784, + "end": 12793, "loc": { "start": { - "line": 298, + "line": 300, "column": 47 }, "end": { - "line": 298, + "line": 300, "column": 56 } } @@ -72205,15 +72670,15 @@ "binop": null, "updateContext": null }, - "start": 12726, - "end": 12727, + "start": 12793, + "end": 12794, "loc": { "start": { - "line": 298, + "line": 300, "column": 56 }, "end": { - "line": 298, + "line": 300, "column": 57 } } @@ -72231,15 +72696,15 @@ "binop": null }, "value": "skip", - "start": 12748, - "end": 12752, + "start": 12815, + "end": 12819, "loc": { "start": { - "line": 299, + "line": 301, "column": 20 }, "end": { - "line": 299, + "line": 301, "column": 24 } } @@ -72257,15 +72722,15 @@ "binop": null, "updateContext": null }, - "start": 12752, - "end": 12753, + "start": 12819, + "end": 12820, "loc": { "start": { - "line": 299, + "line": 301, "column": 24 }, "end": { - "line": 299, + "line": 301, "column": 25 } } @@ -72283,15 +72748,15 @@ "binop": null }, "value": "overrideOption", - "start": 12754, - "end": 12768, + "start": 12821, + "end": 12835, "loc": { "start": { - "line": 299, + "line": 301, "column": 26 }, "end": { - "line": 299, + "line": 301, "column": 40 } } @@ -72308,15 +72773,15 @@ "postfix": false, "binop": null }, - "start": 12768, - "end": 12769, + "start": 12835, + "end": 12836, "loc": { "start": { - "line": 299, + "line": 301, "column": 40 }, "end": { - "line": 299, + "line": 301, "column": 41 } } @@ -72334,15 +72799,15 @@ "binop": null }, "value": "fileTypeConfigs", - "start": 12769, - "end": 12784, + "start": 12836, + "end": 12851, "loc": { "start": { - "line": 299, + "line": 301, "column": 41 }, "end": { - "line": 299, + "line": 301, "column": 56 } } @@ -72360,15 +72825,15 @@ "binop": null, "updateContext": null }, - "start": 12784, - "end": 12785, + "start": 12851, + "end": 12852, "loc": { "start": { - "line": 299, + "line": 301, "column": 56 }, "end": { - "line": 299, + "line": 301, "column": 57 } } @@ -72386,15 +72851,15 @@ "binop": null }, "value": "skip", - "start": 12785, - "end": 12789, + "start": 12852, + "end": 12856, "loc": { "start": { - "line": 299, + "line": 301, "column": 57 }, "end": { - "line": 299, + "line": 301, "column": 61 } } @@ -72412,15 +72877,15 @@ "binop": null, "updateContext": null }, - "start": 12789, - "end": 12790, + "start": 12856, + "end": 12857, "loc": { "start": { - "line": 299, + "line": 301, "column": 61 }, "end": { - "line": 299, + "line": 301, "column": 62 } } @@ -72439,15 +72904,15 @@ "updateContext": null }, "value": 1, - "start": 12791, - "end": 12792, + "start": 12858, + "end": 12859, "loc": { "start": { - "line": 299, + "line": 301, "column": 63 }, "end": { - "line": 299, + "line": 301, "column": 64 } } @@ -72464,15 +72929,15 @@ "postfix": false, "binop": null }, - "start": 12792, - "end": 12793, + "start": 12859, + "end": 12860, "loc": { "start": { - "line": 299, + "line": 301, "column": 64 }, "end": { - "line": 299, + "line": 301, "column": 65 } } @@ -72490,15 +72955,15 @@ "binop": null, "updateContext": null }, - "start": 12793, - "end": 12794, + "start": 12860, + "end": 12861, "loc": { "start": { - "line": 299, + "line": 301, "column": 65 }, "end": { - "line": 299, + "line": 301, "column": 66 } } @@ -72516,15 +72981,15 @@ "binop": null }, "value": "log", - "start": 12815, - "end": 12818, + "start": 12882, + "end": 12885, "loc": { "start": { - "line": 300, + "line": 302, "column": 20 }, "end": { - "line": 300, + "line": 302, "column": 23 } } @@ -72541,15 +73006,15 @@ "postfix": false, "binop": null }, - "start": 12835, - "end": 12836, + "start": 12902, + "end": 12903, "loc": { "start": { - "line": 301, + "line": 303, "column": 16 }, "end": { - "line": 301, + "line": 303, "column": 17 } } @@ -72566,15 +73031,15 @@ "postfix": false, "binop": null }, - "start": 12836, - "end": 12837, + "start": 12903, + "end": 12904, "loc": { "start": { - "line": 301, + "line": 303, "column": 17 }, "end": { - "line": 301, + "line": 303, "column": 18 } } @@ -72592,15 +73057,15 @@ "binop": null, "updateContext": null }, - "start": 12837, - "end": 12838, + "start": 12904, + "end": 12905, "loc": { "start": { - "line": 301, + "line": 303, "column": 18 }, "end": { - "line": 301, + "line": 303, "column": 19 } } @@ -72620,15 +73085,15 @@ "updateContext": null }, "value": "break", - "start": 12855, - "end": 12860, + "start": 12922, + "end": 12927, "loc": { "start": { - "line": 302, + "line": 304, "column": 16 }, "end": { - "line": 302, + "line": 304, "column": 21 } } @@ -72646,15 +73111,15 @@ "binop": null, "updateContext": null }, - "start": 12860, - "end": 12861, + "start": 12927, + "end": 12928, "loc": { "start": { - "line": 302, + "line": 304, "column": 21 }, "end": { - "line": 302, + "line": 304, "column": 22 } } @@ -72674,15 +73139,15 @@ "updateContext": null }, "value": "case", - "start": 12875, - "end": 12879, + "start": 12942, + "end": 12946, "loc": { "start": { - "line": 304, + "line": 306, "column": 12 }, "end": { - "line": 304, + "line": 306, "column": 16 } } @@ -72701,15 +73166,15 @@ "updateContext": null }, "value": "pcd", - "start": 12880, - "end": 12885, + "start": 12947, + "end": 12952, "loc": { "start": { - "line": 304, + "line": 306, "column": 17 }, "end": { - "line": 304, + "line": 306, "column": 22 } } @@ -72727,15 +73192,15 @@ "binop": null, "updateContext": null }, - "start": 12885, - "end": 12886, + "start": 12952, + "end": 12953, "loc": { "start": { - "line": 304, + "line": 306, "column": 22 }, "end": { - "line": 304, + "line": 306, "column": 23 } } @@ -72753,15 +73218,15 @@ "binop": null }, "value": "convert", - "start": 12903, - "end": 12910, + "start": 12970, + "end": 12977, "loc": { "start": { - "line": 305, + "line": 307, "column": 16 }, "end": { - "line": 305, + "line": 307, "column": 23 } } @@ -72778,15 +73243,15 @@ "postfix": false, "binop": null }, - "start": 12910, - "end": 12911, + "start": 12977, + "end": 12978, "loc": { "start": { - "line": 305, + "line": 307, "column": 23 }, "end": { - "line": 305, + "line": 307, "column": 24 } } @@ -72804,15 +73269,15 @@ "binop": null }, "value": "parsePCDIntoXKTModel", - "start": 12911, - "end": 12931, + "start": 12978, + "end": 12998, "loc": { "start": { - "line": 305, + "line": 307, "column": 24 }, "end": { - "line": 305, + "line": 307, "column": 44 } } @@ -72830,15 +73295,15 @@ "binop": null, "updateContext": null }, - "start": 12931, - "end": 12932, + "start": 12998, + "end": 12999, "loc": { "start": { - "line": 305, + "line": 307, "column": 44 }, "end": { - "line": 305, + "line": 307, "column": 45 } } @@ -72855,15 +73320,15 @@ "postfix": false, "binop": null }, - "start": 12933, - "end": 12934, + "start": 13000, + "end": 13001, "loc": { "start": { - "line": 305, + "line": 307, "column": 46 }, "end": { - "line": 305, + "line": 307, "column": 47 } } @@ -72881,15 +73346,15 @@ "binop": null }, "value": "data", - "start": 12955, - "end": 12959, + "start": 13022, + "end": 13026, "loc": { "start": { - "line": 306, + "line": 308, "column": 20 }, "end": { - "line": 306, + "line": 308, "column": 24 } } @@ -72907,15 +73372,15 @@ "binop": null, "updateContext": null }, - "start": 12959, - "end": 12960, + "start": 13026, + "end": 13027, "loc": { "start": { - "line": 306, + "line": 308, "column": 24 }, "end": { - "line": 306, + "line": 308, "column": 25 } } @@ -72933,15 +73398,15 @@ "binop": null }, "value": "sourceData", - "start": 12961, - "end": 12971, + "start": 13028, + "end": 13038, "loc": { "start": { - "line": 306, + "line": 308, "column": 26 }, "end": { - "line": 306, + "line": 308, "column": 36 } } @@ -72959,15 +73424,15 @@ "binop": null, "updateContext": null }, - "start": 12971, - "end": 12972, + "start": 13038, + "end": 13039, "loc": { "start": { - "line": 306, + "line": 308, "column": 36 }, "end": { - "line": 306, + "line": 308, "column": 37 } } @@ -72985,15 +73450,15 @@ "binop": null }, "value": "xktModel", - "start": 12993, - "end": 13001, + "start": 13060, + "end": 13068, "loc": { "start": { - "line": 307, + "line": 309, "column": 20 }, "end": { - "line": 307, + "line": 309, "column": 28 } } @@ -73011,15 +73476,15 @@ "binop": null, "updateContext": null }, - "start": 13001, - "end": 13002, + "start": 13068, + "end": 13069, "loc": { "start": { - "line": 307, + "line": 309, "column": 28 }, "end": { - "line": 307, + "line": 309, "column": 29 } } @@ -73037,15 +73502,15 @@ "binop": null }, "value": "stats", - "start": 13023, - "end": 13028, + "start": 13090, + "end": 13095, "loc": { "start": { - "line": 308, + "line": 310, "column": 20 }, "end": { - "line": 308, + "line": 310, "column": 25 } } @@ -73063,15 +73528,15 @@ "binop": null, "updateContext": null }, - "start": 13028, - "end": 13029, + "start": 13095, + "end": 13096, "loc": { "start": { - "line": 308, + "line": 310, "column": 25 }, "end": { - "line": 308, + "line": 310, "column": 26 } } @@ -73089,15 +73554,15 @@ "binop": null }, "value": "log", - "start": 13050, - "end": 13053, + "start": 13117, + "end": 13120, "loc": { "start": { - "line": 309, + "line": 311, "column": 20 }, "end": { - "line": 309, + "line": 311, "column": 23 } } @@ -73114,15 +73579,15 @@ "postfix": false, "binop": null }, - "start": 13070, - "end": 13071, + "start": 13137, + "end": 13138, "loc": { "start": { - "line": 310, + "line": 312, "column": 16 }, "end": { - "line": 310, + "line": 312, "column": 17 } } @@ -73139,15 +73604,15 @@ "postfix": false, "binop": null }, - "start": 13071, - "end": 13072, + "start": 13138, + "end": 13139, "loc": { "start": { - "line": 310, + "line": 312, "column": 17 }, "end": { - "line": 310, + "line": 312, "column": 18 } } @@ -73165,15 +73630,15 @@ "binop": null, "updateContext": null }, - "start": 13072, - "end": 13073, + "start": 13139, + "end": 13140, "loc": { "start": { - "line": 310, + "line": 312, "column": 18 }, "end": { - "line": 310, + "line": 312, "column": 19 } } @@ -73193,15 +73658,15 @@ "updateContext": null }, "value": "break", - "start": 13090, - "end": 13095, + "start": 13157, + "end": 13162, "loc": { "start": { - "line": 311, + "line": 313, "column": 16 }, "end": { - "line": 311, + "line": 313, "column": 21 } } @@ -73219,15 +73684,15 @@ "binop": null, "updateContext": null }, - "start": 13095, - "end": 13096, + "start": 13162, + "end": 13163, "loc": { "start": { - "line": 311, + "line": 313, "column": 21 }, "end": { - "line": 311, + "line": 313, "column": 22 } } @@ -73247,15 +73712,15 @@ "updateContext": null }, "value": "case", - "start": 13110, - "end": 13114, + "start": 13177, + "end": 13181, "loc": { "start": { - "line": 313, + "line": 315, "column": 12 }, "end": { - "line": 313, + "line": 315, "column": 16 } } @@ -73274,15 +73739,15 @@ "updateContext": null }, "value": "ply", - "start": 13115, - "end": 13120, + "start": 13182, + "end": 13187, "loc": { "start": { - "line": 313, + "line": 315, "column": 17 }, "end": { - "line": 313, + "line": 315, "column": 22 } } @@ -73300,15 +73765,15 @@ "binop": null, "updateContext": null }, - "start": 13120, - "end": 13121, + "start": 13187, + "end": 13188, "loc": { "start": { - "line": 313, + "line": 315, "column": 22 }, "end": { - "line": 313, + "line": 315, "column": 23 } } @@ -73326,15 +73791,15 @@ "binop": null }, "value": "convert", - "start": 13138, - "end": 13145, + "start": 13205, + "end": 13212, "loc": { "start": { - "line": 314, + "line": 316, "column": 16 }, "end": { - "line": 314, + "line": 316, "column": 23 } } @@ -73351,15 +73816,15 @@ "postfix": false, "binop": null }, - "start": 13145, - "end": 13146, + "start": 13212, + "end": 13213, "loc": { "start": { - "line": 314, + "line": 316, "column": 23 }, "end": { - "line": 314, + "line": 316, "column": 24 } } @@ -73377,15 +73842,15 @@ "binop": null }, "value": "parsePLYIntoXKTModel", - "start": 13146, - "end": 13166, + "start": 13213, + "end": 13233, "loc": { "start": { - "line": 314, + "line": 316, "column": 24 }, "end": { - "line": 314, + "line": 316, "column": 44 } } @@ -73403,15 +73868,15 @@ "binop": null, "updateContext": null }, - "start": 13166, - "end": 13167, + "start": 13233, + "end": 13234, "loc": { "start": { - "line": 314, + "line": 316, "column": 44 }, "end": { - "line": 314, + "line": 316, "column": 45 } } @@ -73428,15 +73893,15 @@ "postfix": false, "binop": null }, - "start": 13168, - "end": 13169, + "start": 13235, + "end": 13236, "loc": { "start": { - "line": 314, + "line": 316, "column": 46 }, "end": { - "line": 314, + "line": 316, "column": 47 } } @@ -73454,15 +73919,15 @@ "binop": null }, "value": "data", - "start": 13190, - "end": 13194, + "start": 13257, + "end": 13261, "loc": { "start": { - "line": 315, + "line": 317, "column": 20 }, "end": { - "line": 315, + "line": 317, "column": 24 } } @@ -73480,15 +73945,15 @@ "binop": null, "updateContext": null }, - "start": 13194, - "end": 13195, + "start": 13261, + "end": 13262, "loc": { "start": { - "line": 315, + "line": 317, "column": 24 }, "end": { - "line": 315, + "line": 317, "column": 25 } } @@ -73506,15 +73971,15 @@ "binop": null }, "value": "sourceData", - "start": 13196, - "end": 13206, + "start": 13263, + "end": 13273, "loc": { "start": { - "line": 315, + "line": 317, "column": 26 }, "end": { - "line": 315, + "line": 317, "column": 36 } } @@ -73532,15 +73997,15 @@ "binop": null, "updateContext": null }, - "start": 13206, - "end": 13207, + "start": 13273, + "end": 13274, "loc": { "start": { - "line": 315, + "line": 317, "column": 36 }, "end": { - "line": 315, + "line": 317, "column": 37 } } @@ -73558,15 +74023,15 @@ "binop": null }, "value": "xktModel", - "start": 13228, - "end": 13236, + "start": 13295, + "end": 13303, "loc": { "start": { - "line": 316, + "line": 318, "column": 20 }, "end": { - "line": 316, + "line": 318, "column": 28 } } @@ -73584,15 +74049,15 @@ "binop": null, "updateContext": null }, - "start": 13236, - "end": 13237, + "start": 13303, + "end": 13304, "loc": { "start": { - "line": 316, + "line": 318, "column": 28 }, "end": { - "line": 316, + "line": 318, "column": 29 } } @@ -73610,15 +74075,15 @@ "binop": null }, "value": "stats", - "start": 13258, - "end": 13263, + "start": 13325, + "end": 13330, "loc": { "start": { - "line": 317, + "line": 319, "column": 20 }, "end": { - "line": 317, + "line": 319, "column": 25 } } @@ -73636,15 +74101,15 @@ "binop": null, "updateContext": null }, - "start": 13263, - "end": 13264, + "start": 13330, + "end": 13331, "loc": { "start": { - "line": 317, + "line": 319, "column": 25 }, "end": { - "line": 317, + "line": 319, "column": 26 } } @@ -73662,15 +74127,15 @@ "binop": null }, "value": "log", - "start": 13285, - "end": 13288, + "start": 13352, + "end": 13355, "loc": { "start": { - "line": 318, + "line": 320, "column": 20 }, "end": { - "line": 318, + "line": 320, "column": 23 } } @@ -73687,15 +74152,15 @@ "postfix": false, "binop": null }, - "start": 13305, - "end": 13306, + "start": 13372, + "end": 13373, "loc": { "start": { - "line": 319, + "line": 321, "column": 16 }, "end": { - "line": 319, + "line": 321, "column": 17 } } @@ -73712,15 +74177,15 @@ "postfix": false, "binop": null }, - "start": 13306, - "end": 13307, + "start": 13373, + "end": 13374, "loc": { "start": { - "line": 319, + "line": 321, "column": 17 }, "end": { - "line": 319, + "line": 321, "column": 18 } } @@ -73738,15 +74203,15 @@ "binop": null, "updateContext": null }, - "start": 13307, - "end": 13308, + "start": 13374, + "end": 13375, "loc": { "start": { - "line": 319, + "line": 321, "column": 18 }, "end": { - "line": 319, + "line": 321, "column": 19 } } @@ -73766,15 +74231,15 @@ "updateContext": null }, "value": "break", - "start": 13325, - "end": 13330, + "start": 13392, + "end": 13397, "loc": { "start": { - "line": 320, + "line": 322, "column": 16 }, "end": { - "line": 320, + "line": 322, "column": 21 } } @@ -73792,15 +74257,15 @@ "binop": null, "updateContext": null }, - "start": 13330, - "end": 13331, + "start": 13397, + "end": 13398, "loc": { "start": { - "line": 320, + "line": 322, "column": 21 }, "end": { - "line": 320, + "line": 322, "column": 22 } } @@ -73820,15 +74285,15 @@ "updateContext": null }, "value": "case", - "start": 13345, - "end": 13349, + "start": 13412, + "end": 13416, "loc": { "start": { - "line": 322, + "line": 324, "column": 12 }, "end": { - "line": 322, + "line": 324, "column": 16 } } @@ -73847,15 +74312,15 @@ "updateContext": null }, "value": "stl", - "start": 13350, - "end": 13355, + "start": 13417, + "end": 13422, "loc": { "start": { - "line": 322, + "line": 324, "column": 17 }, "end": { - "line": 322, + "line": 324, "column": 22 } } @@ -73873,15 +74338,15 @@ "binop": null, "updateContext": null }, - "start": 13355, - "end": 13356, + "start": 13422, + "end": 13423, "loc": { "start": { - "line": 322, + "line": 324, "column": 22 }, "end": { - "line": 322, + "line": 324, "column": 23 } } @@ -73899,15 +74364,15 @@ "binop": null }, "value": "convert", - "start": 13373, - "end": 13380, + "start": 13440, + "end": 13447, "loc": { "start": { - "line": 323, + "line": 325, "column": 16 }, "end": { - "line": 323, + "line": 325, "column": 23 } } @@ -73924,15 +74389,15 @@ "postfix": false, "binop": null }, - "start": 13380, - "end": 13381, + "start": 13447, + "end": 13448, "loc": { "start": { - "line": 323, + "line": 325, "column": 23 }, "end": { - "line": 323, + "line": 325, "column": 24 } } @@ -73950,15 +74415,15 @@ "binop": null }, "value": "parseSTLIntoXKTModel", - "start": 13381, - "end": 13401, + "start": 13448, + "end": 13468, "loc": { "start": { - "line": 323, + "line": 325, "column": 24 }, "end": { - "line": 323, + "line": 325, "column": 44 } } @@ -73976,15 +74441,15 @@ "binop": null, "updateContext": null }, - "start": 13401, - "end": 13402, + "start": 13468, + "end": 13469, "loc": { "start": { - "line": 323, + "line": 325, "column": 44 }, "end": { - "line": 323, + "line": 325, "column": 45 } } @@ -74001,15 +74466,15 @@ "postfix": false, "binop": null }, - "start": 13403, - "end": 13404, + "start": 13470, + "end": 13471, "loc": { "start": { - "line": 323, + "line": 325, "column": 46 }, "end": { - "line": 323, + "line": 325, "column": 47 } } @@ -74027,15 +74492,15 @@ "binop": null }, "value": "data", - "start": 13425, - "end": 13429, + "start": 13492, + "end": 13496, "loc": { "start": { - "line": 324, + "line": 326, "column": 20 }, "end": { - "line": 324, + "line": 326, "column": 24 } } @@ -74053,15 +74518,15 @@ "binop": null, "updateContext": null }, - "start": 13429, - "end": 13430, + "start": 13496, + "end": 13497, "loc": { "start": { - "line": 324, + "line": 326, "column": 24 }, "end": { - "line": 324, + "line": 326, "column": 25 } } @@ -74079,15 +74544,15 @@ "binop": null }, "value": "sourceData", - "start": 13431, - "end": 13441, + "start": 13498, + "end": 13508, "loc": { "start": { - "line": 324, + "line": 326, "column": 26 }, "end": { - "line": 324, + "line": 326, "column": 36 } } @@ -74105,15 +74570,15 @@ "binop": null, "updateContext": null }, - "start": 13441, - "end": 13442, + "start": 13508, + "end": 13509, "loc": { "start": { - "line": 324, + "line": 326, "column": 36 }, "end": { - "line": 324, + "line": 326, "column": 37 } } @@ -74131,15 +74596,15 @@ "binop": null }, "value": "xktModel", - "start": 13463, - "end": 13471, + "start": 13530, + "end": 13538, "loc": { "start": { - "line": 325, + "line": 327, "column": 20 }, "end": { - "line": 325, + "line": 327, "column": 28 } } @@ -74157,15 +74622,15 @@ "binop": null, "updateContext": null }, - "start": 13471, - "end": 13472, + "start": 13538, + "end": 13539, "loc": { "start": { - "line": 325, + "line": 327, "column": 28 }, "end": { - "line": 325, + "line": 327, "column": 29 } } @@ -74183,15 +74648,15 @@ "binop": null }, "value": "stats", - "start": 13493, - "end": 13498, + "start": 13560, + "end": 13565, "loc": { "start": { - "line": 326, + "line": 328, "column": 20 }, "end": { - "line": 326, + "line": 328, "column": 25 } } @@ -74209,15 +74674,15 @@ "binop": null, "updateContext": null }, - "start": 13498, - "end": 13499, + "start": 13565, + "end": 13566, "loc": { "start": { - "line": 326, + "line": 328, "column": 25 }, "end": { - "line": 326, + "line": 328, "column": 26 } } @@ -74235,15 +74700,15 @@ "binop": null }, "value": "log", - "start": 13520, - "end": 13523, + "start": 13587, + "end": 13590, "loc": { "start": { - "line": 327, + "line": 329, "column": 20 }, "end": { - "line": 327, + "line": 329, "column": 23 } } @@ -74260,15 +74725,15 @@ "postfix": false, "binop": null }, - "start": 13540, - "end": 13541, + "start": 13607, + "end": 13608, "loc": { "start": { - "line": 328, + "line": 330, "column": 16 }, "end": { - "line": 328, + "line": 330, "column": 17 } } @@ -74285,15 +74750,15 @@ "postfix": false, "binop": null }, - "start": 13541, - "end": 13542, + "start": 13608, + "end": 13609, "loc": { "start": { - "line": 328, + "line": 330, "column": 17 }, "end": { - "line": 328, + "line": 330, "column": 18 } } @@ -74311,15 +74776,15 @@ "binop": null, "updateContext": null }, - "start": 13542, - "end": 13543, + "start": 13609, + "end": 13610, "loc": { "start": { - "line": 328, + "line": 330, "column": 18 }, "end": { - "line": 328, + "line": 330, "column": 19 } } @@ -74339,15 +74804,15 @@ "updateContext": null }, "value": "break", - "start": 13560, - "end": 13565, + "start": 13627, + "end": 13632, "loc": { "start": { - "line": 329, + "line": 331, "column": 16 }, "end": { - "line": 329, + "line": 331, "column": 21 } } @@ -74365,15 +74830,15 @@ "binop": null, "updateContext": null }, - "start": 13565, - "end": 13566, + "start": 13632, + "end": 13633, "loc": { "start": { - "line": 329, + "line": 331, "column": 21 }, "end": { - "line": 329, + "line": 331, "column": 22 } } @@ -74393,15 +74858,15 @@ "updateContext": null }, "value": "default", - "start": 13580, - "end": 13587, + "start": 13647, + "end": 13654, "loc": { "start": { - "line": 331, + "line": 333, "column": 12 }, "end": { - "line": 331, + "line": 333, "column": 19 } } @@ -74419,15 +74884,15 @@ "binop": null, "updateContext": null }, - "start": 13587, - "end": 13588, + "start": 13654, + "end": 13655, "loc": { "start": { - "line": 331, + "line": 333, "column": 19 }, "end": { - "line": 331, + "line": 333, "column": 20 } } @@ -74445,15 +74910,15 @@ "binop": null }, "value": "reject", - "start": 13605, - "end": 13611, + "start": 13672, + "end": 13678, "loc": { "start": { - "line": 332, + "line": 334, "column": 16 }, "end": { - "line": 332, + "line": 334, "column": 22 } } @@ -74470,15 +74935,15 @@ "postfix": false, "binop": null }, - "start": 13611, - "end": 13612, + "start": 13678, + "end": 13679, "loc": { "start": { - "line": 332, + "line": 334, "column": 22 }, "end": { - "line": 332, + "line": 334, "column": 23 } } @@ -74495,15 +74960,15 @@ "postfix": false, "binop": null }, - "start": 13612, - "end": 13613, + "start": 13679, + "end": 13680, "loc": { "start": { - "line": 332, + "line": 334, "column": 23 }, "end": { - "line": 332, + "line": 334, "column": 24 } } @@ -74522,15 +74987,15 @@ "updateContext": null }, "value": "Error: unsupported source format: \"", - "start": 13613, - "end": 13648, + "start": 13680, + "end": 13715, "loc": { "start": { - "line": 332, + "line": 334, "column": 24 }, "end": { - "line": 332, + "line": 334, "column": 59 } } @@ -74547,15 +75012,15 @@ "postfix": false, "binop": null }, - "start": 13648, - "end": 13650, + "start": 13715, + "end": 13717, "loc": { "start": { - "line": 332, + "line": 334, "column": 59 }, "end": { - "line": 332, + "line": 334, "column": 61 } } @@ -74573,15 +75038,15 @@ "binop": null }, "value": "ext", - "start": 13650, - "end": 13653, + "start": 13717, + "end": 13720, "loc": { "start": { - "line": 332, + "line": 334, "column": 61 }, "end": { - "line": 332, + "line": 334, "column": 64 } } @@ -74598,15 +75063,15 @@ "postfix": false, "binop": null }, - "start": 13653, - "end": 13654, + "start": 13720, + "end": 13721, "loc": { "start": { - "line": 332, + "line": 334, "column": 64 }, "end": { - "line": 332, + "line": 334, "column": 65 } } @@ -74625,15 +75090,15 @@ "updateContext": null }, "value": "\".", - "start": 13654, - "end": 13656, + "start": 13721, + "end": 13723, "loc": { "start": { - "line": 332, + "line": 334, "column": 65 }, "end": { - "line": 332, + "line": 334, "column": 67 } } @@ -74650,15 +75115,15 @@ "postfix": false, "binop": null }, - "start": 13656, - "end": 13657, + "start": 13723, + "end": 13724, "loc": { "start": { - "line": 332, + "line": 334, "column": 67 }, "end": { - "line": 332, + "line": 334, "column": 68 } } @@ -74675,15 +75140,15 @@ "postfix": false, "binop": null }, - "start": 13657, - "end": 13658, + "start": 13724, + "end": 13725, "loc": { "start": { - "line": 332, + "line": 334, "column": 68 }, "end": { - "line": 332, + "line": 334, "column": 69 } } @@ -74701,15 +75166,15 @@ "binop": null, "updateContext": null }, - "start": 13658, - "end": 13659, + "start": 13725, + "end": 13726, "loc": { "start": { - "line": 332, + "line": 334, "column": 69 }, "end": { - "line": 332, + "line": 334, "column": 70 } } @@ -74729,15 +75194,15 @@ "updateContext": null }, "value": "return", - "start": 13676, - "end": 13682, + "start": 13743, + "end": 13749, "loc": { "start": { - "line": 333, + "line": 335, "column": 16 }, "end": { - "line": 333, + "line": 335, "column": 22 } } @@ -74755,15 +75220,15 @@ "binop": null, "updateContext": null }, - "start": 13682, - "end": 13683, + "start": 13749, + "end": 13750, "loc": { "start": { - "line": 333, + "line": 335, "column": 22 }, "end": { - "line": 333, + "line": 335, "column": 23 } } @@ -74780,15 +75245,15 @@ "postfix": false, "binop": null }, - "start": 13692, - "end": 13693, + "start": 13759, + "end": 13760, "loc": { "start": { - "line": 334, + "line": 336, "column": 8 }, "end": { - "line": 334, + "line": 336, "column": 9 } } @@ -74807,15 +75272,15 @@ "binop": null }, "value": "function", - "start": 13703, - "end": 13711, + "start": 13770, + "end": 13778, "loc": { "start": { - "line": 336, + "line": 338, "column": 8 }, "end": { - "line": 336, + "line": 338, "column": 16 } } @@ -74833,15 +75298,15 @@ "binop": null }, "value": "convert", - "start": 13712, - "end": 13719, + "start": 13779, + "end": 13786, "loc": { "start": { - "line": 336, + "line": 338, "column": 17 }, "end": { - "line": 336, + "line": 338, "column": 24 } } @@ -74858,15 +75323,15 @@ "postfix": false, "binop": null }, - "start": 13719, - "end": 13720, + "start": 13786, + "end": 13787, "loc": { "start": { - "line": 336, + "line": 338, "column": 24 }, "end": { - "line": 336, + "line": 338, "column": 25 } } @@ -74884,15 +75349,15 @@ "binop": null }, "value": "parser", - "start": 13720, - "end": 13726, + "start": 13787, + "end": 13793, "loc": { "start": { - "line": 336, + "line": 338, "column": 25 }, "end": { - "line": 336, + "line": 338, "column": 31 } } @@ -74910,15 +75375,15 @@ "binop": null, "updateContext": null }, - "start": 13726, - "end": 13727, + "start": 13793, + "end": 13794, "loc": { "start": { - "line": 336, + "line": 338, "column": 31 }, "end": { - "line": 336, + "line": 338, "column": 32 } } @@ -74936,15 +75401,15 @@ "binop": null }, "value": "converterParams", - "start": 13728, - "end": 13743, + "start": 13795, + "end": 13810, "loc": { "start": { - "line": 336, + "line": 338, "column": 33 }, "end": { - "line": 336, + "line": 338, "column": 48 } } @@ -74961,15 +75426,15 @@ "postfix": false, "binop": null }, - "start": 13743, - "end": 13744, + "start": 13810, + "end": 13811, "loc": { "start": { - "line": 336, + "line": 338, "column": 48 }, "end": { - "line": 336, + "line": 338, "column": 49 } } @@ -74986,15 +75451,15 @@ "postfix": false, "binop": null }, - "start": 13745, - "end": 13746, + "start": 13812, + "end": 13813, "loc": { "start": { - "line": 336, + "line": 338, "column": 50 }, "end": { - "line": 336, + "line": 338, "column": 51 } } @@ -75012,15 +75477,15 @@ "binop": null }, "value": "parser", - "start": 13760, - "end": 13766, + "start": 13827, + "end": 13833, "loc": { "start": { - "line": 338, + "line": 340, "column": 12 }, "end": { - "line": 338, + "line": 340, "column": 18 } } @@ -75037,15 +75502,15 @@ "postfix": false, "binop": null }, - "start": 13766, - "end": 13767, + "start": 13833, + "end": 13834, "loc": { "start": { - "line": 338, + "line": 340, "column": 18 }, "end": { - "line": 338, + "line": 340, "column": 19 } } @@ -75063,15 +75528,15 @@ "binop": null }, "value": "converterParams", - "start": 13767, - "end": 13782, + "start": 13834, + "end": 13849, "loc": { "start": { - "line": 338, + "line": 340, "column": 19 }, "end": { - "line": 338, + "line": 340, "column": 34 } } @@ -75088,15 +75553,15 @@ "postfix": false, "binop": null }, - "start": 13782, - "end": 13783, + "start": 13849, + "end": 13850, "loc": { "start": { - "line": 338, + "line": 340, "column": 34 }, "end": { - "line": 338, + "line": 340, "column": 35 } } @@ -75114,15 +75579,15 @@ "binop": null, "updateContext": null }, - "start": 13783, - "end": 13784, + "start": 13850, + "end": 13851, "loc": { "start": { - "line": 338, + "line": 340, "column": 35 }, "end": { - "line": 338, + "line": 340, "column": 36 } } @@ -75140,15 +75605,15 @@ "binop": null }, "value": "then", - "start": 13784, - "end": 13788, + "start": 13851, + "end": 13855, "loc": { "start": { - "line": 338, + "line": 340, "column": 36 }, "end": { - "line": 338, + "line": 340, "column": 40 } } @@ -75165,15 +75630,15 @@ "postfix": false, "binop": null }, - "start": 13788, - "end": 13789, + "start": 13855, + "end": 13856, "loc": { "start": { - "line": 338, + "line": 340, "column": 40 }, "end": { - "line": 338, + "line": 340, "column": 41 } } @@ -75190,15 +75655,15 @@ "postfix": false, "binop": null }, - "start": 13789, - "end": 13790, + "start": 13856, + "end": 13857, "loc": { "start": { - "line": 338, + "line": 340, "column": 41 }, "end": { - "line": 338, + "line": 340, "column": 42 } } @@ -75215,15 +75680,15 @@ "postfix": false, "binop": null }, - "start": 13790, - "end": 13791, + "start": 13857, + "end": 13858, "loc": { "start": { - "line": 338, + "line": 340, "column": 42 }, "end": { - "line": 338, + "line": 340, "column": 43 } } @@ -75241,15 +75706,15 @@ "binop": null, "updateContext": null }, - "start": 13792, - "end": 13794, + "start": 13859, + "end": 13861, "loc": { "start": { - "line": 338, + "line": 340, "column": 44 }, "end": { - "line": 338, + "line": 340, "column": 46 } } @@ -75266,15 +75731,15 @@ "postfix": false, "binop": null }, - "start": 13795, - "end": 13796, + "start": 13862, + "end": 13863, "loc": { "start": { - "line": 338, + "line": 340, "column": 47 }, "end": { - "line": 338, + "line": 340, "column": 48 } } @@ -75294,15 +75759,15 @@ "updateContext": null }, "value": "if", - "start": 13814, - "end": 13816, + "start": 13881, + "end": 13883, "loc": { "start": { - "line": 340, + "line": 342, "column": 16 }, "end": { - "line": 340, + "line": 342, "column": 18 } } @@ -75319,15 +75784,15 @@ "postfix": false, "binop": null }, - "start": 13817, - "end": 13818, + "start": 13884, + "end": 13885, "loc": { "start": { - "line": 340, + "line": 342, "column": 19 }, "end": { - "line": 340, + "line": 342, "column": 20 } } @@ -75346,15 +75811,15 @@ "updateContext": null }, "value": "!", - "start": 13818, - "end": 13819, + "start": 13885, + "end": 13886, "loc": { "start": { - "line": 340, + "line": 342, "column": 20 }, "end": { - "line": 340, + "line": 342, "column": 21 } } @@ -75372,15 +75837,15 @@ "binop": null }, "value": "metaModelJSON", - "start": 13819, - "end": 13832, + "start": 13886, + "end": 13899, "loc": { "start": { - "line": 340, + "line": 342, "column": 21 }, "end": { - "line": 340, + "line": 342, "column": 34 } } @@ -75397,15 +75862,15 @@ "postfix": false, "binop": null }, - "start": 13832, - "end": 13833, + "start": 13899, + "end": 13900, "loc": { "start": { - "line": 340, + "line": 342, "column": 34 }, "end": { - "line": 340, + "line": 342, "column": 35 } } @@ -75422,15 +75887,15 @@ "postfix": false, "binop": null }, - "start": 13834, - "end": 13835, + "start": 13901, + "end": 13902, "loc": { "start": { - "line": 340, + "line": 342, "column": 36 }, "end": { - "line": 340, + "line": 342, "column": 37 } } @@ -75448,15 +75913,15 @@ "binop": null }, "value": "xktModel", - "start": 13856, - "end": 13864, + "start": 13923, + "end": 13931, "loc": { "start": { - "line": 341, + "line": 343, "column": 20 }, "end": { - "line": 341, + "line": 343, "column": 28 } } @@ -75474,15 +75939,15 @@ "binop": null, "updateContext": null }, - "start": 13864, - "end": 13865, + "start": 13931, + "end": 13932, "loc": { "start": { - "line": 341, + "line": 343, "column": 28 }, "end": { - "line": 341, + "line": 343, "column": 29 } } @@ -75500,15 +75965,15 @@ "binop": null }, "value": "createDefaultMetaObjects", - "start": 13865, - "end": 13889, + "start": 13932, + "end": 13956, "loc": { "start": { - "line": 341, + "line": 343, "column": 29 }, "end": { - "line": 341, + "line": 343, "column": 53 } } @@ -75525,15 +75990,15 @@ "postfix": false, "binop": null }, - "start": 13889, - "end": 13890, + "start": 13956, + "end": 13957, "loc": { "start": { - "line": 341, + "line": 343, "column": 53 }, "end": { - "line": 341, + "line": 343, "column": 54 } } @@ -75550,15 +76015,15 @@ "postfix": false, "binop": null }, - "start": 13890, - "end": 13891, + "start": 13957, + "end": 13958, "loc": { "start": { - "line": 341, + "line": 343, "column": 54 }, "end": { - "line": 341, + "line": 343, "column": 55 } } @@ -75576,15 +76041,15 @@ "binop": null, "updateContext": null }, - "start": 13891, - "end": 13892, + "start": 13958, + "end": 13959, "loc": { "start": { - "line": 341, + "line": 343, "column": 55 }, "end": { - "line": 341, + "line": 343, "column": 56 } } @@ -75601,15 +76066,15 @@ "postfix": false, "binop": null }, - "start": 13909, - "end": 13910, + "start": 13976, + "end": 13977, "loc": { "start": { - "line": 342, + "line": 344, "column": 16 }, "end": { - "line": 342, + "line": 344, "column": 17 } } @@ -75627,15 +76092,15 @@ "binop": null }, "value": "log", - "start": 13928, - "end": 13931, + "start": 13995, + "end": 13998, "loc": { "start": { - "line": 344, + "line": 346, "column": 16 }, "end": { - "line": 344, + "line": 346, "column": 19 } } @@ -75652,15 +76117,15 @@ "postfix": false, "binop": null }, - "start": 13931, - "end": 13932, + "start": 13998, + "end": 13999, "loc": { "start": { - "line": 344, + "line": 346, "column": 19 }, "end": { - "line": 344, + "line": 346, "column": 20 } } @@ -75679,15 +76144,15 @@ "updateContext": null }, "value": "Input file parsed OK. Building XKT document...", - "start": 13932, - "end": 13980, + "start": 13999, + "end": 14047, "loc": { "start": { - "line": 344, + "line": 346, "column": 20 }, "end": { - "line": 344, + "line": 346, "column": 68 } } @@ -75704,15 +76169,15 @@ "postfix": false, "binop": null }, - "start": 13980, - "end": 13981, + "start": 14047, + "end": 14048, "loc": { "start": { - "line": 344, + "line": 346, "column": 68 }, "end": { - "line": 344, + "line": 346, "column": 69 } } @@ -75730,15 +76195,15 @@ "binop": null, "updateContext": null }, - "start": 13981, - "end": 13982, + "start": 14048, + "end": 14049, "loc": { "start": { - "line": 344, + "line": 346, "column": 69 }, "end": { - "line": 344, + "line": 346, "column": 70 } } @@ -75756,15 +76221,15 @@ "binop": null }, "value": "xktModel", - "start": 14000, - "end": 14008, + "start": 14067, + "end": 14075, "loc": { "start": { - "line": 346, + "line": 348, "column": 16 }, "end": { - "line": 346, + "line": 348, "column": 24 } } @@ -75782,15 +76247,15 @@ "binop": null, "updateContext": null }, - "start": 14008, - "end": 14009, + "start": 14075, + "end": 14076, "loc": { "start": { - "line": 346, + "line": 348, "column": 24 }, "end": { - "line": 346, + "line": 348, "column": 25 } } @@ -75808,15 +76273,15 @@ "binop": null }, "value": "finalize", - "start": 14009, - "end": 14017, + "start": 14076, + "end": 14084, "loc": { "start": { - "line": 346, + "line": 348, "column": 25 }, "end": { - "line": 346, + "line": 348, "column": 33 } } @@ -75833,15 +76298,15 @@ "postfix": false, "binop": null }, - "start": 14017, - "end": 14018, + "start": 14084, + "end": 14085, "loc": { "start": { - "line": 346, + "line": 348, "column": 33 }, "end": { - "line": 346, + "line": 348, "column": 34 } } @@ -75858,15 +76323,15 @@ "postfix": false, "binop": null }, - "start": 14018, - "end": 14019, + "start": 14085, + "end": 14086, "loc": { "start": { - "line": 346, + "line": 348, "column": 34 }, "end": { - "line": 346, + "line": 348, "column": 35 } } @@ -75884,15 +76349,15 @@ "binop": null, "updateContext": null }, - "start": 14019, - "end": 14020, + "start": 14086, + "end": 14087, "loc": { "start": { - "line": 346, + "line": 348, "column": 35 }, "end": { - "line": 346, + "line": 348, "column": 36 } } @@ -75910,15 +76375,15 @@ "binop": null }, "value": "then", - "start": 14020, - "end": 14024, + "start": 14087, + "end": 14091, "loc": { "start": { - "line": 346, + "line": 348, "column": 36 }, "end": { - "line": 346, + "line": 348, "column": 40 } } @@ -75935,15 +76400,15 @@ "postfix": false, "binop": null }, - "start": 14024, - "end": 14025, + "start": 14091, + "end": 14092, "loc": { "start": { - "line": 346, + "line": 348, "column": 40 }, "end": { - "line": 346, + "line": 348, "column": 41 } } @@ -75960,15 +76425,15 @@ "postfix": false, "binop": null }, - "start": 14025, - "end": 14026, + "start": 14092, + "end": 14093, "loc": { "start": { - "line": 346, + "line": 348, "column": 41 }, "end": { - "line": 346, + "line": 348, "column": 42 } } @@ -75985,15 +76450,15 @@ "postfix": false, "binop": null }, - "start": 14026, - "end": 14027, + "start": 14093, + "end": 14094, "loc": { "start": { - "line": 346, + "line": 348, "column": 42 }, "end": { - "line": 346, + "line": 348, "column": 43 } } @@ -76011,15 +76476,15 @@ "binop": null, "updateContext": null }, - "start": 14028, - "end": 14030, + "start": 14095, + "end": 14097, "loc": { "start": { - "line": 346, + "line": 348, "column": 44 }, "end": { - "line": 346, + "line": 348, "column": 46 } } @@ -76036,15 +76501,15 @@ "postfix": false, "binop": null }, - "start": 14031, - "end": 14032, + "start": 14098, + "end": 14099, "loc": { "start": { - "line": 346, + "line": 348, "column": 47 }, "end": { - "line": 346, + "line": 348, "column": 48 } } @@ -76062,15 +76527,15 @@ "binop": null }, "value": "log", - "start": 14054, - "end": 14057, + "start": 14121, + "end": 14124, "loc": { "start": { - "line": 348, + "line": 350, "column": 20 }, "end": { - "line": 348, + "line": 350, "column": 23 } } @@ -76087,15 +76552,15 @@ "postfix": false, "binop": null }, - "start": 14057, - "end": 14058, + "start": 14124, + "end": 14125, "loc": { "start": { - "line": 348, + "line": 350, "column": 23 }, "end": { - "line": 348, + "line": 350, "column": 24 } } @@ -76114,15 +76579,15 @@ "updateContext": null }, "value": "XKT document built OK. Writing to XKT file...", - "start": 14058, - "end": 14105, + "start": 14125, + "end": 14172, "loc": { "start": { - "line": 348, + "line": 350, "column": 24 }, "end": { - "line": 348, + "line": 350, "column": 71 } } @@ -76139,15 +76604,15 @@ "postfix": false, "binop": null }, - "start": 14105, - "end": 14106, + "start": 14172, + "end": 14173, "loc": { "start": { - "line": 348, + "line": 350, "column": 71 }, "end": { - "line": 348, + "line": 350, "column": 72 } } @@ -76165,15 +76630,15 @@ "binop": null, "updateContext": null }, - "start": 14106, - "end": 14107, + "start": 14173, + "end": 14174, "loc": { "start": { - "line": 348, + "line": 350, "column": 72 }, "end": { - "line": 348, + "line": 350, "column": 73 } } @@ -76193,15 +76658,15 @@ "updateContext": null }, "value": "const", - "start": 14129, - "end": 14134, + "start": 14196, + "end": 14201, "loc": { "start": { - "line": 350, + "line": 352, "column": 20 }, "end": { - "line": 350, + "line": 352, "column": 25 } } @@ -76219,15 +76684,15 @@ "binop": null }, "value": "xktArrayBuffer", - "start": 14135, - "end": 14149, + "start": 14202, + "end": 14216, "loc": { "start": { - "line": 350, + "line": 352, "column": 26 }, "end": { - "line": 350, + "line": 352, "column": 40 } } @@ -76246,15 +76711,15 @@ "updateContext": null }, "value": "=", - "start": 14150, - "end": 14151, + "start": 14217, + "end": 14218, "loc": { "start": { - "line": 350, + "line": 352, "column": 41 }, "end": { - "line": 350, + "line": 352, "column": 42 } } @@ -76272,15 +76737,15 @@ "binop": null }, "value": "writeXKTModelToArrayBuffer", - "start": 14152, - "end": 14178, + "start": 14219, + "end": 14245, "loc": { "start": { - "line": 350, + "line": 352, "column": 43 }, "end": { - "line": 350, + "line": 352, "column": 69 } } @@ -76297,15 +76762,15 @@ "postfix": false, "binop": null }, - "start": 14178, - "end": 14179, + "start": 14245, + "end": 14246, "loc": { "start": { - "line": 350, + "line": 352, "column": 69 }, "end": { - "line": 350, + "line": 352, "column": 70 } } @@ -76323,15 +76788,15 @@ "binop": null }, "value": "xktModel", - "start": 14179, - "end": 14187, + "start": 14246, + "end": 14254, "loc": { "start": { - "line": 350, + "line": 352, "column": 70 }, "end": { - "line": 350, + "line": 352, "column": 78 } } @@ -76349,15 +76814,15 @@ "binop": null, "updateContext": null }, - "start": 14187, - "end": 14188, + "start": 14254, + "end": 14255, "loc": { "start": { - "line": 350, + "line": 352, "column": 78 }, "end": { - "line": 350, + "line": 352, "column": 79 } } @@ -76375,15 +76840,15 @@ "binop": null }, "value": "metaModelJSON", - "start": 14189, - "end": 14202, + "start": 14256, + "end": 14269, "loc": { "start": { - "line": 350, + "line": 352, "column": 80 }, "end": { - "line": 350, + "line": 352, "column": 93 } } @@ -76401,15 +76866,15 @@ "binop": null, "updateContext": null }, - "start": 14202, - "end": 14203, + "start": 14269, + "end": 14270, "loc": { "start": { - "line": 350, + "line": 352, "column": 93 }, "end": { - "line": 350, + "line": 352, "column": 94 } } @@ -76427,15 +76892,15 @@ "binop": null }, "value": "stats", - "start": 14204, - "end": 14209, + "start": 14271, + "end": 14276, "loc": { "start": { - "line": 350, + "line": 352, "column": 95 }, "end": { - "line": 350, + "line": 352, "column": 100 } } @@ -76453,15 +76918,15 @@ "binop": null, "updateContext": null }, - "start": 14209, - "end": 14210, + "start": 14276, + "end": 14277, "loc": { "start": { - "line": 350, + "line": 352, "column": 100 }, "end": { - "line": 350, + "line": 352, "column": 101 } } @@ -76478,15 +76943,15 @@ "postfix": false, "binop": null }, - "start": 14211, - "end": 14212, + "start": 14278, + "end": 14279, "loc": { "start": { - "line": 350, + "line": 352, "column": 102 }, "end": { - "line": 350, + "line": 352, "column": 103 } } @@ -76504,15 +76969,15 @@ "binop": null }, "value": "zip", - "start": 14212, - "end": 14215, + "start": 14279, + "end": 14282, "loc": { "start": { - "line": 350, + "line": 352, "column": 103 }, "end": { - "line": 350, + "line": 352, "column": 106 } } @@ -76530,15 +76995,15 @@ "binop": null, "updateContext": null }, - "start": 14215, - "end": 14216, + "start": 14282, + "end": 14283, "loc": { "start": { - "line": 350, + "line": 352, "column": 106 }, "end": { - "line": 350, + "line": 352, "column": 107 } } @@ -76558,15 +77023,15 @@ "updateContext": null }, "value": "true", - "start": 14217, - "end": 14221, + "start": 14284, + "end": 14288, "loc": { "start": { - "line": 350, + "line": 352, "column": 108 }, "end": { - "line": 350, + "line": 352, "column": 112 } } @@ -76583,15 +77048,15 @@ "postfix": false, "binop": null }, - "start": 14221, - "end": 14222, + "start": 14288, + "end": 14289, "loc": { "start": { - "line": 350, + "line": 352, "column": 112 }, "end": { - "line": 350, + "line": 352, "column": 113 } } @@ -76608,15 +77073,15 @@ "postfix": false, "binop": null }, - "start": 14222, - "end": 14223, + "start": 14289, + "end": 14290, "loc": { "start": { - "line": 350, + "line": 352, "column": 113 }, "end": { - "line": 350, + "line": 352, "column": 114 } } @@ -76634,15 +77099,15 @@ "binop": null, "updateContext": null }, - "start": 14223, - "end": 14224, + "start": 14290, + "end": 14291, "loc": { "start": { - "line": 350, + "line": 352, "column": 114 }, "end": { - "line": 350, + "line": 352, "column": 115 } } @@ -76662,15 +77127,15 @@ "updateContext": null }, "value": "const", - "start": 14246, - "end": 14251, + "start": 14313, + "end": 14318, "loc": { "start": { - "line": 352, + "line": 354, "column": 20 }, "end": { - "line": 352, + "line": 354, "column": 25 } } @@ -76688,15 +77153,15 @@ "binop": null }, "value": "xktContent", - "start": 14252, - "end": 14262, + "start": 14319, + "end": 14329, "loc": { "start": { - "line": 352, + "line": 354, "column": 26 }, "end": { - "line": 352, + "line": 354, "column": 36 } } @@ -76715,15 +77180,15 @@ "updateContext": null }, "value": "=", - "start": 14263, - "end": 14264, + "start": 14330, + "end": 14331, "loc": { "start": { - "line": 352, + "line": 354, "column": 37 }, "end": { - "line": 352, + "line": 354, "column": 38 } } @@ -76741,15 +77206,15 @@ "binop": null }, "value": "Buffer", - "start": 14265, - "end": 14271, + "start": 14332, + "end": 14338, "loc": { "start": { - "line": 352, + "line": 354, "column": 39 }, "end": { - "line": 352, + "line": 354, "column": 45 } } @@ -76767,15 +77232,15 @@ "binop": null, "updateContext": null }, - "start": 14271, - "end": 14272, + "start": 14338, + "end": 14339, "loc": { "start": { - "line": 352, + "line": 354, "column": 45 }, "end": { - "line": 352, + "line": 354, "column": 46 } } @@ -76793,15 +77258,15 @@ "binop": null }, "value": "from", - "start": 14272, - "end": 14276, + "start": 14339, + "end": 14343, "loc": { "start": { - "line": 352, + "line": 354, "column": 46 }, "end": { - "line": 352, + "line": 354, "column": 50 } } @@ -76818,15 +77283,15 @@ "postfix": false, "binop": null }, - "start": 14276, - "end": 14277, + "start": 14343, + "end": 14344, "loc": { "start": { - "line": 352, + "line": 354, "column": 50 }, "end": { - "line": 352, + "line": 354, "column": 51 } } @@ -76844,15 +77309,15 @@ "binop": null }, "value": "xktArrayBuffer", - "start": 14277, - "end": 14291, + "start": 14344, + "end": 14358, "loc": { "start": { - "line": 352, + "line": 354, "column": 51 }, "end": { - "line": 352, + "line": 354, "column": 65 } } @@ -76869,15 +77334,15 @@ "postfix": false, "binop": null }, - "start": 14291, - "end": 14292, + "start": 14358, + "end": 14359, "loc": { "start": { - "line": 352, + "line": 354, "column": 65 }, "end": { - "line": 352, + "line": 354, "column": 66 } } @@ -76895,15 +77360,15 @@ "binop": null, "updateContext": null }, - "start": 14292, - "end": 14293, + "start": 14359, + "end": 14360, "loc": { "start": { - "line": 352, + "line": 354, "column": 66 }, "end": { - "line": 352, + "line": 354, "column": 67 } } @@ -76923,15 +77388,15 @@ "updateContext": null }, "value": "const", - "start": 14315, - "end": 14320, + "start": 14382, + "end": 14387, "loc": { "start": { - "line": 354, + "line": 356, "column": 20 }, "end": { - "line": 354, + "line": 356, "column": 25 } } @@ -76949,15 +77414,15 @@ "binop": null }, "value": "targetFileSizeBytes", - "start": 14321, - "end": 14340, + "start": 14388, + "end": 14407, "loc": { "start": { - "line": 354, + "line": 356, "column": 26 }, "end": { - "line": 354, + "line": 356, "column": 45 } } @@ -76976,15 +77441,15 @@ "updateContext": null }, "value": "=", - "start": 14341, - "end": 14342, + "start": 14408, + "end": 14409, "loc": { "start": { - "line": 354, + "line": 356, "column": 46 }, "end": { - "line": 354, + "line": 356, "column": 47 } } @@ -77002,15 +77467,15 @@ "binop": null }, "value": "xktArrayBuffer", - "start": 14343, - "end": 14357, + "start": 14410, + "end": 14424, "loc": { "start": { - "line": 354, + "line": 356, "column": 48 }, "end": { - "line": 354, + "line": 356, "column": 62 } } @@ -77028,15 +77493,15 @@ "binop": null, "updateContext": null }, - "start": 14357, - "end": 14358, + "start": 14424, + "end": 14425, "loc": { "start": { - "line": 354, + "line": 356, "column": 62 }, "end": { - "line": 354, + "line": 356, "column": 63 } } @@ -77054,15 +77519,15 @@ "binop": null }, "value": "byteLength", - "start": 14358, - "end": 14368, + "start": 14425, + "end": 14435, "loc": { "start": { - "line": 354, + "line": 356, "column": 63 }, "end": { - "line": 354, + "line": 356, "column": 73 } } @@ -77080,15 +77545,15 @@ "binop": null, "updateContext": null }, - "start": 14368, - "end": 14369, + "start": 14435, + "end": 14436, "loc": { "start": { - "line": 354, + "line": 356, "column": 73 }, "end": { - "line": 354, + "line": 356, "column": 74 } } @@ -77106,15 +77571,15 @@ "binop": null }, "value": "stats", - "start": 14391, - "end": 14396, + "start": 14458, + "end": 14463, "loc": { "start": { - "line": 356, + "line": 358, "column": 20 }, "end": { - "line": 356, + "line": 358, "column": 25 } } @@ -77132,15 +77597,15 @@ "binop": null, "updateContext": null }, - "start": 14396, - "end": 14397, + "start": 14463, + "end": 14464, "loc": { "start": { - "line": 356, + "line": 358, "column": 25 }, "end": { - "line": 356, + "line": 358, "column": 26 } } @@ -77158,15 +77623,15 @@ "binop": null }, "value": "minTileSize", - "start": 14397, - "end": 14408, + "start": 14464, + "end": 14475, "loc": { "start": { - "line": 356, + "line": 358, "column": 26 }, "end": { - "line": 356, + "line": 358, "column": 37 } } @@ -77185,15 +77650,15 @@ "updateContext": null }, "value": "=", - "start": 14409, - "end": 14410, + "start": 14476, + "end": 14477, "loc": { "start": { - "line": 356, + "line": 358, "column": 38 }, "end": { - "line": 356, + "line": 358, "column": 39 } } @@ -77211,15 +77676,15 @@ "binop": null }, "value": "minTileSize", - "start": 14411, - "end": 14422, + "start": 14478, + "end": 14489, "loc": { "start": { - "line": 356, + "line": 358, "column": 40 }, "end": { - "line": 356, + "line": 358, "column": 51 } } @@ -77238,15 +77703,15 @@ "updateContext": null }, "value": "||", - "start": 14423, - "end": 14425, + "start": 14490, + "end": 14492, "loc": { "start": { - "line": 356, + "line": 358, "column": 52 }, "end": { - "line": 356, + "line": 358, "column": 54 } } @@ -77265,15 +77730,15 @@ "updateContext": null }, "value": 200, - "start": 14426, - "end": 14429, + "start": 14493, + "end": 14496, "loc": { "start": { - "line": 356, + "line": 358, "column": 55 }, "end": { - "line": 356, + "line": 358, "column": 58 } } @@ -77291,15 +77756,15 @@ "binop": null, "updateContext": null }, - "start": 14429, - "end": 14430, + "start": 14496, + "end": 14497, "loc": { "start": { - "line": 356, + "line": 358, "column": 58 }, "end": { - "line": 356, + "line": 358, "column": 59 } } @@ -77317,15 +77782,15 @@ "binop": null }, "value": "stats", - "start": 14451, - "end": 14456, + "start": 14518, + "end": 14523, "loc": { "start": { - "line": 357, + "line": 359, "column": 20 }, "end": { - "line": 357, + "line": 359, "column": 25 } } @@ -77343,15 +77808,15 @@ "binop": null, "updateContext": null }, - "start": 14456, - "end": 14457, + "start": 14523, + "end": 14524, "loc": { "start": { - "line": 357, + "line": 359, "column": 25 }, "end": { - "line": 357, + "line": 359, "column": 26 } } @@ -77369,15 +77834,15 @@ "binop": null }, "value": "sourceSize", - "start": 14457, - "end": 14467, + "start": 14524, + "end": 14534, "loc": { "start": { - "line": 357, + "line": 359, "column": 26 }, "end": { - "line": 357, + "line": 359, "column": 36 } } @@ -77396,15 +77861,15 @@ "updateContext": null }, "value": "=", - "start": 14468, - "end": 14469, + "start": 14535, + "end": 14536, "loc": { "start": { - "line": 357, + "line": 359, "column": 37 }, "end": { - "line": 357, + "line": 359, "column": 38 } } @@ -77421,15 +77886,15 @@ "postfix": false, "binop": null }, - "start": 14470, - "end": 14471, + "start": 14537, + "end": 14538, "loc": { "start": { - "line": 357, + "line": 359, "column": 39 }, "end": { - "line": 357, + "line": 359, "column": 40 } } @@ -77447,15 +77912,15 @@ "binop": null }, "value": "sourceFileSizeBytes", - "start": 14471, - "end": 14490, + "start": 14538, + "end": 14557, "loc": { "start": { - "line": 357, + "line": 359, "column": 40 }, "end": { - "line": 357, + "line": 359, "column": 59 } } @@ -77474,15 +77939,15 @@ "updateContext": null }, "value": "/", - "start": 14491, - "end": 14492, + "start": 14558, + "end": 14559, "loc": { "start": { - "line": 357, + "line": 359, "column": 60 }, "end": { - "line": 357, + "line": 359, "column": 61 } } @@ -77501,15 +77966,15 @@ "updateContext": null }, "value": 1000, - "start": 14493, - "end": 14497, + "start": 14560, + "end": 14564, "loc": { "start": { - "line": 357, + "line": 359, "column": 62 }, "end": { - "line": 357, + "line": 359, "column": 66 } } @@ -77526,15 +77991,15 @@ "postfix": false, "binop": null }, - "start": 14497, - "end": 14498, + "start": 14564, + "end": 14565, "loc": { "start": { - "line": 357, + "line": 359, "column": 66 }, "end": { - "line": 357, + "line": 359, "column": 67 } } @@ -77552,15 +78017,15 @@ "binop": null, "updateContext": null }, - "start": 14498, - "end": 14499, + "start": 14565, + "end": 14566, "loc": { "start": { - "line": 357, + "line": 359, "column": 67 }, "end": { - "line": 357, + "line": 359, "column": 68 } } @@ -77578,15 +78043,15 @@ "binop": null }, "value": "toFixed", - "start": 14499, - "end": 14506, + "start": 14566, + "end": 14573, "loc": { "start": { - "line": 357, + "line": 359, "column": 68 }, "end": { - "line": 357, + "line": 359, "column": 75 } } @@ -77603,15 +78068,15 @@ "postfix": false, "binop": null }, - "start": 14506, - "end": 14507, + "start": 14573, + "end": 14574, "loc": { "start": { - "line": 357, + "line": 359, "column": 75 }, "end": { - "line": 357, + "line": 359, "column": 76 } } @@ -77630,15 +78095,15 @@ "updateContext": null }, "value": 2, - "start": 14507, - "end": 14508, + "start": 14574, + "end": 14575, "loc": { "start": { - "line": 357, + "line": 359, "column": 76 }, "end": { - "line": 357, + "line": 359, "column": 77 } } @@ -77655,15 +78120,15 @@ "postfix": false, "binop": null }, - "start": 14508, - "end": 14509, + "start": 14575, + "end": 14576, "loc": { "start": { - "line": 357, + "line": 359, "column": 77 }, "end": { - "line": 357, + "line": 359, "column": 78 } } @@ -77681,15 +78146,15 @@ "binop": null, "updateContext": null }, - "start": 14509, - "end": 14510, + "start": 14576, + "end": 14577, "loc": { "start": { - "line": 357, + "line": 359, "column": 78 }, "end": { - "line": 357, + "line": 359, "column": 79 } } @@ -77707,15 +78172,15 @@ "binop": null }, "value": "stats", - "start": 14531, - "end": 14536, + "start": 14598, + "end": 14603, "loc": { "start": { - "line": 358, + "line": 360, "column": 20 }, "end": { - "line": 358, + "line": 360, "column": 25 } } @@ -77733,15 +78198,15 @@ "binop": null, "updateContext": null }, - "start": 14536, - "end": 14537, + "start": 14603, + "end": 14604, "loc": { "start": { - "line": 358, + "line": 360, "column": 25 }, "end": { - "line": 358, + "line": 360, "column": 26 } } @@ -77759,15 +78224,15 @@ "binop": null }, "value": "xktSize", - "start": 14537, - "end": 14544, + "start": 14604, + "end": 14611, "loc": { "start": { - "line": 358, + "line": 360, "column": 26 }, "end": { - "line": 358, + "line": 360, "column": 33 } } @@ -77786,15 +78251,15 @@ "updateContext": null }, "value": "=", - "start": 14545, - "end": 14546, + "start": 14612, + "end": 14613, "loc": { "start": { - "line": 358, + "line": 360, "column": 34 }, "end": { - "line": 358, + "line": 360, "column": 35 } } @@ -77811,15 +78276,15 @@ "postfix": false, "binop": null }, - "start": 14547, - "end": 14548, + "start": 14614, + "end": 14615, "loc": { "start": { - "line": 358, + "line": 360, "column": 36 }, "end": { - "line": 358, + "line": 360, "column": 37 } } @@ -77837,15 +78302,15 @@ "binop": null }, "value": "targetFileSizeBytes", - "start": 14548, - "end": 14567, + "start": 14615, + "end": 14634, "loc": { "start": { - "line": 358, + "line": 360, "column": 37 }, "end": { - "line": 358, + "line": 360, "column": 56 } } @@ -77864,15 +78329,15 @@ "updateContext": null }, "value": "/", - "start": 14568, - "end": 14569, + "start": 14635, + "end": 14636, "loc": { "start": { - "line": 358, + "line": 360, "column": 57 }, "end": { - "line": 358, + "line": 360, "column": 58 } } @@ -77891,15 +78356,15 @@ "updateContext": null }, "value": 1000, - "start": 14570, - "end": 14574, + "start": 14637, + "end": 14641, "loc": { "start": { - "line": 358, + "line": 360, "column": 59 }, "end": { - "line": 358, + "line": 360, "column": 63 } } @@ -77916,15 +78381,15 @@ "postfix": false, "binop": null }, - "start": 14574, - "end": 14575, + "start": 14641, + "end": 14642, "loc": { "start": { - "line": 358, + "line": 360, "column": 63 }, "end": { - "line": 358, + "line": 360, "column": 64 } } @@ -77942,15 +78407,15 @@ "binop": null, "updateContext": null }, - "start": 14575, - "end": 14576, + "start": 14642, + "end": 14643, "loc": { "start": { - "line": 358, + "line": 360, "column": 64 }, "end": { - "line": 358, + "line": 360, "column": 65 } } @@ -77968,15 +78433,15 @@ "binop": null }, "value": "toFixed", - "start": 14576, - "end": 14583, + "start": 14643, + "end": 14650, "loc": { "start": { - "line": 358, + "line": 360, "column": 65 }, "end": { - "line": 358, + "line": 360, "column": 72 } } @@ -77993,15 +78458,15 @@ "postfix": false, "binop": null }, - "start": 14583, - "end": 14584, + "start": 14650, + "end": 14651, "loc": { "start": { - "line": 358, + "line": 360, "column": 72 }, "end": { - "line": 358, + "line": 360, "column": 73 } } @@ -78020,15 +78485,15 @@ "updateContext": null }, "value": 2, - "start": 14584, - "end": 14585, + "start": 14651, + "end": 14652, "loc": { "start": { - "line": 358, + "line": 360, "column": 73 }, "end": { - "line": 358, + "line": 360, "column": 74 } } @@ -78045,15 +78510,15 @@ "postfix": false, "binop": null }, - "start": 14585, - "end": 14586, + "start": 14652, + "end": 14653, "loc": { "start": { - "line": 358, + "line": 360, "column": 74 }, "end": { - "line": 358, + "line": 360, "column": 75 } } @@ -78071,15 +78536,15 @@ "binop": null, "updateContext": null }, - "start": 14586, - "end": 14587, + "start": 14653, + "end": 14654, "loc": { "start": { - "line": 358, + "line": 360, "column": 75 }, "end": { - "line": 358, + "line": 360, "column": 76 } } @@ -78097,15 +78562,15 @@ "binop": null }, "value": "stats", - "start": 14608, - "end": 14613, + "start": 14675, + "end": 14680, "loc": { "start": { - "line": 359, + "line": 361, "column": 20 }, "end": { - "line": 359, + "line": 361, "column": 25 } } @@ -78123,15 +78588,15 @@ "binop": null, "updateContext": null }, - "start": 14613, - "end": 14614, + "start": 14680, + "end": 14681, "loc": { "start": { - "line": 359, + "line": 361, "column": 25 }, "end": { - "line": 359, + "line": 361, "column": 26 } } @@ -78149,15 +78614,15 @@ "binop": null }, "value": "xktVersion", - "start": 14614, - "end": 14624, + "start": 14681, + "end": 14691, "loc": { "start": { - "line": 359, + "line": 361, "column": 26 }, "end": { - "line": 359, + "line": 361, "column": 36 } } @@ -78176,15 +78641,15 @@ "updateContext": null }, "value": "=", - "start": 14625, - "end": 14626, + "start": 14692, + "end": 14693, "loc": { "start": { - "line": 359, + "line": 361, "column": 37 }, "end": { - "line": 359, + "line": 361, "column": 38 } } @@ -78202,15 +78667,15 @@ "binop": null }, "value": "XKT_INFO", - "start": 14627, - "end": 14635, + "start": 14694, + "end": 14702, "loc": { "start": { - "line": 359, + "line": 361, "column": 39 }, "end": { - "line": 359, + "line": 361, "column": 47 } } @@ -78228,15 +78693,15 @@ "binop": null, "updateContext": null }, - "start": 14635, - "end": 14636, + "start": 14702, + "end": 14703, "loc": { "start": { - "line": 359, + "line": 361, "column": 47 }, "end": { - "line": 359, + "line": 361, "column": 48 } } @@ -78254,15 +78719,15 @@ "binop": null }, "value": "xktVersion", - "start": 14636, - "end": 14646, + "start": 14703, + "end": 14713, "loc": { "start": { - "line": 359, + "line": 361, "column": 48 }, "end": { - "line": 359, + "line": 361, "column": 58 } } @@ -78280,15 +78745,15 @@ "binop": null, "updateContext": null }, - "start": 14646, - "end": 14647, + "start": 14713, + "end": 14714, "loc": { "start": { - "line": 359, + "line": 361, "column": 58 }, "end": { - "line": 359, + "line": 361, "column": 59 } } @@ -78306,15 +78771,15 @@ "binop": null }, "value": "stats", - "start": 14668, - "end": 14673, + "start": 14735, + "end": 14740, "loc": { "start": { - "line": 360, + "line": 362, "column": 20 }, "end": { - "line": 360, + "line": 362, "column": 25 } } @@ -78332,15 +78797,15 @@ "binop": null, "updateContext": null }, - "start": 14673, - "end": 14674, + "start": 14740, + "end": 14741, "loc": { "start": { - "line": 360, + "line": 362, "column": 25 }, "end": { - "line": 360, + "line": 362, "column": 26 } } @@ -78358,15 +78823,15 @@ "binop": null }, "value": "compressionRatio", - "start": 14674, - "end": 14690, + "start": 14741, + "end": 14757, "loc": { "start": { - "line": 360, + "line": 362, "column": 26 }, "end": { - "line": 360, + "line": 362, "column": 42 } } @@ -78385,15 +78850,15 @@ "updateContext": null }, "value": "=", - "start": 14691, - "end": 14692, + "start": 14758, + "end": 14759, "loc": { "start": { - "line": 360, + "line": 362, "column": 43 }, "end": { - "line": 360, + "line": 362, "column": 44 } } @@ -78410,15 +78875,15 @@ "postfix": false, "binop": null }, - "start": 14693, - "end": 14694, + "start": 14760, + "end": 14761, "loc": { "start": { - "line": 360, + "line": 362, "column": 45 }, "end": { - "line": 360, + "line": 362, "column": 46 } } @@ -78436,15 +78901,15 @@ "binop": null }, "value": "sourceFileSizeBytes", - "start": 14694, - "end": 14713, + "start": 14761, + "end": 14780, "loc": { "start": { - "line": 360, + "line": 362, "column": 46 }, "end": { - "line": 360, + "line": 362, "column": 65 } } @@ -78463,15 +78928,15 @@ "updateContext": null }, "value": "/", - "start": 14714, - "end": 14715, + "start": 14781, + "end": 14782, "loc": { "start": { - "line": 360, + "line": 362, "column": 66 }, "end": { - "line": 360, + "line": 362, "column": 67 } } @@ -78489,15 +78954,15 @@ "binop": null }, "value": "targetFileSizeBytes", - "start": 14716, - "end": 14735, + "start": 14783, + "end": 14802, "loc": { "start": { - "line": 360, + "line": 362, "column": 68 }, "end": { - "line": 360, + "line": 362, "column": 87 } } @@ -78514,15 +78979,15 @@ "postfix": false, "binop": null }, - "start": 14735, - "end": 14736, + "start": 14802, + "end": 14803, "loc": { "start": { - "line": 360, + "line": 362, "column": 87 }, "end": { - "line": 360, + "line": 362, "column": 88 } } @@ -78540,15 +79005,15 @@ "binop": null, "updateContext": null }, - "start": 14736, - "end": 14737, + "start": 14803, + "end": 14804, "loc": { "start": { - "line": 360, + "line": 362, "column": 88 }, "end": { - "line": 360, + "line": 362, "column": 89 } } @@ -78566,15 +79031,15 @@ "binop": null }, "value": "toFixed", - "start": 14737, - "end": 14744, + "start": 14804, + "end": 14811, "loc": { "start": { - "line": 360, + "line": 362, "column": 89 }, "end": { - "line": 360, + "line": 362, "column": 96 } } @@ -78591,15 +79056,15 @@ "postfix": false, "binop": null }, - "start": 14744, - "end": 14745, + "start": 14811, + "end": 14812, "loc": { "start": { - "line": 360, + "line": 362, "column": 96 }, "end": { - "line": 360, + "line": 362, "column": 97 } } @@ -78618,15 +79083,15 @@ "updateContext": null }, "value": 2, - "start": 14745, - "end": 14746, + "start": 14812, + "end": 14813, "loc": { "start": { - "line": 360, + "line": 362, "column": 97 }, "end": { - "line": 360, + "line": 362, "column": 98 } } @@ -78643,15 +79108,15 @@ "postfix": false, "binop": null }, - "start": 14746, - "end": 14747, + "start": 14813, + "end": 14814, "loc": { "start": { - "line": 360, + "line": 362, "column": 98 }, "end": { - "line": 360, + "line": 362, "column": 99 } } @@ -78669,15 +79134,15 @@ "binop": null, "updateContext": null }, - "start": 14747, - "end": 14748, + "start": 14814, + "end": 14815, "loc": { "start": { - "line": 360, + "line": 362, "column": 99 }, "end": { - "line": 360, + "line": 362, "column": 100 } } @@ -78695,15 +79160,15 @@ "binop": null }, "value": "stats", - "start": 14769, - "end": 14774, + "start": 14836, + "end": 14841, "loc": { "start": { - "line": 361, + "line": 363, "column": 20 }, "end": { - "line": 361, + "line": 363, "column": 25 } } @@ -78721,15 +79186,15 @@ "binop": null, "updateContext": null }, - "start": 14774, - "end": 14775, + "start": 14841, + "end": 14842, "loc": { "start": { - "line": 361, + "line": 363, "column": 25 }, "end": { - "line": 361, + "line": 363, "column": 26 } } @@ -78747,15 +79212,15 @@ "binop": null }, "value": "conversionTime", - "start": 14775, - "end": 14789, + "start": 14842, + "end": 14856, "loc": { "start": { - "line": 361, + "line": 363, "column": 26 }, "end": { - "line": 361, + "line": 363, "column": 40 } } @@ -78774,15 +79239,15 @@ "updateContext": null }, "value": "=", - "start": 14790, - "end": 14791, + "start": 14857, + "end": 14858, "loc": { "start": { - "line": 361, + "line": 363, "column": 41 }, "end": { - "line": 361, + "line": 363, "column": 42 } } @@ -78799,15 +79264,15 @@ "postfix": false, "binop": null }, - "start": 14792, - "end": 14793, + "start": 14859, + "end": 14860, "loc": { "start": { - "line": 361, + "line": 363, "column": 43 }, "end": { - "line": 361, + "line": 363, "column": 44 } } @@ -78824,15 +79289,15 @@ "postfix": false, "binop": null }, - "start": 14793, - "end": 14794, + "start": 14860, + "end": 14861, "loc": { "start": { - "line": 361, + "line": 363, "column": 44 }, "end": { - "line": 361, + "line": 363, "column": 45 } } @@ -78852,15 +79317,15 @@ "updateContext": null }, "value": "new", - "start": 14794, - "end": 14797, + "start": 14861, + "end": 14864, "loc": { "start": { - "line": 361, + "line": 363, "column": 45 }, "end": { - "line": 361, + "line": 363, "column": 48 } } @@ -78878,15 +79343,15 @@ "binop": null }, "value": "Date", - "start": 14798, - "end": 14802, + "start": 14865, + "end": 14869, "loc": { "start": { - "line": 361, + "line": 363, "column": 49 }, "end": { - "line": 361, + "line": 363, "column": 53 } } @@ -78903,15 +79368,15 @@ "postfix": false, "binop": null }, - "start": 14802, - "end": 14803, + "start": 14869, + "end": 14870, "loc": { "start": { - "line": 361, + "line": 363, "column": 53 }, "end": { - "line": 361, + "line": 363, "column": 54 } } @@ -78928,15 +79393,15 @@ "postfix": false, "binop": null }, - "start": 14803, - "end": 14804, + "start": 14870, + "end": 14871, "loc": { "start": { - "line": 361, + "line": 363, "column": 54 }, "end": { - "line": 361, + "line": 363, "column": 55 } } @@ -78955,15 +79420,15 @@ "updateContext": null }, "value": "-", - "start": 14805, - "end": 14806, + "start": 14872, + "end": 14873, "loc": { "start": { - "line": 361, + "line": 363, "column": 56 }, "end": { - "line": 361, + "line": 363, "column": 57 } } @@ -78981,15 +79446,15 @@ "binop": null }, "value": "startTime", - "start": 14807, - "end": 14816, + "start": 14874, + "end": 14883, "loc": { "start": { - "line": 361, + "line": 363, "column": 58 }, "end": { - "line": 361, + "line": 363, "column": 67 } } @@ -79006,15 +79471,15 @@ "postfix": false, "binop": null }, - "start": 14816, - "end": 14817, + "start": 14883, + "end": 14884, "loc": { "start": { - "line": 361, + "line": 363, "column": 67 }, "end": { - "line": 361, + "line": 363, "column": 68 } } @@ -79033,15 +79498,15 @@ "updateContext": null }, "value": "/", - "start": 14818, - "end": 14819, + "start": 14885, + "end": 14886, "loc": { "start": { - "line": 361, + "line": 363, "column": 69 }, "end": { - "line": 361, + "line": 363, "column": 70 } } @@ -79060,15 +79525,15 @@ "updateContext": null }, "value": 1000, - "start": 14820, - "end": 14826, + "start": 14887, + "end": 14893, "loc": { "start": { - "line": 361, + "line": 363, "column": 71 }, "end": { - "line": 361, + "line": 363, "column": 77 } } @@ -79085,15 +79550,15 @@ "postfix": false, "binop": null }, - "start": 14826, - "end": 14827, + "start": 14893, + "end": 14894, "loc": { "start": { - "line": 361, + "line": 363, "column": 77 }, "end": { - "line": 361, + "line": 363, "column": 78 } } @@ -79111,15 +79576,15 @@ "binop": null, "updateContext": null }, - "start": 14827, - "end": 14828, + "start": 14894, + "end": 14895, "loc": { "start": { - "line": 361, + "line": 363, "column": 78 }, "end": { - "line": 361, + "line": 363, "column": 79 } } @@ -79137,15 +79602,15 @@ "binop": null }, "value": "toFixed", - "start": 14828, - "end": 14835, + "start": 14895, + "end": 14902, "loc": { "start": { - "line": 361, + "line": 363, "column": 79 }, "end": { - "line": 361, + "line": 363, "column": 86 } } @@ -79162,15 +79627,15 @@ "postfix": false, "binop": null }, - "start": 14835, - "end": 14836, + "start": 14902, + "end": 14903, "loc": { "start": { - "line": 361, + "line": 363, "column": 86 }, "end": { - "line": 361, + "line": 363, "column": 87 } } @@ -79189,15 +79654,15 @@ "updateContext": null }, "value": 2, - "start": 14836, - "end": 14837, + "start": 14903, + "end": 14904, "loc": { "start": { - "line": 361, + "line": 363, "column": 87 }, "end": { - "line": 361, + "line": 363, "column": 88 } } @@ -79214,15 +79679,15 @@ "postfix": false, "binop": null }, - "start": 14837, - "end": 14838, + "start": 14904, + "end": 14905, "loc": { "start": { - "line": 361, + "line": 363, "column": 88 }, "end": { - "line": 361, + "line": 363, "column": 89 } } @@ -79240,15 +79705,15 @@ "binop": null, "updateContext": null }, - "start": 14838, - "end": 14839, + "start": 14905, + "end": 14906, "loc": { "start": { - "line": 361, + "line": 363, "column": 89 }, "end": { - "line": 361, + "line": 363, "column": 90 } } @@ -79266,15 +79731,15 @@ "binop": null }, "value": "stats", - "start": 14860, - "end": 14865, + "start": 14927, + "end": 14932, "loc": { "start": { - "line": 362, + "line": 364, "column": 20 }, "end": { - "line": 362, + "line": 364, "column": 25 } } @@ -79292,15 +79757,15 @@ "binop": null, "updateContext": null }, - "start": 14865, - "end": 14866, + "start": 14932, + "end": 14933, "loc": { "start": { - "line": 362, + "line": 364, "column": 25 }, "end": { - "line": 362, + "line": 364, "column": 26 } } @@ -79318,15 +79783,15 @@ "binop": null }, "value": "aabb", - "start": 14866, - "end": 14870, + "start": 14933, + "end": 14937, "loc": { "start": { - "line": 362, + "line": 364, "column": 26 }, "end": { - "line": 362, + "line": 364, "column": 30 } } @@ -79345,15 +79810,15 @@ "updateContext": null }, "value": "=", - "start": 14871, - "end": 14872, + "start": 14938, + "end": 14939, "loc": { "start": { - "line": 362, + "line": 364, "column": 31 }, "end": { - "line": 362, + "line": 364, "column": 32 } } @@ -79371,15 +79836,15 @@ "binop": null }, "value": "xktModel", - "start": 14873, - "end": 14881, + "start": 14940, + "end": 14948, "loc": { "start": { - "line": 362, + "line": 364, "column": 33 }, "end": { - "line": 362, + "line": 364, "column": 41 } } @@ -79397,15 +79862,15 @@ "binop": null, "updateContext": null }, - "start": 14881, - "end": 14882, + "start": 14948, + "end": 14949, "loc": { "start": { - "line": 362, + "line": 364, "column": 41 }, "end": { - "line": 362, + "line": 364, "column": 42 } } @@ -79423,15 +79888,15 @@ "binop": null }, "value": "aabb", - "start": 14882, - "end": 14886, + "start": 14949, + "end": 14953, "loc": { "start": { - "line": 362, + "line": 364, "column": 42 }, "end": { - "line": 362, + "line": 364, "column": 46 } } @@ -79449,15 +79914,15 @@ "binop": null, "updateContext": null }, - "start": 14886, - "end": 14887, + "start": 14953, + "end": 14954, "loc": { "start": { - "line": 362, + "line": 364, "column": 46 }, "end": { - "line": 362, + "line": 364, "column": 47 } } @@ -79475,15 +79940,15 @@ "binop": null }, "value": "log", - "start": 14908, - "end": 14911, + "start": 14975, + "end": 14978, "loc": { "start": { - "line": 363, + "line": 365, "column": 20 }, "end": { - "line": 363, + "line": 365, "column": 23 } } @@ -79500,15 +79965,15 @@ "postfix": false, "binop": null }, - "start": 14911, - "end": 14912, + "start": 14978, + "end": 14979, "loc": { "start": { - "line": 363, + "line": 365, "column": 23 }, "end": { - "line": 363, + "line": 365, "column": 24 } } @@ -79525,15 +79990,15 @@ "postfix": false, "binop": null }, - "start": 14912, - "end": 14913, + "start": 14979, + "end": 14980, "loc": { "start": { - "line": 363, + "line": 365, "column": 24 }, "end": { - "line": 363, + "line": 365, "column": 25 } } @@ -79552,15 +80017,15 @@ "updateContext": null }, "value": "Converted to: XKT v", - "start": 14913, - "end": 14932, + "start": 14980, + "end": 14999, "loc": { "start": { - "line": 363, + "line": 365, "column": 25 }, "end": { - "line": 363, + "line": 365, "column": 44 } } @@ -79577,15 +80042,15 @@ "postfix": false, "binop": null }, - "start": 14932, - "end": 14934, + "start": 14999, + "end": 15001, "loc": { "start": { - "line": 363, + "line": 365, "column": 44 }, "end": { - "line": 363, + "line": 365, "column": 46 } } @@ -79603,15 +80068,15 @@ "binop": null }, "value": "stats", - "start": 14934, - "end": 14939, + "start": 15001, + "end": 15006, "loc": { "start": { - "line": 363, + "line": 365, "column": 46 }, "end": { - "line": 363, + "line": 365, "column": 51 } } @@ -79629,15 +80094,15 @@ "binop": null, "updateContext": null }, - "start": 14939, - "end": 14940, + "start": 15006, + "end": 15007, "loc": { "start": { - "line": 363, + "line": 365, "column": 51 }, "end": { - "line": 363, + "line": 365, "column": 52 } } @@ -79655,15 +80120,15 @@ "binop": null }, "value": "xktVersion", - "start": 14940, - "end": 14950, + "start": 15007, + "end": 15017, "loc": { "start": { - "line": 363, + "line": 365, "column": 52 }, "end": { - "line": 363, + "line": 365, "column": 62 } } @@ -79680,15 +80145,15 @@ "postfix": false, "binop": null }, - "start": 14950, - "end": 14951, + "start": 15017, + "end": 15018, "loc": { "start": { - "line": 363, + "line": 365, "column": 62 }, "end": { - "line": 363, + "line": 365, "column": 63 } } @@ -79707,15 +80172,15 @@ "updateContext": null }, "value": "", - "start": 14951, - "end": 14951, + "start": 15018, + "end": 15018, "loc": { "start": { - "line": 363, + "line": 365, "column": 63 }, "end": { - "line": 363, + "line": 365, "column": 63 } } @@ -79732,15 +80197,15 @@ "postfix": false, "binop": null }, - "start": 14951, - "end": 14952, + "start": 15018, + "end": 15019, "loc": { "start": { - "line": 363, + "line": 365, "column": 63 }, "end": { - "line": 363, + "line": 365, "column": 64 } } @@ -79757,15 +80222,15 @@ "postfix": false, "binop": null }, - "start": 14952, - "end": 14953, + "start": 15019, + "end": 15020, "loc": { "start": { - "line": 363, + "line": 365, "column": 64 }, "end": { - "line": 363, + "line": 365, "column": 65 } } @@ -79783,15 +80248,15 @@ "binop": null, "updateContext": null }, - "start": 14953, - "end": 14954, + "start": 15020, + "end": 15021, "loc": { "start": { - "line": 363, + "line": 365, "column": 65 }, "end": { - "line": 363, + "line": 365, "column": 66 } } @@ -79811,15 +80276,15 @@ "updateContext": null }, "value": "if", - "start": 14975, - "end": 14977, + "start": 15042, + "end": 15044, "loc": { "start": { - "line": 364, + "line": 366, "column": 20 }, "end": { - "line": 364, + "line": 366, "column": 22 } } @@ -79836,15 +80301,15 @@ "postfix": false, "binop": null }, - "start": 14978, - "end": 14979, + "start": 15045, + "end": 15046, "loc": { "start": { - "line": 364, + "line": 366, "column": 23 }, "end": { - "line": 364, + "line": 366, "column": 24 } } @@ -79862,15 +80327,15 @@ "binop": null }, "value": "includeTypes", - "start": 14979, - "end": 14991, + "start": 15046, + "end": 15058, "loc": { "start": { - "line": 364, + "line": 366, "column": 24 }, "end": { - "line": 364, + "line": 366, "column": 36 } } @@ -79887,15 +80352,15 @@ "postfix": false, "binop": null }, - "start": 14991, - "end": 14992, + "start": 15058, + "end": 15059, "loc": { "start": { - "line": 364, + "line": 366, "column": 36 }, "end": { - "line": 364, + "line": 366, "column": 37 } } @@ -79912,15 +80377,15 @@ "postfix": false, "binop": null }, - "start": 14993, - "end": 14994, + "start": 15060, + "end": 15061, "loc": { "start": { - "line": 364, + "line": 366, "column": 38 }, "end": { - "line": 364, + "line": 366, "column": 39 } } @@ -79938,15 +80403,15 @@ "binop": null }, "value": "log", - "start": 15019, - "end": 15022, + "start": 15086, + "end": 15089, "loc": { "start": { - "line": 365, + "line": 367, "column": 24 }, "end": { - "line": 365, + "line": 367, "column": 27 } } @@ -79963,15 +80428,15 @@ "postfix": false, "binop": null }, - "start": 15022, - "end": 15023, + "start": 15089, + "end": 15090, "loc": { "start": { - "line": 365, + "line": 367, "column": 27 }, "end": { - "line": 365, + "line": 367, "column": 28 } } @@ -79990,15 +80455,15 @@ "updateContext": null }, "value": "Include types: ", - "start": 15023, - "end": 15040, + "start": 15090, + "end": 15107, "loc": { "start": { - "line": 365, + "line": 367, "column": 28 }, "end": { - "line": 365, + "line": 367, "column": 45 } } @@ -80017,15 +80482,15 @@ "updateContext": null }, "value": "+", - "start": 15041, - "end": 15042, + "start": 15108, + "end": 15109, "loc": { "start": { - "line": 365, + "line": 367, "column": 46 }, "end": { - "line": 365, + "line": 367, "column": 47 } } @@ -80042,15 +80507,15 @@ "postfix": false, "binop": null }, - "start": 15043, - "end": 15044, + "start": 15110, + "end": 15111, "loc": { "start": { - "line": 365, + "line": 367, "column": 48 }, "end": { - "line": 365, + "line": 367, "column": 49 } } @@ -80068,15 +80533,15 @@ "binop": null }, "value": "includeTypes", - "start": 15044, - "end": 15056, + "start": 15111, + "end": 15123, "loc": { "start": { - "line": 365, + "line": 367, "column": 49 }, "end": { - "line": 365, + "line": 367, "column": 61 } } @@ -80094,15 +80559,15 @@ "binop": null, "updateContext": null }, - "start": 15057, - "end": 15058, + "start": 15124, + "end": 15125, "loc": { "start": { - "line": 365, + "line": 367, "column": 62 }, "end": { - "line": 365, + "line": 367, "column": 63 } } @@ -80120,15 +80585,15 @@ "binop": null }, "value": "includeTypes", - "start": 15059, - "end": 15071, + "start": 15126, + "end": 15138, "loc": { "start": { - "line": 365, + "line": 367, "column": 64 }, "end": { - "line": 365, + "line": 367, "column": 76 } } @@ -80146,15 +80611,15 @@ "binop": null, "updateContext": null }, - "start": 15072, - "end": 15073, + "start": 15139, + "end": 15140, "loc": { "start": { - "line": 365, + "line": 367, "column": 77 }, "end": { - "line": 365, + "line": 367, "column": 78 } } @@ -80173,15 +80638,15 @@ "updateContext": null }, "value": "(include all)", - "start": 15074, - "end": 15089, + "start": 15141, + "end": 15156, "loc": { "start": { - "line": 365, + "line": 367, "column": 79 }, "end": { - "line": 365, + "line": 367, "column": 94 } } @@ -80198,15 +80663,15 @@ "postfix": false, "binop": null }, - "start": 15089, - "end": 15090, + "start": 15156, + "end": 15157, "loc": { "start": { - "line": 365, + "line": 367, "column": 94 }, "end": { - "line": 365, + "line": 367, "column": 95 } } @@ -80223,15 +80688,15 @@ "postfix": false, "binop": null }, - "start": 15090, - "end": 15091, + "start": 15157, + "end": 15158, "loc": { "start": { - "line": 365, + "line": 367, "column": 95 }, "end": { - "line": 365, + "line": 367, "column": 96 } } @@ -80249,15 +80714,15 @@ "binop": null, "updateContext": null }, - "start": 15091, - "end": 15092, + "start": 15158, + "end": 15159, "loc": { "start": { - "line": 365, + "line": 367, "column": 96 }, "end": { - "line": 365, + "line": 367, "column": 97 } } @@ -80274,15 +80739,15 @@ "postfix": false, "binop": null }, - "start": 15113, - "end": 15114, + "start": 15180, + "end": 15181, "loc": { "start": { - "line": 366, + "line": 368, "column": 20 }, "end": { - "line": 366, + "line": 368, "column": 21 } } @@ -80302,15 +80767,15 @@ "updateContext": null }, "value": "if", - "start": 15135, - "end": 15137, + "start": 15202, + "end": 15204, "loc": { "start": { - "line": 367, + "line": 369, "column": 20 }, "end": { - "line": 367, + "line": 369, "column": 22 } } @@ -80327,15 +80792,15 @@ "postfix": false, "binop": null }, - "start": 15138, - "end": 15139, + "start": 15205, + "end": 15206, "loc": { "start": { - "line": 367, + "line": 369, "column": 23 }, "end": { - "line": 367, + "line": 369, "column": 24 } } @@ -80353,15 +80818,15 @@ "binop": null }, "value": "excludeTypes", - "start": 15139, - "end": 15151, + "start": 15206, + "end": 15218, "loc": { "start": { - "line": 367, + "line": 369, "column": 24 }, "end": { - "line": 367, + "line": 369, "column": 36 } } @@ -80378,15 +80843,15 @@ "postfix": false, "binop": null }, - "start": 15151, - "end": 15152, + "start": 15218, + "end": 15219, "loc": { "start": { - "line": 367, + "line": 369, "column": 36 }, "end": { - "line": 367, + "line": 369, "column": 37 } } @@ -80403,15 +80868,15 @@ "postfix": false, "binop": null }, - "start": 15153, - "end": 15154, + "start": 15220, + "end": 15221, "loc": { "start": { - "line": 367, + "line": 369, "column": 38 }, "end": { - "line": 367, + "line": 369, "column": 39 } } @@ -80429,15 +80894,15 @@ "binop": null }, "value": "log", - "start": 15179, - "end": 15182, + "start": 15246, + "end": 15249, "loc": { "start": { - "line": 368, + "line": 370, "column": 24 }, "end": { - "line": 368, + "line": 370, "column": 27 } } @@ -80454,15 +80919,15 @@ "postfix": false, "binop": null }, - "start": 15182, - "end": 15183, + "start": 15249, + "end": 15250, "loc": { "start": { - "line": 368, + "line": 370, "column": 27 }, "end": { - "line": 368, + "line": 370, "column": 28 } } @@ -80481,15 +80946,15 @@ "updateContext": null }, "value": "Exclude types: ", - "start": 15183, - "end": 15200, + "start": 15250, + "end": 15267, "loc": { "start": { - "line": 368, + "line": 370, "column": 28 }, "end": { - "line": 368, + "line": 370, "column": 45 } } @@ -80508,15 +80973,15 @@ "updateContext": null }, "value": "+", - "start": 15201, - "end": 15202, + "start": 15268, + "end": 15269, "loc": { "start": { - "line": 368, + "line": 370, "column": 46 }, "end": { - "line": 368, + "line": 370, "column": 47 } } @@ -80533,15 +80998,15 @@ "postfix": false, "binop": null }, - "start": 15203, - "end": 15204, + "start": 15270, + "end": 15271, "loc": { "start": { - "line": 368, + "line": 370, "column": 48 }, "end": { - "line": 368, + "line": 370, "column": 49 } } @@ -80559,15 +81024,15 @@ "binop": null }, "value": "excludeTypes", - "start": 15204, - "end": 15216, + "start": 15271, + "end": 15283, "loc": { "start": { - "line": 368, + "line": 370, "column": 49 }, "end": { - "line": 368, + "line": 370, "column": 61 } } @@ -80585,15 +81050,15 @@ "binop": null, "updateContext": null }, - "start": 15217, - "end": 15218, + "start": 15284, + "end": 15285, "loc": { "start": { - "line": 368, + "line": 370, "column": 62 }, "end": { - "line": 368, + "line": 370, "column": 63 } } @@ -80611,15 +81076,15 @@ "binop": null }, "value": "excludeTypes", - "start": 15219, - "end": 15231, + "start": 15286, + "end": 15298, "loc": { "start": { - "line": 368, + "line": 370, "column": 64 }, "end": { - "line": 368, + "line": 370, "column": 76 } } @@ -80637,15 +81102,15 @@ "binop": null, "updateContext": null }, - "start": 15232, - "end": 15233, + "start": 15299, + "end": 15300, "loc": { "start": { - "line": 368, + "line": 370, "column": 77 }, "end": { - "line": 368, + "line": 370, "column": 78 } } @@ -80664,15 +81129,15 @@ "updateContext": null }, "value": "(exclude none)", - "start": 15234, - "end": 15250, + "start": 15301, + "end": 15317, "loc": { "start": { - "line": 368, + "line": 370, "column": 79 }, "end": { - "line": 368, + "line": 370, "column": 95 } } @@ -80689,15 +81154,15 @@ "postfix": false, "binop": null }, - "start": 15250, - "end": 15251, + "start": 15317, + "end": 15318, "loc": { "start": { - "line": 368, + "line": 370, "column": 95 }, "end": { - "line": 368, + "line": 370, "column": 96 } } @@ -80714,15 +81179,15 @@ "postfix": false, "binop": null }, - "start": 15251, - "end": 15252, + "start": 15318, + "end": 15319, "loc": { "start": { - "line": 368, + "line": 370, "column": 96 }, "end": { - "line": 368, + "line": 370, "column": 97 } } @@ -80740,15 +81205,15 @@ "binop": null, "updateContext": null }, - "start": 15252, - "end": 15253, + "start": 15319, + "end": 15320, "loc": { "start": { - "line": 368, + "line": 370, "column": 97 }, "end": { - "line": 368, + "line": 370, "column": 98 } } @@ -80765,15 +81230,15 @@ "postfix": false, "binop": null }, - "start": 15274, - "end": 15275, + "start": 15341, + "end": 15342, "loc": { "start": { - "line": 369, + "line": 371, "column": 20 }, "end": { - "line": 369, + "line": 371, "column": 21 } } @@ -80791,15 +81256,15 @@ "binop": null }, "value": "log", - "start": 15296, - "end": 15299, + "start": 15363, + "end": 15366, "loc": { "start": { - "line": 370, + "line": 372, "column": 20 }, "end": { - "line": 370, + "line": 372, "column": 23 } } @@ -80816,15 +81281,15 @@ "postfix": false, "binop": null }, - "start": 15299, - "end": 15300, + "start": 15366, + "end": 15367, "loc": { "start": { - "line": 370, + "line": 372, "column": 23 }, "end": { - "line": 370, + "line": 372, "column": 24 } } @@ -80843,15 +81308,15 @@ "updateContext": null }, "value": "XKT size: ", - "start": 15300, - "end": 15312, + "start": 15367, + "end": 15379, "loc": { "start": { - "line": 370, + "line": 372, "column": 24 }, "end": { - "line": 370, + "line": 372, "column": 36 } } @@ -80870,15 +81335,15 @@ "updateContext": null }, "value": "+", - "start": 15313, - "end": 15314, + "start": 15380, + "end": 15381, "loc": { "start": { - "line": 370, + "line": 372, "column": 37 }, "end": { - "line": 370, + "line": 372, "column": 38 } } @@ -80896,15 +81361,15 @@ "binop": null }, "value": "stats", - "start": 15315, - "end": 15320, + "start": 15382, + "end": 15387, "loc": { "start": { - "line": 370, + "line": 372, "column": 39 }, "end": { - "line": 370, + "line": 372, "column": 44 } } @@ -80922,15 +81387,15 @@ "binop": null, "updateContext": null }, - "start": 15320, - "end": 15321, + "start": 15387, + "end": 15388, "loc": { "start": { - "line": 370, + "line": 372, "column": 44 }, "end": { - "line": 370, + "line": 372, "column": 45 } } @@ -80948,15 +81413,15 @@ "binop": null }, "value": "xktSize", - "start": 15321, - "end": 15328, + "start": 15388, + "end": 15395, "loc": { "start": { - "line": 370, + "line": 372, "column": 45 }, "end": { - "line": 370, + "line": 372, "column": 52 } } @@ -80975,15 +81440,15 @@ "updateContext": null }, "value": "+", - "start": 15329, - "end": 15330, + "start": 15396, + "end": 15397, "loc": { "start": { - "line": 370, + "line": 372, "column": 53 }, "end": { - "line": 370, + "line": 372, "column": 54 } } @@ -81002,15 +81467,15 @@ "updateContext": null }, "value": " kB", - "start": 15331, - "end": 15336, + "start": 15398, + "end": 15403, "loc": { "start": { - "line": 370, + "line": 372, "column": 55 }, "end": { - "line": 370, + "line": 372, "column": 60 } } @@ -81027,15 +81492,15 @@ "postfix": false, "binop": null }, - "start": 15336, - "end": 15337, + "start": 15403, + "end": 15404, "loc": { "start": { - "line": 370, + "line": 372, "column": 60 }, "end": { - "line": 370, + "line": 372, "column": 61 } } @@ -81053,15 +81518,15 @@ "binop": null, "updateContext": null }, - "start": 15337, - "end": 15338, + "start": 15404, + "end": 15405, "loc": { "start": { - "line": 370, + "line": 372, "column": 61 }, "end": { - "line": 370, + "line": 372, "column": 62 } } @@ -81079,15 +81544,15 @@ "binop": null }, "value": "log", - "start": 15359, - "end": 15362, + "start": 15426, + "end": 15429, "loc": { "start": { - "line": 371, + "line": 373, "column": 20 }, "end": { - "line": 371, + "line": 373, "column": 23 } } @@ -81104,15 +81569,15 @@ "postfix": false, "binop": null }, - "start": 15362, - "end": 15363, + "start": 15429, + "end": 15430, "loc": { "start": { - "line": 371, + "line": 373, "column": 23 }, "end": { - "line": 371, + "line": 373, "column": 24 } } @@ -81131,15 +81596,15 @@ "updateContext": null }, "value": "XKT textures size: ", - "start": 15363, - "end": 15384, + "start": 15430, + "end": 15451, "loc": { "start": { - "line": 371, + "line": 373, "column": 24 }, "end": { - "line": 371, + "line": 373, "column": 45 } } @@ -81158,15 +81623,15 @@ "updateContext": null }, "value": "+", - "start": 15385, - "end": 15386, + "start": 15452, + "end": 15453, "loc": { "start": { - "line": 371, + "line": 373, "column": 46 }, "end": { - "line": 371, + "line": 373, "column": 47 } } @@ -81183,15 +81648,15 @@ "postfix": false, "binop": null }, - "start": 15387, - "end": 15388, + "start": 15454, + "end": 15455, "loc": { "start": { - "line": 371, + "line": 373, "column": 48 }, "end": { - "line": 371, + "line": 373, "column": 49 } } @@ -81209,15 +81674,15 @@ "binop": null }, "value": "stats", - "start": 15388, - "end": 15393, + "start": 15455, + "end": 15460, "loc": { "start": { - "line": 371, + "line": 373, "column": 49 }, "end": { - "line": 371, + "line": 373, "column": 54 } } @@ -81235,15 +81700,15 @@ "binop": null, "updateContext": null }, - "start": 15393, - "end": 15394, + "start": 15460, + "end": 15461, "loc": { "start": { - "line": 371, + "line": 373, "column": 54 }, "end": { - "line": 371, + "line": 373, "column": 55 } } @@ -81261,15 +81726,15 @@ "binop": null }, "value": "texturesSize", - "start": 15394, - "end": 15406, + "start": 15461, + "end": 15473, "loc": { "start": { - "line": 371, + "line": 373, "column": 55 }, "end": { - "line": 371, + "line": 373, "column": 67 } } @@ -81288,15 +81753,15 @@ "updateContext": null }, "value": "/", - "start": 15407, - "end": 15408, + "start": 15474, + "end": 15475, "loc": { "start": { - "line": 371, + "line": 373, "column": 68 }, "end": { - "line": 371, + "line": 373, "column": 69 } } @@ -81315,15 +81780,15 @@ "updateContext": null }, "value": 1000, - "start": 15409, - "end": 15413, + "start": 15476, + "end": 15480, "loc": { "start": { - "line": 371, + "line": 373, "column": 70 }, "end": { - "line": 371, + "line": 373, "column": 74 } } @@ -81340,15 +81805,15 @@ "postfix": false, "binop": null }, - "start": 15413, - "end": 15414, + "start": 15480, + "end": 15481, "loc": { "start": { - "line": 371, + "line": 373, "column": 74 }, "end": { - "line": 371, + "line": 373, "column": 75 } } @@ -81366,15 +81831,15 @@ "binop": null, "updateContext": null }, - "start": 15414, - "end": 15415, + "start": 15481, + "end": 15482, "loc": { "start": { - "line": 371, + "line": 373, "column": 75 }, "end": { - "line": 371, + "line": 373, "column": 76 } } @@ -81392,15 +81857,15 @@ "binop": null }, "value": "toFixed", - "start": 15415, - "end": 15422, + "start": 15482, + "end": 15489, "loc": { "start": { - "line": 371, + "line": 373, "column": 76 }, "end": { - "line": 371, + "line": 373, "column": 83 } } @@ -81417,15 +81882,15 @@ "postfix": false, "binop": null }, - "start": 15422, - "end": 15423, + "start": 15489, + "end": 15490, "loc": { "start": { - "line": 371, + "line": 373, "column": 83 }, "end": { - "line": 371, + "line": 373, "column": 84 } } @@ -81444,15 +81909,15 @@ "updateContext": null }, "value": 2, - "start": 15423, - "end": 15424, + "start": 15490, + "end": 15491, "loc": { "start": { - "line": 371, + "line": 373, "column": 84 }, "end": { - "line": 371, + "line": 373, "column": 85 } } @@ -81469,15 +81934,15 @@ "postfix": false, "binop": null }, - "start": 15424, - "end": 15425, + "start": 15491, + "end": 15492, "loc": { "start": { - "line": 371, + "line": 373, "column": 85 }, "end": { - "line": 371, + "line": 373, "column": 86 } } @@ -81496,15 +81961,15 @@ "updateContext": null }, "value": "+", - "start": 15426, - "end": 15427, + "start": 15493, + "end": 15494, "loc": { "start": { - "line": 371, + "line": 373, "column": 87 }, "end": { - "line": 371, + "line": 373, "column": 88 } } @@ -81523,15 +81988,15 @@ "updateContext": null }, "value": "kB", - "start": 15428, - "end": 15432, + "start": 15495, + "end": 15499, "loc": { "start": { - "line": 371, + "line": 373, "column": 89 }, "end": { - "line": 371, + "line": 373, "column": 93 } } @@ -81548,15 +82013,15 @@ "postfix": false, "binop": null }, - "start": 15432, - "end": 15433, + "start": 15499, + "end": 15500, "loc": { "start": { - "line": 371, + "line": 373, "column": 93 }, "end": { - "line": 371, + "line": 373, "column": 94 } } @@ -81574,15 +82039,15 @@ "binop": null, "updateContext": null }, - "start": 15433, - "end": 15434, + "start": 15500, + "end": 15501, "loc": { "start": { - "line": 371, + "line": 373, "column": 94 }, "end": { - "line": 371, + "line": 373, "column": 95 } } @@ -81600,15 +82065,15 @@ "binop": null }, "value": "log", - "start": 15455, - "end": 15458, + "start": 15522, + "end": 15525, "loc": { "start": { - "line": 372, + "line": 374, "column": 20 }, "end": { - "line": 372, + "line": 374, "column": 23 } } @@ -81625,15 +82090,15 @@ "postfix": false, "binop": null }, - "start": 15458, - "end": 15459, + "start": 15525, + "end": 15526, "loc": { "start": { - "line": 372, + "line": 374, "column": 23 }, "end": { - "line": 372, + "line": 374, "column": 24 } } @@ -81652,15 +82117,15 @@ "updateContext": null }, "value": "Compression ratio: ", - "start": 15459, - "end": 15480, + "start": 15526, + "end": 15547, "loc": { "start": { - "line": 372, + "line": 374, "column": 24 }, "end": { - "line": 372, + "line": 374, "column": 45 } } @@ -81679,15 +82144,15 @@ "updateContext": null }, "value": "+", - "start": 15481, - "end": 15482, + "start": 15548, + "end": 15549, "loc": { "start": { - "line": 372, + "line": 374, "column": 46 }, "end": { - "line": 372, + "line": 374, "column": 47 } } @@ -81705,15 +82170,15 @@ "binop": null }, "value": "stats", - "start": 15483, - "end": 15488, + "start": 15550, + "end": 15555, "loc": { "start": { - "line": 372, + "line": 374, "column": 48 }, "end": { - "line": 372, + "line": 374, "column": 53 } } @@ -81731,15 +82196,15 @@ "binop": null, "updateContext": null }, - "start": 15488, - "end": 15489, + "start": 15555, + "end": 15556, "loc": { "start": { - "line": 372, + "line": 374, "column": 53 }, "end": { - "line": 372, + "line": 374, "column": 54 } } @@ -81757,15 +82222,15 @@ "binop": null }, "value": "compressionRatio", - "start": 15489, - "end": 15505, + "start": 15556, + "end": 15572, "loc": { "start": { - "line": 372, + "line": 374, "column": 54 }, "end": { - "line": 372, + "line": 374, "column": 70 } } @@ -81782,15 +82247,15 @@ "postfix": false, "binop": null }, - "start": 15505, - "end": 15506, + "start": 15572, + "end": 15573, "loc": { "start": { - "line": 372, + "line": 374, "column": 70 }, "end": { - "line": 372, + "line": 374, "column": 71 } } @@ -81808,15 +82273,15 @@ "binop": null, "updateContext": null }, - "start": 15506, - "end": 15507, + "start": 15573, + "end": 15574, "loc": { "start": { - "line": 372, + "line": 374, "column": 71 }, "end": { - "line": 372, + "line": 374, "column": 72 } } @@ -81834,15 +82299,15 @@ "binop": null }, "value": "log", - "start": 15528, - "end": 15531, + "start": 15595, + "end": 15598, "loc": { "start": { - "line": 373, + "line": 375, "column": 20 }, "end": { - "line": 373, + "line": 375, "column": 23 } } @@ -81859,15 +82324,15 @@ "postfix": false, "binop": null }, - "start": 15531, - "end": 15532, + "start": 15598, + "end": 15599, "loc": { "start": { - "line": 373, + "line": 375, "column": 23 }, "end": { - "line": 373, + "line": 375, "column": 24 } } @@ -81886,15 +82351,15 @@ "updateContext": null }, "value": "Conversion time: ", - "start": 15532, - "end": 15551, + "start": 15599, + "end": 15618, "loc": { "start": { - "line": 373, + "line": 375, "column": 24 }, "end": { - "line": 373, + "line": 375, "column": 43 } } @@ -81913,15 +82378,15 @@ "updateContext": null }, "value": "+", - "start": 15552, - "end": 15553, + "start": 15619, + "end": 15620, "loc": { "start": { - "line": 373, + "line": 375, "column": 44 }, "end": { - "line": 373, + "line": 375, "column": 45 } } @@ -81939,15 +82404,15 @@ "binop": null }, "value": "stats", - "start": 15554, - "end": 15559, + "start": 15621, + "end": 15626, "loc": { "start": { - "line": 373, + "line": 375, "column": 46 }, "end": { - "line": 373, + "line": 375, "column": 51 } } @@ -81965,15 +82430,15 @@ "binop": null, "updateContext": null }, - "start": 15559, - "end": 15560, + "start": 15626, + "end": 15627, "loc": { "start": { - "line": 373, + "line": 375, "column": 51 }, "end": { - "line": 373, + "line": 375, "column": 52 } } @@ -81991,15 +82456,15 @@ "binop": null }, "value": "conversionTime", - "start": 15560, - "end": 15574, + "start": 15627, + "end": 15641, "loc": { "start": { - "line": 373, + "line": 375, "column": 52 }, "end": { - "line": 373, + "line": 375, "column": 66 } } @@ -82018,15 +82483,15 @@ "updateContext": null }, "value": "+", - "start": 15575, - "end": 15576, + "start": 15642, + "end": 15643, "loc": { "start": { - "line": 373, + "line": 375, "column": 67 }, "end": { - "line": 373, + "line": 375, "column": 68 } } @@ -82045,15 +82510,15 @@ "updateContext": null }, "value": " s", - "start": 15577, - "end": 15581, + "start": 15644, + "end": 15648, "loc": { "start": { - "line": 373, + "line": 375, "column": 69 }, "end": { - "line": 373, + "line": 375, "column": 73 } } @@ -82070,15 +82535,15 @@ "postfix": false, "binop": null }, - "start": 15581, - "end": 15582, + "start": 15648, + "end": 15649, "loc": { "start": { - "line": 373, + "line": 375, "column": 73 }, "end": { - "line": 373, + "line": 375, "column": 74 } } @@ -82096,15 +82561,15 @@ "binop": null, "updateContext": null }, - "start": 15582, - "end": 15583, + "start": 15649, + "end": 15650, "loc": { "start": { - "line": 373, + "line": 375, "column": 74 }, "end": { - "line": 373, + "line": 375, "column": 75 } } @@ -82122,15 +82587,15 @@ "binop": null }, "value": "log", - "start": 15604, - "end": 15607, + "start": 15671, + "end": 15674, "loc": { "start": { - "line": 374, + "line": 376, "column": 20 }, "end": { - "line": 374, + "line": 376, "column": 23 } } @@ -82147,15 +82612,15 @@ "postfix": false, "binop": null }, - "start": 15607, - "end": 15608, + "start": 15674, + "end": 15675, "loc": { "start": { - "line": 374, + "line": 376, "column": 23 }, "end": { - "line": 374, + "line": 376, "column": 24 } } @@ -82174,15 +82639,15 @@ "updateContext": null }, "value": "Converted metaobjects: ", - "start": 15608, - "end": 15633, + "start": 15675, + "end": 15700, "loc": { "start": { - "line": 374, + "line": 376, "column": 24 }, "end": { - "line": 374, + "line": 376, "column": 49 } } @@ -82201,15 +82666,15 @@ "updateContext": null }, "value": "+", - "start": 15634, - "end": 15635, + "start": 15701, + "end": 15702, "loc": { "start": { - "line": 374, + "line": 376, "column": 50 }, "end": { - "line": 374, + "line": 376, "column": 51 } } @@ -82227,15 +82692,15 @@ "binop": null }, "value": "stats", - "start": 15636, - "end": 15641, + "start": 15703, + "end": 15708, "loc": { "start": { - "line": 374, + "line": 376, "column": 52 }, "end": { - "line": 374, + "line": 376, "column": 57 } } @@ -82253,15 +82718,15 @@ "binop": null, "updateContext": null }, - "start": 15641, - "end": 15642, + "start": 15708, + "end": 15709, "loc": { "start": { - "line": 374, + "line": 376, "column": 57 }, "end": { - "line": 374, + "line": 376, "column": 58 } } @@ -82279,15 +82744,15 @@ "binop": null }, "value": "numMetaObjects", - "start": 15642, - "end": 15656, + "start": 15709, + "end": 15723, "loc": { "start": { - "line": 374, + "line": 376, "column": 58 }, "end": { - "line": 374, + "line": 376, "column": 72 } } @@ -82304,15 +82769,15 @@ "postfix": false, "binop": null }, - "start": 15656, - "end": 15657, + "start": 15723, + "end": 15724, "loc": { "start": { - "line": 374, + "line": 376, "column": 72 }, "end": { - "line": 374, + "line": 376, "column": 73 } } @@ -82330,15 +82795,15 @@ "binop": null, "updateContext": null }, - "start": 15657, - "end": 15658, + "start": 15724, + "end": 15725, "loc": { "start": { - "line": 374, + "line": 376, "column": 73 }, "end": { - "line": 374, + "line": 376, "column": 74 } } @@ -82356,15 +82821,15 @@ "binop": null }, "value": "log", - "start": 15679, - "end": 15682, + "start": 15746, + "end": 15749, "loc": { "start": { - "line": 375, + "line": 377, "column": 20 }, "end": { - "line": 375, + "line": 377, "column": 23 } } @@ -82381,15 +82846,15 @@ "postfix": false, "binop": null }, - "start": 15682, - "end": 15683, + "start": 15749, + "end": 15750, "loc": { "start": { - "line": 375, + "line": 377, "column": 23 }, "end": { - "line": 375, + "line": 377, "column": 24 } } @@ -82408,15 +82873,15 @@ "updateContext": null }, "value": "Converted property sets: ", - "start": 15683, - "end": 15710, + "start": 15750, + "end": 15777, "loc": { "start": { - "line": 375, + "line": 377, "column": 24 }, "end": { - "line": 375, + "line": 377, "column": 51 } } @@ -82435,15 +82900,15 @@ "updateContext": null }, "value": "+", - "start": 15711, - "end": 15712, + "start": 15778, + "end": 15779, "loc": { "start": { - "line": 375, + "line": 377, "column": 52 }, "end": { - "line": 375, + "line": 377, "column": 53 } } @@ -82461,15 +82926,15 @@ "binop": null }, "value": "stats", - "start": 15713, - "end": 15718, + "start": 15780, + "end": 15785, "loc": { "start": { - "line": 375, + "line": 377, "column": 54 }, "end": { - "line": 375, + "line": 377, "column": 59 } } @@ -82487,15 +82952,15 @@ "binop": null, "updateContext": null }, - "start": 15718, - "end": 15719, + "start": 15785, + "end": 15786, "loc": { "start": { - "line": 375, + "line": 377, "column": 59 }, "end": { - "line": 375, + "line": 377, "column": 60 } } @@ -82513,15 +82978,15 @@ "binop": null }, "value": "numPropertySets", - "start": 15719, - "end": 15734, + "start": 15786, + "end": 15801, "loc": { "start": { - "line": 375, + "line": 377, "column": 60 }, "end": { - "line": 375, + "line": 377, "column": 75 } } @@ -82538,15 +83003,15 @@ "postfix": false, "binop": null }, - "start": 15734, - "end": 15735, + "start": 15801, + "end": 15802, "loc": { "start": { - "line": 375, + "line": 377, "column": 75 }, "end": { - "line": 375, + "line": 377, "column": 76 } } @@ -82564,15 +83029,15 @@ "binop": null, "updateContext": null }, - "start": 15735, - "end": 15736, + "start": 15802, + "end": 15803, "loc": { "start": { - "line": 375, + "line": 377, "column": 76 }, "end": { - "line": 375, + "line": 377, "column": 77 } } @@ -82590,15 +83055,15 @@ "binop": null }, "value": "log", - "start": 15757, - "end": 15760, + "start": 15824, + "end": 15827, "loc": { "start": { - "line": 376, + "line": 378, "column": 20 }, "end": { - "line": 376, + "line": 378, "column": 23 } } @@ -82615,15 +83080,15 @@ "postfix": false, "binop": null }, - "start": 15760, - "end": 15761, + "start": 15827, + "end": 15828, "loc": { "start": { - "line": 376, + "line": 378, "column": 23 }, "end": { - "line": 376, + "line": 378, "column": 24 } } @@ -82642,15 +83107,15 @@ "updateContext": null }, "value": "Converted drawable objects: ", - "start": 15761, - "end": 15791, + "start": 15828, + "end": 15858, "loc": { "start": { - "line": 376, + "line": 378, "column": 24 }, "end": { - "line": 376, + "line": 378, "column": 54 } } @@ -82669,15 +83134,15 @@ "updateContext": null }, "value": "+", - "start": 15792, - "end": 15793, + "start": 15859, + "end": 15860, "loc": { "start": { - "line": 376, + "line": 378, "column": 55 }, "end": { - "line": 376, + "line": 378, "column": 56 } } @@ -82695,15 +83160,15 @@ "binop": null }, "value": "stats", - "start": 15794, - "end": 15799, + "start": 15861, + "end": 15866, "loc": { "start": { - "line": 376, + "line": 378, "column": 57 }, "end": { - "line": 376, + "line": 378, "column": 62 } } @@ -82721,15 +83186,15 @@ "binop": null, "updateContext": null }, - "start": 15799, - "end": 15800, + "start": 15866, + "end": 15867, "loc": { "start": { - "line": 376, + "line": 378, "column": 62 }, "end": { - "line": 376, + "line": 378, "column": 63 } } @@ -82747,15 +83212,15 @@ "binop": null }, "value": "numObjects", - "start": 15800, - "end": 15810, + "start": 15867, + "end": 15877, "loc": { "start": { - "line": 376, + "line": 378, "column": 63 }, "end": { - "line": 376, + "line": 378, "column": 73 } } @@ -82772,15 +83237,15 @@ "postfix": false, "binop": null }, - "start": 15810, - "end": 15811, + "start": 15877, + "end": 15878, "loc": { "start": { - "line": 376, + "line": 378, "column": 73 }, "end": { - "line": 376, + "line": 378, "column": 74 } } @@ -82798,15 +83263,15 @@ "binop": null, "updateContext": null }, - "start": 15811, - "end": 15812, + "start": 15878, + "end": 15879, "loc": { "start": { - "line": 376, + "line": 378, "column": 74 }, "end": { - "line": 376, + "line": 378, "column": 75 } } @@ -82824,15 +83289,15 @@ "binop": null }, "value": "log", - "start": 15833, - "end": 15836, + "start": 15900, + "end": 15903, "loc": { "start": { - "line": 377, + "line": 379, "column": 20 }, "end": { - "line": 377, + "line": 379, "column": 23 } } @@ -82849,15 +83314,15 @@ "postfix": false, "binop": null }, - "start": 15836, - "end": 15837, + "start": 15903, + "end": 15904, "loc": { "start": { - "line": 377, + "line": 379, "column": 23 }, "end": { - "line": 377, + "line": 379, "column": 24 } } @@ -82876,15 +83341,15 @@ "updateContext": null }, "value": "Converted geometries: ", - "start": 15837, - "end": 15861, + "start": 15904, + "end": 15928, "loc": { "start": { - "line": 377, + "line": 379, "column": 24 }, "end": { - "line": 377, + "line": 379, "column": 48 } } @@ -82903,15 +83368,15 @@ "updateContext": null }, "value": "+", - "start": 15862, - "end": 15863, + "start": 15929, + "end": 15930, "loc": { "start": { - "line": 377, + "line": 379, "column": 49 }, "end": { - "line": 377, + "line": 379, "column": 50 } } @@ -82929,15 +83394,15 @@ "binop": null }, "value": "stats", - "start": 15864, - "end": 15869, + "start": 15931, + "end": 15936, "loc": { "start": { - "line": 377, + "line": 379, "column": 51 }, "end": { - "line": 377, + "line": 379, "column": 56 } } @@ -82955,15 +83420,15 @@ "binop": null, "updateContext": null }, - "start": 15869, - "end": 15870, + "start": 15936, + "end": 15937, "loc": { "start": { - "line": 377, + "line": 379, "column": 56 }, "end": { - "line": 377, + "line": 379, "column": 57 } } @@ -82981,15 +83446,15 @@ "binop": null }, "value": "numGeometries", - "start": 15870, - "end": 15883, + "start": 15937, + "end": 15950, "loc": { "start": { - "line": 377, + "line": 379, "column": 57 }, "end": { - "line": 377, + "line": 379, "column": 70 } } @@ -83006,15 +83471,15 @@ "postfix": false, "binop": null }, - "start": 15883, - "end": 15884, + "start": 15950, + "end": 15951, "loc": { "start": { - "line": 377, + "line": 379, "column": 70 }, "end": { - "line": 377, + "line": 379, "column": 71 } } @@ -83032,15 +83497,15 @@ "binop": null, "updateContext": null }, - "start": 15884, - "end": 15885, + "start": 15951, + "end": 15952, "loc": { "start": { - "line": 377, + "line": 379, "column": 71 }, "end": { - "line": 377, + "line": 379, "column": 72 } } @@ -83058,15 +83523,15 @@ "binop": null }, "value": "log", - "start": 15906, - "end": 15909, + "start": 15973, + "end": 15976, "loc": { "start": { - "line": 378, + "line": 380, "column": 20 }, "end": { - "line": 378, + "line": 380, "column": 23 } } @@ -83083,15 +83548,15 @@ "postfix": false, "binop": null }, - "start": 15909, - "end": 15910, + "start": 15976, + "end": 15977, "loc": { "start": { - "line": 378, + "line": 380, "column": 23 }, "end": { - "line": 378, + "line": 380, "column": 24 } } @@ -83110,15 +83575,15 @@ "updateContext": null }, "value": "Converted textures: ", - "start": 15910, - "end": 15932, + "start": 15977, + "end": 15999, "loc": { "start": { - "line": 378, + "line": 380, "column": 24 }, "end": { - "line": 378, + "line": 380, "column": 46 } } @@ -83137,15 +83602,15 @@ "updateContext": null }, "value": "+", - "start": 15933, - "end": 15934, + "start": 16000, + "end": 16001, "loc": { "start": { - "line": 378, + "line": 380, "column": 47 }, "end": { - "line": 378, + "line": 380, "column": 48 } } @@ -83163,15 +83628,15 @@ "binop": null }, "value": "stats", - "start": 15935, - "end": 15940, + "start": 16002, + "end": 16007, "loc": { "start": { - "line": 378, + "line": 380, "column": 49 }, "end": { - "line": 378, + "line": 380, "column": 54 } } @@ -83189,15 +83654,15 @@ "binop": null, "updateContext": null }, - "start": 15940, - "end": 15941, + "start": 16007, + "end": 16008, "loc": { "start": { - "line": 378, + "line": 380, "column": 54 }, "end": { - "line": 378, + "line": 380, "column": 55 } } @@ -83215,15 +83680,15 @@ "binop": null }, "value": "numTextures", - "start": 15941, - "end": 15952, + "start": 16008, + "end": 16019, "loc": { "start": { - "line": 378, + "line": 380, "column": 55 }, "end": { - "line": 378, + "line": 380, "column": 66 } } @@ -83240,15 +83705,15 @@ "postfix": false, "binop": null }, - "start": 15952, - "end": 15953, + "start": 16019, + "end": 16020, "loc": { "start": { - "line": 378, + "line": 380, "column": 66 }, "end": { - "line": 378, + "line": 380, "column": 67 } } @@ -83266,15 +83731,15 @@ "binop": null, "updateContext": null }, - "start": 15953, - "end": 15954, + "start": 16020, + "end": 16021, "loc": { "start": { - "line": 378, + "line": 380, "column": 67 }, "end": { - "line": 378, + "line": 380, "column": 68 } } @@ -83292,15 +83757,15 @@ "binop": null }, "value": "log", - "start": 15975, - "end": 15978, + "start": 16042, + "end": 16045, "loc": { "start": { - "line": 379, + "line": 381, "column": 20 }, "end": { - "line": 379, + "line": 381, "column": 23 } } @@ -83317,15 +83782,15 @@ "postfix": false, "binop": null }, - "start": 15978, - "end": 15979, + "start": 16045, + "end": 16046, "loc": { "start": { - "line": 379, + "line": 381, "column": 23 }, "end": { - "line": 379, + "line": 381, "column": 24 } } @@ -83344,15 +83809,15 @@ "updateContext": null }, "value": "Converted textureSets: ", - "start": 15979, - "end": 16004, + "start": 16046, + "end": 16071, "loc": { "start": { - "line": 379, + "line": 381, "column": 24 }, "end": { - "line": 379, + "line": 381, "column": 49 } } @@ -83371,15 +83836,15 @@ "updateContext": null }, "value": "+", - "start": 16005, - "end": 16006, + "start": 16072, + "end": 16073, "loc": { "start": { - "line": 379, + "line": 381, "column": 50 }, "end": { - "line": 379, + "line": 381, "column": 51 } } @@ -83397,15 +83862,15 @@ "binop": null }, "value": "stats", - "start": 16007, - "end": 16012, + "start": 16074, + "end": 16079, "loc": { "start": { - "line": 379, + "line": 381, "column": 52 }, "end": { - "line": 379, + "line": 381, "column": 57 } } @@ -83423,15 +83888,15 @@ "binop": null, "updateContext": null }, - "start": 16012, - "end": 16013, + "start": 16079, + "end": 16080, "loc": { "start": { - "line": 379, + "line": 381, "column": 57 }, "end": { - "line": 379, + "line": 381, "column": 58 } } @@ -83449,15 +83914,15 @@ "binop": null }, "value": "numTextureSets", - "start": 16013, - "end": 16027, + "start": 16080, + "end": 16094, "loc": { "start": { - "line": 379, + "line": 381, "column": 58 }, "end": { - "line": 379, + "line": 381, "column": 72 } } @@ -83474,15 +83939,15 @@ "postfix": false, "binop": null }, - "start": 16027, - "end": 16028, + "start": 16094, + "end": 16095, "loc": { "start": { - "line": 379, + "line": 381, "column": 72 }, "end": { - "line": 379, + "line": 381, "column": 73 } } @@ -83500,15 +83965,15 @@ "binop": null, "updateContext": null }, - "start": 16028, - "end": 16029, + "start": 16095, + "end": 16096, "loc": { "start": { - "line": 379, + "line": 381, "column": 73 }, "end": { - "line": 379, + "line": 381, "column": 74 } } @@ -83526,15 +83991,15 @@ "binop": null }, "value": "log", - "start": 16050, - "end": 16053, + "start": 16117, + "end": 16120, "loc": { "start": { - "line": 380, + "line": 382, "column": 20 }, "end": { - "line": 380, + "line": 382, "column": 23 } } @@ -83551,15 +84016,15 @@ "postfix": false, "binop": null }, - "start": 16053, - "end": 16054, + "start": 16120, + "end": 16121, "loc": { "start": { - "line": 380, + "line": 382, "column": 23 }, "end": { - "line": 380, + "line": 382, "column": 24 } } @@ -83578,15 +84043,15 @@ "updateContext": null }, "value": "Converted triangles: ", - "start": 16054, - "end": 16077, + "start": 16121, + "end": 16144, "loc": { "start": { - "line": 380, + "line": 382, "column": 24 }, "end": { - "line": 380, + "line": 382, "column": 47 } } @@ -83605,15 +84070,15 @@ "updateContext": null }, "value": "+", - "start": 16078, - "end": 16079, + "start": 16145, + "end": 16146, "loc": { "start": { - "line": 380, + "line": 382, "column": 48 }, "end": { - "line": 380, + "line": 382, "column": 49 } } @@ -83631,15 +84096,15 @@ "binop": null }, "value": "stats", - "start": 16080, - "end": 16085, + "start": 16147, + "end": 16152, "loc": { "start": { - "line": 380, + "line": 382, "column": 50 }, "end": { - "line": 380, + "line": 382, "column": 55 } } @@ -83657,15 +84122,15 @@ "binop": null, "updateContext": null }, - "start": 16085, - "end": 16086, + "start": 16152, + "end": 16153, "loc": { "start": { - "line": 380, + "line": 382, "column": 55 }, "end": { - "line": 380, + "line": 382, "column": 56 } } @@ -83683,15 +84148,15 @@ "binop": null }, "value": "numTriangles", - "start": 16086, - "end": 16098, + "start": 16153, + "end": 16165, "loc": { "start": { - "line": 380, + "line": 382, "column": 56 }, "end": { - "line": 380, + "line": 382, "column": 68 } } @@ -83708,15 +84173,15 @@ "postfix": false, "binop": null }, - "start": 16098, - "end": 16099, + "start": 16165, + "end": 16166, "loc": { "start": { - "line": 380, + "line": 382, "column": 68 }, "end": { - "line": 380, + "line": 382, "column": 69 } } @@ -83734,15 +84199,15 @@ "binop": null, "updateContext": null }, - "start": 16099, - "end": 16100, + "start": 16166, + "end": 16167, "loc": { "start": { - "line": 380, + "line": 382, "column": 69 }, "end": { - "line": 380, + "line": 382, "column": 70 } } @@ -83760,15 +84225,15 @@ "binop": null }, "value": "log", - "start": 16121, - "end": 16124, + "start": 16188, + "end": 16191, "loc": { "start": { - "line": 381, + "line": 383, "column": 20 }, "end": { - "line": 381, + "line": 383, "column": 23 } } @@ -83785,15 +84250,15 @@ "postfix": false, "binop": null }, - "start": 16124, - "end": 16125, + "start": 16191, + "end": 16192, "loc": { "start": { - "line": 381, + "line": 383, "column": 23 }, "end": { - "line": 381, + "line": 383, "column": 24 } } @@ -83812,15 +84277,15 @@ "updateContext": null }, "value": "Converted vertices: ", - "start": 16125, - "end": 16147, + "start": 16192, + "end": 16214, "loc": { "start": { - "line": 381, + "line": 383, "column": 24 }, "end": { - "line": 381, + "line": 383, "column": 46 } } @@ -83839,15 +84304,15 @@ "updateContext": null }, "value": "+", - "start": 16148, - "end": 16149, + "start": 16215, + "end": 16216, "loc": { "start": { - "line": 381, + "line": 383, "column": 47 }, "end": { - "line": 381, + "line": 383, "column": 48 } } @@ -83865,15 +84330,15 @@ "binop": null }, "value": "stats", - "start": 16150, - "end": 16155, + "start": 16217, + "end": 16222, "loc": { "start": { - "line": 381, + "line": 383, "column": 49 }, "end": { - "line": 381, + "line": 383, "column": 54 } } @@ -83891,15 +84356,15 @@ "binop": null, "updateContext": null }, - "start": 16155, - "end": 16156, + "start": 16222, + "end": 16223, "loc": { "start": { - "line": 381, + "line": 383, "column": 54 }, "end": { - "line": 381, + "line": 383, "column": 55 } } @@ -83917,15 +84382,15 @@ "binop": null }, "value": "numVertices", - "start": 16156, - "end": 16167, + "start": 16223, + "end": 16234, "loc": { "start": { - "line": 381, + "line": 383, "column": 55 }, "end": { - "line": 381, + "line": 383, "column": 66 } } @@ -83942,15 +84407,15 @@ "postfix": false, "binop": null }, - "start": 16167, - "end": 16168, + "start": 16234, + "end": 16235, "loc": { "start": { - "line": 381, + "line": 383, "column": 66 }, "end": { - "line": 381, + "line": 383, "column": 67 } } @@ -83968,15 +84433,15 @@ "binop": null, "updateContext": null }, - "start": 16168, - "end": 16169, + "start": 16235, + "end": 16236, "loc": { "start": { - "line": 381, + "line": 383, "column": 67 }, "end": { - "line": 381, + "line": 383, "column": 68 } } @@ -83994,15 +84459,15 @@ "binop": null }, "value": "log", - "start": 16190, - "end": 16193, + "start": 16257, + "end": 16260, "loc": { "start": { - "line": 382, + "line": 384, "column": 20 }, "end": { - "line": 382, + "line": 384, "column": 23 } } @@ -84019,15 +84484,15 @@ "postfix": false, "binop": null }, - "start": 16193, - "end": 16194, + "start": 16260, + "end": 16261, "loc": { "start": { - "line": 382, + "line": 384, "column": 23 }, "end": { - "line": 382, + "line": 384, "column": 24 } } @@ -84046,15 +84511,15 @@ "updateContext": null }, "value": "Converted UVs: ", - "start": 16194, - "end": 16211, + "start": 16261, + "end": 16278, "loc": { "start": { - "line": 382, + "line": 384, "column": 24 }, "end": { - "line": 382, + "line": 384, "column": 41 } } @@ -84073,15 +84538,15 @@ "updateContext": null }, "value": "+", - "start": 16212, - "end": 16213, + "start": 16279, + "end": 16280, "loc": { "start": { - "line": 382, + "line": 384, "column": 42 }, "end": { - "line": 382, + "line": 384, "column": 43 } } @@ -84099,15 +84564,15 @@ "binop": null }, "value": "stats", - "start": 16214, - "end": 16219, + "start": 16281, + "end": 16286, "loc": { "start": { - "line": 382, + "line": 384, "column": 44 }, "end": { - "line": 382, + "line": 384, "column": 49 } } @@ -84125,15 +84590,15 @@ "binop": null, "updateContext": null }, - "start": 16219, - "end": 16220, + "start": 16286, + "end": 16287, "loc": { "start": { - "line": 382, + "line": 384, "column": 49 }, "end": { - "line": 382, + "line": 384, "column": 50 } } @@ -84151,15 +84616,15 @@ "binop": null }, "value": "numUVs", - "start": 16220, - "end": 16226, + "start": 16287, + "end": 16293, "loc": { "start": { - "line": 382, + "line": 384, "column": 50 }, "end": { - "line": 382, + "line": 384, "column": 56 } } @@ -84176,15 +84641,15 @@ "postfix": false, "binop": null }, - "start": 16226, - "end": 16227, + "start": 16293, + "end": 16294, "loc": { "start": { - "line": 382, + "line": 384, "column": 56 }, "end": { - "line": 382, + "line": 384, "column": 57 } } @@ -84202,15 +84667,15 @@ "binop": null, "updateContext": null }, - "start": 16227, - "end": 16228, + "start": 16294, + "end": 16295, "loc": { "start": { - "line": 382, + "line": 384, "column": 57 }, "end": { - "line": 382, + "line": 384, "column": 58 } } @@ -84228,15 +84693,15 @@ "binop": null }, "value": "log", - "start": 16249, - "end": 16252, + "start": 16316, + "end": 16319, "loc": { "start": { - "line": 383, + "line": 385, "column": 20 }, "end": { - "line": 383, + "line": 385, "column": 23 } } @@ -84253,15 +84718,15 @@ "postfix": false, "binop": null }, - "start": 16252, - "end": 16253, + "start": 16319, + "end": 16320, "loc": { "start": { - "line": 383, + "line": 385, "column": 23 }, "end": { - "line": 383, + "line": 385, "column": 24 } } @@ -84280,15 +84745,15 @@ "updateContext": null }, "value": "Converted normals: ", - "start": 16253, - "end": 16274, + "start": 16320, + "end": 16341, "loc": { "start": { - "line": 383, + "line": 385, "column": 24 }, "end": { - "line": 383, + "line": 385, "column": 45 } } @@ -84307,15 +84772,15 @@ "updateContext": null }, "value": "+", - "start": 16275, - "end": 16276, + "start": 16342, + "end": 16343, "loc": { "start": { - "line": 383, + "line": 385, "column": 46 }, "end": { - "line": 383, + "line": 385, "column": 47 } } @@ -84333,15 +84798,15 @@ "binop": null }, "value": "stats", - "start": 16277, - "end": 16282, + "start": 16344, + "end": 16349, "loc": { "start": { - "line": 383, + "line": 385, "column": 48 }, "end": { - "line": 383, + "line": 385, "column": 53 } } @@ -84359,15 +84824,15 @@ "binop": null, "updateContext": null }, - "start": 16282, - "end": 16283, + "start": 16349, + "end": 16350, "loc": { "start": { - "line": 383, + "line": 385, "column": 53 }, "end": { - "line": 383, + "line": 385, "column": 54 } } @@ -84385,15 +84850,15 @@ "binop": null }, "value": "numNormals", - "start": 16283, - "end": 16293, + "start": 16350, + "end": 16360, "loc": { "start": { - "line": 383, + "line": 385, "column": 54 }, "end": { - "line": 383, + "line": 385, "column": 64 } } @@ -84410,15 +84875,15 @@ "postfix": false, "binop": null }, - "start": 16293, - "end": 16294, + "start": 16360, + "end": 16361, "loc": { "start": { - "line": 383, + "line": 385, "column": 64 }, "end": { - "line": 383, + "line": 385, "column": 65 } } @@ -84436,15 +84901,15 @@ "binop": null, "updateContext": null }, - "start": 16294, - "end": 16295, + "start": 16361, + "end": 16362, "loc": { "start": { - "line": 383, + "line": 385, "column": 65 }, "end": { - "line": 383, + "line": 385, "column": 66 } } @@ -84462,15 +84927,15 @@ "binop": null }, "value": "log", - "start": 16316, - "end": 16319, + "start": 16383, + "end": 16386, "loc": { "start": { - "line": 384, + "line": 386, "column": 20 }, "end": { - "line": 384, + "line": 386, "column": 23 } } @@ -84487,15 +84952,15 @@ "postfix": false, "binop": null }, - "start": 16319, - "end": 16320, + "start": 16386, + "end": 16387, "loc": { "start": { - "line": 384, + "line": 386, "column": 23 }, "end": { - "line": 384, + "line": 386, "column": 24 } } @@ -84514,15 +84979,15 @@ "updateContext": null }, "value": "minTileSize: ", - "start": 16320, - "end": 16335, + "start": 16387, + "end": 16402, "loc": { "start": { - "line": 384, + "line": 386, "column": 24 }, "end": { - "line": 384, + "line": 386, "column": 39 } } @@ -84541,15 +85006,15 @@ "updateContext": null }, "value": "+", - "start": 16336, - "end": 16337, + "start": 16403, + "end": 16404, "loc": { "start": { - "line": 384, + "line": 386, "column": 40 }, "end": { - "line": 384, + "line": 386, "column": 41 } } @@ -84567,15 +85032,15 @@ "binop": null }, "value": "stats", - "start": 16338, - "end": 16343, + "start": 16405, + "end": 16410, "loc": { "start": { - "line": 384, + "line": 386, "column": 42 }, "end": { - "line": 384, + "line": 386, "column": 47 } } @@ -84593,15 +85058,15 @@ "binop": null, "updateContext": null }, - "start": 16343, - "end": 16344, + "start": 16410, + "end": 16411, "loc": { "start": { - "line": 384, + "line": 386, "column": 47 }, "end": { - "line": 384, + "line": 386, "column": 48 } } @@ -84619,15 +85084,15 @@ "binop": null }, "value": "minTileSize", - "start": 16344, - "end": 16355, + "start": 16411, + "end": 16422, "loc": { "start": { - "line": 384, + "line": 386, "column": 48 }, "end": { - "line": 384, + "line": 386, "column": 59 } } @@ -84644,15 +85109,15 @@ "postfix": false, "binop": null }, - "start": 16355, - "end": 16356, + "start": 16422, + "end": 16423, "loc": { "start": { - "line": 384, + "line": 386, "column": 59 }, "end": { - "line": 384, + "line": 386, "column": 60 } } @@ -84670,15 +85135,15 @@ "binop": null, "updateContext": null }, - "start": 16356, - "end": 16357, + "start": 16423, + "end": 16424, "loc": { "start": { - "line": 384, + "line": 386, "column": 60 }, "end": { - "line": 384, + "line": 386, "column": 61 } } @@ -84698,15 +85163,15 @@ "updateContext": null }, "value": "if", - "start": 16379, - "end": 16381, + "start": 16446, + "end": 16448, "loc": { "start": { - "line": 386, + "line": 388, "column": 20 }, "end": { - "line": 386, + "line": 388, "column": 22 } } @@ -84723,15 +85188,15 @@ "postfix": false, "binop": null }, - "start": 16382, - "end": 16383, + "start": 16449, + "end": 16450, "loc": { "start": { - "line": 386, + "line": 388, "column": 23 }, "end": { - "line": 386, + "line": 388, "column": 24 } } @@ -84749,15 +85214,15 @@ "binop": null }, "value": "output", - "start": 16383, - "end": 16389, + "start": 16450, + "end": 16456, "loc": { "start": { - "line": 386, + "line": 388, "column": 24 }, "end": { - "line": 386, + "line": 388, "column": 30 } } @@ -84774,15 +85239,15 @@ "postfix": false, "binop": null }, - "start": 16389, - "end": 16390, + "start": 16456, + "end": 16457, "loc": { "start": { - "line": 386, + "line": 388, "column": 30 }, "end": { - "line": 386, + "line": 388, "column": 31 } } @@ -84799,15 +85264,15 @@ "postfix": false, "binop": null }, - "start": 16391, - "end": 16392, + "start": 16458, + "end": 16459, "loc": { "start": { - "line": 386, + "line": 388, "column": 32 }, "end": { - "line": 386, + "line": 388, "column": 33 } } @@ -84827,15 +85292,15 @@ "updateContext": null }, "value": "const", - "start": 16417, - "end": 16422, + "start": 16484, + "end": 16489, "loc": { "start": { - "line": 387, + "line": 389, "column": 24 }, "end": { - "line": 387, + "line": 389, "column": 29 } } @@ -84853,15 +85318,15 @@ "binop": null }, "value": "outputDir", - "start": 16423, - "end": 16432, + "start": 16490, + "end": 16499, "loc": { "start": { - "line": 387, + "line": 389, "column": 30 }, "end": { - "line": 387, + "line": 389, "column": 39 } } @@ -84880,15 +85345,15 @@ "updateContext": null }, "value": "=", - "start": 16433, - "end": 16434, + "start": 16500, + "end": 16501, "loc": { "start": { - "line": 387, + "line": 389, "column": 40 }, "end": { - "line": 387, + "line": 389, "column": 41 } } @@ -84906,15 +85371,15 @@ "binop": null }, "value": "getBasePath", - "start": 16435, - "end": 16446, + "start": 16502, + "end": 16513, "loc": { "start": { - "line": 387, + "line": 389, "column": 42 }, "end": { - "line": 387, + "line": 389, "column": 53 } } @@ -84931,15 +85396,15 @@ "postfix": false, "binop": null }, - "start": 16446, - "end": 16447, + "start": 16513, + "end": 16514, "loc": { "start": { - "line": 387, + "line": 389, "column": 53 }, "end": { - "line": 387, + "line": 389, "column": 54 } } @@ -84957,15 +85422,15 @@ "binop": null }, "value": "output", - "start": 16447, - "end": 16453, + "start": 16514, + "end": 16520, "loc": { "start": { - "line": 387, + "line": 389, "column": 54 }, "end": { - "line": 387, + "line": 389, "column": 60 } } @@ -84982,15 +85447,15 @@ "postfix": false, "binop": null }, - "start": 16453, - "end": 16454, + "start": 16520, + "end": 16521, "loc": { "start": { - "line": 387, + "line": 389, "column": 60 }, "end": { - "line": 387, + "line": 389, "column": 61 } } @@ -85008,15 +85473,15 @@ "binop": null, "updateContext": null }, - "start": 16454, - "end": 16455, + "start": 16521, + "end": 16522, "loc": { "start": { - "line": 387, + "line": 389, "column": 61 }, "end": { - "line": 387, + "line": 389, "column": 62 } } @@ -85034,15 +85499,15 @@ "binop": null }, "value": "trim", - "start": 16455, - "end": 16459, + "start": 16522, + "end": 16526, "loc": { "start": { - "line": 387, + "line": 389, "column": 62 }, "end": { - "line": 387, + "line": 389, "column": 66 } } @@ -85059,15 +85524,15 @@ "postfix": false, "binop": null }, - "start": 16459, - "end": 16460, + "start": 16526, + "end": 16527, "loc": { "start": { - "line": 387, + "line": 389, "column": 66 }, "end": { - "line": 387, + "line": 389, "column": 67 } } @@ -85084,15 +85549,15 @@ "postfix": false, "binop": null }, - "start": 16460, - "end": 16461, + "start": 16527, + "end": 16528, "loc": { "start": { - "line": 387, + "line": 389, "column": 67 }, "end": { - "line": 387, + "line": 389, "column": 68 } } @@ -85110,15 +85575,15 @@ "binop": null, "updateContext": null }, - "start": 16461, - "end": 16462, + "start": 16528, + "end": 16529, "loc": { "start": { - "line": 387, + "line": 389, "column": 68 }, "end": { - "line": 387, + "line": 389, "column": 69 } } @@ -85138,15 +85603,15 @@ "updateContext": null }, "value": "if", - "start": 16487, - "end": 16489, + "start": 16554, + "end": 16556, "loc": { "start": { - "line": 388, + "line": 390, "column": 24 }, "end": { - "line": 388, + "line": 390, "column": 26 } } @@ -85163,15 +85628,15 @@ "postfix": false, "binop": null }, - "start": 16490, - "end": 16491, + "start": 16557, + "end": 16558, "loc": { "start": { - "line": 388, + "line": 390, "column": 27 }, "end": { - "line": 388, + "line": 390, "column": 28 } } @@ -85189,15 +85654,15 @@ "binop": null }, "value": "outputDir", - "start": 16491, - "end": 16500, + "start": 16558, + "end": 16567, "loc": { "start": { - "line": 388, + "line": 390, "column": 28 }, "end": { - "line": 388, + "line": 390, "column": 37 } } @@ -85216,15 +85681,15 @@ "updateContext": null }, "value": "!==", - "start": 16501, - "end": 16504, + "start": 16568, + "end": 16571, "loc": { "start": { - "line": 388, + "line": 390, "column": 38 }, "end": { - "line": 388, + "line": 390, "column": 41 } } @@ -85243,15 +85708,15 @@ "updateContext": null }, "value": "", - "start": 16505, - "end": 16507, + "start": 16572, + "end": 16574, "loc": { "start": { - "line": 388, + "line": 390, "column": 42 }, "end": { - "line": 388, + "line": 390, "column": 44 } } @@ -85270,15 +85735,15 @@ "updateContext": null }, "value": "&&", - "start": 16508, - "end": 16510, + "start": 16575, + "end": 16577, "loc": { "start": { - "line": 388, + "line": 390, "column": 45 }, "end": { - "line": 388, + "line": 390, "column": 47 } } @@ -85297,15 +85762,15 @@ "updateContext": null }, "value": "!", - "start": 16511, - "end": 16512, + "start": 16578, + "end": 16579, "loc": { "start": { - "line": 388, + "line": 390, "column": 48 }, "end": { - "line": 388, + "line": 390, "column": 49 } } @@ -85323,15 +85788,15 @@ "binop": null }, "value": "fs", - "start": 16512, - "end": 16514, + "start": 16579, + "end": 16581, "loc": { "start": { - "line": 388, + "line": 390, "column": 49 }, "end": { - "line": 388, + "line": 390, "column": 51 } } @@ -85349,15 +85814,15 @@ "binop": null, "updateContext": null }, - "start": 16514, - "end": 16515, + "start": 16581, + "end": 16582, "loc": { "start": { - "line": 388, + "line": 390, "column": 51 }, "end": { - "line": 388, + "line": 390, "column": 52 } } @@ -85375,15 +85840,15 @@ "binop": null }, "value": "existsSync", - "start": 16515, - "end": 16525, + "start": 16582, + "end": 16592, "loc": { "start": { - "line": 388, + "line": 390, "column": 52 }, "end": { - "line": 388, + "line": 390, "column": 62 } } @@ -85400,15 +85865,15 @@ "postfix": false, "binop": null }, - "start": 16525, - "end": 16526, + "start": 16592, + "end": 16593, "loc": { "start": { - "line": 388, + "line": 390, "column": 62 }, "end": { - "line": 388, + "line": 390, "column": 63 } } @@ -85426,15 +85891,15 @@ "binop": null }, "value": "outputDir", - "start": 16526, - "end": 16535, + "start": 16593, + "end": 16602, "loc": { "start": { - "line": 388, + "line": 390, "column": 63 }, "end": { - "line": 388, + "line": 390, "column": 72 } } @@ -85451,15 +85916,15 @@ "postfix": false, "binop": null }, - "start": 16535, - "end": 16536, + "start": 16602, + "end": 16603, "loc": { "start": { - "line": 388, + "line": 390, "column": 72 }, "end": { - "line": 388, + "line": 390, "column": 73 } } @@ -85476,15 +85941,15 @@ "postfix": false, "binop": null }, - "start": 16536, - "end": 16537, + "start": 16603, + "end": 16604, "loc": { "start": { - "line": 388, + "line": 390, "column": 73 }, "end": { - "line": 388, + "line": 390, "column": 74 } } @@ -85501,15 +85966,15 @@ "postfix": false, "binop": null }, - "start": 16538, - "end": 16539, + "start": 16605, + "end": 16606, "loc": { "start": { - "line": 388, + "line": 390, "column": 75 }, "end": { - "line": 388, + "line": 390, "column": 76 } } @@ -85527,15 +85992,15 @@ "binop": null }, "value": "fs", - "start": 16568, - "end": 16570, + "start": 16635, + "end": 16637, "loc": { "start": { - "line": 389, + "line": 391, "column": 28 }, "end": { - "line": 389, + "line": 391, "column": 30 } } @@ -85553,15 +86018,15 @@ "binop": null, "updateContext": null }, - "start": 16570, - "end": 16571, + "start": 16637, + "end": 16638, "loc": { "start": { - "line": 389, + "line": 391, "column": 30 }, "end": { - "line": 389, + "line": 391, "column": 31 } } @@ -85579,15 +86044,15 @@ "binop": null }, "value": "mkdirSync", - "start": 16571, - "end": 16580, + "start": 16638, + "end": 16647, "loc": { "start": { - "line": 389, + "line": 391, "column": 31 }, "end": { - "line": 389, + "line": 391, "column": 40 } } @@ -85604,15 +86069,15 @@ "postfix": false, "binop": null }, - "start": 16580, - "end": 16581, + "start": 16647, + "end": 16648, "loc": { "start": { - "line": 389, + "line": 391, "column": 40 }, "end": { - "line": 389, + "line": 391, "column": 41 } } @@ -85630,15 +86095,15 @@ "binop": null }, "value": "outputDir", - "start": 16581, - "end": 16590, + "start": 16648, + "end": 16657, "loc": { "start": { - "line": 389, + "line": 391, "column": 41 }, "end": { - "line": 389, + "line": 391, "column": 50 } } @@ -85656,15 +86121,15 @@ "binop": null, "updateContext": null }, - "start": 16590, - "end": 16591, + "start": 16657, + "end": 16658, "loc": { "start": { - "line": 389, + "line": 391, "column": 50 }, "end": { - "line": 389, + "line": 391, "column": 51 } } @@ -85681,15 +86146,15 @@ "postfix": false, "binop": null }, - "start": 16592, - "end": 16593, + "start": 16659, + "end": 16660, "loc": { "start": { - "line": 389, + "line": 391, "column": 52 }, "end": { - "line": 389, + "line": 391, "column": 53 } } @@ -85707,15 +86172,15 @@ "binop": null }, "value": "recursive", - "start": 16593, - "end": 16602, + "start": 16660, + "end": 16669, "loc": { "start": { - "line": 389, + "line": 391, "column": 53 }, "end": { - "line": 389, + "line": 391, "column": 62 } } @@ -85733,15 +86198,15 @@ "binop": null, "updateContext": null }, - "start": 16602, - "end": 16603, + "start": 16669, + "end": 16670, "loc": { "start": { - "line": 389, + "line": 391, "column": 62 }, "end": { - "line": 389, + "line": 391, "column": 63 } } @@ -85761,15 +86226,15 @@ "updateContext": null }, "value": "true", - "start": 16604, - "end": 16608, + "start": 16671, + "end": 16675, "loc": { "start": { - "line": 389, + "line": 391, "column": 64 }, "end": { - "line": 389, + "line": 391, "column": 68 } } @@ -85786,15 +86251,15 @@ "postfix": false, "binop": null }, - "start": 16608, - "end": 16609, + "start": 16675, + "end": 16676, "loc": { "start": { - "line": 389, + "line": 391, "column": 68 }, "end": { - "line": 389, + "line": 391, "column": 69 } } @@ -85811,15 +86276,15 @@ "postfix": false, "binop": null }, - "start": 16609, - "end": 16610, + "start": 16676, + "end": 16677, "loc": { "start": { - "line": 389, + "line": 391, "column": 69 }, "end": { - "line": 389, + "line": 391, "column": 70 } } @@ -85837,15 +86302,15 @@ "binop": null, "updateContext": null }, - "start": 16610, - "end": 16611, + "start": 16677, + "end": 16678, "loc": { "start": { - "line": 389, + "line": 391, "column": 70 }, "end": { - "line": 389, + "line": 391, "column": 71 } } @@ -85862,15 +86327,15 @@ "postfix": false, "binop": null }, - "start": 16636, - "end": 16637, + "start": 16703, + "end": 16704, "loc": { "start": { - "line": 390, + "line": 392, "column": 24 }, "end": { - "line": 390, + "line": 392, "column": 25 } } @@ -85888,15 +86353,15 @@ "binop": null }, "value": "log", - "start": 16662, - "end": 16665, + "start": 16729, + "end": 16732, "loc": { "start": { - "line": 391, + "line": 393, "column": 24 }, "end": { - "line": 391, + "line": 393, "column": 27 } } @@ -85913,15 +86378,15 @@ "postfix": false, "binop": null }, - "start": 16665, - "end": 16666, + "start": 16732, + "end": 16733, "loc": { "start": { - "line": 391, + "line": 393, "column": 27 }, "end": { - "line": 391, + "line": 393, "column": 28 } } @@ -85940,15 +86405,15 @@ "updateContext": null }, "value": "Writing XKT file: ", - "start": 16666, - "end": 16686, + "start": 16733, + "end": 16753, "loc": { "start": { - "line": 391, + "line": 393, "column": 28 }, "end": { - "line": 391, + "line": 393, "column": 48 } } @@ -85967,15 +86432,15 @@ "updateContext": null }, "value": "+", - "start": 16687, - "end": 16688, + "start": 16754, + "end": 16755, "loc": { "start": { - "line": 391, + "line": 393, "column": 49 }, "end": { - "line": 391, + "line": 393, "column": 50 } } @@ -85993,15 +86458,15 @@ "binop": null }, "value": "output", - "start": 16689, - "end": 16695, + "start": 16756, + "end": 16762, "loc": { "start": { - "line": 391, + "line": 393, "column": 51 }, "end": { - "line": 391, + "line": 393, "column": 57 } } @@ -86018,15 +86483,15 @@ "postfix": false, "binop": null }, - "start": 16695, - "end": 16696, + "start": 16762, + "end": 16763, "loc": { "start": { - "line": 391, + "line": 393, "column": 57 }, "end": { - "line": 391, + "line": 393, "column": 58 } } @@ -86044,15 +86509,15 @@ "binop": null, "updateContext": null }, - "start": 16696, - "end": 16697, + "start": 16763, + "end": 16764, "loc": { "start": { - "line": 391, + "line": 393, "column": 58 }, "end": { - "line": 391, + "line": 393, "column": 59 } } @@ -86070,15 +86535,15 @@ "binop": null }, "value": "fs", - "start": 16722, - "end": 16724, + "start": 16789, + "end": 16791, "loc": { "start": { - "line": 392, + "line": 394, "column": 24 }, "end": { - "line": 392, + "line": 394, "column": 26 } } @@ -86096,15 +86561,15 @@ "binop": null, "updateContext": null }, - "start": 16724, - "end": 16725, + "start": 16791, + "end": 16792, "loc": { "start": { - "line": 392, + "line": 394, "column": 26 }, "end": { - "line": 392, + "line": 394, "column": 27 } } @@ -86122,15 +86587,15 @@ "binop": null }, "value": "writeFileSync", - "start": 16725, - "end": 16738, + "start": 16792, + "end": 16805, "loc": { "start": { - "line": 392, + "line": 394, "column": 27 }, "end": { - "line": 392, + "line": 394, "column": 40 } } @@ -86147,15 +86612,15 @@ "postfix": false, "binop": null }, - "start": 16738, - "end": 16739, + "start": 16805, + "end": 16806, "loc": { "start": { - "line": 392, + "line": 394, "column": 40 }, "end": { - "line": 392, + "line": 394, "column": 41 } } @@ -86173,15 +86638,15 @@ "binop": null }, "value": "output", - "start": 16739, - "end": 16745, + "start": 16806, + "end": 16812, "loc": { "start": { - "line": 392, + "line": 394, "column": 41 }, "end": { - "line": 392, + "line": 394, "column": 47 } } @@ -86199,15 +86664,15 @@ "binop": null, "updateContext": null }, - "start": 16745, - "end": 16746, + "start": 16812, + "end": 16813, "loc": { "start": { - "line": 392, + "line": 394, "column": 47 }, "end": { - "line": 392, + "line": 394, "column": 48 } } @@ -86225,15 +86690,15 @@ "binop": null }, "value": "xktContent", - "start": 16747, - "end": 16757, + "start": 16814, + "end": 16824, "loc": { "start": { - "line": 392, + "line": 394, "column": 49 }, "end": { - "line": 392, + "line": 394, "column": 59 } } @@ -86250,15 +86715,15 @@ "postfix": false, "binop": null }, - "start": 16757, - "end": 16758, + "start": 16824, + "end": 16825, "loc": { "start": { - "line": 392, + "line": 394, "column": 59 }, "end": { - "line": 392, + "line": 394, "column": 60 } } @@ -86276,15 +86741,15 @@ "binop": null, "updateContext": null }, - "start": 16758, - "end": 16759, + "start": 16825, + "end": 16826, "loc": { "start": { - "line": 392, + "line": 394, "column": 60 }, "end": { - "line": 392, + "line": 394, "column": 61 } } @@ -86301,15 +86766,15 @@ "postfix": false, "binop": null }, - "start": 16780, - "end": 16781, + "start": 16847, + "end": 16848, "loc": { "start": { - "line": 393, + "line": 395, "column": 20 }, "end": { - "line": 393, + "line": 395, "column": 21 } } @@ -86329,15 +86794,15 @@ "updateContext": null }, "value": "if", - "start": 16803, - "end": 16805, + "start": 16870, + "end": 16872, "loc": { "start": { - "line": 395, + "line": 397, "column": 20 }, "end": { - "line": 395, + "line": 397, "column": 22 } } @@ -86354,15 +86819,15 @@ "postfix": false, "binop": null }, - "start": 16806, - "end": 16807, + "start": 16873, + "end": 16874, "loc": { "start": { - "line": 395, + "line": 397, "column": 23 }, "end": { - "line": 395, + "line": 397, "column": 24 } } @@ -86380,15 +86845,15 @@ "binop": null }, "value": "outputXKTModel", - "start": 16807, - "end": 16821, + "start": 16874, + "end": 16888, "loc": { "start": { - "line": 395, + "line": 397, "column": 24 }, "end": { - "line": 395, + "line": 397, "column": 38 } } @@ -86405,15 +86870,15 @@ "postfix": false, "binop": null }, - "start": 16821, - "end": 16822, + "start": 16888, + "end": 16889, "loc": { "start": { - "line": 395, + "line": 397, "column": 38 }, "end": { - "line": 395, + "line": 397, "column": 39 } } @@ -86430,15 +86895,15 @@ "postfix": false, "binop": null }, - "start": 16823, - "end": 16824, + "start": 16890, + "end": 16891, "loc": { "start": { - "line": 395, + "line": 397, "column": 40 }, "end": { - "line": 395, + "line": 397, "column": 41 } } @@ -86456,15 +86921,15 @@ "binop": null }, "value": "outputXKTModel", - "start": 16849, - "end": 16863, + "start": 16916, + "end": 16930, "loc": { "start": { - "line": 396, + "line": 398, "column": 24 }, "end": { - "line": 396, + "line": 398, "column": 38 } } @@ -86481,15 +86946,15 @@ "postfix": false, "binop": null }, - "start": 16863, - "end": 16864, + "start": 16930, + "end": 16931, "loc": { "start": { - "line": 396, + "line": 398, "column": 38 }, "end": { - "line": 396, + "line": 398, "column": 39 } } @@ -86507,15 +86972,15 @@ "binop": null }, "value": "xktModel", - "start": 16864, - "end": 16872, + "start": 16931, + "end": 16939, "loc": { "start": { - "line": 396, + "line": 398, "column": 39 }, "end": { - "line": 396, + "line": 398, "column": 47 } } @@ -86532,15 +86997,15 @@ "postfix": false, "binop": null }, - "start": 16872, - "end": 16873, + "start": 16939, + "end": 16940, "loc": { "start": { - "line": 396, + "line": 398, "column": 47 }, "end": { - "line": 396, + "line": 398, "column": 48 } } @@ -86558,15 +87023,15 @@ "binop": null, "updateContext": null }, - "start": 16873, - "end": 16874, + "start": 16940, + "end": 16941, "loc": { "start": { - "line": 396, + "line": 398, "column": 48 }, "end": { - "line": 396, + "line": 398, "column": 49 } } @@ -86583,15 +87048,15 @@ "postfix": false, "binop": null }, - "start": 16895, - "end": 16896, + "start": 16962, + "end": 16963, "loc": { "start": { - "line": 397, + "line": 399, "column": 20 }, "end": { - "line": 397, + "line": 399, "column": 21 } } @@ -86611,15 +87076,15 @@ "updateContext": null }, "value": "if", - "start": 16918, - "end": 16920, + "start": 16985, + "end": 16987, "loc": { "start": { - "line": 399, + "line": 401, "column": 20 }, "end": { - "line": 399, + "line": 401, "column": 22 } } @@ -86636,15 +87101,15 @@ "postfix": false, "binop": null }, - "start": 16921, - "end": 16922, + "start": 16988, + "end": 16989, "loc": { "start": { - "line": 399, + "line": 401, "column": 23 }, "end": { - "line": 399, + "line": 401, "column": 24 } } @@ -86662,15 +87127,15 @@ "binop": null }, "value": "outputXKT", - "start": 16922, - "end": 16931, + "start": 16989, + "end": 16998, "loc": { "start": { - "line": 399, + "line": 401, "column": 24 }, "end": { - "line": 399, + "line": 401, "column": 33 } } @@ -86687,15 +87152,15 @@ "postfix": false, "binop": null }, - "start": 16931, - "end": 16932, + "start": 16998, + "end": 16999, "loc": { "start": { - "line": 399, + "line": 401, "column": 33 }, "end": { - "line": 399, + "line": 401, "column": 34 } } @@ -86712,15 +87177,15 @@ "postfix": false, "binop": null }, - "start": 16933, - "end": 16934, + "start": 17000, + "end": 17001, "loc": { "start": { - "line": 399, + "line": 401, "column": 35 }, "end": { - "line": 399, + "line": 401, "column": 36 } } @@ -86738,15 +87203,15 @@ "binop": null }, "value": "outputXKT", - "start": 16959, - "end": 16968, + "start": 17026, + "end": 17035, "loc": { "start": { - "line": 400, + "line": 402, "column": 24 }, "end": { - "line": 400, + "line": 402, "column": 33 } } @@ -86763,15 +87228,15 @@ "postfix": false, "binop": null }, - "start": 16968, - "end": 16969, + "start": 17035, + "end": 17036, "loc": { "start": { - "line": 400, + "line": 402, "column": 33 }, "end": { - "line": 400, + "line": 402, "column": 34 } } @@ -86789,15 +87254,15 @@ "binop": null }, "value": "xktContent", - "start": 16969, - "end": 16979, + "start": 17036, + "end": 17046, "loc": { "start": { - "line": 400, + "line": 402, "column": 34 }, "end": { - "line": 400, + "line": 402, "column": 44 } } @@ -86814,15 +87279,15 @@ "postfix": false, "binop": null }, - "start": 16979, - "end": 16980, + "start": 17046, + "end": 17047, "loc": { "start": { - "line": 400, + "line": 402, "column": 44 }, "end": { - "line": 400, + "line": 402, "column": 45 } } @@ -86840,15 +87305,15 @@ "binop": null, "updateContext": null }, - "start": 16980, - "end": 16981, + "start": 17047, + "end": 17048, "loc": { "start": { - "line": 400, + "line": 402, "column": 45 }, "end": { - "line": 400, + "line": 402, "column": 46 } } @@ -86865,15 +87330,15 @@ "postfix": false, "binop": null }, - "start": 17002, - "end": 17003, + "start": 17069, + "end": 17070, "loc": { "start": { - "line": 401, + "line": 403, "column": 20 }, "end": { - "line": 401, + "line": 403, "column": 21 } } @@ -86893,15 +87358,15 @@ "updateContext": null }, "value": "if", - "start": 17025, - "end": 17027, + "start": 17092, + "end": 17094, "loc": { "start": { - "line": 403, + "line": 405, "column": 20 }, "end": { - "line": 403, + "line": 405, "column": 22 } } @@ -86918,15 +87383,15 @@ "postfix": false, "binop": null }, - "start": 17028, - "end": 17029, + "start": 17095, + "end": 17096, "loc": { "start": { - "line": 403, + "line": 405, "column": 23 }, "end": { - "line": 403, + "line": 405, "column": 24 } } @@ -86944,15 +87409,15 @@ "binop": null }, "value": "outputStats", - "start": 17029, - "end": 17040, + "start": 17096, + "end": 17107, "loc": { "start": { - "line": 403, + "line": 405, "column": 24 }, "end": { - "line": 403, + "line": 405, "column": 35 } } @@ -86969,15 +87434,15 @@ "postfix": false, "binop": null }, - "start": 17040, - "end": 17041, + "start": 17107, + "end": 17108, "loc": { "start": { - "line": 403, + "line": 405, "column": 35 }, "end": { - "line": 403, + "line": 405, "column": 36 } } @@ -86994,15 +87459,15 @@ "postfix": false, "binop": null }, - "start": 17042, - "end": 17043, + "start": 17109, + "end": 17110, "loc": { "start": { - "line": 403, + "line": 405, "column": 37 }, "end": { - "line": 403, + "line": 405, "column": 38 } } @@ -87020,15 +87485,15 @@ "binop": null }, "value": "outputStats", - "start": 17068, - "end": 17079, + "start": 17135, + "end": 17146, "loc": { "start": { - "line": 404, + "line": 406, "column": 24 }, "end": { - "line": 404, + "line": 406, "column": 35 } } @@ -87045,15 +87510,15 @@ "postfix": false, "binop": null }, - "start": 17079, - "end": 17080, + "start": 17146, + "end": 17147, "loc": { "start": { - "line": 404, + "line": 406, "column": 35 }, "end": { - "line": 404, + "line": 406, "column": 36 } } @@ -87071,15 +87536,15 @@ "binop": null }, "value": "stats", - "start": 17080, - "end": 17085, + "start": 17147, + "end": 17152, "loc": { "start": { - "line": 404, + "line": 406, "column": 36 }, "end": { - "line": 404, + "line": 406, "column": 41 } } @@ -87096,15 +87561,15 @@ "postfix": false, "binop": null }, - "start": 17085, - "end": 17086, + "start": 17152, + "end": 17153, "loc": { "start": { - "line": 404, + "line": 406, "column": 41 }, "end": { - "line": 404, + "line": 406, "column": 42 } } @@ -87122,15 +87587,15 @@ "binop": null, "updateContext": null }, - "start": 17086, - "end": 17087, + "start": 17153, + "end": 17154, "loc": { "start": { - "line": 404, + "line": 406, "column": 42 }, "end": { - "line": 404, + "line": 406, "column": 43 } } @@ -87147,15 +87612,15 @@ "postfix": false, "binop": null }, - "start": 17108, - "end": 17109, + "start": 17175, + "end": 17176, "loc": { "start": { - "line": 405, + "line": 407, "column": 20 }, "end": { - "line": 405, + "line": 407, "column": 21 } } @@ -87173,15 +87638,15 @@ "binop": null }, "value": "resolve", - "start": 17131, - "end": 17138, + "start": 17198, + "end": 17205, "loc": { "start": { - "line": 407, + "line": 409, "column": 20 }, "end": { - "line": 407, + "line": 409, "column": 27 } } @@ -87198,15 +87663,15 @@ "postfix": false, "binop": null }, - "start": 17138, - "end": 17139, + "start": 17205, + "end": 17206, "loc": { "start": { - "line": 407, + "line": 409, "column": 27 }, "end": { - "line": 407, + "line": 409, "column": 28 } } @@ -87223,15 +87688,15 @@ "postfix": false, "binop": null }, - "start": 17139, - "end": 17140, + "start": 17206, + "end": 17207, "loc": { "start": { - "line": 407, + "line": 409, "column": 28 }, "end": { - "line": 407, + "line": 409, "column": 29 } } @@ -87249,15 +87714,15 @@ "binop": null, "updateContext": null }, - "start": 17140, - "end": 17141, + "start": 17207, + "end": 17208, "loc": { "start": { - "line": 407, + "line": 409, "column": 29 }, "end": { - "line": 407, + "line": 409, "column": 30 } } @@ -87274,15 +87739,15 @@ "postfix": false, "binop": null }, - "start": 17158, - "end": 17159, + "start": 17225, + "end": 17226, "loc": { "start": { - "line": 408, + "line": 410, "column": 16 }, "end": { - "line": 408, + "line": 410, "column": 17 } } @@ -87299,15 +87764,15 @@ "postfix": false, "binop": null }, - "start": 17159, - "end": 17160, + "start": 17226, + "end": 17227, "loc": { "start": { - "line": 408, + "line": 410, "column": 17 }, "end": { - "line": 408, + "line": 410, "column": 18 } } @@ -87325,15 +87790,15 @@ "binop": null, "updateContext": null }, - "start": 17160, - "end": 17161, + "start": 17227, + "end": 17228, "loc": { "start": { - "line": 408, + "line": 410, "column": 18 }, "end": { - "line": 408, + "line": 410, "column": 19 } } @@ -87350,15 +87815,15 @@ "postfix": false, "binop": null }, - "start": 17174, - "end": 17175, + "start": 17241, + "end": 17242, "loc": { "start": { - "line": 409, + "line": 411, "column": 12 }, "end": { - "line": 409, + "line": 411, "column": 13 } } @@ -87376,15 +87841,15 @@ "binop": null, "updateContext": null }, - "start": 17175, - "end": 17176, + "start": 17242, + "end": 17243, "loc": { "start": { - "line": 409, + "line": 411, "column": 13 }, "end": { - "line": 409, + "line": 411, "column": 14 } } @@ -87401,15 +87866,15 @@ "postfix": false, "binop": null }, - "start": 17177, - "end": 17178, + "start": 17244, + "end": 17245, "loc": { "start": { - "line": 409, + "line": 411, "column": 15 }, "end": { - "line": 409, + "line": 411, "column": 16 } } @@ -87427,15 +87892,15 @@ "binop": null }, "value": "err", - "start": 17178, - "end": 17181, + "start": 17245, + "end": 17248, "loc": { "start": { - "line": 409, + "line": 411, "column": 16 }, "end": { - "line": 409, + "line": 411, "column": 19 } } @@ -87452,15 +87917,15 @@ "postfix": false, "binop": null }, - "start": 17181, - "end": 17182, + "start": 17248, + "end": 17249, "loc": { "start": { - "line": 409, + "line": 411, "column": 19 }, "end": { - "line": 409, + "line": 411, "column": 20 } } @@ -87478,15 +87943,15 @@ "binop": null, "updateContext": null }, - "start": 17183, - "end": 17185, + "start": 17250, + "end": 17252, "loc": { "start": { - "line": 409, + "line": 411, "column": 21 }, "end": { - "line": 409, + "line": 411, "column": 23 } } @@ -87503,15 +87968,15 @@ "postfix": false, "binop": null }, - "start": 17186, - "end": 17187, + "start": 17253, + "end": 17254, "loc": { "start": { - "line": 409, + "line": 411, "column": 24 }, "end": { - "line": 409, + "line": 411, "column": 25 } } @@ -87529,15 +87994,15 @@ "binop": null }, "value": "reject", - "start": 17204, - "end": 17210, + "start": 17271, + "end": 17277, "loc": { "start": { - "line": 410, + "line": 412, "column": 16 }, "end": { - "line": 410, + "line": 412, "column": 22 } } @@ -87554,15 +88019,15 @@ "postfix": false, "binop": null }, - "start": 17210, - "end": 17211, + "start": 17277, + "end": 17278, "loc": { "start": { - "line": 410, + "line": 412, "column": 22 }, "end": { - "line": 410, + "line": 412, "column": 23 } } @@ -87580,15 +88045,15 @@ "binop": null }, "value": "err", - "start": 17211, - "end": 17214, + "start": 17278, + "end": 17281, "loc": { "start": { - "line": 410, + "line": 412, "column": 23 }, "end": { - "line": 410, + "line": 412, "column": 26 } } @@ -87605,15 +88070,15 @@ "postfix": false, "binop": null }, - "start": 17214, - "end": 17215, + "start": 17281, + "end": 17282, "loc": { "start": { - "line": 410, + "line": 412, "column": 26 }, "end": { - "line": 410, + "line": 412, "column": 27 } } @@ -87631,15 +88096,15 @@ "binop": null, "updateContext": null }, - "start": 17215, - "end": 17216, + "start": 17282, + "end": 17283, "loc": { "start": { - "line": 410, + "line": 412, "column": 27 }, "end": { - "line": 410, + "line": 412, "column": 28 } } @@ -87656,15 +88121,15 @@ "postfix": false, "binop": null }, - "start": 17229, - "end": 17230, + "start": 17296, + "end": 17297, "loc": { "start": { - "line": 411, + "line": 413, "column": 12 }, "end": { - "line": 411, + "line": 413, "column": 13 } } @@ -87681,15 +88146,15 @@ "postfix": false, "binop": null }, - "start": 17230, - "end": 17231, + "start": 17297, + "end": 17298, "loc": { "start": { - "line": 411, + "line": 413, "column": 13 }, "end": { - "line": 411, + "line": 413, "column": 14 } } @@ -87707,15 +88172,15 @@ "binop": null, "updateContext": null }, - "start": 17231, - "end": 17232, + "start": 17298, + "end": 17299, "loc": { "start": { - "line": 411, + "line": 413, "column": 14 }, "end": { - "line": 411, + "line": 413, "column": 15 } } @@ -87732,15 +88197,15 @@ "postfix": false, "binop": null }, - "start": 17241, - "end": 17242, + "start": 17308, + "end": 17309, "loc": { "start": { - "line": 412, + "line": 414, "column": 8 }, "end": { - "line": 412, + "line": 414, "column": 9 } } @@ -87757,15 +88222,15 @@ "postfix": false, "binop": null }, - "start": 17247, - "end": 17248, + "start": 17314, + "end": 17315, "loc": { "start": { - "line": 413, + "line": 415, "column": 4 }, "end": { - "line": 413, + "line": 415, "column": 5 } } @@ -87782,15 +88247,15 @@ "postfix": false, "binop": null }, - "start": 17248, - "end": 17249, + "start": 17315, + "end": 17316, "loc": { "start": { - "line": 413, + "line": 415, "column": 5 }, "end": { - "line": 413, + "line": 415, "column": 6 } } @@ -87808,15 +88273,15 @@ "binop": null, "updateContext": null }, - "start": 17249, - "end": 17250, + "start": 17316, + "end": 17317, "loc": { "start": { - "line": 413, + "line": 415, "column": 6 }, "end": { - "line": 413, + "line": 415, "column": 7 } } @@ -87833,15 +88298,15 @@ "postfix": false, "binop": null }, - "start": 17251, - "end": 17252, + "start": 17318, + "end": 17319, "loc": { "start": { - "line": 414, + "line": 416, "column": 0 }, "end": { - "line": 414, + "line": 416, "column": 1 } } @@ -87860,15 +88325,15 @@ "binop": null }, "value": "function", - "start": 17254, - "end": 17262, + "start": 17321, + "end": 17329, "loc": { "start": { - "line": 416, + "line": 418, "column": 0 }, "end": { - "line": 416, + "line": 418, "column": 8 } } @@ -87886,15 +88351,15 @@ "binop": null }, "value": "getBasePath", - "start": 17263, - "end": 17274, + "start": 17330, + "end": 17341, "loc": { "start": { - "line": 416, + "line": 418, "column": 9 }, "end": { - "line": 416, + "line": 418, "column": 20 } } @@ -87911,15 +88376,15 @@ "postfix": false, "binop": null }, - "start": 17274, - "end": 17275, + "start": 17341, + "end": 17342, "loc": { "start": { - "line": 416, + "line": 418, "column": 20 }, "end": { - "line": 416, + "line": 418, "column": 21 } } @@ -87937,15 +88402,15 @@ "binop": null }, "value": "src", - "start": 17275, - "end": 17278, + "start": 17342, + "end": 17345, "loc": { "start": { - "line": 416, + "line": 418, "column": 21 }, "end": { - "line": 416, + "line": 418, "column": 24 } } @@ -87962,15 +88427,15 @@ "postfix": false, "binop": null }, - "start": 17278, - "end": 17279, + "start": 17345, + "end": 17346, "loc": { "start": { - "line": 416, + "line": 418, "column": 24 }, "end": { - "line": 416, + "line": 418, "column": 25 } } @@ -87987,15 +88452,15 @@ "postfix": false, "binop": null }, - "start": 17280, - "end": 17281, + "start": 17347, + "end": 17348, "loc": { "start": { - "line": 416, + "line": 418, "column": 26 }, "end": { - "line": 416, + "line": 418, "column": 27 } } @@ -88015,15 +88480,15 @@ "updateContext": null }, "value": "const", - "start": 17286, - "end": 17291, + "start": 17353, + "end": 17358, "loc": { "start": { - "line": 417, + "line": 419, "column": 4 }, "end": { - "line": 417, + "line": 419, "column": 9 } } @@ -88041,15 +88506,15 @@ "binop": null }, "value": "i", - "start": 17292, - "end": 17293, + "start": 17359, + "end": 17360, "loc": { "start": { - "line": 417, + "line": 419, "column": 10 }, "end": { - "line": 417, + "line": 419, "column": 11 } } @@ -88068,15 +88533,15 @@ "updateContext": null }, "value": "=", - "start": 17294, - "end": 17295, + "start": 17361, + "end": 17362, "loc": { "start": { - "line": 417, + "line": 419, "column": 12 }, "end": { - "line": 417, + "line": 419, "column": 13 } } @@ -88094,15 +88559,15 @@ "binop": null }, "value": "src", - "start": 17296, - "end": 17299, + "start": 17363, + "end": 17366, "loc": { "start": { - "line": 417, + "line": 419, "column": 14 }, "end": { - "line": 417, + "line": 419, "column": 17 } } @@ -88120,15 +88585,15 @@ "binop": null, "updateContext": null }, - "start": 17299, - "end": 17300, + "start": 17366, + "end": 17367, "loc": { "start": { - "line": 417, + "line": 419, "column": 17 }, "end": { - "line": 417, + "line": 419, "column": 18 } } @@ -88146,15 +88611,15 @@ "binop": null }, "value": "lastIndexOf", - "start": 17300, - "end": 17311, + "start": 17367, + "end": 17378, "loc": { "start": { - "line": 417, + "line": 419, "column": 18 }, "end": { - "line": 417, + "line": 419, "column": 29 } } @@ -88171,15 +88636,15 @@ "postfix": false, "binop": null }, - "start": 17311, - "end": 17312, + "start": 17378, + "end": 17379, "loc": { "start": { - "line": 417, + "line": 419, "column": 29 }, "end": { - "line": 417, + "line": 419, "column": 30 } } @@ -88198,15 +88663,15 @@ "updateContext": null }, "value": "/", - "start": 17312, - "end": 17315, + "start": 17379, + "end": 17382, "loc": { "start": { - "line": 417, + "line": 419, "column": 30 }, "end": { - "line": 417, + "line": 419, "column": 33 } } @@ -88223,15 +88688,15 @@ "postfix": false, "binop": null }, - "start": 17315, - "end": 17316, + "start": 17382, + "end": 17383, "loc": { "start": { - "line": 417, + "line": 419, "column": 33 }, "end": { - "line": 417, + "line": 419, "column": 34 } } @@ -88249,15 +88714,15 @@ "binop": null, "updateContext": null }, - "start": 17316, - "end": 17317, + "start": 17383, + "end": 17384, "loc": { "start": { - "line": 417, + "line": 419, "column": 34 }, "end": { - "line": 417, + "line": 419, "column": 35 } } @@ -88277,15 +88742,15 @@ "updateContext": null }, "value": "return", - "start": 17322, - "end": 17328, + "start": 17389, + "end": 17395, "loc": { "start": { - "line": 418, + "line": 420, "column": 4 }, "end": { - "line": 418, + "line": 420, "column": 10 } } @@ -88302,15 +88767,15 @@ "postfix": false, "binop": null }, - "start": 17329, - "end": 17330, + "start": 17396, + "end": 17397, "loc": { "start": { - "line": 418, + "line": 420, "column": 11 }, "end": { - "line": 418, + "line": 420, "column": 12 } } @@ -88328,15 +88793,15 @@ "binop": null }, "value": "i", - "start": 17330, - "end": 17331, + "start": 17397, + "end": 17398, "loc": { "start": { - "line": 418, + "line": 420, "column": 12 }, "end": { - "line": 418, + "line": 420, "column": 13 } } @@ -88355,15 +88820,15 @@ "updateContext": null }, "value": "!==", - "start": 17332, - "end": 17335, + "start": 17399, + "end": 17402, "loc": { "start": { - "line": 418, + "line": 420, "column": 14 }, "end": { - "line": 418, + "line": 420, "column": 17 } } @@ -88382,15 +88847,15 @@ "updateContext": null }, "value": 0, - "start": 17336, - "end": 17337, + "start": 17403, + "end": 17404, "loc": { "start": { - "line": 418, + "line": 420, "column": 18 }, "end": { - "line": 418, + "line": 420, "column": 19 } } @@ -88407,15 +88872,15 @@ "postfix": false, "binop": null }, - "start": 17337, - "end": 17338, + "start": 17404, + "end": 17405, "loc": { "start": { - "line": 418, + "line": 420, "column": 19 }, "end": { - "line": 418, + "line": 420, "column": 20 } } @@ -88433,15 +88898,15 @@ "binop": null, "updateContext": null }, - "start": 17339, - "end": 17340, + "start": 17406, + "end": 17407, "loc": { "start": { - "line": 418, + "line": 420, "column": 21 }, "end": { - "line": 418, + "line": 420, "column": 22 } } @@ -88459,15 +88924,15 @@ "binop": null }, "value": "src", - "start": 17341, - "end": 17344, + "start": 17408, + "end": 17411, "loc": { "start": { - "line": 418, + "line": 420, "column": 23 }, "end": { - "line": 418, + "line": 420, "column": 26 } } @@ -88485,15 +88950,15 @@ "binop": null, "updateContext": null }, - "start": 17344, - "end": 17345, + "start": 17411, + "end": 17412, "loc": { "start": { - "line": 418, + "line": 420, "column": 26 }, "end": { - "line": 418, + "line": 420, "column": 27 } } @@ -88511,15 +88976,15 @@ "binop": null }, "value": "substring", - "start": 17345, - "end": 17354, + "start": 17412, + "end": 17421, "loc": { "start": { - "line": 418, + "line": 420, "column": 27 }, "end": { - "line": 418, + "line": 420, "column": 36 } } @@ -88536,15 +89001,15 @@ "postfix": false, "binop": null }, - "start": 17354, - "end": 17355, + "start": 17421, + "end": 17422, "loc": { "start": { - "line": 418, + "line": 420, "column": 36 }, "end": { - "line": 418, + "line": 420, "column": 37 } } @@ -88563,15 +89028,15 @@ "updateContext": null }, "value": 0, - "start": 17355, - "end": 17356, + "start": 17422, + "end": 17423, "loc": { "start": { - "line": 418, + "line": 420, "column": 37 }, "end": { - "line": 418, + "line": 420, "column": 38 } } @@ -88589,15 +89054,15 @@ "binop": null, "updateContext": null }, - "start": 17356, - "end": 17357, + "start": 17423, + "end": 17424, "loc": { "start": { - "line": 418, + "line": 420, "column": 38 }, "end": { - "line": 418, + "line": 420, "column": 39 } } @@ -88615,15 +89080,15 @@ "binop": null }, "value": "i", - "start": 17358, - "end": 17359, + "start": 17425, + "end": 17426, "loc": { "start": { - "line": 418, + "line": 420, "column": 40 }, "end": { - "line": 418, + "line": 420, "column": 41 } } @@ -88642,15 +89107,15 @@ "updateContext": null }, "value": "+", - "start": 17360, - "end": 17361, + "start": 17427, + "end": 17428, "loc": { "start": { - "line": 418, + "line": 420, "column": 42 }, "end": { - "line": 418, + "line": 420, "column": 43 } } @@ -88669,15 +89134,15 @@ "updateContext": null }, "value": 1, - "start": 17362, - "end": 17363, + "start": 17429, + "end": 17430, "loc": { "start": { - "line": 418, + "line": 420, "column": 44 }, "end": { - "line": 418, + "line": 420, "column": 45 } } @@ -88694,15 +89159,15 @@ "postfix": false, "binop": null }, - "start": 17363, - "end": 17364, + "start": 17430, + "end": 17431, "loc": { "start": { - "line": 418, + "line": 420, "column": 45 }, "end": { - "line": 418, + "line": 420, "column": 46 } } @@ -88720,15 +89185,15 @@ "binop": null, "updateContext": null }, - "start": 17365, - "end": 17366, + "start": 17432, + "end": 17433, "loc": { "start": { - "line": 418, + "line": 420, "column": 47 }, "end": { - "line": 418, + "line": 420, "column": 48 } } @@ -88747,15 +89212,15 @@ "updateContext": null }, "value": "", - "start": 17367, - "end": 17369, + "start": 17434, + "end": 17436, "loc": { "start": { - "line": 418, + "line": 420, "column": 49 }, "end": { - "line": 418, + "line": 420, "column": 51 } } @@ -88773,15 +89238,15 @@ "binop": null, "updateContext": null }, - "start": 17369, - "end": 17370, + "start": 17436, + "end": 17437, "loc": { "start": { - "line": 418, + "line": 420, "column": 51 }, "end": { - "line": 418, + "line": 420, "column": 52 } } @@ -88798,15 +89263,15 @@ "postfix": false, "binop": null }, - "start": 17371, - "end": 17372, + "start": 17438, + "end": 17439, "loc": { "start": { - "line": 419, + "line": 421, "column": 0 }, "end": { - "line": 419, + "line": 421, "column": 1 } } @@ -88826,15 +89291,15 @@ "updateContext": null }, "value": "export", - "start": 17374, - "end": 17380, + "start": 17441, + "end": 17447, "loc": { "start": { - "line": 421, + "line": 423, "column": 0 }, "end": { - "line": 421, + "line": 423, "column": 6 } } @@ -88851,15 +89316,15 @@ "postfix": false, "binop": null }, - "start": 17381, - "end": 17382, + "start": 17448, + "end": 17449, "loc": { "start": { - "line": 421, + "line": 423, "column": 7 }, "end": { - "line": 421, + "line": 423, "column": 8 } } @@ -88877,15 +89342,15 @@ "binop": null }, "value": "convert2xkt", - "start": 17382, - "end": 17393, + "start": 17449, + "end": 17460, "loc": { "start": { - "line": 421, + "line": 423, "column": 8 }, "end": { - "line": 421, + "line": 423, "column": 19 } } @@ -88902,15 +89367,15 @@ "postfix": false, "binop": null }, - "start": 17393, - "end": 17394, + "start": 17460, + "end": 17461, "loc": { "start": { - "line": 421, + "line": 423, "column": 19 }, "end": { - "line": 421, + "line": 423, "column": 20 } } @@ -88928,15 +89393,15 @@ "binop": null, "updateContext": null }, - "start": 17394, - "end": 17395, + "start": 17461, + "end": 17462, "loc": { "start": { - "line": 421, + "line": 423, "column": 20 }, "end": { - "line": 421, + "line": 423, "column": 21 } } @@ -88954,15 +89419,15 @@ "binop": null, "updateContext": null }, - "start": 17395, - "end": 17395, + "start": 17462, + "end": 17462, "loc": { "start": { - "line": 421, + "line": 423, "column": 21 }, "end": { - "line": 421, + "line": 423, "column": 21 } } diff --git a/docs/coverage.json b/docs/coverage.json index 81f7d2c..470614c 100644 --- a/docs/coverage.json +++ b/docs/coverage.json @@ -229,7 +229,7 @@ "expectCount": 2, "actualCount": 1, "undocumentLines": [ - 416 + 418 ] }, "src/geometryBuilders/buildBoxGeometry.js": { diff --git a/docs/file/src/convert2xkt.js.html b/docs/file/src/convert2xkt.js.html index 89671ea..6502ebb 100644 --- a/docs/file/src/convert2xkt.js.html +++ b/docs/file/src/convert2xkt.js.html @@ -263,6 +263,8 @@ reject(err); return; } + } else { + log(`Not embedding metadata in XKT`); } let metaModelJSON; diff --git a/docs/index.json b/docs/index.json index e3d8e81..27f1c45 100644 --- a/docs/index.json +++ b/docs/index.json @@ -7890,7 +7890,7 @@ "__docId__": 326, "kind": "file", "name": "src/convert2xkt.js", - "content": "import {XKT_INFO} from \"./XKT_INFO.js\";\nimport {XKTModel} from \"./XKTModel/XKTModel.js\";\nimport {parseCityJSONIntoXKTModel} from \"./parsers/parseCityJSONIntoXKTModel.js\";\nimport {parseGLTFIntoXKTModel} from \"./parsers/parseGLTFIntoXKTModel.js\";\nimport {parseIFCIntoXKTModel} from \"./parsers/parseIFCIntoXKTModel.js\";\nimport {parseLASIntoXKTModel} from \"./parsers/parseLASIntoXKTModel.js\";\nimport {parsePCDIntoXKTModel} from \"./parsers/parsePCDIntoXKTModel.js\";\nimport {parsePLYIntoXKTModel} from \"./parsers/parsePLYIntoXKTModel.js\";\nimport {parseSTLIntoXKTModel} from \"./parsers/parseSTLIntoXKTModel.js\";\nimport {writeXKTModelToArrayBuffer} from \"./XKTModel/writeXKTModelToArrayBuffer.js\";\n\nimport {toArrayBuffer} from \"./XKTModel/lib/toArraybuffer\";\nimport {parseGLTFJSONIntoXKTModel} from \"./parsers/parseGLTFJSONIntoXKTModel\";\n\nconst fs = require('fs');\n\n/**\n * Converts model files into xeokit's native XKT format.\n *\n * Supported source formats are: IFC, CityJSON, glTF, LAZ and LAS.\n *\n * **Only bundled in xeokit-convert.cjs.js.**\n *\n * ## Usage\n *\n * ````javascript\n * const convert2xkt = require(\"@xeokit/xeokit-convert/dist/convert2xkt.cjs.js\");\n * const fs = require('fs');\n *\n * convert2xkt({\n * sourceData: fs.readFileSync(\"rme_advanced_sample_project.ifc\"),\n * outputXKT: (xtkArrayBuffer) => {\n * fs.writeFileSync(\"rme_advanced_sample_project.ifc.xkt\", xtkArrayBuffer);\n * }\n * }).then(() => {\n * console.log(\"Converted.\");\n * }, (errMsg) => {\n * console.error(\"Conversion failed: \" + errMsg)\n * });\n ````\n * @param {Object} params Conversion parameters.\n * @param {Object} params.WebIFC The WebIFC library. We pass this in as an external dependency, in order to give the\n * caller the choice of whether to use the Browser or NodeJS version.\n * @param {*} [params.configs] Configurations.\n * @param {String} [params.source] Path to source file. Alternative to ````sourceData````.\n * @param {ArrayBuffer|JSON} [params.sourceData] Source file data. Alternative to ````source````.\n * @param {String} [params.sourceFormat] Format of source file/data. Always needed with ````sourceData````, but not normally needed with ````source````, because convert2xkt will determine the format automatically from the file extension of ````source````.\n * @param {String} [params.metaModelDataStr] Source file data. Overrides metadata from ````metaModelSource````, ````sourceData```` and ````source````.\n * @param {String} [params.metaModelSource] Path to source metaModel file. Overrides metadata from ````sourceData```` and ````source````. Overridden by ````metaModelData````.\n * @param {String} [params.output] Path to destination XKT file. Directories on this path are automatically created if not existing.\n * @param {Function} [params.outputXKTModel] Callback to collect the ````XKTModel```` that is internally build by this method.\n * @param {Function} [params.outputXKT] Callback to collect XKT file data.\n * @param {String[]} [params.includeTypes] Option to only convert objects of these types.\n * @param {String[]} [params.excludeTypes] Option to never convert objects of these types.\n * @param {Object} [stats] Collects conversion statistics. Statistics are attached to this object if provided.\n * @param {Function} [params.outputStats] Callback to collect statistics.\n * @param {Boolean} [params.rotateX=false] Whether to rotate the model 90 degrees about the X axis to make the Y axis \"up\", if necessary. Applies to CityJSON and LAS/LAZ models.\n * @param {Boolean} [params.reuseGeometries=true] When true, will enable geometry reuse within the XKT. When false,\n * will automatically \"expand\" all reused geometries into duplicate copies. This has the drawback of increasing the XKT\n * file size (~10-30% for typical models), but can make the model more responsive in the xeokit Viewer, especially if the model\n * has excessive geometry reuse. An example of excessive geometry reuse would be when a model (eg. glTF) has 4000 geometries that are\n * shared amongst 2000 objects, ie. a large number of geometries with a low amount of reuse, which can present a\n * pathological performance case for xeokit's underlying graphics APIs (WebGL, WebGPU etc).\n * @param {Boolean} [params.includeTextures=true] Whether to convert textures. Only works for ````glTF```` models.\n * @param {Boolean} [params.includeNormals=true] Whether to convert normals. When false, the parser will ignore\n * geometry normals, and the modelwill rely on the xeokit ````Viewer```` to automatically generate them. This has\n * the limitation that the normals will be face-aligned, and therefore the ````Viewer```` will only be able to render\n * a flat-shaded non-PBR representation of the model.\n * @param {Number} [params.minTileSize=200] Minimum RTC coordinate tile size. Set this to a value between 100 and 10000,\n * depending on how far from the coordinate origin the model's vertex positions are; specify larger tile sizes when close\n * to the origin, and smaller sizes when distant. This compensates for decreasing precision as floats get bigger.\n * @param {Function} [params.log] Logging callback.\n * @return {Promise}\n */\nfunction convert2xkt({\n WebIFC,\n configs,\n source,\n sourceData,\n sourceFormat,\n metaModelSource,\n metaModelDataStr,\n output,\n outputXKTModel,\n outputXKT,\n includeTypes,\n excludeTypes,\n reuseGeometries = true,\n minTileSize = 200,\n stats = {},\n outputStats,\n rotateX = false,\n includeTextures = true,\n includeNormals = true,\n log = function (msg) {\n }\n }) {\n\n stats.sourceFormat = \"\";\n stats.schemaVersion = \"\";\n stats.title = \"\";\n stats.author = \"\";\n stats.created = \"\";\n stats.numMetaObjects = 0;\n stats.numPropertySets = 0;\n stats.numTriangles = 0;\n stats.numVertices = 0;\n stats.numNormals = 0;\n stats.numUVs = 0;\n stats.numTextures = 0;\n stats.numTextureSets = 0;\n stats.numObjects = 0;\n stats.numGeometries = 0;\n stats.sourceSize = 0;\n stats.xktSize = 0;\n stats.texturesSize = 0;\n stats.xktVersion = \"\";\n stats.compressionRatio = 0;\n stats.conversionTime = 0;\n stats.aabb = null;\n\n return new Promise(function (resolve, reject) {\n const _log = log;\n log = (msg) => {\n _log(`[convert2xkt] ${msg}`)\n }\n\n if (!source && !sourceData) {\n reject(\"Argument expected: source or sourceData\");\n return;\n }\n\n if (!sourceFormat && sourceData) {\n reject(\"Argument expected: sourceFormat is required with sourceData\");\n return;\n }\n\n if (!output && !outputXKTModel && !outputXKT) {\n reject(\"Argument expected: output, outputXKTModel or outputXKT\");\n return;\n }\n\n if (source) {\n log('Reading input file: ' + source);\n }\n\n const startTime = new Date();\n\n const sourceConfigs = configs.sourceConfigs || {};\n const ext = sourceFormat || source.split('.').pop();\n let fileTypeConfigs = sourceConfigs[ext];\n\n if (!fileTypeConfigs) {\n log(`[WARNING] Could not find configs sourceConfigs entry for source format \"${ext}\". This is derived from the source file name extension. Will use internal default configs.`);\n fileTypeConfigs = {};\n }\n function overrideOption(option1, option2) {\n if (option1 !== undefined) {\n return option1;\n }\n return option2;\n }\n\n if (!sourceData) {\n try {\n sourceData = fs.readFileSync(source);\n } catch (err) {\n reject(err);\n return;\n }\n }\n\n const sourceFileSizeBytes = sourceData.byteLength;\n\n log(\"Input file size: \" + (sourceFileSizeBytes / 1000).toFixed(2) + \" kB\");\n\n if (!metaModelDataStr && metaModelSource) {\n log('Reading input metadata file: ' + metaModelSource);\n try {\n metaModelDataStr = fs.readFileSync(metaModelSource);\n } catch (err) {\n reject(err);\n return;\n }\n }\n\n let metaModelJSON;\n\n if (metaModelDataStr) {\n try {\n metaModelJSON = JSON.parse(metaModelDataStr);\n } catch (e) {\n log(`Error parsing metadata JSON: ${e}`);\n }\n }\n\n minTileSize = overrideOption(fileTypeConfigs.minTileSize, minTileSize);\n rotateX = overrideOption(fileTypeConfigs.rotateX, rotateX);\n reuseGeometries = overrideOption(fileTypeConfigs.reuseGeometries, reuseGeometries);\n includeTextures = overrideOption(fileTypeConfigs.includeTextures, includeTextures);\n includeNormals = overrideOption(fileTypeConfigs.includeNormals, includeNormals);\n includeTypes = overrideOption(fileTypeConfigs.includeTypes, includeTypes);\n excludeTypes = overrideOption(fileTypeConfigs.excludeTypes, excludeTypes);\n\n if (reuseGeometries === false) {\n log(\"Geometry reuse is disabled\");\n }\n\n const xktModel = new XKTModel({\n minTileSize\n });\n\n switch (ext) {\n case \"json\":\n convert(parseCityJSONIntoXKTModel, {\n data: JSON.parse(sourceData),\n xktModel,\n stats,\n rotateX,\n center: fileTypeConfigs.center,\n transform: fileTypeConfigs.transform,\n log\n });\n break;\n\n case \"glb\":\n sourceData = toArrayBuffer(sourceData);\n convert(parseGLTFIntoXKTModel, {\n data: sourceData,\n reuseGeometries,\n includeTextures,\n includeNormals,\n metaModelData: metaModelJSON,\n xktModel,\n stats,\n log\n });\n break;\n\n case \"gltf\":\n const gltfJSON = JSON.parse(sourceData);\n const gltfBasePath = source ? getBasePath(source) : \"\";\n convert(parseGLTFJSONIntoXKTModel, {\n baseUri: gltfBasePath,\n data: gltfJSON,\n reuseGeometries,\n includeTextures,\n includeNormals,\n metaModelData: metaModelJSON,\n xktModel,\n getAttachment: async (name) => {\n const filePath = gltfBasePath + name;\n log(`Reading attachment file: ${filePath}`);\n const buffer = fs.readFileSync(filePath);\n const arrayBuf = toArrayBuffer(buffer);\n return arrayBuf;\n },\n stats,\n log\n });\n break;\n\n case \"ifc\":\n convert(parseIFCIntoXKTModel, {\n WebIFC,\n data: sourceData,\n xktModel,\n wasmPath: \"./\",\n includeTypes,\n excludeTypes,\n stats,\n log\n });\n break;\n\n case \"laz\":\n convert(parseLASIntoXKTModel, {\n data: sourceData,\n xktModel,\n stats,\n fp64: fileTypeConfigs.fp64,\n colorDepth: fileTypeConfigs.colorDepth,\n center: fileTypeConfigs.center,\n transform: fileTypeConfigs.transform,\n skip: overrideOption(fileTypeConfigs.skip, 1),\n log\n });\n break;\n\n case \"las\":\n convert(parseLASIntoXKTModel, {\n data: sourceData,\n xktModel,\n stats,\n fp64: fileTypeConfigs.fp64,\n colorDepth: fileTypeConfigs.colorDepth,\n center: fileTypeConfigs.center,\n transform: fileTypeConfigs.transform,\n skip: overrideOption(fileTypeConfigs.skip, 1),\n log\n });\n break;\n\n case \"pcd\":\n convert(parsePCDIntoXKTModel, {\n data: sourceData,\n xktModel,\n stats,\n log\n });\n break;\n\n case \"ply\":\n convert(parsePLYIntoXKTModel, {\n data: sourceData,\n xktModel,\n stats,\n log\n });\n break;\n\n case \"stl\":\n convert(parseSTLIntoXKTModel, {\n data: sourceData,\n xktModel,\n stats,\n log\n });\n break;\n\n default:\n reject(`Error: unsupported source format: \"${ext}\".`);\n return;\n }\n\n function convert(parser, converterParams) {\n\n parser(converterParams).then(() => {\n\n if (!metaModelJSON) {\n xktModel.createDefaultMetaObjects();\n }\n\n log(\"Input file parsed OK. Building XKT document...\");\n\n xktModel.finalize().then(() => {\n\n log(\"XKT document built OK. Writing to XKT file...\");\n\n const xktArrayBuffer = writeXKTModelToArrayBuffer(xktModel, metaModelJSON, stats, {zip: true});\n\n const xktContent = Buffer.from(xktArrayBuffer);\n\n const targetFileSizeBytes = xktArrayBuffer.byteLength;\n\n stats.minTileSize = minTileSize || 200;\n stats.sourceSize = (sourceFileSizeBytes / 1000).toFixed(2);\n stats.xktSize = (targetFileSizeBytes / 1000).toFixed(2);\n stats.xktVersion = XKT_INFO.xktVersion;\n stats.compressionRatio = (sourceFileSizeBytes / targetFileSizeBytes).toFixed(2);\n stats.conversionTime = ((new Date() - startTime) / 1000.0).toFixed(2);\n stats.aabb = xktModel.aabb;\n log(`Converted to: XKT v${stats.xktVersion}`);\n if (includeTypes) {\n log(\"Include types: \" + (includeTypes ? includeTypes : \"(include all)\"));\n }\n if (excludeTypes) {\n log(\"Exclude types: \" + (excludeTypes ? excludeTypes : \"(exclude none)\"));\n }\n log(\"XKT size: \" + stats.xktSize + \" kB\");\n log(\"XKT textures size: \" + (stats.texturesSize / 1000).toFixed(2) + \"kB\");\n log(\"Compression ratio: \" + stats.compressionRatio);\n log(\"Conversion time: \" + stats.conversionTime + \" s\");\n log(\"Converted metaobjects: \" + stats.numMetaObjects);\n log(\"Converted property sets: \" + stats.numPropertySets);\n log(\"Converted drawable objects: \" + stats.numObjects);\n log(\"Converted geometries: \" + stats.numGeometries);\n log(\"Converted textures: \" + stats.numTextures);\n log(\"Converted textureSets: \" + stats.numTextureSets);\n log(\"Converted triangles: \" + stats.numTriangles);\n log(\"Converted vertices: \" + stats.numVertices);\n log(\"Converted UVs: \" + stats.numUVs);\n log(\"Converted normals: \" + stats.numNormals);\n log(\"minTileSize: \" + stats.minTileSize);\n\n if (output) {\n const outputDir = getBasePath(output).trim();\n if (outputDir !== \"\" && !fs.existsSync(outputDir)) {\n fs.mkdirSync(outputDir, {recursive: true});\n }\n log('Writing XKT file: ' + output);\n fs.writeFileSync(output, xktContent);\n }\n\n if (outputXKTModel) {\n outputXKTModel(xktModel);\n }\n\n if (outputXKT) {\n outputXKT(xktContent);\n }\n\n if (outputStats) {\n outputStats(stats);\n }\n\n resolve();\n });\n }, (err) => {\n reject(err);\n });\n }\n });\n}\n\nfunction getBasePath(src) {\n const i = src.lastIndexOf(\"/\");\n return (i !== 0) ? src.substring(0, i + 1) : \"\";\n}\n\nexport {convert2xkt};", + "content": "import {XKT_INFO} from \"./XKT_INFO.js\";\nimport {XKTModel} from \"./XKTModel/XKTModel.js\";\nimport {parseCityJSONIntoXKTModel} from \"./parsers/parseCityJSONIntoXKTModel.js\";\nimport {parseGLTFIntoXKTModel} from \"./parsers/parseGLTFIntoXKTModel.js\";\nimport {parseIFCIntoXKTModel} from \"./parsers/parseIFCIntoXKTModel.js\";\nimport {parseLASIntoXKTModel} from \"./parsers/parseLASIntoXKTModel.js\";\nimport {parsePCDIntoXKTModel} from \"./parsers/parsePCDIntoXKTModel.js\";\nimport {parsePLYIntoXKTModel} from \"./parsers/parsePLYIntoXKTModel.js\";\nimport {parseSTLIntoXKTModel} from \"./parsers/parseSTLIntoXKTModel.js\";\nimport {writeXKTModelToArrayBuffer} from \"./XKTModel/writeXKTModelToArrayBuffer.js\";\n\nimport {toArrayBuffer} from \"./XKTModel/lib/toArraybuffer\";\nimport {parseGLTFJSONIntoXKTModel} from \"./parsers/parseGLTFJSONIntoXKTModel\";\n\nconst fs = require('fs');\n\n/**\n * Converts model files into xeokit's native XKT format.\n *\n * Supported source formats are: IFC, CityJSON, glTF, LAZ and LAS.\n *\n * **Only bundled in xeokit-convert.cjs.js.**\n *\n * ## Usage\n *\n * ````javascript\n * const convert2xkt = require(\"@xeokit/xeokit-convert/dist/convert2xkt.cjs.js\");\n * const fs = require('fs');\n *\n * convert2xkt({\n * sourceData: fs.readFileSync(\"rme_advanced_sample_project.ifc\"),\n * outputXKT: (xtkArrayBuffer) => {\n * fs.writeFileSync(\"rme_advanced_sample_project.ifc.xkt\", xtkArrayBuffer);\n * }\n * }).then(() => {\n * console.log(\"Converted.\");\n * }, (errMsg) => {\n * console.error(\"Conversion failed: \" + errMsg)\n * });\n ````\n * @param {Object} params Conversion parameters.\n * @param {Object} params.WebIFC The WebIFC library. We pass this in as an external dependency, in order to give the\n * caller the choice of whether to use the Browser or NodeJS version.\n * @param {*} [params.configs] Configurations.\n * @param {String} [params.source] Path to source file. Alternative to ````sourceData````.\n * @param {ArrayBuffer|JSON} [params.sourceData] Source file data. Alternative to ````source````.\n * @param {String} [params.sourceFormat] Format of source file/data. Always needed with ````sourceData````, but not normally needed with ````source````, because convert2xkt will determine the format automatically from the file extension of ````source````.\n * @param {String} [params.metaModelDataStr] Source file data. Overrides metadata from ````metaModelSource````, ````sourceData```` and ````source````.\n * @param {String} [params.metaModelSource] Path to source metaModel file. Overrides metadata from ````sourceData```` and ````source````. Overridden by ````metaModelData````.\n * @param {String} [params.output] Path to destination XKT file. Directories on this path are automatically created if not existing.\n * @param {Function} [params.outputXKTModel] Callback to collect the ````XKTModel```` that is internally build by this method.\n * @param {Function} [params.outputXKT] Callback to collect XKT file data.\n * @param {String[]} [params.includeTypes] Option to only convert objects of these types.\n * @param {String[]} [params.excludeTypes] Option to never convert objects of these types.\n * @param {Object} [stats] Collects conversion statistics. Statistics are attached to this object if provided.\n * @param {Function} [params.outputStats] Callback to collect statistics.\n * @param {Boolean} [params.rotateX=false] Whether to rotate the model 90 degrees about the X axis to make the Y axis \"up\", if necessary. Applies to CityJSON and LAS/LAZ models.\n * @param {Boolean} [params.reuseGeometries=true] When true, will enable geometry reuse within the XKT. When false,\n * will automatically \"expand\" all reused geometries into duplicate copies. This has the drawback of increasing the XKT\n * file size (~10-30% for typical models), but can make the model more responsive in the xeokit Viewer, especially if the model\n * has excessive geometry reuse. An example of excessive geometry reuse would be when a model (eg. glTF) has 4000 geometries that are\n * shared amongst 2000 objects, ie. a large number of geometries with a low amount of reuse, which can present a\n * pathological performance case for xeokit's underlying graphics APIs (WebGL, WebGPU etc).\n * @param {Boolean} [params.includeTextures=true] Whether to convert textures. Only works for ````glTF```` models.\n * @param {Boolean} [params.includeNormals=true] Whether to convert normals. When false, the parser will ignore\n * geometry normals, and the modelwill rely on the xeokit ````Viewer```` to automatically generate them. This has\n * the limitation that the normals will be face-aligned, and therefore the ````Viewer```` will only be able to render\n * a flat-shaded non-PBR representation of the model.\n * @param {Number} [params.minTileSize=200] Minimum RTC coordinate tile size. Set this to a value between 100 and 10000,\n * depending on how far from the coordinate origin the model's vertex positions are; specify larger tile sizes when close\n * to the origin, and smaller sizes when distant. This compensates for decreasing precision as floats get bigger.\n * @param {Function} [params.log] Logging callback.\n * @return {Promise}\n */\nfunction convert2xkt({\n WebIFC,\n configs,\n source,\n sourceData,\n sourceFormat,\n metaModelSource,\n metaModelDataStr,\n output,\n outputXKTModel,\n outputXKT,\n includeTypes,\n excludeTypes,\n reuseGeometries = true,\n minTileSize = 200,\n stats = {},\n outputStats,\n rotateX = false,\n includeTextures = true,\n includeNormals = true,\n log = function (msg) {\n }\n }) {\n\n stats.sourceFormat = \"\";\n stats.schemaVersion = \"\";\n stats.title = \"\";\n stats.author = \"\";\n stats.created = \"\";\n stats.numMetaObjects = 0;\n stats.numPropertySets = 0;\n stats.numTriangles = 0;\n stats.numVertices = 0;\n stats.numNormals = 0;\n stats.numUVs = 0;\n stats.numTextures = 0;\n stats.numTextureSets = 0;\n stats.numObjects = 0;\n stats.numGeometries = 0;\n stats.sourceSize = 0;\n stats.xktSize = 0;\n stats.texturesSize = 0;\n stats.xktVersion = \"\";\n stats.compressionRatio = 0;\n stats.conversionTime = 0;\n stats.aabb = null;\n\n return new Promise(function (resolve, reject) {\n const _log = log;\n log = (msg) => {\n _log(`[convert2xkt] ${msg}`)\n }\n\n if (!source && !sourceData) {\n reject(\"Argument expected: source or sourceData\");\n return;\n }\n\n if (!sourceFormat && sourceData) {\n reject(\"Argument expected: sourceFormat is required with sourceData\");\n return;\n }\n\n if (!output && !outputXKTModel && !outputXKT) {\n reject(\"Argument expected: output, outputXKTModel or outputXKT\");\n return;\n }\n\n if (source) {\n log('Reading input file: ' + source);\n }\n\n const startTime = new Date();\n\n const sourceConfigs = configs.sourceConfigs || {};\n const ext = sourceFormat || source.split('.').pop();\n let fileTypeConfigs = sourceConfigs[ext];\n\n if (!fileTypeConfigs) {\n log(`[WARNING] Could not find configs sourceConfigs entry for source format \"${ext}\". This is derived from the source file name extension. Will use internal default configs.`);\n fileTypeConfigs = {};\n }\n function overrideOption(option1, option2) {\n if (option1 !== undefined) {\n return option1;\n }\n return option2;\n }\n\n if (!sourceData) {\n try {\n sourceData = fs.readFileSync(source);\n } catch (err) {\n reject(err);\n return;\n }\n }\n\n const sourceFileSizeBytes = sourceData.byteLength;\n\n log(\"Input file size: \" + (sourceFileSizeBytes / 1000).toFixed(2) + \" kB\");\n\n if (!metaModelDataStr && metaModelSource) {\n log('Reading input metadata file: ' + metaModelSource);\n try {\n metaModelDataStr = fs.readFileSync(metaModelSource);\n } catch (err) {\n reject(err);\n return;\n }\n } else {\n log(`Not embedding metadata in XKT`);\n }\n\n let metaModelJSON;\n\n if (metaModelDataStr) {\n try {\n metaModelJSON = JSON.parse(metaModelDataStr);\n } catch (e) {\n log(`Error parsing metadata JSON: ${e}`);\n }\n }\n\n minTileSize = overrideOption(fileTypeConfigs.minTileSize, minTileSize);\n rotateX = overrideOption(fileTypeConfigs.rotateX, rotateX);\n reuseGeometries = overrideOption(fileTypeConfigs.reuseGeometries, reuseGeometries);\n includeTextures = overrideOption(fileTypeConfigs.includeTextures, includeTextures);\n includeNormals = overrideOption(fileTypeConfigs.includeNormals, includeNormals);\n includeTypes = overrideOption(fileTypeConfigs.includeTypes, includeTypes);\n excludeTypes = overrideOption(fileTypeConfigs.excludeTypes, excludeTypes);\n\n if (reuseGeometries === false) {\n log(\"Geometry reuse is disabled\");\n }\n\n const xktModel = new XKTModel({\n minTileSize\n });\n\n switch (ext) {\n case \"json\":\n convert(parseCityJSONIntoXKTModel, {\n data: JSON.parse(sourceData),\n xktModel,\n stats,\n rotateX,\n center: fileTypeConfigs.center,\n transform: fileTypeConfigs.transform,\n log\n });\n break;\n\n case \"glb\":\n sourceData = toArrayBuffer(sourceData);\n convert(parseGLTFIntoXKTModel, {\n data: sourceData,\n reuseGeometries,\n includeTextures,\n includeNormals,\n metaModelData: metaModelJSON,\n xktModel,\n stats,\n log\n });\n break;\n\n case \"gltf\":\n const gltfJSON = JSON.parse(sourceData);\n const gltfBasePath = source ? getBasePath(source) : \"\";\n convert(parseGLTFJSONIntoXKTModel, {\n baseUri: gltfBasePath,\n data: gltfJSON,\n reuseGeometries,\n includeTextures,\n includeNormals,\n metaModelData: metaModelJSON,\n xktModel,\n getAttachment: async (name) => {\n const filePath = gltfBasePath + name;\n log(`Reading attachment file: ${filePath}`);\n const buffer = fs.readFileSync(filePath);\n const arrayBuf = toArrayBuffer(buffer);\n return arrayBuf;\n },\n stats,\n log\n });\n break;\n\n case \"ifc\":\n convert(parseIFCIntoXKTModel, {\n WebIFC,\n data: sourceData,\n xktModel,\n wasmPath: \"./\",\n includeTypes,\n excludeTypes,\n stats,\n log\n });\n break;\n\n case \"laz\":\n convert(parseLASIntoXKTModel, {\n data: sourceData,\n xktModel,\n stats,\n fp64: fileTypeConfigs.fp64,\n colorDepth: fileTypeConfigs.colorDepth,\n center: fileTypeConfigs.center,\n transform: fileTypeConfigs.transform,\n skip: overrideOption(fileTypeConfigs.skip, 1),\n log\n });\n break;\n\n case \"las\":\n convert(parseLASIntoXKTModel, {\n data: sourceData,\n xktModel,\n stats,\n fp64: fileTypeConfigs.fp64,\n colorDepth: fileTypeConfigs.colorDepth,\n center: fileTypeConfigs.center,\n transform: fileTypeConfigs.transform,\n skip: overrideOption(fileTypeConfigs.skip, 1),\n log\n });\n break;\n\n case \"pcd\":\n convert(parsePCDIntoXKTModel, {\n data: sourceData,\n xktModel,\n stats,\n log\n });\n break;\n\n case \"ply\":\n convert(parsePLYIntoXKTModel, {\n data: sourceData,\n xktModel,\n stats,\n log\n });\n break;\n\n case \"stl\":\n convert(parseSTLIntoXKTModel, {\n data: sourceData,\n xktModel,\n stats,\n log\n });\n break;\n\n default:\n reject(`Error: unsupported source format: \"${ext}\".`);\n return;\n }\n\n function convert(parser, converterParams) {\n\n parser(converterParams).then(() => {\n\n if (!metaModelJSON) {\n xktModel.createDefaultMetaObjects();\n }\n\n log(\"Input file parsed OK. Building XKT document...\");\n\n xktModel.finalize().then(() => {\n\n log(\"XKT document built OK. Writing to XKT file...\");\n\n const xktArrayBuffer = writeXKTModelToArrayBuffer(xktModel, metaModelJSON, stats, {zip: true});\n\n const xktContent = Buffer.from(xktArrayBuffer);\n\n const targetFileSizeBytes = xktArrayBuffer.byteLength;\n\n stats.minTileSize = minTileSize || 200;\n stats.sourceSize = (sourceFileSizeBytes / 1000).toFixed(2);\n stats.xktSize = (targetFileSizeBytes / 1000).toFixed(2);\n stats.xktVersion = XKT_INFO.xktVersion;\n stats.compressionRatio = (sourceFileSizeBytes / targetFileSizeBytes).toFixed(2);\n stats.conversionTime = ((new Date() - startTime) / 1000.0).toFixed(2);\n stats.aabb = xktModel.aabb;\n log(`Converted to: XKT v${stats.xktVersion}`);\n if (includeTypes) {\n log(\"Include types: \" + (includeTypes ? includeTypes : \"(include all)\"));\n }\n if (excludeTypes) {\n log(\"Exclude types: \" + (excludeTypes ? excludeTypes : \"(exclude none)\"));\n }\n log(\"XKT size: \" + stats.xktSize + \" kB\");\n log(\"XKT textures size: \" + (stats.texturesSize / 1000).toFixed(2) + \"kB\");\n log(\"Compression ratio: \" + stats.compressionRatio);\n log(\"Conversion time: \" + stats.conversionTime + \" s\");\n log(\"Converted metaobjects: \" + stats.numMetaObjects);\n log(\"Converted property sets: \" + stats.numPropertySets);\n log(\"Converted drawable objects: \" + stats.numObjects);\n log(\"Converted geometries: \" + stats.numGeometries);\n log(\"Converted textures: \" + stats.numTextures);\n log(\"Converted textureSets: \" + stats.numTextureSets);\n log(\"Converted triangles: \" + stats.numTriangles);\n log(\"Converted vertices: \" + stats.numVertices);\n log(\"Converted UVs: \" + stats.numUVs);\n log(\"Converted normals: \" + stats.numNormals);\n log(\"minTileSize: \" + stats.minTileSize);\n\n if (output) {\n const outputDir = getBasePath(output).trim();\n if (outputDir !== \"\" && !fs.existsSync(outputDir)) {\n fs.mkdirSync(outputDir, {recursive: true});\n }\n log('Writing XKT file: ' + output);\n fs.writeFileSync(output, xktContent);\n }\n\n if (outputXKTModel) {\n outputXKTModel(xktModel);\n }\n\n if (outputXKT) {\n outputXKT(xktContent);\n }\n\n if (outputStats) {\n outputStats(stats);\n }\n\n resolve();\n });\n }, (err) => {\n reject(err);\n });\n }\n });\n}\n\nfunction getBasePath(src) {\n const i = src.lastIndexOf(\"/\");\n return (i !== 0) ? src.substring(0, i + 1) : \"\";\n}\n\nexport {convert2xkt};", "static": true, "longname": "/home/lindsay/xeolabs/xeokit-convert-jan10/src/convert2xkt.js", "access": "public", @@ -7911,7 +7911,7 @@ "importPath": "@xeokit/xeokit-convert/src/convert2xkt.js", "importStyle": null, "description": null, - "lineNumber": 416, + "lineNumber": 418, "undocument": true, "params": [ { @@ -14218,7 +14218,7 @@ }, { "kind": "packageJSON", - "content": "{\n \"name\": \"@xeokit/xeokit-convert\",\n \"version\": \"1.1.15-beta-1\",\n \"description\": \"JavaScript utilities to create .XKT files\",\n \"main\": \"index.js\",\n \"bin\": \"/convert2xkt.js\",\n \"directories\": {},\n \"scripts\": {\n \"build\": \"rollup --config rollup.config.tests.js; webpack --mode=production --node-env=production --progress; rollup --config rollup.config.dist.js; rollup --config rollup.config.convert2xkt.js; rm -Rf ./docs/*; ./node_modules/.bin/esdoc\",\n \"build-tests\": \"rollup --config rollup.config.tests.js\",\n \"build-node\": \"webpack --mode=production --node-env=production --progress\",\n \"build-browser\": \"rollup --config rollup.config.dist.js\",\n \"docs\": \"rm -Rf ./docs/*; ./node_modules/.bin/esdoc\",\n \"publish\": \"npm publish --access public\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/xeokit/xeokit-convert.git\"\n },\n \"keywords\": [\n \"xeolabs\",\n \"xeokit\",\n \"bim\",\n \"opensource\",\n \"ifc\",\n \"webgl\",\n \"xkt\",\n \"gltf\",\n \"glb\",\n \"cityjson\",\n \"laz\",\n \"gis\"\n ],\n \"author\": \"Lindsay Kay\",\n \"license\": \"LICENSE\",\n \"bugs\": {\n \"url\": \"https://github.com/xeokit/xeokit-convert/issues\"\n },\n \"homepage\": \"https://github.com/xeokit/xeokit-convert#readme\",\n \"dependencies\": {\n \"@loaders.gl/core\": \"^3.2.6\",\n \"@loaders.gl/gltf\": \"^3.2.6\",\n \"@loaders.gl/images\": \"^3.2.6\",\n \"@loaders.gl/json\": \"^3.2.6\",\n \"@loaders.gl/las\": \"^3.2.6\",\n \"@loaders.gl/obj\": \"^3.2.6\",\n \"@loaders.gl/ply\": \"^3.2.6\",\n \"@loaders.gl/polyfills\": \"^3.2.6\",\n \"@loaders.gl/textures\": \"^3.2.6\",\n \"@typeonly/validator\": \"^0.5.2\",\n \"commander\": \"^11.0.0\",\n \"core-js\": \"^3.22.5\",\n \"fs\": \"0.0.1-security\",\n \"pako\": \"^2.0.4\",\n \"path\": \"^0.12.7\",\n \"web-ifc\": \"0.0.40\"\n },\n \"devDependencies\": {\n \"@babel/core\": \"^7.17.10\",\n \"@babel/plugin-external-helpers\": \"^7.17.12\",\n \"@babel/preset-env\": \"^7.17.12\",\n \"@rollup/plugin-alias\": \"^3.1.9\",\n \"@rollup/plugin-commonjs\": \"^21.1.0\",\n \"@rollup/plugin-node-resolve\": \"^13.2.1\",\n \"@xeokit/xeokit-sdk\": \"^2.3.0\",\n \"babel-loader\": \"^8.2.5\",\n \"copy-webpack-plugin\": \"^11.0.0\",\n \"esdoc\": \"^1.1.0\",\n \"esdoc-node\": \"^1.0.5\",\n \"esdoc-standard-plugin\": \"^1.0.0\",\n \"http-server\": \"^14.1.0\",\n \"npm-upgrade\": \"^3.1.0\",\n \"rimraf\": \"^3.0.2\",\n \"rollup\": \"^2.70.2\",\n \"rollup-plugin-copy\": \"^3.4.0\",\n \"rollup-plugin-minify-es\": \"^1.1.1\",\n \"typeonly\": \"^0.4.6\",\n \"webpack\": \"^5.72.1\",\n \"webpack-cli\": \"^4.9.2\",\n \"webpack-node-externals\": \"^3.0.0\"\n },\n \"files\": [\n \"/dist\",\n \"/convert2xkt.js\",\n \"/convert2xkt.conf.js\"\n ]\n}\n", + "content": "{\n \"name\": \"@xeokit/xeokit-convert\",\n \"version\": \"1.1.15-beta-2\",\n \"description\": \"JavaScript utilities to create .XKT files\",\n \"main\": \"index.js\",\n \"bin\": \"/convert2xkt.js\",\n \"directories\": {},\n \"scripts\": {\n \"build\": \"rollup --config rollup.config.tests.js; webpack --mode=production --node-env=production --progress; rollup --config rollup.config.dist.js; rollup --config rollup.config.convert2xkt.js; rm -Rf ./docs/*; ./node_modules/.bin/esdoc\",\n \"build-tests\": \"rollup --config rollup.config.tests.js\",\n \"build-node\": \"webpack --mode=production --node-env=production --progress\",\n \"build-browser\": \"rollup --config rollup.config.dist.js\",\n \"docs\": \"rm -Rf ./docs/*; ./node_modules/.bin/esdoc\",\n \"publish\": \"npm publish --access public\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/xeokit/xeokit-convert.git\"\n },\n \"keywords\": [\n \"xeolabs\",\n \"xeokit\",\n \"bim\",\n \"opensource\",\n \"ifc\",\n \"webgl\",\n \"xkt\",\n \"gltf\",\n \"glb\",\n \"cityjson\",\n \"laz\",\n \"gis\"\n ],\n \"author\": \"Lindsay Kay\",\n \"license\": \"LICENSE\",\n \"bugs\": {\n \"url\": \"https://github.com/xeokit/xeokit-convert/issues\"\n },\n \"homepage\": \"https://github.com/xeokit/xeokit-convert#readme\",\n \"dependencies\": {\n \"@loaders.gl/core\": \"^3.2.6\",\n \"@loaders.gl/gltf\": \"^3.2.6\",\n \"@loaders.gl/images\": \"^3.2.6\",\n \"@loaders.gl/json\": \"^3.2.6\",\n \"@loaders.gl/las\": \"^3.2.6\",\n \"@loaders.gl/obj\": \"^3.2.6\",\n \"@loaders.gl/ply\": \"^3.2.6\",\n \"@loaders.gl/polyfills\": \"^3.2.6\",\n \"@loaders.gl/textures\": \"^3.2.6\",\n \"@typeonly/validator\": \"^0.5.2\",\n \"commander\": \"^11.0.0\",\n \"core-js\": \"^3.22.5\",\n \"fs\": \"0.0.1-security\",\n \"pako\": \"^2.0.4\",\n \"path\": \"^0.12.7\",\n \"web-ifc\": \"0.0.40\"\n },\n \"devDependencies\": {\n \"@babel/core\": \"^7.17.10\",\n \"@babel/plugin-external-helpers\": \"^7.17.12\",\n \"@babel/preset-env\": \"^7.17.12\",\n \"@rollup/plugin-alias\": \"^3.1.9\",\n \"@rollup/plugin-commonjs\": \"^21.1.0\",\n \"@rollup/plugin-node-resolve\": \"^13.2.1\",\n \"@xeokit/xeokit-sdk\": \"^2.3.0\",\n \"babel-loader\": \"^8.2.5\",\n \"copy-webpack-plugin\": \"^11.0.0\",\n \"esdoc\": \"^1.1.0\",\n \"esdoc-node\": \"^1.0.5\",\n \"esdoc-standard-plugin\": \"^1.0.0\",\n \"http-server\": \"^14.1.0\",\n \"npm-upgrade\": \"^3.1.0\",\n \"rimraf\": \"^3.0.2\",\n \"rollup\": \"^2.70.2\",\n \"rollup-plugin-copy\": \"^3.4.0\",\n \"rollup-plugin-minify-es\": \"^1.1.1\",\n \"typeonly\": \"^0.4.6\",\n \"webpack\": \"^5.72.1\",\n \"webpack-cli\": \"^4.9.2\",\n \"webpack-node-externals\": \"^3.0.0\"\n },\n \"files\": [\n \"/dist\",\n \"/convert2xkt.js\",\n \"/convert2xkt.conf.js\"\n ]\n}\n", "longname": "/home/lindsay/xeolabs/xeokit-convert-jan10/package.json", "name": "package.json", "static": true, diff --git a/docs/source.html b/docs/source.html index ff88e11..fda2ea8 100644 --- a/docs/source.html +++ b/docs/source.html @@ -275,7 +275,7 @@ 11 %1/9 22711 byte 460 - 2024-01-05 16:06:42 (UTC) + 2024-01-02 17:32:52 (UTC) src/XKT_INFO.js @@ -283,7 +283,7 @@ 100 %1/1 563 byte 20 - 2024-01-04 16:57:40 (UTC) + 2024-01-02 17:32:32 (UTC) src/constants.js @@ -309,12 +309,12 @@ 2024-01-04 16:57:40 (UTC) - src/convert2xkt.js + src/convert2xkt.js convert2xkt 50 %1/2 - 17400 byte - 420 - 2024-01-05 16:06:42 (UTC) + 17467 byte + 422 + 2024-02-07 02:49:47 (UTC) src/geometryBuilders/buildBoxGeometry.js diff --git a/package.json b/package.json index 9d05324..e78792b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@xeokit/xeokit-convert", - "version": "1.1.15-beta-1", + "version": "1.1.15-beta-3", "description": "JavaScript utilities to create .XKT files", "main": "index.js", "bin": "/convert2xkt.js", diff --git a/src/convert2xkt.js b/src/convert2xkt.js index cbe70d9..a05eb68 100755 --- a/src/convert2xkt.js +++ b/src/convert2xkt.js @@ -182,6 +182,8 @@ function convert2xkt({ reject(err); return; } + } else { + log(`Not embedding metadata in XKT`); } let metaModelJSON;