{"version":3,"file":"component---src-pages-blog-interaktive-3-d-modelle-js-8c06bae2d6f87f2b665b.js","mappings":"8JAGA,MAAMA,EAAQ,CACZ,CACEC,KAAM,iBACNC,MAAOC,EAAAA,EACPC,KAAM,YACNC,SAAU,aAEZ,CACEJ,KAAM,qBACNC,MAAOI,EAAAA,EACPF,KAAM,WACNC,SAAU,YAId,K,qFCVA,MAAME,EAAQ,CACZ,CACEC,IAAK,WACLC,SAAU,+BACVC,gBAAiB,KACjBC,YAAa,KACbP,KAAM,uBAER,CACEI,IAAK,cACLC,SAAU,yCACVC,gB,QAAiBE,EACjBD,YAAa,KACbE,YAAY,EACZT,KAAM,iCAER,CACEI,IAAK,QACLC,SAAU,iCACVK,YAAa,sCACbJ,gBAAiBK,EAAAA,EACjBJ,YAAa,KACbP,KAAM,8BAUR,CACEI,IAAK,oBACLC,SAAU,eACVK,YAAa,oDACbJ,gBAAiB,KACjBC,YAAa,KACbK,YAAY,EACZZ,KAAM,0BAER,CACEI,IAAK,sBACLC,SAAU,qBACVK,YAAa,+BACbJ,gBAAiBO,EAAAA,EACjBN,YAAa,KACbE,YAAY,EACZT,KAAM,6BAER,CACEI,IAAK,sBACLC,SAAU,sBACVK,YAAa,iBACbJ,gBAAiBQ,EAAAA,EACjBP,YAAa,KACbP,KAAM,+BAER,CACEI,IAAK,sBACLC,SAAU,0BACVK,YAAa,mCACbJ,gBAAiBS,EAAAA,EACjBR,YAAa,EACbE,YAAY,EACZT,KAAM,oCAER,CACEI,IAAK,cACLC,SAAU,gBACVK,YAAa,wBACbJ,gBAAiB,KACjBC,YAAa,EACbP,KAAM,wBAER,CACEI,IAAK,uBACLC,SAAU,oBACVK,YAAa,mCACbJ,gBAAiBU,EAAAA,EACjBT,YAAa,KACbP,KAAM,4BAER,CACEI,IAAK,sBACLC,SAAU,gBACVK,YAAa,4BACbJ,gBAAiBW,EAAAA,EACjBV,YAAa,KACbE,YAAY,EACZT,KAAM,wBAER,CACEI,IAAK,MACLC,SAAU,qB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AOT,EAAAA,cAAA,YAAM,4BAEfA,EAAAA,cAACc,EAAAA,GAAW,CAACC,cAAc,IAAIV,MAAOA,IAEtCL,EAAAA,cAACgB,EAAAA,GAAO,CACNP,MAAM,0CACNjhC,KACEwgC,EAAAA,cAAA,YACEA,EAAAA,cAAA,SACEA,EAAAA,cAAA,SAAG,2CACHA,EAAAA,cAAA,WAAM,0TAMNA,EAAAA,cAAA,WAAM,IAACA,EAAAA,cAAA,WAAM,2PAKbA,EAAAA,cAAA,WAAM,IAACA,EAAAA,cAAA,WACPA,EAAAA,cAAA,SAAG,oCACHA,EAAAA,cAAA,WAAM,8dAcdA,EAAAA,cAACiB,GAAS,MAEVjB,EAAAA,cAACgB,EAAAA,GAAO,CACNP,MAAM,IACNjhC,KACEwgC,EAAAA,cAAA,YACEA,EAAAA,cAAA,SAAG,gMAKDA,EAAAA,cAAA,WAAM,IAACA,EAAAA,cAAA,WAAM,wPAUrBA,EAAAA,cAACkB,EAAAA,GAAW,CAACzhC,MAAO0hC,GAAAA,IACpBnB,EAAAA,cAACoB,EAAAA,GAAU,CACTthC,MAAOA,EAAAA,EACPuhC,WAAW,EACXZ,MAAM,0BAERT,EAAAA,cAACgB,EAAAA,GAAO,CACNP,MAAM,8BACNjhC,KAAK,+PAEPwgC,EAAAA,cAACsB,EAAAA,GAAW,CAAC/hC,MAAOA,EAAAA,IACb,C,uBC9Hb,IAAe,IAA0B,yD,uBCAzC,IAAe,IAA0B,qD,uBCAzC,IAAe,IAA0B,uD,uBCAzC,IAAe,IAA0B,6D,uBCAzC,IAAe,IAA0B,kF,uBCAzC,IAAe,IAA0B,sD,uBCAzC,IAAe,IAA0B,uD,uBCAzC,IAAe,IAA0B,+D,uBCAzC,IAAe,IAA0B,yD,qBCAzC,IAAe,IAA0B,0D,uBCAzC,IAAe,IAA0B,qD","sources":["webpack://gatsby-starter-default/./src/components/BannerLinks/DefaultBox/index.js","webpack://gatsby-starter-default/./src/components/BlogSlider/DefaultCards/index.js","webpack://gatsby-starter-default/./node_modules/three/examples/jsm/utils/BufferGeometryUtils.js","webpack://gatsby-starter-default/./node_modules/three/examples/jsm/loaders/GLTFLoader.js","webpack://gatsby-starter-default/./node_modules/three/examples/jsm/controls/OrbitControls.js","webpack://gatsby-starter-default/./src/components/3DLogo/index.js","webpack://gatsby-starter-default/./src/pages/blog/interaktive-3d-modelle.js","webpack://gatsby-starter-default/./src/assets/bannerlinks/jointheteam.jpg","webpack://gatsby-starter-default/./src/assets/bannerlinks/takeoff.jpg","webpack://gatsby-starter-default/./src/assets/georg_neu.png","webpack://gatsby-starter-default/./src/assets/handynavigation.jpg","webpack://gatsby-starter-default/./src/assets/internet-explorer-gravestone-overlay.png","webpack://gatsby-starter-default/./src/assets/matomo_m.png","webpack://gatsby-starter-default/./src/assets/mouse.opt.gif","webpack://gatsby-starter-default/./src/assets/projektuebersicht.jpg","webpack://gatsby-starter-default/./src/assets/sandsoftime.jpg","webpack://gatsby-starter-default/./src/assets/splitscreens.jpg","webpack://gatsby-starter-default/./src/assets/verlauf.jpg"],"sourcesContent":["import JoinTheTeam from '../../../assets/bannerlinks/jointheteam.jpg'\nimport TakeOff from '../../../assets/bannerlinks/takeoff.jpg'\n\nconst boxes = [\n {\n text: 'Join the team!',\n image: JoinTheTeam,\n link: '/karriere',\n linkText: 'Bewerbung'\n },\n {\n text: 'Ready to take off?',\n image: TakeOff,\n link: '/kontakt',\n linkText: 'Kontakt'\n }\n]\n\nexport default boxes\n","import Farbverlauf from '../../../assets/verlauf.jpg'\nimport SandsofTime from '../../../assets/sandsoftime.jpg'\nimport Mouse from '../../../assets/mouse.opt.gif'\nimport HandyNav from '../../../assets/handynavigation.jpg'\nimport HowIsYourDay from '../../../assets/splitscreens.jpg'\nimport matomo_m from '../../../assets/matomo_m.png'\nimport ie_grave from '../../../assets/internet-explorer-gravestone-overlay.png'\n\nconst cards = [\n {\n tag: 'Karriere',\n headline: 'Interview zum Girls Day 2022',\n backgroundImage: null,\n readingTime: null,\n link: '/blog/girlsday-2022'\n },\n {\n tag: 'Technologie',\n headline: 'Der Internet Explorer wird eingestellt',\n backgroundImage: ie_grave,\n readingTime: null,\n whiteColor: true,\n link: '/blog/internet-explorer-death'\n },\n {\n tag: 'DSGVO',\n headline: 'matomo statt Google Analytics!',\n subheadline: 'Meiden auch Sie hohe Bußgeldstrafen',\n backgroundImage: matomo_m,\n readingTime: null,\n link: '/blog/matomo_statt_google/'\n },\n // {\n // tag: 'Technologie',\n // headline: 'DSGVO - einfach!',\n // subheadline: 'DSGVO Checkliste zum Abhaken',\n // backgroundImage: null,\n // readingTime: 2,\n // link: '/blog/dsgvo-einfach/'\n // },\n {\n tag: 'Projektmanagement',\n headline: 'Ticketsystem',\n subheadline: 'Strukturierte Kommunikation während des Projektes',\n backgroundImage: null,\n readingTime: null,\n blackColor: true,\n link: '/blog/customer-portal/'\n },\n {\n tag: 'UI - User Interface',\n headline: 'Gradient your life',\n subheadline: 'Farbverläufe und Transitions',\n backgroundImage: Farbverlauf,\n readingTime: null,\n whiteColor: true,\n link: '/blog/gradient-your-life/'\n },\n {\n tag: 'UI - User Interface',\n headline: 'Bild-befüllter Text',\n subheadline: 'Stylish.Punkt.',\n backgroundImage: SandsofTime,\n readingTime: null,\n link: '/blog/bild-befuellter-text/'\n },\n {\n tag: 'UI - User Interface',\n headline: 'Mobiles Menü ganz unten',\n subheadline: 'Daumen brauchen neue Menüführung',\n backgroundImage: HandyNav,\n readingTime: 5,\n whiteColor: true,\n link: '/blog/mobilenavigationganzunten/'\n },\n {\n tag: 'Technologie',\n headline: 'Cross-Testing',\n subheadline: 'Wie funktioniert das?',\n backgroundImage: null,\n readingTime: 1,\n link: '/blog/cross-testing/'\n },\n {\n tag: 'UX - User Experience',\n headline: 'Micro Interaction',\n subheadline: 'Verbesserung der User Experience',\n backgroundImage: Mouse,\n readingTime: null,\n link: '/blog/micro-interaction/'\n },\n {\n tag: 'UI - User Interface',\n headline: 'Split Screens',\n subheadline: 'Dualität mit Style Faktor',\n backgroundImage: HowIsYourDay,\n readingTime: null,\n whiteColor: true,\n link: '/blog/split-screens/'\n },\n {\n tag: 'SEO',\n headline: '95% Uplift mit SEO',\n subheadline: 'Reichweite der Webseite maximieren',\n backgroundImage: null,\n readingTime: 5,\n link: '/blog/mittels-seo-zur-besten-platzierung'\n }\n]\n\nexport default cards\n","import { BufferAttribute, BufferGeometry, Float32BufferAttribute, InstancedBufferAttribute, InterleavedBuffer, InterleavedBufferAttribute, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, Vector3 } from 'three';\nfunction computeMikkTSpaceTangents(geometry, MikkTSpace) {\n let negateSign = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n if (!MikkTSpace || !MikkTSpace.isReady) {\n throw new Error('BufferGeometryUtils: Initialized MikkTSpace library required.');\n }\n if (!geometry.hasAttribute('position') || !geometry.hasAttribute('normal') || !geometry.hasAttribute('uv')) {\n throw new Error('BufferGeometryUtils: Tangents require \"position\", \"normal\", and \"uv\" attributes.');\n }\n function getAttributeArray(attribute) {\n if (attribute.normalized || attribute.isInterleavedBufferAttribute) {\n const dstArray = new Float32Array(attribute.count * attribute.itemSize);\n for (let i = 0, j = 0; i < attribute.count; i++) {\n dstArray[j++] = attribute.getX(i);\n dstArray[j++] = attribute.getY(i);\n if (attribute.itemSize > 2) {\n dstArray[j++] = attribute.getZ(i);\n }\n }\n return dstArray;\n }\n if (attribute.array instanceof Float32Array) {\n return attribute.array;\n }\n return new Float32Array(attribute.array);\n }\n\n // MikkTSpace algorithm requires non-indexed input.\n\n const _geometry = geometry.index ? geometry.toNonIndexed() : geometry;\n\n // Compute vertex tangents.\n\n const tangents = MikkTSpace.generateTangents(getAttributeArray(_geometry.attributes.position), getAttributeArray(_geometry.attributes.normal), getAttributeArray(_geometry.attributes.uv));\n\n // Texture coordinate convention of glTF differs from the apparent\n // default of the MikkTSpace library; .w component must be flipped.\n\n if (negateSign) {\n for (let i = 3; i < tangents.length; i += 4) {\n tangents[i] *= -1;\n }\n }\n\n //\n\n _geometry.setAttribute('tangent', new BufferAttribute(tangents, 4));\n if (geometry !== _geometry) {\n geometry.copy(_geometry);\n }\n return geometry;\n}\n\n/**\n * @param {Array} geometries\n * @param {Boolean} useGroups\n * @return {BufferGeometry}\n */\nfunction mergeGeometries(geometries) {\n let useGroups = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n const isIndexed = geometries[0].index !== null;\n const attributesUsed = new Set(Object.keys(geometries[0].attributes));\n const morphAttributesUsed = new Set(Object.keys(geometries[0].morphAttributes));\n const attributes = {};\n const morphAttributes = {};\n const morphTargetsRelative = geometries[0].morphTargetsRelative;\n const mergedGeometry = new BufferGeometry();\n let offset = 0;\n for (let i = 0; i < geometries.length; ++i) {\n const geometry = geometries[i];\n let attributesCount = 0;\n\n // ensure that all geometries are indexed, or none\n\n if (isIndexed !== (geometry.index !== null)) {\n console.error('THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index ' + i + '. All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them.');\n return null;\n }\n\n // gather attributes, exit early if they're different\n\n for (const name in geometry.attributes) {\n if (!attributesUsed.has(name)) {\n console.error('THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index ' + i + '. All geometries must have compatible attributes; make sure \"' + name + '\" attribute exists among all geometries, or in none of them.');\n return null;\n }\n if (attributes[name] === undefined) attributes[name] = [];\n attributes[name].push(geometry.attributes[name]);\n attributesCount++;\n }\n\n // ensure geometries have the same number of attributes\n\n if (attributesCount !== attributesUsed.size) {\n console.error('THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index ' + i + '. Make sure all geometries have the same number of attributes.');\n return null;\n }\n\n // gather morph attributes, exit early if they're different\n\n if (morphTargetsRelative !== geometry.morphTargetsRelative) {\n console.error('THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index ' + i + '. .morphTargetsRelative must be consistent throughout all geometries.');\n return null;\n }\n for (const name in geometry.morphAttributes) {\n if (!morphAttributesUsed.has(name)) {\n console.error('THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index ' + i + '. .morphAttributes must be consistent throughout all geometries.');\n return null;\n }\n if (morphAttributes[name] === undefined) morphAttributes[name] = [];\n morphAttributes[name].push(geometry.morphAttributes[name]);\n }\n if (useGroups) {\n let count;\n if (isIndexed) {\n count = geometry.index.count;\n } else if (geometry.attributes.position !== undefined) {\n count = geometry.attributes.position.count;\n } else {\n console.error('THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index ' + i + '. The geometry must have either an index or a position attribute');\n return null;\n }\n mergedGeometry.addGroup(offset, count, i);\n offset += count;\n }\n }\n\n // merge indices\n\n if (isIndexed) {\n let indexOffset = 0;\n const mergedIndex = [];\n for (let i = 0; i < geometries.length; ++i) {\n const index = geometries[i].index;\n for (let j = 0; j < index.count; ++j) {\n mergedIndex.push(index.getX(j) + indexOffset);\n }\n indexOffset += geometries[i].attributes.position.count;\n }\n mergedGeometry.setIndex(mergedIndex);\n }\n\n // merge attributes\n\n for (const name in attributes) {\n const mergedAttribute = mergeAttributes(attributes[name]);\n if (!mergedAttribute) {\n console.error('THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the ' + name + ' attribute.');\n return null;\n }\n mergedGeometry.setAttribute(name, mergedAttribute);\n }\n\n // merge morph attributes\n\n for (const name in morphAttributes) {\n const numMorphTargets = morphAttributes[name][0].length;\n if (numMorphTargets === 0) break;\n mergedGeometry.morphAttributes = mergedGeometry.morphAttributes || {};\n mergedGeometry.morphAttributes[name] = [];\n for (let i = 0; i < numMorphTargets; ++i) {\n const morphAttributesToMerge = [];\n for (let j = 0; j < morphAttributes[name].length; ++j) {\n morphAttributesToMerge.push(morphAttributes[name][j][i]);\n }\n const mergedMorphAttribute = mergeAttributes(morphAttributesToMerge);\n if (!mergedMorphAttribute) {\n console.error('THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the ' + name + ' morphAttribute.');\n return null;\n }\n mergedGeometry.morphAttributes[name].push(mergedMorphAttribute);\n }\n }\n return mergedGeometry;\n}\n\n/**\n * @param {Array} attributes\n * @return {BufferAttribute}\n */\nfunction mergeAttributes(attributes) {\n let TypedArray;\n let itemSize;\n let normalized;\n let gpuType = -1;\n let arrayLength = 0;\n for (let i = 0; i < attributes.length; ++i) {\n const attribute = attributes[i];\n if (TypedArray === undefined) TypedArray = attribute.array.constructor;\n if (TypedArray !== attribute.array.constructor) {\n console.error('THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes.');\n return null;\n }\n if (itemSize === undefined) itemSize = attribute.itemSize;\n if (itemSize !== attribute.itemSize) {\n console.error('THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes.');\n return null;\n }\n if (normalized === undefined) normalized = attribute.normalized;\n if (normalized !== attribute.normalized) {\n console.error('THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes.');\n return null;\n }\n if (gpuType === -1) gpuType = attribute.gpuType;\n if (gpuType !== attribute.gpuType) {\n console.error('THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes.');\n return null;\n }\n arrayLength += attribute.count * itemSize;\n }\n const array = new TypedArray(arrayLength);\n const result = new BufferAttribute(array, itemSize, normalized);\n let offset = 0;\n for (let i = 0; i < attributes.length; ++i) {\n const attribute = attributes[i];\n if (attribute.isInterleavedBufferAttribute) {\n const tupleOffset = offset / itemSize;\n for (let j = 0, l = attribute.count; j < l; j++) {\n for (let c = 0; c < itemSize; c++) {\n const value = attribute.getComponent(j, c);\n result.setComponent(j + tupleOffset, c, value);\n }\n }\n } else {\n array.set(attribute.array, offset);\n }\n offset += attribute.count * itemSize;\n }\n if (gpuType !== undefined) {\n result.gpuType = gpuType;\n }\n return result;\n}\n\n/**\n * @param {BufferAttribute}\n * @return {BufferAttribute}\n */\nexport function deepCloneAttribute(attribute) {\n if (attribute.isInstancedInterleavedBufferAttribute || attribute.isInterleavedBufferAttribute) {\n return deinterleaveAttribute(attribute);\n }\n if (attribute.isInstancedBufferAttribute) {\n return new InstancedBufferAttribute().copy(attribute);\n }\n return new BufferAttribute().copy(attribute);\n}\n\n/**\n * @param {Array} attributes\n * @return {Array}\n */\nfunction interleaveAttributes(attributes) {\n // Interleaves the provided attributes into an InterleavedBuffer and returns\n // a set of InterleavedBufferAttributes for each attribute\n let TypedArray;\n let arrayLength = 0;\n let stride = 0;\n\n // calculate the length and type of the interleavedBuffer\n for (let i = 0, l = attributes.length; i < l; ++i) {\n const attribute = attributes[i];\n if (TypedArray === undefined) TypedArray = attribute.array.constructor;\n if (TypedArray !== attribute.array.constructor) {\n console.error('AttributeBuffers of different types cannot be interleaved');\n return null;\n }\n arrayLength += attribute.array.length;\n stride += attribute.itemSize;\n }\n\n // Create the set of buffer attributes\n const interleavedBuffer = new InterleavedBuffer(new TypedArray(arrayLength), stride);\n let offset = 0;\n const res = [];\n const getters = ['getX', 'getY', 'getZ', 'getW'];\n const setters = ['setX', 'setY', 'setZ', 'setW'];\n for (let j = 0, l = attributes.length; j < l; j++) {\n const attribute = attributes[j];\n const itemSize = attribute.itemSize;\n const count = attribute.count;\n const iba = new InterleavedBufferAttribute(interleavedBuffer, itemSize, offset, attribute.normalized);\n res.push(iba);\n offset += itemSize;\n\n // Move the data for each attribute into the new interleavedBuffer\n // at the appropriate offset\n for (let c = 0; c < count; c++) {\n for (let k = 0; k < itemSize; k++) {\n iba[setters[k]](c, attribute[getters[k]](c));\n }\n }\n }\n return res;\n}\n\n// returns a new, non-interleaved version of the provided attribute\nexport function deinterleaveAttribute(attribute) {\n const cons = attribute.data.array.constructor;\n const count = attribute.count;\n const itemSize = attribute.itemSize;\n const normalized = attribute.normalized;\n const array = new cons(count * itemSize);\n let newAttribute;\n if (attribute.isInstancedInterleavedBufferAttribute) {\n newAttribute = new InstancedBufferAttribute(array, itemSize, normalized, attribute.meshPerAttribute);\n } else {\n newAttribute = new BufferAttribute(array, itemSize, normalized);\n }\n for (let i = 0; i < count; i++) {\n newAttribute.setX(i, attribute.getX(i));\n if (itemSize >= 2) {\n newAttribute.setY(i, attribute.getY(i));\n }\n if (itemSize >= 3) {\n newAttribute.setZ(i, attribute.getZ(i));\n }\n if (itemSize >= 4) {\n newAttribute.setW(i, attribute.getW(i));\n }\n }\n return newAttribute;\n}\n\n// deinterleaves all attributes on the geometry\nexport function deinterleaveGeometry(geometry) {\n const attributes = geometry.attributes;\n const morphTargets = geometry.morphTargets;\n const attrMap = new Map();\n for (const key in attributes) {\n const attr = attributes[key];\n if (attr.isInterleavedBufferAttribute) {\n if (!attrMap.has(attr)) {\n attrMap.set(attr, deinterleaveAttribute(attr));\n }\n attributes[key] = attrMap.get(attr);\n }\n }\n for (const key in morphTargets) {\n const attr = morphTargets[key];\n if (attr.isInterleavedBufferAttribute) {\n if (!attrMap.has(attr)) {\n attrMap.set(attr, deinterleaveAttribute(attr));\n }\n morphTargets[key] = attrMap.get(attr);\n }\n }\n}\n\n/**\n * @param {BufferGeometry} geometry\n * @return {number}\n */\nfunction estimateBytesUsed(geometry) {\n // Return the estimated memory used by this geometry in bytes\n // Calculate using itemSize, count, and BYTES_PER_ELEMENT to account\n // for InterleavedBufferAttributes.\n let mem = 0;\n for (const name in geometry.attributes) {\n const attr = geometry.getAttribute(name);\n mem += attr.count * attr.itemSize * attr.array.BYTES_PER_ELEMENT;\n }\n const indices = geometry.getIndex();\n mem += indices ? indices.count * indices.itemSize * indices.array.BYTES_PER_ELEMENT : 0;\n return mem;\n}\n\n/**\n * @param {BufferGeometry} geometry\n * @param {number} tolerance\n * @return {BufferGeometry}\n */\nfunction mergeVertices(geometry) {\n let tolerance = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1e-4;\n tolerance = Math.max(tolerance, Number.EPSILON);\n\n // Generate an index buffer if the geometry doesn't have one, or optimize it\n // if it's already available.\n const hashToIndex = {};\n const indices = geometry.getIndex();\n const positions = geometry.getAttribute('position');\n const vertexCount = indices ? indices.count : positions.count;\n\n // next value for triangle indices\n let nextIndex = 0;\n\n // attributes and new attribute arrays\n const attributeNames = Object.keys(geometry.attributes);\n const tmpAttributes = {};\n const tmpMorphAttributes = {};\n const newIndices = [];\n const getters = ['getX', 'getY', 'getZ', 'getW'];\n const setters = ['setX', 'setY', 'setZ', 'setW'];\n\n // Initialize the arrays, allocating space conservatively. Extra\n // space will be trimmed in the last step.\n for (let i = 0, l = attributeNames.length; i < l; i++) {\n const name = attributeNames[i];\n const attr = geometry.attributes[name];\n tmpAttributes[name] = new BufferAttribute(new attr.array.constructor(attr.count * attr.itemSize), attr.itemSize, attr.normalized);\n const morphAttr = geometry.morphAttributes[name];\n if (morphAttr) {\n tmpMorphAttributes[name] = new BufferAttribute(new morphAttr.array.constructor(morphAttr.count * morphAttr.itemSize), morphAttr.itemSize, morphAttr.normalized);\n }\n }\n\n // convert the error tolerance to an amount of decimal places to truncate to\n const halfTolerance = tolerance * 0.5;\n const exponent = Math.log10(1 / tolerance);\n const hashMultiplier = Math.pow(10, exponent);\n const hashAdditive = halfTolerance * hashMultiplier;\n for (let i = 0; i < vertexCount; i++) {\n const index = indices ? indices.getX(i) : i;\n\n // Generate a hash for the vertex attributes at the current index 'i'\n let hash = '';\n for (let j = 0, l = attributeNames.length; j < l; j++) {\n const name = attributeNames[j];\n const attribute = geometry.getAttribute(name);\n const itemSize = attribute.itemSize;\n for (let k = 0; k < itemSize; k++) {\n // double tilde truncates the decimal value\n hash += `${~~(attribute[getters[k]](index) * hashMultiplier + hashAdditive)},`;\n }\n }\n\n // Add another reference to the vertex if it's already\n // used by another index\n if (hash in hashToIndex) {\n newIndices.push(hashToIndex[hash]);\n } else {\n // copy data to the new index in the temporary attributes\n for (let j = 0, l = attributeNames.length; j < l; j++) {\n const name = attributeNames[j];\n const attribute = geometry.getAttribute(name);\n const morphAttr = geometry.morphAttributes[name];\n const itemSize = attribute.itemSize;\n const newarray = tmpAttributes[name];\n const newMorphArrays = tmpMorphAttributes[name];\n for (let k = 0; k < itemSize; k++) {\n const getterFunc = getters[k];\n const setterFunc = setters[k];\n newarray[setterFunc](nextIndex, attribute[getterFunc](index));\n if (morphAttr) {\n for (let m = 0, ml = morphAttr.length; m < ml; m++) {\n newMorphArrays[m][setterFunc](nextIndex, morphAttr[m][getterFunc](index));\n }\n }\n }\n }\n hashToIndex[hash] = nextIndex;\n newIndices.push(nextIndex);\n nextIndex++;\n }\n }\n\n // generate result BufferGeometry\n const result = geometry.clone();\n for (const name in geometry.attributes) {\n const tmpAttribute = tmpAttributes[name];\n result.setAttribute(name, new BufferAttribute(tmpAttribute.array.slice(0, nextIndex * tmpAttribute.itemSize), tmpAttribute.itemSize, tmpAttribute.normalized));\n if (!(name in tmpMorphAttributes)) continue;\n for (let j = 0; j < tmpMorphAttributes[name].length; j++) {\n const tmpMorphAttribute = tmpMorphAttributes[name][j];\n result.morphAttributes[name][j] = new BufferAttribute(tmpMorphAttribute.array.slice(0, nextIndex * tmpMorphAttribute.itemSize), tmpMorphAttribute.itemSize, tmpMorphAttribute.normalized);\n }\n }\n\n // indices\n\n result.setIndex(newIndices);\n return result;\n}\n\n/**\n * @param {BufferGeometry} geometry\n * @param {number} drawMode\n * @return {BufferGeometry}\n */\nfunction toTrianglesDrawMode(geometry, drawMode) {\n if (drawMode === TrianglesDrawMode) {\n console.warn('THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles.');\n return geometry;\n }\n if (drawMode === TriangleFanDrawMode || drawMode === TriangleStripDrawMode) {\n let index = geometry.getIndex();\n\n // generate index if not present\n\n if (index === null) {\n const indices = [];\n const position = geometry.getAttribute('position');\n if (position !== undefined) {\n for (let i = 0; i < position.count; i++) {\n indices.push(i);\n }\n geometry.setIndex(indices);\n index = geometry.getIndex();\n } else {\n console.error('THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible.');\n return geometry;\n }\n }\n\n //\n\n const numberOfTriangles = index.count - 2;\n const newIndices = [];\n if (drawMode === TriangleFanDrawMode) {\n // gl.TRIANGLE_FAN\n\n for (let i = 1; i <= numberOfTriangles; i++) {\n newIndices.push(index.getX(0));\n newIndices.push(index.getX(i));\n newIndices.push(index.getX(i + 1));\n }\n } else {\n // gl.TRIANGLE_STRIP\n\n for (let i = 0; i < numberOfTriangles; i++) {\n if (i % 2 === 0) {\n newIndices.push(index.getX(i));\n newIndices.push(index.getX(i + 1));\n newIndices.push(index.getX(i + 2));\n } else {\n newIndices.push(index.getX(i + 2));\n newIndices.push(index.getX(i + 1));\n newIndices.push(index.getX(i));\n }\n }\n }\n if (newIndices.length / 3 !== numberOfTriangles) {\n console.error('THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.');\n }\n\n // build final geometry\n\n const newGeometry = geometry.clone();\n newGeometry.setIndex(newIndices);\n newGeometry.clearGroups();\n return newGeometry;\n } else {\n console.error('THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:', drawMode);\n return geometry;\n }\n}\n\n/**\n * Calculates the morphed attributes of a morphed/skinned BufferGeometry.\n * Helpful for Raytracing or Decals.\n * @param {Mesh | Line | Points} object An instance of Mesh, Line or Points.\n * @return {Object} An Object with original position/normal attributes and morphed ones.\n */\nfunction computeMorphedAttributes(object) {\n const _vA = new Vector3();\n const _vB = new Vector3();\n const _vC = new Vector3();\n const _tempA = new Vector3();\n const _tempB = new Vector3();\n const _tempC = new Vector3();\n const _morphA = new Vector3();\n const _morphB = new Vector3();\n const _morphC = new Vector3();\n function _calculateMorphedAttributeData(object, attribute, morphAttribute, morphTargetsRelative, a, b, c, modifiedAttributeArray) {\n _vA.fromBufferAttribute(attribute, a);\n _vB.fromBufferAttribute(attribute, b);\n _vC.fromBufferAttribute(attribute, c);\n const morphInfluences = object.morphTargetInfluences;\n if (morphAttribute && morphInfluences) {\n _morphA.set(0, 0, 0);\n _morphB.set(0, 0, 0);\n _morphC.set(0, 0, 0);\n for (let i = 0, il = morphAttribute.length; i < il; i++) {\n const influence = morphInfluences[i];\n const morph = morphAttribute[i];\n if (influence === 0) continue;\n _tempA.fromBufferAttribute(morph, a);\n _tempB.fromBufferAttribute(morph, b);\n _tempC.fromBufferAttribute(morph, c);\n if (morphTargetsRelative) {\n _morphA.addScaledVector(_tempA, influence);\n _morphB.addScaledVector(_tempB, influence);\n _morphC.addScaledVector(_tempC, influence);\n } else {\n _morphA.addScaledVector(_tempA.sub(_vA), influence);\n _morphB.addScaledVector(_tempB.sub(_vB), influence);\n _morphC.addScaledVector(_tempC.sub(_vC), influence);\n }\n }\n _vA.add(_morphA);\n _vB.add(_morphB);\n _vC.add(_morphC);\n }\n if (object.isSkinnedMesh) {\n object.applyBoneTransform(a, _vA);\n object.applyBoneTransform(b, _vB);\n object.applyBoneTransform(c, _vC);\n }\n modifiedAttributeArray[a * 3 + 0] = _vA.x;\n modifiedAttributeArray[a * 3 + 1] = _vA.y;\n modifiedAttributeArray[a * 3 + 2] = _vA.z;\n modifiedAttributeArray[b * 3 + 0] = _vB.x;\n modifiedAttributeArray[b * 3 + 1] = _vB.y;\n modifiedAttributeArray[b * 3 + 2] = _vB.z;\n modifiedAttributeArray[c * 3 + 0] = _vC.x;\n modifiedAttributeArray[c * 3 + 1] = _vC.y;\n modifiedAttributeArray[c * 3 + 2] = _vC.z;\n }\n const geometry = object.geometry;\n const material = object.material;\n let a, b, c;\n const index = geometry.index;\n const positionAttribute = geometry.attributes.position;\n const morphPosition = geometry.morphAttributes.position;\n const morphTargetsRelative = geometry.morphTargetsRelative;\n const normalAttribute = geometry.attributes.normal;\n const morphNormal = geometry.morphAttributes.position;\n const groups = geometry.groups;\n const drawRange = geometry.drawRange;\n let i, j, il, jl;\n let group;\n let start, end;\n const modifiedPosition = new Float32Array(positionAttribute.count * positionAttribute.itemSize);\n const modifiedNormal = new Float32Array(normalAttribute.count * normalAttribute.itemSize);\n if (index !== null) {\n // indexed buffer geometry\n\n if (Array.isArray(material)) {\n for (i = 0, il = groups.length; i < il; i++) {\n group = groups[i];\n start = Math.max(group.start, drawRange.start);\n end = Math.min(group.start + group.count, drawRange.start + drawRange.count);\n for (j = start, jl = end; j < jl; j += 3) {\n a = index.getX(j);\n b = index.getX(j + 1);\n c = index.getX(j + 2);\n _calculateMorphedAttributeData(object, positionAttribute, morphPosition, morphTargetsRelative, a, b, c, modifiedPosition);\n _calculateMorphedAttributeData(object, normalAttribute, morphNormal, morphTargetsRelative, a, b, c, modifiedNormal);\n }\n }\n } else {\n start = Math.max(0, drawRange.start);\n end = Math.min(index.count, drawRange.start + drawRange.count);\n for (i = start, il = end; i < il; i += 3) {\n a = index.getX(i);\n b = index.getX(i + 1);\n c = index.getX(i + 2);\n _calculateMorphedAttributeData(object, positionAttribute, morphPosition, morphTargetsRelative, a, b, c, modifiedPosition);\n _calculateMorphedAttributeData(object, normalAttribute, morphNormal, morphTargetsRelative, a, b, c, modifiedNormal);\n }\n }\n } else {\n // non-indexed buffer geometry\n\n if (Array.isArray(material)) {\n for (i = 0, il = groups.length; i < il; i++) {\n group = groups[i];\n start = Math.max(group.start, drawRange.start);\n end = Math.min(group.start + group.count, drawRange.start + drawRange.count);\n for (j = start, jl = end; j < jl; j += 3) {\n a = j;\n b = j + 1;\n c = j + 2;\n _calculateMorphedAttributeData(object, positionAttribute, morphPosition, morphTargetsRelative, a, b, c, modifiedPosition);\n _calculateMorphedAttributeData(object, normalAttribute, morphNormal, morphTargetsRelative, a, b, c, modifiedNormal);\n }\n }\n } else {\n start = Math.max(0, drawRange.start);\n end = Math.min(positionAttribute.count, drawRange.start + drawRange.count);\n for (i = start, il = end; i < il; i += 3) {\n a = i;\n b = i + 1;\n c = i + 2;\n _calculateMorphedAttributeData(object, positionAttribute, morphPosition, morphTargetsRelative, a, b, c, modifiedPosition);\n _calculateMorphedAttributeData(object, normalAttribute, morphNormal, morphTargetsRelative, a, b, c, modifiedNormal);\n }\n }\n }\n const morphedPositionAttribute = new Float32BufferAttribute(modifiedPosition, 3);\n const morphedNormalAttribute = new Float32BufferAttribute(modifiedNormal, 3);\n return {\n positionAttribute: positionAttribute,\n normalAttribute: normalAttribute,\n morphedPositionAttribute: morphedPositionAttribute,\n morphedNormalAttribute: morphedNormalAttribute\n };\n}\nfunction mergeGroups(geometry) {\n if (geometry.groups.length === 0) {\n console.warn('THREE.BufferGeometryUtils.mergeGroups(): No groups are defined. Nothing to merge.');\n return geometry;\n }\n let groups = geometry.groups;\n\n // sort groups by material index\n\n groups = groups.sort((a, b) => {\n if (a.materialIndex !== b.materialIndex) return a.materialIndex - b.materialIndex;\n return a.start - b.start;\n });\n\n // create index for non-indexed geometries\n\n if (geometry.getIndex() === null) {\n const positionAttribute = geometry.getAttribute('position');\n const indices = [];\n for (let i = 0; i < positionAttribute.count; i += 3) {\n indices.push(i, i + 1, i + 2);\n }\n geometry.setIndex(indices);\n }\n\n // sort index\n\n const index = geometry.getIndex();\n const newIndices = [];\n for (let i = 0; i < groups.length; i++) {\n const group = groups[i];\n const groupStart = group.start;\n const groupLength = groupStart + group.count;\n for (let j = groupStart; j < groupLength; j++) {\n newIndices.push(index.getX(j));\n }\n }\n geometry.dispose(); // Required to force buffer recreation\n geometry.setIndex(newIndices);\n\n // update groups indices\n\n let start = 0;\n for (let i = 0; i < groups.length; i++) {\n const group = groups[i];\n group.start = start;\n start += group.count;\n }\n\n // merge groups\n\n let currentGroup = groups[0];\n geometry.groups = [currentGroup];\n for (let i = 1; i < groups.length; i++) {\n const group = groups[i];\n if (currentGroup.materialIndex === group.materialIndex) {\n currentGroup.count += group.count;\n } else {\n currentGroup = group;\n geometry.groups.push(currentGroup);\n }\n }\n return geometry;\n}\n\n/**\n * Modifies the supplied geometry if it is non-indexed, otherwise creates a new,\n * non-indexed geometry. Returns the geometry with smooth normals everywhere except\n * faces that meet at an angle greater than the crease angle.\n *\n * @param {BufferGeometry} geometry\n * @param {number} [creaseAngle]\n * @return {BufferGeometry}\n */\nfunction toCreasedNormals(geometry) {\n let creaseAngle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Math.PI / 3;\n const creaseDot = Math.cos(creaseAngle);\n const hashMultiplier = (1 + 1e-10) * 1e2;\n\n // reusable vectors\n const verts = [new Vector3(), new Vector3(), new Vector3()];\n const tempVec1 = new Vector3();\n const tempVec2 = new Vector3();\n const tempNorm = new Vector3();\n const tempNorm2 = new Vector3();\n\n // hashes a vector\n function hashVertex(v) {\n const x = ~~(v.x * hashMultiplier);\n const y = ~~(v.y * hashMultiplier);\n const z = ~~(v.z * hashMultiplier);\n return `${x},${y},${z}`;\n }\n\n // BufferGeometry.toNonIndexed() warns if the geometry is non-indexed\n // and returns the original geometry\n const resultGeometry = geometry.index ? geometry.toNonIndexed() : geometry;\n const posAttr = resultGeometry.attributes.position;\n const vertexMap = {};\n\n // find all the normals shared by commonly located vertices\n for (let i = 0, l = posAttr.count / 3; i < l; i++) {\n const i3 = 3 * i;\n const a = verts[0].fromBufferAttribute(posAttr, i3 + 0);\n const b = verts[1].fromBufferAttribute(posAttr, i3 + 1);\n const c = verts[2].fromBufferAttribute(posAttr, i3 + 2);\n tempVec1.subVectors(c, b);\n tempVec2.subVectors(a, b);\n\n // add the normal to the map for all vertices\n const normal = new Vector3().crossVectors(tempVec1, tempVec2).normalize();\n for (let n = 0; n < 3; n++) {\n const vert = verts[n];\n const hash = hashVertex(vert);\n if (!(hash in vertexMap)) {\n vertexMap[hash] = [];\n }\n vertexMap[hash].push(normal);\n }\n }\n\n // average normals from all vertices that share a common location if they are within the\n // provided crease threshold\n const normalArray = new Float32Array(posAttr.count * 3);\n const normAttr = new BufferAttribute(normalArray, 3, false);\n for (let i = 0, l = posAttr.count / 3; i < l; i++) {\n // get the face normal for this vertex\n const i3 = 3 * i;\n const a = verts[0].fromBufferAttribute(posAttr, i3 + 0);\n const b = verts[1].fromBufferAttribute(posAttr, i3 + 1);\n const c = verts[2].fromBufferAttribute(posAttr, i3 + 2);\n tempVec1.subVectors(c, b);\n tempVec2.subVectors(a, b);\n tempNorm.crossVectors(tempVec1, tempVec2).normalize();\n\n // average all normals that meet the threshold and set the normal value\n for (let n = 0; n < 3; n++) {\n const vert = verts[n];\n const hash = hashVertex(vert);\n const otherNormals = vertexMap[hash];\n tempNorm2.set(0, 0, 0);\n for (let k = 0, lk = otherNormals.length; k < lk; k++) {\n const otherNorm = otherNormals[k];\n if (tempNorm.dot(otherNorm) > creaseDot) {\n tempNorm2.add(otherNorm);\n }\n }\n tempNorm2.normalize();\n normAttr.setXYZ(i3 + n, tempNorm2.x, tempNorm2.y, tempNorm2.z);\n }\n }\n resultGeometry.setAttribute('normal', normAttr);\n return resultGeometry;\n}\nexport { computeMikkTSpaceTangents, mergeGeometries, mergeAttributes, interleaveAttributes, estimateBytesUsed, mergeVertices, toTrianglesDrawMode, computeMorphedAttributes, mergeGroups, toCreasedNormals };","import { AnimationClip, Bone, Box3, BufferAttribute, BufferGeometry, ClampToEdgeWrapping, Color, ColorManagement, DirectionalLight, DoubleSide, FileLoader, FrontSide, Group, ImageBitmapLoader, InstancedMesh, InterleavedBuffer, InterleavedBufferAttribute, Interpolant, InterpolateDiscrete, InterpolateLinear, Line, LineBasicMaterial, LineLoop, LineSegments, LinearFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearSRGBColorSpace, Loader, LoaderUtils, Material, MathUtils, Matrix4, Mesh, MeshBasicMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MirroredRepeatWrapping, NearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NumberKeyframeTrack, Object3D, OrthographicCamera, PerspectiveCamera, PointLight, Points, PointsMaterial, PropertyBinding, Quaternion, QuaternionKeyframeTrack, RepeatWrapping, Skeleton, SkinnedMesh, Sphere, SpotLight, Texture, TextureLoader, TriangleFanDrawMode, TriangleStripDrawMode, Vector2, Vector3, VectorKeyframeTrack, SRGBColorSpace, InstancedBufferAttribute } from 'three';\nimport { toTrianglesDrawMode } from '../utils/BufferGeometryUtils.js';\nclass GLTFLoader extends Loader {\n constructor(manager) {\n super(manager);\n this.dracoLoader = null;\n this.ktx2Loader = null;\n this.meshoptDecoder = null;\n this.pluginCallbacks = [];\n this.register(function (parser) {\n return new GLTFMaterialsClearcoatExtension(parser);\n });\n this.register(function (parser) {\n return new GLTFMaterialsDispersionExtension(parser);\n });\n this.register(function (parser) {\n return new GLTFTextureBasisUExtension(parser);\n });\n this.register(function (parser) {\n return new GLTFTextureWebPExtension(parser);\n });\n this.register(function (parser) {\n return new GLTFTextureAVIFExtension(parser);\n });\n this.register(function (parser) {\n return new GLTFMaterialsSheenExtension(parser);\n });\n this.register(function (parser) {\n return new GLTFMaterialsTransmissionExtension(parser);\n });\n this.register(function (parser) {\n return new GLTFMaterialsVolumeExtension(parser);\n });\n this.register(function (parser) {\n return new GLTFMaterialsIorExtension(parser);\n });\n this.register(function (parser) {\n return new GLTFMaterialsEmissiveStrengthExtension(parser);\n });\n this.register(function (parser) {\n return new GLTFMaterialsSpecularExtension(parser);\n });\n this.register(function (parser) {\n return new GLTFMaterialsIridescenceExtension(parser);\n });\n this.register(function (parser) {\n return new GLTFMaterialsAnisotropyExtension(parser);\n });\n this.register(function (parser) {\n return new GLTFMaterialsBumpExtension(parser);\n });\n this.register(function (parser) {\n return new GLTFLightsExtension(parser);\n });\n this.register(function (parser) {\n return new GLTFMeshoptCompression(parser);\n });\n this.register(function (parser) {\n return new GLTFMeshGpuInstancing(parser);\n });\n }\n load(url, onLoad, onProgress, onError) {\n const scope = this;\n let resourcePath;\n if (this.resourcePath !== '') {\n resourcePath = this.resourcePath;\n } else if (this.path !== '') {\n // If a base path is set, resources will be relative paths from that plus the relative path of the gltf file\n // Example path = 'https://my-cnd-server.com/', url = 'assets/models/model.gltf'\n // resourcePath = 'https://my-cnd-server.com/assets/models/'\n // referenced resource 'model.bin' will be loaded from 'https://my-cnd-server.com/assets/models/model.bin'\n // referenced resource '../textures/texture.png' will be loaded from 'https://my-cnd-server.com/assets/textures/texture.png'\n const relativeUrl = LoaderUtils.extractUrlBase(url);\n resourcePath = LoaderUtils.resolveURL(relativeUrl, this.path);\n } else {\n resourcePath = LoaderUtils.extractUrlBase(url);\n }\n\n // Tells the LoadingManager to track an extra item, which resolves after\n // the model is fully loaded. This means the count of items loaded will\n // be incorrect, but ensures manager.onLoad() does not fire early.\n this.manager.itemStart(url);\n const _onError = function (e) {\n if (onError) {\n onError(e);\n } else {\n console.error(e);\n }\n scope.manager.itemError(url);\n scope.manager.itemEnd(url);\n };\n const loader = new FileLoader(this.manager);\n loader.setPath(this.path);\n loader.setResponseType('arraybuffer');\n loader.setRequestHeader(this.requestHeader);\n loader.setWithCredentials(this.withCredentials);\n loader.load(url, function (data) {\n try {\n scope.parse(data, resourcePath, function (gltf) {\n onLoad(gltf);\n scope.manager.itemEnd(url);\n }, _onError);\n } catch (e) {\n _onError(e);\n }\n }, onProgress, _onError);\n }\n setDRACOLoader(dracoLoader) {\n this.dracoLoader = dracoLoader;\n return this;\n }\n setDDSLoader() {\n throw new Error('THREE.GLTFLoader: \"MSFT_texture_dds\" no longer supported. Please update to \"KHR_texture_basisu\".');\n }\n setKTX2Loader(ktx2Loader) {\n this.ktx2Loader = ktx2Loader;\n return this;\n }\n setMeshoptDecoder(meshoptDecoder) {\n this.meshoptDecoder = meshoptDecoder;\n return this;\n }\n register(callback) {\n if (this.pluginCallbacks.indexOf(callback) === -1) {\n this.pluginCallbacks.push(callback);\n }\n return this;\n }\n unregister(callback) {\n if (this.pluginCallbacks.indexOf(callback) !== -1) {\n this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(callback), 1);\n }\n return this;\n }\n parse(data, path, onLoad, onError) {\n let json;\n const extensions = {};\n const plugins = {};\n const textDecoder = new TextDecoder();\n if (typeof data === 'string') {\n json = JSON.parse(data);\n } else if (data instanceof ArrayBuffer) {\n const magic = textDecoder.decode(new Uint8Array(data, 0, 4));\n if (magic === BINARY_EXTENSION_HEADER_MAGIC) {\n try {\n extensions[EXTENSIONS.KHR_BINARY_GLTF] = new GLTFBinaryExtension(data);\n } catch (error) {\n if (onError) onError(error);\n return;\n }\n json = JSON.parse(extensions[EXTENSIONS.KHR_BINARY_GLTF].content);\n } else {\n json = JSON.parse(textDecoder.decode(data));\n }\n } else {\n json = data;\n }\n if (json.asset === undefined || json.asset.version[0] < 2) {\n if (onError) onError(new Error('THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.'));\n return;\n }\n const parser = new GLTFParser(json, {\n path: path || this.resourcePath || '',\n crossOrigin: this.crossOrigin,\n requestHeader: this.requestHeader,\n manager: this.manager,\n ktx2Loader: this.ktx2Loader,\n meshoptDecoder: this.meshoptDecoder\n });\n parser.fileLoader.setRequestHeader(this.requestHeader);\n for (let i = 0; i < this.pluginCallbacks.length; i++) {\n const plugin = this.pluginCallbacks[i](parser);\n if (!plugin.name) console.error('THREE.GLTFLoader: Invalid plugin found: missing name');\n plugins[plugin.name] = plugin;\n\n // Workaround to avoid determining as unknown extension\n // in addUnknownExtensionsToUserData().\n // Remove this workaround if we move all the existing\n // extension handlers to plugin system\n extensions[plugin.name] = true;\n }\n if (json.extensionsUsed) {\n for (let i = 0; i < json.extensionsUsed.length; ++i) {\n const extensionName = json.extensionsUsed[i];\n const extensionsRequired = json.extensionsRequired || [];\n switch (extensionName) {\n case EXTENSIONS.KHR_MATERIALS_UNLIT:\n extensions[extensionName] = new GLTFMaterialsUnlitExtension();\n break;\n case EXTENSIONS.KHR_DRACO_MESH_COMPRESSION:\n extensions[extensionName] = new GLTFDracoMeshCompressionExtension(json, this.dracoLoader);\n break;\n case EXTENSIONS.KHR_TEXTURE_TRANSFORM:\n extensions[extensionName] = new GLTFTextureTransformExtension();\n break;\n case EXTENSIONS.KHR_MESH_QUANTIZATION:\n extensions[extensionName] = new GLTFMeshQuantizationExtension();\n break;\n default:\n if (extensionsRequired.indexOf(extensionName) >= 0 && plugins[extensionName] === undefined) {\n console.warn('THREE.GLTFLoader: Unknown extension \"' + extensionName + '\".');\n }\n }\n }\n }\n parser.setExtensions(extensions);\n parser.setPlugins(plugins);\n parser.parse(onLoad, onError);\n }\n parseAsync(data, path) {\n const scope = this;\n return new Promise(function (resolve, reject) {\n scope.parse(data, path, resolve, reject);\n });\n }\n}\n\n/* GLTFREGISTRY */\n\nfunction GLTFRegistry() {\n let objects = {};\n return {\n get: function (key) {\n return objects[key];\n },\n add: function (key, object) {\n objects[key] = object;\n },\n remove: function (key) {\n delete objects[key];\n },\n removeAll: function () {\n objects = {};\n }\n };\n}\n\n/*********************************/\n/********** EXTENSIONS ***********/\n/*********************************/\n\nconst EXTENSIONS = {\n KHR_BINARY_GLTF: 'KHR_binary_glTF',\n KHR_DRACO_MESH_COMPRESSION: 'KHR_draco_mesh_compression',\n KHR_LIGHTS_PUNCTUAL: 'KHR_lights_punctual',\n KHR_MATERIALS_CLEARCOAT: 'KHR_materials_clearcoat',\n KHR_MATERIALS_DISPERSION: 'KHR_materials_dispersion',\n KHR_MATERIALS_IOR: 'KHR_materials_ior',\n KHR_MATERIALS_SHEEN: 'KHR_materials_sheen',\n KHR_MATERIALS_SPECULAR: 'KHR_materials_specular',\n KHR_MATERIALS_TRANSMISSION: 'KHR_materials_transmission',\n KHR_MATERIALS_IRIDESCENCE: 'KHR_materials_iridescence',\n KHR_MATERIALS_ANISOTROPY: 'KHR_materials_anisotropy',\n KHR_MATERIALS_UNLIT: 'KHR_materials_unlit',\n KHR_MATERIALS_VOLUME: 'KHR_materials_volume',\n KHR_TEXTURE_BASISU: 'KHR_texture_basisu',\n KHR_TEXTURE_TRANSFORM: 'KHR_texture_transform',\n KHR_MESH_QUANTIZATION: 'KHR_mesh_quantization',\n KHR_MATERIALS_EMISSIVE_STRENGTH: 'KHR_materials_emissive_strength',\n EXT_MATERIALS_BUMP: 'EXT_materials_bump',\n EXT_TEXTURE_WEBP: 'EXT_texture_webp',\n EXT_TEXTURE_AVIF: 'EXT_texture_avif',\n EXT_MESHOPT_COMPRESSION: 'EXT_meshopt_compression',\n EXT_MESH_GPU_INSTANCING: 'EXT_mesh_gpu_instancing'\n};\n\n/**\n * Punctual Lights Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_lights_punctual\n */\nclass GLTFLightsExtension {\n constructor(parser) {\n this.parser = parser;\n this.name = EXTENSIONS.KHR_LIGHTS_PUNCTUAL;\n\n // Object3D instance caches\n this.cache = {\n refs: {},\n uses: {}\n };\n }\n _markDefs() {\n const parser = this.parser;\n const nodeDefs = this.parser.json.nodes || [];\n for (let nodeIndex = 0, nodeLength = nodeDefs.length; nodeIndex < nodeLength; nodeIndex++) {\n const nodeDef = nodeDefs[nodeIndex];\n if (nodeDef.extensions && nodeDef.extensions[this.name] && nodeDef.extensions[this.name].light !== undefined) {\n parser._addNodeRef(this.cache, nodeDef.extensions[this.name].light);\n }\n }\n }\n _loadLight(lightIndex) {\n const parser = this.parser;\n const cacheKey = 'light:' + lightIndex;\n let dependency = parser.cache.get(cacheKey);\n if (dependency) return dependency;\n const json = parser.json;\n const extensions = json.extensions && json.extensions[this.name] || {};\n const lightDefs = extensions.lights || [];\n const lightDef = lightDefs[lightIndex];\n let lightNode;\n const color = new Color(0xffffff);\n if (lightDef.color !== undefined) color.setRGB(lightDef.color[0], lightDef.color[1], lightDef.color[2], LinearSRGBColorSpace);\n const range = lightDef.range !== undefined ? lightDef.range : 0;\n switch (lightDef.type) {\n case 'directional':\n lightNode = new DirectionalLight(color);\n lightNode.target.position.set(0, 0, -1);\n lightNode.add(lightNode.target);\n break;\n case 'point':\n lightNode = new PointLight(color);\n lightNode.distance = range;\n break;\n case 'spot':\n lightNode = new SpotLight(color);\n lightNode.distance = range;\n // Handle spotlight properties.\n lightDef.spot = lightDef.spot || {};\n lightDef.spot.innerConeAngle = lightDef.spot.innerConeAngle !== undefined ? lightDef.spot.innerConeAngle : 0;\n lightDef.spot.outerConeAngle = lightDef.spot.outerConeAngle !== undefined ? lightDef.spot.outerConeAngle : Math.PI / 4.0;\n lightNode.angle = lightDef.spot.outerConeAngle;\n lightNode.penumbra = 1.0 - lightDef.spot.innerConeAngle / lightDef.spot.outerConeAngle;\n lightNode.target.position.set(0, 0, -1);\n lightNode.add(lightNode.target);\n break;\n default:\n throw new Error('THREE.GLTFLoader: Unexpected light type: ' + lightDef.type);\n }\n\n // Some lights (e.g. spot) default to a position other than the origin. Reset the position\n // here, because node-level parsing will only override position if explicitly specified.\n lightNode.position.set(0, 0, 0);\n lightNode.decay = 2;\n assignExtrasToUserData(lightNode, lightDef);\n if (lightDef.intensity !== undefined) lightNode.intensity = lightDef.intensity;\n lightNode.name = parser.createUniqueName(lightDef.name || 'light_' + lightIndex);\n dependency = Promise.resolve(lightNode);\n parser.cache.add(cacheKey, dependency);\n return dependency;\n }\n getDependency(type, index) {\n if (type !== 'light') return;\n return this._loadLight(index);\n }\n createNodeAttachment(nodeIndex) {\n const self = this;\n const parser = this.parser;\n const json = parser.json;\n const nodeDef = json.nodes[nodeIndex];\n const lightDef = nodeDef.extensions && nodeDef.extensions[this.name] || {};\n const lightIndex = lightDef.light;\n if (lightIndex === undefined) return null;\n return this._loadLight(lightIndex).then(function (light) {\n return parser._getNodeRef(self.cache, lightIndex, light);\n });\n }\n}\n\n/**\n * Unlit Materials Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit\n */\nclass GLTFMaterialsUnlitExtension {\n constructor() {\n this.name = EXTENSIONS.KHR_MATERIALS_UNLIT;\n }\n getMaterialType() {\n return MeshBasicMaterial;\n }\n extendParams(materialParams, materialDef, parser) {\n const pending = [];\n materialParams.color = new Color(1.0, 1.0, 1.0);\n materialParams.opacity = 1.0;\n const metallicRoughness = materialDef.pbrMetallicRoughness;\n if (metallicRoughness) {\n if (Array.isArray(metallicRoughness.baseColorFactor)) {\n const array = metallicRoughness.baseColorFactor;\n materialParams.color.setRGB(array[0], array[1], array[2], LinearSRGBColorSpace);\n materialParams.opacity = array[3];\n }\n if (metallicRoughness.baseColorTexture !== undefined) {\n pending.push(parser.assignTexture(materialParams, 'map', metallicRoughness.baseColorTexture, SRGBColorSpace));\n }\n }\n return Promise.all(pending);\n }\n}\n\n/**\n * Materials Emissive Strength Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/blob/5768b3ce0ef32bc39cdf1bef10b948586635ead3/extensions/2.0/Khronos/KHR_materials_emissive_strength/README.md\n */\nclass GLTFMaterialsEmissiveStrengthExtension {\n constructor(parser) {\n this.parser = parser;\n this.name = EXTENSIONS.KHR_MATERIALS_EMISSIVE_STRENGTH;\n }\n extendMaterialParams(materialIndex, materialParams) {\n const parser = this.parser;\n const materialDef = parser.json.materials[materialIndex];\n if (!materialDef.extensions || !materialDef.extensions[this.name]) {\n return Promise.resolve();\n }\n const emissiveStrength = materialDef.extensions[this.name].emissiveStrength;\n if (emissiveStrength !== undefined) {\n materialParams.emissiveIntensity = emissiveStrength;\n }\n return Promise.resolve();\n }\n}\n\n/**\n * Clearcoat Materials Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_clearcoat\n */\nclass GLTFMaterialsClearcoatExtension {\n constructor(parser) {\n this.parser = parser;\n this.name = EXTENSIONS.KHR_MATERIALS_CLEARCOAT;\n }\n getMaterialType(materialIndex) {\n const parser = this.parser;\n const materialDef = parser.json.materials[materialIndex];\n if (!materialDef.extensions || !materialDef.extensions[this.name]) return null;\n return MeshPhysicalMaterial;\n }\n extendMaterialParams(materialIndex, materialParams) {\n const parser = this.parser;\n const materialDef = parser.json.materials[materialIndex];\n if (!materialDef.extensions || !materialDef.extensions[this.name]) {\n return Promise.resolve();\n }\n const pending = [];\n const extension = materialDef.extensions[this.name];\n if (extension.clearcoatFactor !== undefined) {\n materialParams.clearcoat = extension.clearcoatFactor;\n }\n if (extension.clearcoatTexture !== undefined) {\n pending.push(parser.assignTexture(materialParams, 'clearcoatMap', extension.clearcoatTexture));\n }\n if (extension.clearcoatRoughnessFactor !== undefined) {\n materialParams.clearcoatRoughness = extension.clearcoatRoughnessFactor;\n }\n if (extension.clearcoatRoughnessTexture !== undefined) {\n pending.push(parser.assignTexture(materialParams, 'clearcoatRoughnessMap', extension.clearcoatRoughnessTexture));\n }\n if (extension.clearcoatNormalTexture !== undefined) {\n pending.push(parser.assignTexture(materialParams, 'clearcoatNormalMap', extension.clearcoatNormalTexture));\n if (extension.clearcoatNormalTexture.scale !== undefined) {\n const scale = extension.clearcoatNormalTexture.scale;\n materialParams.clearcoatNormalScale = new Vector2(scale, scale);\n }\n }\n return Promise.all(pending);\n }\n}\n\n/**\n * Materials dispersion Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_dispersion\n */\nclass GLTFMaterialsDispersionExtension {\n constructor(parser) {\n this.parser = parser;\n this.name = EXTENSIONS.KHR_MATERIALS_DISPERSION;\n }\n getMaterialType(materialIndex) {\n const parser = this.parser;\n const materialDef = parser.json.materials[materialIndex];\n if (!materialDef.extensions || !materialDef.extensions[this.name]) return null;\n return MeshPhysicalMaterial;\n }\n extendMaterialParams(materialIndex, materialParams) {\n const parser = this.parser;\n const materialDef = parser.json.materials[materialIndex];\n if (!materialDef.extensions || !materialDef.extensions[this.name]) {\n return Promise.resolve();\n }\n const extension = materialDef.extensions[this.name];\n materialParams.dispersion = extension.dispersion !== undefined ? extension.dispersion : 0;\n return Promise.resolve();\n }\n}\n\n/**\n * Iridescence Materials Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_iridescence\n */\nclass GLTFMaterialsIridescenceExtension {\n constructor(parser) {\n this.parser = parser;\n this.name = EXTENSIONS.KHR_MATERIALS_IRIDESCENCE;\n }\n getMaterialType(materialIndex) {\n const parser = this.parser;\n const materialDef = parser.json.materials[materialIndex];\n if (!materialDef.extensions || !materialDef.extensions[this.name]) return null;\n return MeshPhysicalMaterial;\n }\n extendMaterialParams(materialIndex, materialParams) {\n const parser = this.parser;\n const materialDef = parser.json.materials[materialIndex];\n if (!materialDef.extensions || !materialDef.extensions[this.name]) {\n return Promise.resolve();\n }\n const pending = [];\n const extension = materialDef.extensions[this.name];\n if (extension.iridescenceFactor !== undefined) {\n materialParams.iridescence = extension.iridescenceFactor;\n }\n if (extension.iridescenceTexture !== undefined) {\n pending.push(parser.assignTexture(materialParams, 'iridescenceMap', extension.iridescenceTexture));\n }\n if (extension.iridescenceIor !== undefined) {\n materialParams.iridescenceIOR = extension.iridescenceIor;\n }\n if (materialParams.iridescenceThicknessRange === undefined) {\n materialParams.iridescenceThicknessRange = [100, 400];\n }\n if (extension.iridescenceThicknessMinimum !== undefined) {\n materialParams.iridescenceThicknessRange[0] = extension.iridescenceThicknessMinimum;\n }\n if (extension.iridescenceThicknessMaximum !== undefined) {\n materialParams.iridescenceThicknessRange[1] = extension.iridescenceThicknessMaximum;\n }\n if (extension.iridescenceThicknessTexture !== undefined) {\n pending.push(parser.assignTexture(materialParams, 'iridescenceThicknessMap', extension.iridescenceThicknessTexture));\n }\n return Promise.all(pending);\n }\n}\n\n/**\n * Sheen Materials Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_sheen\n */\nclass GLTFMaterialsSheenExtension {\n constructor(parser) {\n this.parser = parser;\n this.name = EXTENSIONS.KHR_MATERIALS_SHEEN;\n }\n getMaterialType(materialIndex) {\n const parser = this.parser;\n const materialDef = parser.json.materials[materialIndex];\n if (!materialDef.extensions || !materialDef.extensions[this.name]) return null;\n return MeshPhysicalMaterial;\n }\n extendMaterialParams(materialIndex, materialParams) {\n const parser = this.parser;\n const materialDef = parser.json.materials[materialIndex];\n if (!materialDef.extensions || !materialDef.extensions[this.name]) {\n return Promise.resolve();\n }\n const pending = [];\n materialParams.sheenColor = new Color(0, 0, 0);\n materialParams.sheenRoughness = 0;\n materialParams.sheen = 1;\n const extension = materialDef.extensions[this.name];\n if (extension.sheenColorFactor !== undefined) {\n const colorFactor = extension.sheenColorFactor;\n materialParams.sheenColor.setRGB(colorFactor[0], colorFactor[1], colorFactor[2], LinearSRGBColorSpace);\n }\n if (extension.sheenRoughnessFactor !== undefined) {\n materialParams.sheenRoughness = extension.sheenRoughnessFactor;\n }\n if (extension.sheenColorTexture !== undefined) {\n pending.push(parser.assignTexture(materialParams, 'sheenColorMap', extension.sheenColorTexture, SRGBColorSpace));\n }\n if (extension.sheenRoughnessTexture !== undefined) {\n pending.push(parser.assignTexture(materialParams, 'sheenRoughnessMap', extension.sheenRoughnessTexture));\n }\n return Promise.all(pending);\n }\n}\n\n/**\n * Transmission Materials Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_transmission\n * Draft: https://github.com/KhronosGroup/glTF/pull/1698\n */\nclass GLTFMaterialsTransmissionExtension {\n constructor(parser) {\n this.parser = parser;\n this.name = EXTENSIONS.KHR_MATERIALS_TRANSMISSION;\n }\n getMaterialType(materialIndex) {\n const parser = this.parser;\n const materialDef = parser.json.materials[materialIndex];\n if (!materialDef.extensions || !materialDef.extensions[this.name]) return null;\n return MeshPhysicalMaterial;\n }\n extendMaterialParams(materialIndex, materialParams) {\n const parser = this.parser;\n const materialDef = parser.json.materials[materialIndex];\n if (!materialDef.extensions || !materialDef.extensions[this.name]) {\n return Promise.resolve();\n }\n const pending = [];\n const extension = materialDef.extensions[this.name];\n if (extension.transmissionFactor !== undefined) {\n materialParams.transmission = extension.transmissionFactor;\n }\n if (extension.transmissionTexture !== undefined) {\n pending.push(parser.assignTexture(materialParams, 'transmissionMap', extension.transmissionTexture));\n }\n return Promise.all(pending);\n }\n}\n\n/**\n * Materials Volume Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_volume\n */\nclass GLTFMaterialsVolumeExtension {\n constructor(parser) {\n this.parser = parser;\n this.name = EXTENSIONS.KHR_MATERIALS_VOLUME;\n }\n getMaterialType(materialIndex) {\n const parser = this.parser;\n const materialDef = parser.json.materials[materialIndex];\n if (!materialDef.extensions || !materialDef.extensions[this.name]) return null;\n return MeshPhysicalMaterial;\n }\n extendMaterialParams(materialIndex, materialParams) {\n const parser = this.parser;\n const materialDef = parser.json.materials[materialIndex];\n if (!materialDef.extensions || !materialDef.extensions[this.name]) {\n return Promise.resolve();\n }\n const pending = [];\n const extension = materialDef.extensions[this.name];\n materialParams.thickness = extension.thicknessFactor !== undefined ? extension.thicknessFactor : 0;\n if (extension.thicknessTexture !== undefined) {\n pending.push(parser.assignTexture(materialParams, 'thicknessMap', extension.thicknessTexture));\n }\n materialParams.attenuationDistance = extension.attenuationDistance || Infinity;\n const colorArray = extension.attenuationColor || [1, 1, 1];\n materialParams.attenuationColor = new Color().setRGB(colorArray[0], colorArray[1], colorArray[2], LinearSRGBColorSpace);\n return Promise.all(pending);\n }\n}\n\n/**\n * Materials ior Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_ior\n */\nclass GLTFMaterialsIorExtension {\n constructor(parser) {\n this.parser = parser;\n this.name = EXTENSIONS.KHR_MATERIALS_IOR;\n }\n getMaterialType(materialIndex) {\n const parser = this.parser;\n const materialDef = parser.json.materials[materialIndex];\n if (!materialDef.extensions || !materialDef.extensions[this.name]) return null;\n return MeshPhysicalMaterial;\n }\n extendMaterialParams(materialIndex, materialParams) {\n const parser = this.parser;\n const materialDef = parser.json.materials[materialIndex];\n if (!materialDef.extensions || !materialDef.extensions[this.name]) {\n return Promise.resolve();\n }\n const extension = materialDef.extensions[this.name];\n materialParams.ior = extension.ior !== undefined ? extension.ior : 1.5;\n return Promise.resolve();\n }\n}\n\n/**\n * Materials specular Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_specular\n */\nclass GLTFMaterialsSpecularExtension {\n constructor(parser) {\n this.parser = parser;\n this.name = EXTENSIONS.KHR_MATERIALS_SPECULAR;\n }\n getMaterialType(materialIndex) {\n const parser = this.parser;\n const materialDef = parser.json.materials[materialIndex];\n if (!materialDef.extensions || !materialDef.extensions[this.name]) return null;\n return MeshPhysicalMaterial;\n }\n extendMaterialParams(materialIndex, materialParams) {\n const parser = this.parser;\n const materialDef = parser.json.materials[materialIndex];\n if (!materialDef.extensions || !materialDef.extensions[this.name]) {\n return Promise.resolve();\n }\n const pending = [];\n const extension = materialDef.extensions[this.name];\n materialParams.specularIntensity = extension.specularFactor !== undefined ? extension.specularFactor : 1.0;\n if (extension.specularTexture !== undefined) {\n pending.push(parser.assignTexture(materialParams, 'specularIntensityMap', extension.specularTexture));\n }\n const colorArray = extension.specularColorFactor || [1, 1, 1];\n materialParams.specularColor = new Color().setRGB(colorArray[0], colorArray[1], colorArray[2], LinearSRGBColorSpace);\n if (extension.specularColorTexture !== undefined) {\n pending.push(parser.assignTexture(materialParams, 'specularColorMap', extension.specularColorTexture, SRGBColorSpace));\n }\n return Promise.all(pending);\n }\n}\n\n/**\n * Materials bump Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/EXT_materials_bump\n */\nclass GLTFMaterialsBumpExtension {\n constructor(parser) {\n this.parser = parser;\n this.name = EXTENSIONS.EXT_MATERIALS_BUMP;\n }\n getMaterialType(materialIndex) {\n const parser = this.parser;\n const materialDef = parser.json.materials[materialIndex];\n if (!materialDef.extensions || !materialDef.extensions[this.name]) return null;\n return MeshPhysicalMaterial;\n }\n extendMaterialParams(materialIndex, materialParams) {\n const parser = this.parser;\n const materialDef = parser.json.materials[materialIndex];\n if (!materialDef.extensions || !materialDef.extensions[this.name]) {\n return Promise.resolve();\n }\n const pending = [];\n const extension = materialDef.extensions[this.name];\n materialParams.bumpScale = extension.bumpFactor !== undefined ? extension.bumpFactor : 1.0;\n if (extension.bumpTexture !== undefined) {\n pending.push(parser.assignTexture(materialParams, 'bumpMap', extension.bumpTexture));\n }\n return Promise.all(pending);\n }\n}\n\n/**\n * Materials anisotropy Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_anisotropy\n */\nclass GLTFMaterialsAnisotropyExtension {\n constructor(parser) {\n this.parser = parser;\n this.name = EXTENSIONS.KHR_MATERIALS_ANISOTROPY;\n }\n getMaterialType(materialIndex) {\n const parser = this.parser;\n const materialDef = parser.json.materials[materialIndex];\n if (!materialDef.extensions || !materialDef.extensions[this.name]) return null;\n return MeshPhysicalMaterial;\n }\n extendMaterialParams(materialIndex, materialParams) {\n const parser = this.parser;\n const materialDef = parser.json.materials[materialIndex];\n if (!materialDef.extensions || !materialDef.extensions[this.name]) {\n return Promise.resolve();\n }\n const pending = [];\n const extension = materialDef.extensions[this.name];\n if (extension.anisotropyStrength !== undefined) {\n materialParams.anisotropy = extension.anisotropyStrength;\n }\n if (extension.anisotropyRotation !== undefined) {\n materialParams.anisotropyRotation = extension.anisotropyRotation;\n }\n if (extension.anisotropyTexture !== undefined) {\n pending.push(parser.assignTexture(materialParams, 'anisotropyMap', extension.anisotropyTexture));\n }\n return Promise.all(pending);\n }\n}\n\n/**\n * BasisU Texture Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_texture_basisu\n */\nclass GLTFTextureBasisUExtension {\n constructor(parser) {\n this.parser = parser;\n this.name = EXTENSIONS.KHR_TEXTURE_BASISU;\n }\n loadTexture(textureIndex) {\n const parser = this.parser;\n const json = parser.json;\n const textureDef = json.textures[textureIndex];\n if (!textureDef.extensions || !textureDef.extensions[this.name]) {\n return null;\n }\n const extension = textureDef.extensions[this.name];\n const loader = parser.options.ktx2Loader;\n if (!loader) {\n if (json.extensionsRequired && json.extensionsRequired.indexOf(this.name) >= 0) {\n throw new Error('THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures');\n } else {\n // Assumes that the extension is optional and that a fallback texture is present\n return null;\n }\n }\n return parser.loadTextureImage(textureIndex, extension.source, loader);\n }\n}\n\n/**\n * WebP Texture Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_texture_webp\n */\nclass GLTFTextureWebPExtension {\n constructor(parser) {\n this.parser = parser;\n this.name = EXTENSIONS.EXT_TEXTURE_WEBP;\n this.isSupported = null;\n }\n loadTexture(textureIndex) {\n const name = this.name;\n const parser = this.parser;\n const json = parser.json;\n const textureDef = json.textures[textureIndex];\n if (!textureDef.extensions || !textureDef.extensions[name]) {\n return null;\n }\n const extension = textureDef.extensions[name];\n const source = json.images[extension.source];\n let loader = parser.textureLoader;\n if (source.uri) {\n const handler = parser.options.manager.getHandler(source.uri);\n if (handler !== null) loader = handler;\n }\n return this.detectSupport().then(function (isSupported) {\n if (isSupported) return parser.loadTextureImage(textureIndex, extension.source, loader);\n if (json.extensionsRequired && json.extensionsRequired.indexOf(name) >= 0) {\n throw new Error('THREE.GLTFLoader: WebP required by asset but unsupported.');\n }\n\n // Fall back to PNG or JPEG.\n return parser.loadTexture(textureIndex);\n });\n }\n detectSupport() {\n if (!this.isSupported) {\n this.isSupported = new Promise(function (resolve) {\n const image = new Image();\n\n // Lossy test image. Support for lossy images doesn't guarantee support for all\n // WebP images, unfortunately.\n image.src = 'data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA';\n image.onload = image.onerror = function () {\n resolve(image.height === 1);\n };\n });\n }\n return this.isSupported;\n }\n}\n\n/**\n * AVIF Texture Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_texture_avif\n */\nclass GLTFTextureAVIFExtension {\n constructor(parser) {\n this.parser = parser;\n this.name = EXTENSIONS.EXT_TEXTURE_AVIF;\n this.isSupported = null;\n }\n loadTexture(textureIndex) {\n const name = this.name;\n const parser = this.parser;\n const json = parser.json;\n const textureDef = json.textures[textureIndex];\n if (!textureDef.extensions || !textureDef.extensions[name]) {\n return null;\n }\n const extension = textureDef.extensions[name];\n const source = json.images[extension.source];\n let loader = parser.textureLoader;\n if (source.uri) {\n const handler = parser.options.manager.getHandler(source.uri);\n if (handler !== null) loader = handler;\n }\n return this.detectSupport().then(function (isSupported) {\n if (isSupported) return parser.loadTextureImage(textureIndex, extension.source, loader);\n if (json.extensionsRequired && json.extensionsRequired.indexOf(name) >= 0) {\n throw new Error('THREE.GLTFLoader: AVIF required by asset but unsupported.');\n }\n\n // Fall back to PNG or JPEG.\n return parser.loadTexture(textureIndex);\n });\n }\n detectSupport() {\n if (!this.isSupported) {\n this.isSupported = new Promise(function (resolve) {\n const image = new Image();\n\n // Lossy test image.\n image.src = 'data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=';\n image.onload = image.onerror = function () {\n resolve(image.height === 1);\n };\n });\n }\n return this.isSupported;\n }\n}\n\n/**\n * meshopt BufferView Compression Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_meshopt_compression\n */\nclass GLTFMeshoptCompression {\n constructor(parser) {\n this.name = EXTENSIONS.EXT_MESHOPT_COMPRESSION;\n this.parser = parser;\n }\n loadBufferView(index) {\n const json = this.parser.json;\n const bufferView = json.bufferViews[index];\n if (bufferView.extensions && bufferView.extensions[this.name]) {\n const extensionDef = bufferView.extensions[this.name];\n const buffer = this.parser.getDependency('buffer', extensionDef.buffer);\n const decoder = this.parser.options.meshoptDecoder;\n if (!decoder || !decoder.supported) {\n if (json.extensionsRequired && json.extensionsRequired.indexOf(this.name) >= 0) {\n throw new Error('THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files');\n } else {\n // Assumes that the extension is optional and that fallback buffer data is present\n return null;\n }\n }\n return buffer.then(function (res) {\n const byteOffset = extensionDef.byteOffset || 0;\n const byteLength = extensionDef.byteLength || 0;\n const count = extensionDef.count;\n const stride = extensionDef.byteStride;\n const source = new Uint8Array(res, byteOffset, byteLength);\n if (decoder.decodeGltfBufferAsync) {\n return decoder.decodeGltfBufferAsync(count, stride, source, extensionDef.mode, extensionDef.filter).then(function (res) {\n return res.buffer;\n });\n } else {\n // Support for MeshoptDecoder 0.18 or earlier, without decodeGltfBufferAsync\n return decoder.ready.then(function () {\n const result = new ArrayBuffer(count * stride);\n decoder.decodeGltfBuffer(new Uint8Array(result), count, stride, source, extensionDef.mode, extensionDef.filter);\n return result;\n });\n }\n });\n } else {\n return null;\n }\n }\n}\n\n/**\n * GPU Instancing Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_mesh_gpu_instancing\n *\n */\nclass GLTFMeshGpuInstancing {\n constructor(parser) {\n this.name = EXTENSIONS.EXT_MESH_GPU_INSTANCING;\n this.parser = parser;\n }\n createNodeMesh(nodeIndex) {\n const json = this.parser.json;\n const nodeDef = json.nodes[nodeIndex];\n if (!nodeDef.extensions || !nodeDef.extensions[this.name] || nodeDef.mesh === undefined) {\n return null;\n }\n const meshDef = json.meshes[nodeDef.mesh];\n\n // No Points or Lines + Instancing support yet\n\n for (const primitive of meshDef.primitives) {\n if (primitive.mode !== WEBGL_CONSTANTS.TRIANGLES && primitive.mode !== WEBGL_CONSTANTS.TRIANGLE_STRIP && primitive.mode !== WEBGL_CONSTANTS.TRIANGLE_FAN && primitive.mode !== undefined) {\n return null;\n }\n }\n const extensionDef = nodeDef.extensions[this.name];\n const attributesDef = extensionDef.attributes;\n\n // @TODO: Can we support InstancedMesh + SkinnedMesh?\n\n const pending = [];\n const attributes = {};\n for (const key in attributesDef) {\n pending.push(this.parser.getDependency('accessor', attributesDef[key]).then(accessor => {\n attributes[key] = accessor;\n return attributes[key];\n }));\n }\n if (pending.length < 1) {\n return null;\n }\n pending.push(this.parser.createNodeMesh(nodeIndex));\n return Promise.all(pending).then(results => {\n const nodeObject = results.pop();\n const meshes = nodeObject.isGroup ? nodeObject.children : [nodeObject];\n const count = results[0].count; // All attribute counts should be same\n const instancedMeshes = [];\n for (const mesh of meshes) {\n // Temporal variables\n const m = new Matrix4();\n const p = new Vector3();\n const q = new Quaternion();\n const s = new Vector3(1, 1, 1);\n const instancedMesh = new InstancedMesh(mesh.geometry, mesh.material, count);\n for (let i = 0; i < count; i++) {\n if (attributes.TRANSLATION) {\n p.fromBufferAttribute(attributes.TRANSLATION, i);\n }\n if (attributes.ROTATION) {\n q.fromBufferAttribute(attributes.ROTATION, i);\n }\n if (attributes.SCALE) {\n s.fromBufferAttribute(attributes.SCALE, i);\n }\n instancedMesh.setMatrixAt(i, m.compose(p, q, s));\n }\n\n // Add instance attributes to the geometry, excluding TRS.\n for (const attributeName in attributes) {\n if (attributeName === '_COLOR_0') {\n const attr = attributes[attributeName];\n instancedMesh.instanceColor = new InstancedBufferAttribute(attr.array, attr.itemSize, attr.normalized);\n } else if (attributeName !== 'TRANSLATION' && attributeName !== 'ROTATION' && attributeName !== 'SCALE') {\n mesh.geometry.setAttribute(attributeName, attributes[attributeName]);\n }\n }\n\n // Just in case\n Object3D.prototype.copy.call(instancedMesh, mesh);\n this.parser.assignFinalMaterial(instancedMesh);\n instancedMeshes.push(instancedMesh);\n }\n if (nodeObject.isGroup) {\n nodeObject.clear();\n nodeObject.add(...instancedMeshes);\n return nodeObject;\n }\n return instancedMeshes[0];\n });\n }\n}\n\n/* BINARY EXTENSION */\nconst BINARY_EXTENSION_HEADER_MAGIC = 'glTF';\nconst BINARY_EXTENSION_HEADER_LENGTH = 12;\nconst BINARY_EXTENSION_CHUNK_TYPES = {\n JSON: 0x4E4F534A,\n BIN: 0x004E4942\n};\nclass GLTFBinaryExtension {\n constructor(data) {\n this.name = EXTENSIONS.KHR_BINARY_GLTF;\n this.content = null;\n this.body = null;\n const headerView = new DataView(data, 0, BINARY_EXTENSION_HEADER_LENGTH);\n const textDecoder = new TextDecoder();\n this.header = {\n magic: textDecoder.decode(new Uint8Array(data.slice(0, 4))),\n version: headerView.getUint32(4, true),\n length: headerView.getUint32(8, true)\n };\n if (this.header.magic !== BINARY_EXTENSION_HEADER_MAGIC) {\n throw new Error('THREE.GLTFLoader: Unsupported glTF-Binary header.');\n } else if (this.header.version < 2.0) {\n throw new Error('THREE.GLTFLoader: Legacy binary file detected.');\n }\n const chunkContentsLength = this.header.length - BINARY_EXTENSION_HEADER_LENGTH;\n const chunkView = new DataView(data, BINARY_EXTENSION_HEADER_LENGTH);\n let chunkIndex = 0;\n while (chunkIndex < chunkContentsLength) {\n const chunkLength = chunkView.getUint32(chunkIndex, true);\n chunkIndex += 4;\n const chunkType = chunkView.getUint32(chunkIndex, true);\n chunkIndex += 4;\n if (chunkType === BINARY_EXTENSION_CHUNK_TYPES.JSON) {\n const contentArray = new Uint8Array(data, BINARY_EXTENSION_HEADER_LENGTH + chunkIndex, chunkLength);\n this.content = textDecoder.decode(contentArray);\n } else if (chunkType === BINARY_EXTENSION_CHUNK_TYPES.BIN) {\n const byteOffset = BINARY_EXTENSION_HEADER_LENGTH + chunkIndex;\n this.body = data.slice(byteOffset, byteOffset + chunkLength);\n }\n\n // Clients must ignore chunks with unknown types.\n\n chunkIndex += chunkLength;\n }\n if (this.content === null) {\n throw new Error('THREE.GLTFLoader: JSON content not found.');\n }\n }\n}\n\n/**\n * DRACO Mesh Compression Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression\n */\nclass GLTFDracoMeshCompressionExtension {\n constructor(json, dracoLoader) {\n if (!dracoLoader) {\n throw new Error('THREE.GLTFLoader: No DRACOLoader instance provided.');\n }\n this.name = EXTENSIONS.KHR_DRACO_MESH_COMPRESSION;\n this.json = json;\n this.dracoLoader = dracoLoader;\n this.dracoLoader.preload();\n }\n decodePrimitive(primitive, parser) {\n const json = this.json;\n const dracoLoader = this.dracoLoader;\n const bufferViewIndex = primitive.extensions[this.name].bufferView;\n const gltfAttributeMap = primitive.extensions[this.name].attributes;\n const threeAttributeMap = {};\n const attributeNormalizedMap = {};\n const attributeTypeMap = {};\n for (const attributeName in gltfAttributeMap) {\n const threeAttributeName = ATTRIBUTES[attributeName] || attributeName.toLowerCase();\n threeAttributeMap[threeAttributeName] = gltfAttributeMap[attributeName];\n }\n for (const attributeName in primitive.attributes) {\n const threeAttributeName = ATTRIBUTES[attributeName] || attributeName.toLowerCase();\n if (gltfAttributeMap[attributeName] !== undefined) {\n const accessorDef = json.accessors[primitive.attributes[attributeName]];\n const componentType = WEBGL_COMPONENT_TYPES[accessorDef.componentType];\n attributeTypeMap[threeAttributeName] = componentType.name;\n attributeNormalizedMap[threeAttributeName] = accessorDef.normalized === true;\n }\n }\n return parser.getDependency('bufferView', bufferViewIndex).then(function (bufferView) {\n return new Promise(function (resolve, reject) {\n dracoLoader.decodeDracoFile(bufferView, function (geometry) {\n for (const attributeName in geometry.attributes) {\n const attribute = geometry.attributes[attributeName];\n const normalized = attributeNormalizedMap[attributeName];\n if (normalized !== undefined) attribute.normalized = normalized;\n }\n resolve(geometry);\n }, threeAttributeMap, attributeTypeMap, LinearSRGBColorSpace, reject);\n });\n });\n }\n}\n\n/**\n * Texture Transform Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_texture_transform\n */\nclass GLTFTextureTransformExtension {\n constructor() {\n this.name = EXTENSIONS.KHR_TEXTURE_TRANSFORM;\n }\n extendTexture(texture, transform) {\n if ((transform.texCoord === undefined || transform.texCoord === texture.channel) && transform.offset === undefined && transform.rotation === undefined && transform.scale === undefined) {\n // See https://github.com/mrdoob/three.js/issues/21819.\n return texture;\n }\n texture = texture.clone();\n if (transform.texCoord !== undefined) {\n texture.channel = transform.texCoord;\n }\n if (transform.offset !== undefined) {\n texture.offset.fromArray(transform.offset);\n }\n if (transform.rotation !== undefined) {\n texture.rotation = transform.rotation;\n }\n if (transform.scale !== undefined) {\n texture.repeat.fromArray(transform.scale);\n }\n texture.needsUpdate = true;\n return texture;\n }\n}\n\n/**\n * Mesh Quantization Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_mesh_quantization\n */\nclass GLTFMeshQuantizationExtension {\n constructor() {\n this.name = EXTENSIONS.KHR_MESH_QUANTIZATION;\n }\n}\n\n/*********************************/\n/********** INTERPOLATION ********/\n/*********************************/\n\n// Spline Interpolation\n// Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#appendix-c-spline-interpolation\nclass GLTFCubicSplineInterpolant extends Interpolant {\n constructor(parameterPositions, sampleValues, sampleSize, resultBuffer) {\n super(parameterPositions, sampleValues, sampleSize, resultBuffer);\n }\n copySampleValue_(index) {\n // Copies a sample value to the result buffer. See description of glTF\n // CUBICSPLINE values layout in interpolate_() function below.\n\n const result = this.resultBuffer,\n values = this.sampleValues,\n valueSize = this.valueSize,\n offset = index * valueSize * 3 + valueSize;\n for (let i = 0; i !== valueSize; i++) {\n result[i] = values[offset + i];\n }\n return result;\n }\n interpolate_(i1, t0, t, t1) {\n const result = this.resultBuffer;\n const values = this.sampleValues;\n const stride = this.valueSize;\n const stride2 = stride * 2;\n const stride3 = stride * 3;\n const td = t1 - t0;\n const p = (t - t0) / td;\n const pp = p * p;\n const ppp = pp * p;\n const offset1 = i1 * stride3;\n const offset0 = offset1 - stride3;\n const s2 = -2 * ppp + 3 * pp;\n const s3 = ppp - pp;\n const s0 = 1 - s2;\n const s1 = s3 - pp + p;\n\n // Layout of keyframe output values for CUBICSPLINE animations:\n // [ inTangent_1, splineVertex_1, outTangent_1, inTangent_2, splineVertex_2, ... ]\n for (let i = 0; i !== stride; i++) {\n const p0 = values[offset0 + i + stride]; // splineVertex_k\n const m0 = values[offset0 + i + stride2] * td; // outTangent_k * (t_k+1 - t_k)\n const p1 = values[offset1 + i + stride]; // splineVertex_k+1\n const m1 = values[offset1 + i] * td; // inTangent_k+1 * (t_k+1 - t_k)\n\n result[i] = s0 * p0 + s1 * m0 + s2 * p1 + s3 * m1;\n }\n return result;\n }\n}\nconst _q = new Quaternion();\nclass GLTFCubicSplineQuaternionInterpolant extends GLTFCubicSplineInterpolant {\n interpolate_(i1, t0, t, t1) {\n const result = super.interpolate_(i1, t0, t, t1);\n _q.fromArray(result).normalize().toArray(result);\n return result;\n }\n}\n\n/*********************************/\n/********** INTERNALS ************/\n/*********************************/\n\n/* CONSTANTS */\n\nconst WEBGL_CONSTANTS = {\n FLOAT: 5126,\n //FLOAT_MAT2: 35674,\n FLOAT_MAT3: 35675,\n FLOAT_MAT4: 35676,\n FLOAT_VEC2: 35664,\n FLOAT_VEC3: 35665,\n FLOAT_VEC4: 35666,\n LINEAR: 9729,\n REPEAT: 10497,\n SAMPLER_2D: 35678,\n POINTS: 0,\n LINES: 1,\n LINE_LOOP: 2,\n LINE_STRIP: 3,\n TRIANGLES: 4,\n TRIANGLE_STRIP: 5,\n TRIANGLE_FAN: 6,\n UNSIGNED_BYTE: 5121,\n UNSIGNED_SHORT: 5123\n};\nconst WEBGL_COMPONENT_TYPES = {\n 5120: Int8Array,\n 5121: Uint8Array,\n 5122: Int16Array,\n 5123: Uint16Array,\n 5125: Uint32Array,\n 5126: Float32Array\n};\nconst WEBGL_FILTERS = {\n 9728: NearestFilter,\n 9729: LinearFilter,\n 9984: NearestMipmapNearestFilter,\n 9985: LinearMipmapNearestFilter,\n 9986: NearestMipmapLinearFilter,\n 9987: LinearMipmapLinearFilter\n};\nconst WEBGL_WRAPPINGS = {\n 33071: ClampToEdgeWrapping,\n 33648: MirroredRepeatWrapping,\n 10497: RepeatWrapping\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};\nconst ATTRIBUTES = {\n POSITION: 'position',\n NORMAL: 'normal',\n TANGENT: 'tangent',\n TEXCOORD_0: 'uv',\n TEXCOORD_1: 'uv1',\n TEXCOORD_2: 'uv2',\n TEXCOORD_3: 'uv3',\n COLOR_0: 'color',\n WEIGHTS_0: 'skinWeight',\n JOINTS_0: 'skinIndex'\n};\nconst PATH_PROPERTIES = {\n scale: 'scale',\n translation: 'position',\n rotation: 'quaternion',\n weights: 'morphTargetInfluences'\n};\nconst INTERPOLATION = {\n CUBICSPLINE: undefined,\n // We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each\n // keyframe track will be initialized with a default interpolation type, then modified.\n LINEAR: InterpolateLinear,\n STEP: InterpolateDiscrete\n};\nconst ALPHA_MODES = {\n OPAQUE: 'OPAQUE',\n MASK: 'MASK',\n BLEND: 'BLEND'\n};\n\n/**\n * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#default-material\n */\nfunction createDefaultMaterial(cache) {\n if (cache['DefaultMaterial'] === undefined) {\n cache['DefaultMaterial'] = new MeshStandardMaterial({\n color: 0xFFFFFF,\n emissive: 0x000000,\n metalness: 1,\n roughness: 1,\n transparent: false,\n depthTest: true,\n side: FrontSide\n });\n }\n return cache['DefaultMaterial'];\n}\nfunction addUnknownExtensionsToUserData(knownExtensions, object, objectDef) {\n // Add unknown glTF extensions to an object's userData.\n\n for (const name in objectDef.extensions) {\n if (knownExtensions[name] === undefined) {\n object.userData.gltfExtensions = object.userData.gltfExtensions || {};\n object.userData.gltfExtensions[name] = objectDef.extensions[name];\n }\n }\n}\n\n/**\n * @param {Object3D|Material|BufferGeometry} object\n * @param {GLTF.definition} gltfDef\n */\nfunction assignExtrasToUserData(object, gltfDef) {\n if (gltfDef.extras !== undefined) {\n if (typeof gltfDef.extras === 'object') {\n Object.assign(object.userData, gltfDef.extras);\n } else {\n console.warn('THREE.GLTFLoader: Ignoring primitive type .extras, ' + gltfDef.extras);\n }\n }\n}\n\n/**\n * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#morph-targets\n *\n * @param {BufferGeometry} geometry\n * @param {Array} targets\n * @param {GLTFParser} parser\n * @return {Promise}\n */\nfunction addMorphTargets(geometry, targets, parser) {\n let hasMorphPosition = false;\n let hasMorphNormal = false;\n let hasMorphColor = false;\n for (let i = 0, il = targets.length; i < il; i++) {\n const target = targets[i];\n if (target.POSITION !== undefined) hasMorphPosition = true;\n if (target.NORMAL !== undefined) hasMorphNormal = true;\n if (target.COLOR_0 !== undefined) hasMorphColor = true;\n if (hasMorphPosition && hasMorphNormal && hasMorphColor) break;\n }\n if (!hasMorphPosition && !hasMorphNormal && !hasMorphColor) return Promise.resolve(geometry);\n const pendingPositionAccessors = [];\n const pendingNormalAccessors = [];\n const pendingColorAccessors = [];\n for (let i = 0, il = targets.length; i < il; i++) {\n const target = targets[i];\n if (hasMorphPosition) {\n const pendingAccessor = target.POSITION !== undefined ? parser.getDependency('accessor', target.POSITION) : geometry.attributes.position;\n pendingPositionAccessors.push(pendingAccessor);\n }\n if (hasMorphNormal) {\n const pendingAccessor = target.NORMAL !== undefined ? parser.getDependency('accessor', target.NORMAL) : geometry.attributes.normal;\n pendingNormalAccessors.push(pendingAccessor);\n }\n if (hasMorphColor) {\n const pendingAccessor = target.COLOR_0 !== undefined ? parser.getDependency('accessor', target.COLOR_0) : geometry.attributes.color;\n pendingColorAccessors.push(pendingAccessor);\n }\n }\n return Promise.all([Promise.all(pendingPositionAccessors), Promise.all(pendingNormalAccessors), Promise.all(pendingColorAccessors)]).then(function (accessors) {\n const morphPositions = accessors[0];\n const morphNormals = accessors[1];\n const morphColors = accessors[2];\n if (hasMorphPosition) geometry.morphAttributes.position = morphPositions;\n if (hasMorphNormal) geometry.morphAttributes.normal = morphNormals;\n if (hasMorphColor) geometry.morphAttributes.color = morphColors;\n geometry.morphTargetsRelative = true;\n return geometry;\n });\n}\n\n/**\n * @param {Mesh} mesh\n * @param {GLTF.Mesh} meshDef\n */\nfunction updateMorphTargets(mesh, meshDef) {\n mesh.updateMorphTargets();\n if (meshDef.weights !== undefined) {\n for (let i = 0, il = meshDef.weights.length; i < il; i++) {\n mesh.morphTargetInfluences[i] = meshDef.weights[i];\n }\n }\n\n // .extras has user-defined data, so check that .extras.targetNames is an array.\n if (meshDef.extras && Array.isArray(meshDef.extras.targetNames)) {\n const targetNames = meshDef.extras.targetNames;\n if (mesh.morphTargetInfluences.length === targetNames.length) {\n mesh.morphTargetDictionary = {};\n for (let i = 0, il = targetNames.length; i < il; i++) {\n mesh.morphTargetDictionary[targetNames[i]] = i;\n }\n } else {\n console.warn('THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.');\n }\n }\n}\nfunction createPrimitiveKey(primitiveDef) {\n let geometryKey;\n const dracoExtension = primitiveDef.extensions && primitiveDef.extensions[EXTENSIONS.KHR_DRACO_MESH_COMPRESSION];\n if (dracoExtension) {\n geometryKey = 'draco:' + dracoExtension.bufferView + ':' + dracoExtension.indices + ':' + createAttributesKey(dracoExtension.attributes);\n } else {\n geometryKey = primitiveDef.indices + ':' + createAttributesKey(primitiveDef.attributes) + ':' + primitiveDef.mode;\n }\n if (primitiveDef.targets !== undefined) {\n for (let i = 0, il = primitiveDef.targets.length; i < il; i++) {\n geometryKey += ':' + createAttributesKey(primitiveDef.targets[i]);\n }\n }\n return geometryKey;\n}\nfunction createAttributesKey(attributes) {\n let attributesKey = '';\n const keys = Object.keys(attributes).sort();\n for (let i = 0, il = keys.length; i < il; i++) {\n attributesKey += keys[i] + ':' + attributes[keys[i]] + ';';\n }\n return attributesKey;\n}\nfunction getNormalizedComponentScale(constructor) {\n // Reference:\n // https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_mesh_quantization#encoding-quantized-data\n\n switch (constructor) {\n case Int8Array:\n return 1 / 127;\n case Uint8Array:\n return 1 / 255;\n case Int16Array:\n return 1 / 32767;\n case Uint16Array:\n return 1 / 65535;\n default:\n throw new Error('THREE.GLTFLoader: Unsupported normalized accessor component type.');\n }\n}\nfunction getImageURIMimeType(uri) {\n if (uri.search(/\\.jpe?g($|\\?)/i) > 0 || uri.search(/^data\\:image\\/jpeg/) === 0) return 'image/jpeg';\n if (uri.search(/\\.webp($|\\?)/i) > 0 || uri.search(/^data\\:image\\/webp/) === 0) return 'image/webp';\n return 'image/png';\n}\nconst _identityMatrix = new Matrix4();\n\n/* GLTF PARSER */\n\nclass GLTFParser {\n constructor() {\n let json = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n this.json = json;\n this.extensions = {};\n this.plugins = {};\n this.options = options;\n\n // loader object cache\n this.cache = new GLTFRegistry();\n\n // associations between Three.js objects and glTF elements\n this.associations = new Map();\n\n // BufferGeometry caching\n this.primitiveCache = {};\n\n // Node cache\n this.nodeCache = {};\n\n // Object3D instance caches\n this.meshCache = {\n refs: {},\n uses: {}\n };\n this.cameraCache = {\n refs: {},\n uses: {}\n };\n this.lightCache = {\n refs: {},\n uses: {}\n };\n this.sourceCache = {};\n this.textureCache = {};\n\n // Track node names, to ensure no duplicates\n this.nodeNamesUsed = {};\n\n // Use an ImageBitmapLoader if imageBitmaps are supported. Moves much of the\n // expensive work of uploading a texture to the GPU off the main thread.\n\n let isSafari = false;\n let isFirefox = false;\n let firefoxVersion = -1;\n if (typeof navigator !== 'undefined') {\n isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent) === true;\n isFirefox = navigator.userAgent.indexOf('Firefox') > -1;\n firefoxVersion = isFirefox ? navigator.userAgent.match(/Firefox\\/([0-9]+)\\./)[1] : -1;\n }\n if (typeof createImageBitmap === 'undefined' || isSafari || isFirefox && firefoxVersion < 98) {\n this.textureLoader = new TextureLoader(this.options.manager);\n } else {\n this.textureLoader = new ImageBitmapLoader(this.options.manager);\n }\n this.textureLoader.setCrossOrigin(this.options.crossOrigin);\n this.textureLoader.setRequestHeader(this.options.requestHeader);\n this.fileLoader = new FileLoader(this.options.manager);\n this.fileLoader.setResponseType('arraybuffer');\n if (this.options.crossOrigin === 'use-credentials') {\n this.fileLoader.setWithCredentials(true);\n }\n }\n setExtensions(extensions) {\n this.extensions = extensions;\n }\n setPlugins(plugins) {\n this.plugins = plugins;\n }\n parse(onLoad, onError) {\n const parser = this;\n const json = this.json;\n const extensions = this.extensions;\n\n // Clear the loader cache\n this.cache.removeAll();\n this.nodeCache = {};\n\n // Mark the special nodes/meshes in json for efficient parse\n this._invokeAll(function (ext) {\n return ext._markDefs && ext._markDefs();\n });\n Promise.all(this._invokeAll(function (ext) {\n return ext.beforeRoot && ext.beforeRoot();\n })).then(function () {\n return Promise.all([parser.getDependencies('scene'), parser.getDependencies('animation'), parser.getDependencies('camera')]);\n }).then(function (dependencies) {\n const result = {\n scene: dependencies[0][json.scene || 0],\n scenes: dependencies[0],\n animations: dependencies[1],\n cameras: dependencies[2],\n asset: json.asset,\n parser: parser,\n userData: {}\n };\n addUnknownExtensionsToUserData(extensions, result, json);\n assignExtrasToUserData(result, json);\n return Promise.all(parser._invokeAll(function (ext) {\n return ext.afterRoot && ext.afterRoot(result);\n })).then(function () {\n for (const scene of result.scenes) {\n scene.updateMatrixWorld();\n }\n onLoad(result);\n });\n }).catch(onError);\n }\n\n /**\n * Marks the special nodes/meshes in json for efficient parse.\n */\n _markDefs() {\n const nodeDefs = this.json.nodes || [];\n const skinDefs = this.json.skins || [];\n const meshDefs = this.json.meshes || [];\n\n // Nothing in the node definition indicates whether it is a Bone or an\n // Object3D. Use the skins' joint references to mark bones.\n for (let skinIndex = 0, skinLength = skinDefs.length; skinIndex < skinLength; skinIndex++) {\n const joints = skinDefs[skinIndex].joints;\n for (let i = 0, il = joints.length; i < il; i++) {\n nodeDefs[joints[i]].isBone = true;\n }\n }\n\n // Iterate over all nodes, marking references to shared resources,\n // as well as skeleton joints.\n for (let nodeIndex = 0, nodeLength = nodeDefs.length; nodeIndex < nodeLength; nodeIndex++) {\n const nodeDef = nodeDefs[nodeIndex];\n if (nodeDef.mesh !== undefined) {\n this._addNodeRef(this.meshCache, nodeDef.mesh);\n\n // Nothing in the mesh definition indicates whether it is\n // a SkinnedMesh or Mesh. Use the node's mesh reference\n // to mark SkinnedMesh if node has skin.\n if (nodeDef.skin !== undefined) {\n meshDefs[nodeDef.mesh].isSkinnedMesh = true;\n }\n }\n if (nodeDef.camera !== undefined) {\n this._addNodeRef(this.cameraCache, nodeDef.camera);\n }\n }\n }\n\n /**\n * Counts references to shared node / Object3D resources. These resources\n * can be reused, or \"instantiated\", at multiple nodes in the scene\n * hierarchy. Mesh, Camera, and Light instances are instantiated and must\n * be marked. Non-scenegraph resources (like Materials, Geometries, and\n * Textures) can be reused directly and are not marked here.\n *\n * Example: CesiumMilkTruck sample model reuses \"Wheel\" meshes.\n */\n _addNodeRef(cache, index) {\n if (index === undefined) return;\n if (cache.refs[index] === undefined) {\n cache.refs[index] = cache.uses[index] = 0;\n }\n cache.refs[index]++;\n }\n\n /** Returns a reference to a shared resource, cloning it if necessary. */\n _getNodeRef(cache, index, object) {\n if (cache.refs[index] <= 1) return object;\n const ref = object.clone();\n\n // Propagates mappings to the cloned object, prevents mappings on the\n // original object from being lost.\n const updateMappings = (original, clone) => {\n const mappings = this.associations.get(original);\n if (mappings != null) {\n this.associations.set(clone, mappings);\n }\n for (const [i, child] of original.children.entries()) {\n updateMappings(child, clone.children[i]);\n }\n };\n updateMappings(object, ref);\n ref.name += '_instance_' + cache.uses[index]++;\n return ref;\n }\n _invokeOne(func) {\n const extensions = Object.values(this.plugins);\n extensions.push(this);\n for (let i = 0; i < extensions.length; i++) {\n const result = func(extensions[i]);\n if (result) return result;\n }\n return null;\n }\n _invokeAll(func) {\n const extensions = Object.values(this.plugins);\n extensions.unshift(this);\n const pending = [];\n for (let i = 0; i < extensions.length; i++) {\n const result = func(extensions[i]);\n if (result) pending.push(result);\n }\n return pending;\n }\n\n /**\n * Requests the specified dependency asynchronously, with caching.\n * @param {string} type\n * @param {number} index\n * @return {Promise}\n */\n getDependency(type, index) {\n const cacheKey = type + ':' + index;\n let dependency = this.cache.get(cacheKey);\n if (!dependency) {\n switch (type) {\n case 'scene':\n dependency = this.loadScene(index);\n break;\n case 'node':\n dependency = this._invokeOne(function (ext) {\n return ext.loadNode && ext.loadNode(index);\n });\n break;\n case 'mesh':\n dependency = this._invokeOne(function (ext) {\n return ext.loadMesh && ext.loadMesh(index);\n });\n break;\n case 'accessor':\n dependency = this.loadAccessor(index);\n break;\n case 'bufferView':\n dependency = this._invokeOne(function (ext) {\n return ext.loadBufferView && ext.loadBufferView(index);\n });\n break;\n case 'buffer':\n dependency = this.loadBuffer(index);\n break;\n case 'material':\n dependency = this._invokeOne(function (ext) {\n return ext.loadMaterial && ext.loadMaterial(index);\n });\n break;\n case 'texture':\n dependency = this._invokeOne(function (ext) {\n return ext.loadTexture && ext.loadTexture(index);\n });\n break;\n case 'skin':\n dependency = this.loadSkin(index);\n break;\n case 'animation':\n dependency = this._invokeOne(function (ext) {\n return ext.loadAnimation && ext.loadAnimation(index);\n });\n break;\n case 'camera':\n dependency = this.loadCamera(index);\n break;\n default:\n dependency = this._invokeOne(function (ext) {\n return ext != this && ext.getDependency && ext.getDependency(type, index);\n });\n if (!dependency) {\n throw new Error('Unknown type: ' + type);\n }\n break;\n }\n this.cache.add(cacheKey, dependency);\n }\n return dependency;\n }\n\n /**\n * Requests all dependencies of the specified type asynchronously, with caching.\n * @param {string} type\n * @return {Promise>}\n */\n getDependencies(type) {\n let dependencies = this.cache.get(type);\n if (!dependencies) {\n const parser = this;\n const defs = this.json[type + (type === 'mesh' ? 'es' : 's')] || [];\n dependencies = Promise.all(defs.map(function (def, index) {\n return parser.getDependency(type, index);\n }));\n this.cache.add(type, dependencies);\n }\n return dependencies;\n }\n\n /**\n * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#buffers-and-buffer-views\n * @param {number} bufferIndex\n * @return {Promise}\n */\n loadBuffer(bufferIndex) {\n const bufferDef = this.json.buffers[bufferIndex];\n const loader = this.fileLoader;\n if (bufferDef.type && bufferDef.type !== 'arraybuffer') {\n throw new Error('THREE.GLTFLoader: ' + bufferDef.type + ' buffer type is not supported.');\n }\n\n // If present, GLB container is required to be the first buffer.\n if (bufferDef.uri === undefined && bufferIndex === 0) {\n return Promise.resolve(this.extensions[EXTENSIONS.KHR_BINARY_GLTF].body);\n }\n const options = this.options;\n return new Promise(function (resolve, reject) {\n loader.load(LoaderUtils.resolveURL(bufferDef.uri, options.path), resolve, undefined, function () {\n reject(new Error('THREE.GLTFLoader: Failed to load buffer \"' + bufferDef.uri + '\".'));\n });\n });\n }\n\n /**\n * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#buffers-and-buffer-views\n * @param {number} bufferViewIndex\n * @return {Promise}\n */\n loadBufferView(bufferViewIndex) {\n const bufferViewDef = this.json.bufferViews[bufferViewIndex];\n return this.getDependency('buffer', bufferViewDef.buffer).then(function (buffer) {\n const byteLength = bufferViewDef.byteLength || 0;\n const byteOffset = bufferViewDef.byteOffset || 0;\n return buffer.slice(byteOffset, byteOffset + byteLength);\n });\n }\n\n /**\n * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#accessors\n * @param {number} accessorIndex\n * @return {Promise}\n */\n loadAccessor(accessorIndex) {\n const parser = this;\n const json = this.json;\n const accessorDef = this.json.accessors[accessorIndex];\n if (accessorDef.bufferView === undefined && accessorDef.sparse === undefined) {\n const itemSize = WEBGL_TYPE_SIZES[accessorDef.type];\n const TypedArray = WEBGL_COMPONENT_TYPES[accessorDef.componentType];\n const normalized = accessorDef.normalized === true;\n const array = new TypedArray(accessorDef.count * itemSize);\n return Promise.resolve(new BufferAttribute(array, itemSize, normalized));\n }\n const pendingBufferViews = [];\n if (accessorDef.bufferView !== undefined) {\n pendingBufferViews.push(this.getDependency('bufferView', accessorDef.bufferView));\n } else {\n pendingBufferViews.push(null);\n }\n if (accessorDef.sparse !== undefined) {\n pendingBufferViews.push(this.getDependency('bufferView', accessorDef.sparse.indices.bufferView));\n pendingBufferViews.push(this.getDependency('bufferView', accessorDef.sparse.values.bufferView));\n }\n return Promise.all(pendingBufferViews).then(function (bufferViews) {\n const bufferView = bufferViews[0];\n const itemSize = WEBGL_TYPE_SIZES[accessorDef.type];\n const TypedArray = WEBGL_COMPONENT_TYPES[accessorDef.componentType];\n\n // For VEC3: itemSize is 3, elementBytes is 4, itemBytes is 12.\n const elementBytes = TypedArray.BYTES_PER_ELEMENT;\n const itemBytes = elementBytes * itemSize;\n const byteOffset = accessorDef.byteOffset || 0;\n const byteStride = accessorDef.bufferView !== undefined ? json.bufferViews[accessorDef.bufferView].byteStride : undefined;\n const normalized = accessorDef.normalized === true;\n let array, bufferAttribute;\n\n // The buffer is not interleaved if the stride is the item size in bytes.\n if (byteStride && byteStride !== itemBytes) {\n // Each \"slice\" of the buffer, as defined by 'count' elements of 'byteStride' bytes, gets its own InterleavedBuffer\n // This makes sure that IBA.count reflects accessor.count properly\n const ibSlice = Math.floor(byteOffset / byteStride);\n const ibCacheKey = 'InterleavedBuffer:' + accessorDef.bufferView + ':' + accessorDef.componentType + ':' + ibSlice + ':' + accessorDef.count;\n let ib = parser.cache.get(ibCacheKey);\n if (!ib) {\n array = new TypedArray(bufferView, ibSlice * byteStride, accessorDef.count * byteStride / elementBytes);\n\n // Integer parameters to IB/IBA are in array elements, not bytes.\n ib = new InterleavedBuffer(array, byteStride / elementBytes);\n parser.cache.add(ibCacheKey, ib);\n }\n bufferAttribute = new InterleavedBufferAttribute(ib, itemSize, byteOffset % byteStride / elementBytes, normalized);\n } else {\n if (bufferView === null) {\n array = new TypedArray(accessorDef.count * itemSize);\n } else {\n array = new TypedArray(bufferView, byteOffset, accessorDef.count * itemSize);\n }\n bufferAttribute = new BufferAttribute(array, itemSize, normalized);\n }\n\n // https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#sparse-accessors\n if (accessorDef.sparse !== undefined) {\n const itemSizeIndices = WEBGL_TYPE_SIZES.SCALAR;\n const TypedArrayIndices = WEBGL_COMPONENT_TYPES[accessorDef.sparse.indices.componentType];\n const byteOffsetIndices = accessorDef.sparse.indices.byteOffset || 0;\n const byteOffsetValues = accessorDef.sparse.values.byteOffset || 0;\n const sparseIndices = new TypedArrayIndices(bufferViews[1], byteOffsetIndices, accessorDef.sparse.count * itemSizeIndices);\n const sparseValues = new TypedArray(bufferViews[2], byteOffsetValues, accessorDef.sparse.count * itemSize);\n if (bufferView !== null) {\n // Avoid modifying the original ArrayBuffer, if the bufferView wasn't initialized with zeroes.\n bufferAttribute = new BufferAttribute(bufferAttribute.array.slice(), bufferAttribute.itemSize, bufferAttribute.normalized);\n }\n for (let i = 0, il = sparseIndices.length; i < il; i++) {\n const index = sparseIndices[i];\n bufferAttribute.setX(index, sparseValues[i * itemSize]);\n if (itemSize >= 2) bufferAttribute.setY(index, sparseValues[i * itemSize + 1]);\n if (itemSize >= 3) bufferAttribute.setZ(index, sparseValues[i * itemSize + 2]);\n if (itemSize >= 4) bufferAttribute.setW(index, sparseValues[i * itemSize + 3]);\n if (itemSize >= 5) throw new Error('THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.');\n }\n }\n return bufferAttribute;\n });\n }\n\n /**\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#textures\n * @param {number} textureIndex\n * @return {Promise}\n */\n loadTexture(textureIndex) {\n const json = this.json;\n const options = this.options;\n const textureDef = json.textures[textureIndex];\n const sourceIndex = textureDef.source;\n const sourceDef = json.images[sourceIndex];\n let loader = this.textureLoader;\n if (sourceDef.uri) {\n const handler = options.manager.getHandler(sourceDef.uri);\n if (handler !== null) loader = handler;\n }\n return this.loadTextureImage(textureIndex, sourceIndex, loader);\n }\n loadTextureImage(textureIndex, sourceIndex, loader) {\n const parser = this;\n const json = this.json;\n const textureDef = json.textures[textureIndex];\n const sourceDef = json.images[sourceIndex];\n const cacheKey = (sourceDef.uri || sourceDef.bufferView) + ':' + textureDef.sampler;\n if (this.textureCache[cacheKey]) {\n // See https://github.com/mrdoob/three.js/issues/21559.\n return this.textureCache[cacheKey];\n }\n const promise = this.loadImageSource(sourceIndex, loader).then(function (texture) {\n texture.flipY = false;\n texture.name = textureDef.name || sourceDef.name || '';\n if (texture.name === '' && typeof sourceDef.uri === 'string' && sourceDef.uri.startsWith('data:image/') === false) {\n texture.name = sourceDef.uri;\n }\n const samplers = json.samplers || {};\n const sampler = samplers[textureDef.sampler] || {};\n texture.magFilter = WEBGL_FILTERS[sampler.magFilter] || LinearFilter;\n texture.minFilter = WEBGL_FILTERS[sampler.minFilter] || LinearMipmapLinearFilter;\n texture.wrapS = WEBGL_WRAPPINGS[sampler.wrapS] || RepeatWrapping;\n texture.wrapT = WEBGL_WRAPPINGS[sampler.wrapT] || RepeatWrapping;\n parser.associations.set(texture, {\n textures: textureIndex\n });\n return texture;\n }).catch(function () {\n return null;\n });\n this.textureCache[cacheKey] = promise;\n return promise;\n }\n loadImageSource(sourceIndex, loader) {\n const parser = this;\n const json = this.json;\n const options = this.options;\n if (this.sourceCache[sourceIndex] !== undefined) {\n return this.sourceCache[sourceIndex].then(texture => texture.clone());\n }\n const sourceDef = json.images[sourceIndex];\n const URL = self.URL || self.webkitURL;\n let sourceURI = sourceDef.uri || '';\n let isObjectURL = false;\n if (sourceDef.bufferView !== undefined) {\n // Load binary image data from bufferView, if provided.\n\n sourceURI = parser.getDependency('bufferView', sourceDef.bufferView).then(function (bufferView) {\n isObjectURL = true;\n const blob = new Blob([bufferView], {\n type: sourceDef.mimeType\n });\n sourceURI = URL.createObjectURL(blob);\n return sourceURI;\n });\n } else if (sourceDef.uri === undefined) {\n throw new Error('THREE.GLTFLoader: Image ' + sourceIndex + ' is missing URI and bufferView');\n }\n const promise = Promise.resolve(sourceURI).then(function (sourceURI) {\n return new Promise(function (resolve, reject) {\n let onLoad = resolve;\n if (loader.isImageBitmapLoader === true) {\n onLoad = function (imageBitmap) {\n const texture = new Texture(imageBitmap);\n texture.needsUpdate = true;\n resolve(texture);\n };\n }\n loader.load(LoaderUtils.resolveURL(sourceURI, options.path), onLoad, undefined, reject);\n });\n }).then(function (texture) {\n // Clean up resources and configure Texture.\n\n if (isObjectURL === true) {\n URL.revokeObjectURL(sourceURI);\n }\n texture.userData.mimeType = sourceDef.mimeType || getImageURIMimeType(sourceDef.uri);\n return texture;\n }).catch(function (error) {\n console.error('THREE.GLTFLoader: Couldn\\'t load texture', sourceURI);\n throw error;\n });\n this.sourceCache[sourceIndex] = promise;\n return promise;\n }\n\n /**\n * Asynchronously assigns a texture to the given material parameters.\n * @param {Object} materialParams\n * @param {string} mapName\n * @param {Object} mapDef\n * @return {Promise}\n */\n assignTexture(materialParams, mapName, mapDef, colorSpace) {\n const parser = this;\n return this.getDependency('texture', mapDef.index).then(function (texture) {\n if (!texture) return null;\n if (mapDef.texCoord !== undefined && mapDef.texCoord > 0) {\n texture = texture.clone();\n texture.channel = mapDef.texCoord;\n }\n if (parser.extensions[EXTENSIONS.KHR_TEXTURE_TRANSFORM]) {\n const transform = mapDef.extensions !== undefined ? mapDef.extensions[EXTENSIONS.KHR_TEXTURE_TRANSFORM] : undefined;\n if (transform) {\n const gltfReference = parser.associations.get(texture);\n texture = parser.extensions[EXTENSIONS.KHR_TEXTURE_TRANSFORM].extendTexture(texture, transform);\n parser.associations.set(texture, gltfReference);\n }\n }\n if (colorSpace !== undefined) {\n texture.colorSpace = colorSpace;\n }\n materialParams[mapName] = texture;\n return texture;\n });\n }\n\n /**\n * Assigns final material to a Mesh, Line, or Points instance. The instance\n * already has a material (generated from the glTF material options alone)\n * but reuse of the same glTF material may require multiple threejs materials\n * to accommodate different primitive types, defines, etc. New materials will\n * be created if necessary, and reused from a cache.\n * @param {Object3D} mesh Mesh, Line, or Points instance.\n */\n assignFinalMaterial(mesh) {\n const geometry = mesh.geometry;\n let material = mesh.material;\n const useDerivativeTangents = geometry.attributes.tangent === undefined;\n const useVertexColors = geometry.attributes.color !== undefined;\n const useFlatShading = geometry.attributes.normal === undefined;\n if (mesh.isPoints) {\n const cacheKey = 'PointsMaterial:' + material.uuid;\n let pointsMaterial = this.cache.get(cacheKey);\n if (!pointsMaterial) {\n pointsMaterial = new PointsMaterial();\n Material.prototype.copy.call(pointsMaterial, material);\n pointsMaterial.color.copy(material.color);\n pointsMaterial.map = material.map;\n pointsMaterial.sizeAttenuation = false; // glTF spec says points should be 1px\n\n this.cache.add(cacheKey, pointsMaterial);\n }\n material = pointsMaterial;\n } else if (mesh.isLine) {\n const cacheKey = 'LineBasicMaterial:' + material.uuid;\n let lineMaterial = this.cache.get(cacheKey);\n if (!lineMaterial) {\n lineMaterial = new LineBasicMaterial();\n Material.prototype.copy.call(lineMaterial, material);\n lineMaterial.color.copy(material.color);\n lineMaterial.map = material.map;\n this.cache.add(cacheKey, lineMaterial);\n }\n material = lineMaterial;\n }\n\n // Clone the material if it will be modified\n if (useDerivativeTangents || useVertexColors || useFlatShading) {\n let cacheKey = 'ClonedMaterial:' + material.uuid + ':';\n if (useDerivativeTangents) cacheKey += 'derivative-tangents:';\n if (useVertexColors) cacheKey += 'vertex-colors:';\n if (useFlatShading) cacheKey += 'flat-shading:';\n let cachedMaterial = this.cache.get(cacheKey);\n if (!cachedMaterial) {\n cachedMaterial = material.clone();\n if (useVertexColors) cachedMaterial.vertexColors = true;\n if (useFlatShading) cachedMaterial.flatShading = true;\n if (useDerivativeTangents) {\n // https://github.com/mrdoob/three.js/issues/11438#issuecomment-507003995\n if (cachedMaterial.normalScale) cachedMaterial.normalScale.y *= -1;\n if (cachedMaterial.clearcoatNormalScale) cachedMaterial.clearcoatNormalScale.y *= -1;\n }\n this.cache.add(cacheKey, cachedMaterial);\n this.associations.set(cachedMaterial, this.associations.get(material));\n }\n material = cachedMaterial;\n }\n mesh.material = material;\n }\n getMaterialType( /* materialIndex */\n ) {\n return MeshStandardMaterial;\n }\n\n /**\n * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials\n * @param {number} materialIndex\n * @return {Promise}\n */\n loadMaterial(materialIndex) {\n const parser = this;\n const json = this.json;\n const extensions = this.extensions;\n const materialDef = json.materials[materialIndex];\n let materialType;\n const materialParams = {};\n const materialExtensions = materialDef.extensions || {};\n const pending = [];\n if (materialExtensions[EXTENSIONS.KHR_MATERIALS_UNLIT]) {\n const kmuExtension = extensions[EXTENSIONS.KHR_MATERIALS_UNLIT];\n materialType = kmuExtension.getMaterialType();\n pending.push(kmuExtension.extendParams(materialParams, materialDef, parser));\n } else {\n // Specification:\n // https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#metallic-roughness-material\n\n const metallicRoughness = materialDef.pbrMetallicRoughness || {};\n materialParams.color = new Color(1.0, 1.0, 1.0);\n materialParams.opacity = 1.0;\n if (Array.isArray(metallicRoughness.baseColorFactor)) {\n const array = metallicRoughness.baseColorFactor;\n materialParams.color.setRGB(array[0], array[1], array[2], LinearSRGBColorSpace);\n materialParams.opacity = array[3];\n }\n if (metallicRoughness.baseColorTexture !== undefined) {\n pending.push(parser.assignTexture(materialParams, 'map', metallicRoughness.baseColorTexture, SRGBColorSpace));\n }\n materialParams.metalness = metallicRoughness.metallicFactor !== undefined ? metallicRoughness.metallicFactor : 1.0;\n materialParams.roughness = metallicRoughness.roughnessFactor !== undefined ? metallicRoughness.roughnessFactor : 1.0;\n if (metallicRoughness.metallicRoughnessTexture !== undefined) {\n pending.push(parser.assignTexture(materialParams, 'metalnessMap', metallicRoughness.metallicRoughnessTexture));\n pending.push(parser.assignTexture(materialParams, 'roughnessMap', metallicRoughness.metallicRoughnessTexture));\n }\n materialType = this._invokeOne(function (ext) {\n return ext.getMaterialType && ext.getMaterialType(materialIndex);\n });\n pending.push(Promise.all(this._invokeAll(function (ext) {\n return ext.extendMaterialParams && ext.extendMaterialParams(materialIndex, materialParams);\n })));\n }\n if (materialDef.doubleSided === true) {\n materialParams.side = DoubleSide;\n }\n const alphaMode = materialDef.alphaMode || ALPHA_MODES.OPAQUE;\n if (alphaMode === ALPHA_MODES.BLEND) {\n materialParams.transparent = true;\n\n // See: https://github.com/mrdoob/three.js/issues/17706\n materialParams.depthWrite = false;\n } else {\n materialParams.transparent = false;\n if (alphaMode === ALPHA_MODES.MASK) {\n materialParams.alphaTest = materialDef.alphaCutoff !== undefined ? materialDef.alphaCutoff : 0.5;\n }\n }\n if (materialDef.normalTexture !== undefined && materialType !== MeshBasicMaterial) {\n pending.push(parser.assignTexture(materialParams, 'normalMap', materialDef.normalTexture));\n materialParams.normalScale = new Vector2(1, 1);\n if (materialDef.normalTexture.scale !== undefined) {\n const scale = materialDef.normalTexture.scale;\n materialParams.normalScale.set(scale, scale);\n }\n }\n if (materialDef.occlusionTexture !== undefined && materialType !== MeshBasicMaterial) {\n pending.push(parser.assignTexture(materialParams, 'aoMap', materialDef.occlusionTexture));\n if (materialDef.occlusionTexture.strength !== undefined) {\n materialParams.aoMapIntensity = materialDef.occlusionTexture.strength;\n }\n }\n if (materialDef.emissiveFactor !== undefined && materialType !== MeshBasicMaterial) {\n const emissiveFactor = materialDef.emissiveFactor;\n materialParams.emissive = new Color().setRGB(emissiveFactor[0], emissiveFactor[1], emissiveFactor[2], LinearSRGBColorSpace);\n }\n if (materialDef.emissiveTexture !== undefined && materialType !== MeshBasicMaterial) {\n pending.push(parser.assignTexture(materialParams, 'emissiveMap', materialDef.emissiveTexture, SRGBColorSpace));\n }\n return Promise.all(pending).then(function () {\n const material = new materialType(materialParams);\n if (materialDef.name) material.name = materialDef.name;\n assignExtrasToUserData(material, materialDef);\n parser.associations.set(material, {\n materials: materialIndex\n });\n if (materialDef.extensions) addUnknownExtensionsToUserData(extensions, material, materialDef);\n return material;\n });\n }\n\n /** When Object3D instances are targeted by animation, they need unique names. */\n createUniqueName(originalName) {\n const sanitizedName = PropertyBinding.sanitizeNodeName(originalName || '');\n if (sanitizedName in this.nodeNamesUsed) {\n return sanitizedName + '_' + ++this.nodeNamesUsed[sanitizedName];\n } else {\n this.nodeNamesUsed[sanitizedName] = 0;\n return sanitizedName;\n }\n }\n\n /**\n * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#geometry\n *\n * Creates BufferGeometries from primitives.\n *\n * @param {Array} primitives\n * @return {Promise>}\n */\n loadGeometries(primitives) {\n const parser = this;\n const extensions = this.extensions;\n const cache = this.primitiveCache;\n function createDracoPrimitive(primitive) {\n return extensions[EXTENSIONS.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(primitive, parser).then(function (geometry) {\n return addPrimitiveAttributes(geometry, primitive, parser);\n });\n }\n const pending = [];\n for (let i = 0, il = primitives.length; i < il; i++) {\n const primitive = primitives[i];\n const cacheKey = createPrimitiveKey(primitive);\n\n // See if we've already created this geometry\n const cached = cache[cacheKey];\n if (cached) {\n // Use the cached geometry if it exists\n pending.push(cached.promise);\n } else {\n let geometryPromise;\n if (primitive.extensions && primitive.extensions[EXTENSIONS.KHR_DRACO_MESH_COMPRESSION]) {\n // Use DRACO geometry if available\n geometryPromise = createDracoPrimitive(primitive);\n } else {\n // Otherwise create a new geometry\n geometryPromise = addPrimitiveAttributes(new BufferGeometry(), primitive, parser);\n }\n\n // Cache this geometry\n cache[cacheKey] = {\n primitive: primitive,\n promise: geometryPromise\n };\n pending.push(geometryPromise);\n }\n }\n return Promise.all(pending);\n }\n\n /**\n * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#meshes\n * @param {number} meshIndex\n * @return {Promise}\n */\n loadMesh(meshIndex) {\n const parser = this;\n const json = this.json;\n const extensions = this.extensions;\n const meshDef = json.meshes[meshIndex];\n const primitives = meshDef.primitives;\n const pending = [];\n for (let i = 0, il = primitives.length; i < il; i++) {\n const material = primitives[i].material === undefined ? createDefaultMaterial(this.cache) : this.getDependency('material', primitives[i].material);\n pending.push(material);\n }\n pending.push(parser.loadGeometries(primitives));\n return Promise.all(pending).then(function (results) {\n const materials = results.slice(0, results.length - 1);\n const geometries = results[results.length - 1];\n const meshes = [];\n for (let i = 0, il = geometries.length; i < il; i++) {\n const geometry = geometries[i];\n const primitive = primitives[i];\n\n // 1. create Mesh\n\n let mesh;\n const material = materials[i];\n if (primitive.mode === WEBGL_CONSTANTS.TRIANGLES || primitive.mode === WEBGL_CONSTANTS.TRIANGLE_STRIP || primitive.mode === WEBGL_CONSTANTS.TRIANGLE_FAN || primitive.mode === undefined) {\n // .isSkinnedMesh isn't in glTF spec. See ._markDefs()\n mesh = meshDef.isSkinnedMesh === true ? new SkinnedMesh(geometry, material) : new Mesh(geometry, material);\n if (mesh.isSkinnedMesh === true) {\n // normalize skin weights to fix malformed assets (see #15319)\n mesh.normalizeSkinWeights();\n }\n if (primitive.mode === WEBGL_CONSTANTS.TRIANGLE_STRIP) {\n mesh.geometry = toTrianglesDrawMode(mesh.geometry, TriangleStripDrawMode);\n } else if (primitive.mode === WEBGL_CONSTANTS.TRIANGLE_FAN) {\n mesh.geometry = toTrianglesDrawMode(mesh.geometry, TriangleFanDrawMode);\n }\n } else if (primitive.mode === WEBGL_CONSTANTS.LINES) {\n mesh = new LineSegments(geometry, material);\n } else if (primitive.mode === WEBGL_CONSTANTS.LINE_STRIP) {\n mesh = new Line(geometry, material);\n } else if (primitive.mode === WEBGL_CONSTANTS.LINE_LOOP) {\n mesh = new LineLoop(geometry, material);\n } else if (primitive.mode === WEBGL_CONSTANTS.POINTS) {\n mesh = new Points(geometry, material);\n } else {\n throw new Error('THREE.GLTFLoader: Primitive mode unsupported: ' + primitive.mode);\n }\n if (Object.keys(mesh.geometry.morphAttributes).length > 0) {\n updateMorphTargets(mesh, meshDef);\n }\n mesh.name = parser.createUniqueName(meshDef.name || 'mesh_' + meshIndex);\n assignExtrasToUserData(mesh, meshDef);\n if (primitive.extensions) addUnknownExtensionsToUserData(extensions, mesh, primitive);\n parser.assignFinalMaterial(mesh);\n meshes.push(mesh);\n }\n for (let i = 0, il = meshes.length; i < il; i++) {\n parser.associations.set(meshes[i], {\n meshes: meshIndex,\n primitives: i\n });\n }\n if (meshes.length === 1) {\n if (meshDef.extensions) addUnknownExtensionsToUserData(extensions, meshes[0], meshDef);\n return meshes[0];\n }\n const group = new Group();\n if (meshDef.extensions) addUnknownExtensionsToUserData(extensions, group, meshDef);\n parser.associations.set(group, {\n meshes: meshIndex\n });\n for (let i = 0, il = meshes.length; i < il; i++) {\n group.add(meshes[i]);\n }\n return group;\n });\n }\n\n /**\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#cameras\n * @param {number} cameraIndex\n * @return {Promise}\n */\n loadCamera(cameraIndex) {\n let camera;\n const cameraDef = this.json.cameras[cameraIndex];\n const params = cameraDef[cameraDef.type];\n if (!params) {\n console.warn('THREE.GLTFLoader: Missing camera parameters.');\n return;\n }\n if (cameraDef.type === 'perspective') {\n camera = new PerspectiveCamera(MathUtils.radToDeg(params.yfov), params.aspectRatio || 1, params.znear || 1, params.zfar || 2e6);\n } else if (cameraDef.type === 'orthographic') {\n camera = new OrthographicCamera(-params.xmag, params.xmag, params.ymag, -params.ymag, params.znear, params.zfar);\n }\n if (cameraDef.name) camera.name = this.createUniqueName(cameraDef.name);\n assignExtrasToUserData(camera, cameraDef);\n return Promise.resolve(camera);\n }\n\n /**\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins\n * @param {number} skinIndex\n * @return {Promise}\n */\n loadSkin(skinIndex) {\n const skinDef = this.json.skins[skinIndex];\n const pending = [];\n for (let i = 0, il = skinDef.joints.length; i < il; i++) {\n pending.push(this._loadNodeShallow(skinDef.joints[i]));\n }\n if (skinDef.inverseBindMatrices !== undefined) {\n pending.push(this.getDependency('accessor', skinDef.inverseBindMatrices));\n } else {\n pending.push(null);\n }\n return Promise.all(pending).then(function (results) {\n const inverseBindMatrices = results.pop();\n const jointNodes = results;\n\n // Note that bones (joint nodes) may or may not be in the\n // scene graph at this time.\n\n const bones = [];\n const boneInverses = [];\n for (let i = 0, il = jointNodes.length; i < il; i++) {\n const jointNode = jointNodes[i];\n if (jointNode) {\n bones.push(jointNode);\n const mat = new Matrix4();\n if (inverseBindMatrices !== null) {\n mat.fromArray(inverseBindMatrices.array, i * 16);\n }\n boneInverses.push(mat);\n } else {\n console.warn('THREE.GLTFLoader: Joint \"%s\" could not be found.', skinDef.joints[i]);\n }\n }\n return new Skeleton(bones, boneInverses);\n });\n }\n\n /**\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#animations\n * @param {number} animationIndex\n * @return {Promise}\n */\n loadAnimation(animationIndex) {\n const json = this.json;\n const parser = this;\n const animationDef = json.animations[animationIndex];\n const animationName = animationDef.name ? animationDef.name : 'animation_' + animationIndex;\n const pendingNodes = [];\n const pendingInputAccessors = [];\n const pendingOutputAccessors = [];\n const pendingSamplers = [];\n const pendingTargets = [];\n for (let i = 0, il = animationDef.channels.length; i < il; i++) {\n const channel = animationDef.channels[i];\n const sampler = animationDef.samplers[channel.sampler];\n const target = channel.target;\n const name = target.node;\n const input = animationDef.parameters !== undefined ? animationDef.parameters[sampler.input] : sampler.input;\n const output = animationDef.parameters !== undefined ? animationDef.parameters[sampler.output] : sampler.output;\n if (target.node === undefined) continue;\n pendingNodes.push(this.getDependency('node', name));\n pendingInputAccessors.push(this.getDependency('accessor', input));\n pendingOutputAccessors.push(this.getDependency('accessor', output));\n pendingSamplers.push(sampler);\n pendingTargets.push(target);\n }\n return Promise.all([Promise.all(pendingNodes), Promise.all(pendingInputAccessors), Promise.all(pendingOutputAccessors), Promise.all(pendingSamplers), Promise.all(pendingTargets)]).then(function (dependencies) {\n const nodes = dependencies[0];\n const inputAccessors = dependencies[1];\n const outputAccessors = dependencies[2];\n const samplers = dependencies[3];\n const targets = dependencies[4];\n const tracks = [];\n for (let i = 0, il = nodes.length; i < il; i++) {\n const node = nodes[i];\n const inputAccessor = inputAccessors[i];\n const outputAccessor = outputAccessors[i];\n const sampler = samplers[i];\n const target = targets[i];\n if (node === undefined) continue;\n if (node.updateMatrix) {\n node.updateMatrix();\n }\n const createdTracks = parser._createAnimationTracks(node, inputAccessor, outputAccessor, sampler, target);\n if (createdTracks) {\n for (let k = 0; k < createdTracks.length; k++) {\n tracks.push(createdTracks[k]);\n }\n }\n }\n return new AnimationClip(animationName, undefined, tracks);\n });\n }\n createNodeMesh(nodeIndex) {\n const json = this.json;\n const parser = this;\n const nodeDef = json.nodes[nodeIndex];\n if (nodeDef.mesh === undefined) return null;\n return parser.getDependency('mesh', nodeDef.mesh).then(function (mesh) {\n const node = parser._getNodeRef(parser.meshCache, nodeDef.mesh, mesh);\n\n // if weights are provided on the node, override weights on the mesh.\n if (nodeDef.weights !== undefined) {\n node.traverse(function (o) {\n if (!o.isMesh) return;\n for (let i = 0, il = nodeDef.weights.length; i < il; i++) {\n o.morphTargetInfluences[i] = nodeDef.weights[i];\n }\n });\n }\n return node;\n });\n }\n\n /**\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#nodes-and-hierarchy\n * @param {number} nodeIndex\n * @return {Promise}\n */\n loadNode(nodeIndex) {\n const json = this.json;\n const parser = this;\n const nodeDef = json.nodes[nodeIndex];\n const nodePending = parser._loadNodeShallow(nodeIndex);\n const childPending = [];\n const childrenDef = nodeDef.children || [];\n for (let i = 0, il = childrenDef.length; i < il; i++) {\n childPending.push(parser.getDependency('node', childrenDef[i]));\n }\n const skeletonPending = nodeDef.skin === undefined ? Promise.resolve(null) : parser.getDependency('skin', nodeDef.skin);\n return Promise.all([nodePending, Promise.all(childPending), skeletonPending]).then(function (results) {\n const node = results[0];\n const children = results[1];\n const skeleton = results[2];\n if (skeleton !== null) {\n // This full traverse should be fine because\n // child glTF nodes have not been added to this node yet.\n node.traverse(function (mesh) {\n if (!mesh.isSkinnedMesh) return;\n mesh.bind(skeleton, _identityMatrix);\n });\n }\n for (let i = 0, il = children.length; i < il; i++) {\n node.add(children[i]);\n }\n return node;\n });\n }\n\n // ._loadNodeShallow() parses a single node.\n // skin and child nodes are created and added in .loadNode() (no '_' prefix).\n _loadNodeShallow(nodeIndex) {\n const json = this.json;\n const extensions = this.extensions;\n const parser = this;\n\n // This method is called from .loadNode() and .loadSkin().\n // Cache a node to avoid duplication.\n\n if (this.nodeCache[nodeIndex] !== undefined) {\n return this.nodeCache[nodeIndex];\n }\n const nodeDef = json.nodes[nodeIndex];\n\n // reserve node's name before its dependencies, so the root has the intended name.\n const nodeName = nodeDef.name ? parser.createUniqueName(nodeDef.name) : '';\n const pending = [];\n const meshPromise = parser._invokeOne(function (ext) {\n return ext.createNodeMesh && ext.createNodeMesh(nodeIndex);\n });\n if (meshPromise) {\n pending.push(meshPromise);\n }\n if (nodeDef.camera !== undefined) {\n pending.push(parser.getDependency('camera', nodeDef.camera).then(function (camera) {\n return parser._getNodeRef(parser.cameraCache, nodeDef.camera, camera);\n }));\n }\n parser._invokeAll(function (ext) {\n return ext.createNodeAttachment && ext.createNodeAttachment(nodeIndex);\n }).forEach(function (promise) {\n pending.push(promise);\n });\n this.nodeCache[nodeIndex] = Promise.all(pending).then(function (objects) {\n let node;\n\n // .isBone isn't in glTF spec. See ._markDefs\n if (nodeDef.isBone === true) {\n node = new Bone();\n } else if (objects.length > 1) {\n node = new Group();\n } else if (objects.length === 1) {\n node = objects[0];\n } else {\n node = new Object3D();\n }\n if (node !== objects[0]) {\n for (let i = 0, il = objects.length; i < il; i++) {\n node.add(objects[i]);\n }\n }\n if (nodeDef.name) {\n node.userData.name = nodeDef.name;\n node.name = nodeName;\n }\n assignExtrasToUserData(node, nodeDef);\n if (nodeDef.extensions) addUnknownExtensionsToUserData(extensions, node, nodeDef);\n if (nodeDef.matrix !== undefined) {\n const matrix = new Matrix4();\n matrix.fromArray(nodeDef.matrix);\n node.applyMatrix4(matrix);\n } else {\n if (nodeDef.translation !== undefined) {\n node.position.fromArray(nodeDef.translation);\n }\n if (nodeDef.rotation !== undefined) {\n node.quaternion.fromArray(nodeDef.rotation);\n }\n if (nodeDef.scale !== undefined) {\n node.scale.fromArray(nodeDef.scale);\n }\n }\n if (!parser.associations.has(node)) {\n parser.associations.set(node, {});\n }\n parser.associations.get(node).nodes = nodeIndex;\n return node;\n });\n return this.nodeCache[nodeIndex];\n }\n\n /**\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#scenes\n * @param {number} sceneIndex\n * @return {Promise}\n */\n loadScene(sceneIndex) {\n const extensions = this.extensions;\n const sceneDef = this.json.scenes[sceneIndex];\n const parser = this;\n\n // Loader returns Group, not Scene.\n // See: https://github.com/mrdoob/three.js/issues/18342#issuecomment-578981172\n const scene = new Group();\n if (sceneDef.name) scene.name = parser.createUniqueName(sceneDef.name);\n assignExtrasToUserData(scene, sceneDef);\n if (sceneDef.extensions) addUnknownExtensionsToUserData(extensions, scene, sceneDef);\n const nodeIds = sceneDef.nodes || [];\n const pending = [];\n for (let i = 0, il = nodeIds.length; i < il; i++) {\n pending.push(parser.getDependency('node', nodeIds[i]));\n }\n return Promise.all(pending).then(function (nodes) {\n for (let i = 0, il = nodes.length; i < il; i++) {\n scene.add(nodes[i]);\n }\n\n // Removes dangling associations, associations that reference a node that\n // didn't make it into the scene.\n const reduceAssociations = node => {\n const reducedAssociations = new Map();\n for (const [key, value] of parser.associations) {\n if (key instanceof Material || key instanceof Texture) {\n reducedAssociations.set(key, value);\n }\n }\n node.traverse(node => {\n const mappings = parser.associations.get(node);\n if (mappings != null) {\n reducedAssociations.set(node, mappings);\n }\n });\n return reducedAssociations;\n };\n parser.associations = reduceAssociations(scene);\n return scene;\n });\n }\n _createAnimationTracks(node, inputAccessor, outputAccessor, sampler, target) {\n const tracks = [];\n const targetName = node.name ? node.name : node.uuid;\n const targetNames = [];\n if (PATH_PROPERTIES[target.path] === PATH_PROPERTIES.weights) {\n node.traverse(function (object) {\n if (object.morphTargetInfluences) {\n targetNames.push(object.name ? object.name : object.uuid);\n }\n });\n } else {\n targetNames.push(targetName);\n }\n let TypedKeyframeTrack;\n switch (PATH_PROPERTIES[target.path]) {\n case PATH_PROPERTIES.weights:\n TypedKeyframeTrack = NumberKeyframeTrack;\n break;\n case PATH_PROPERTIES.rotation:\n TypedKeyframeTrack = QuaternionKeyframeTrack;\n break;\n case PATH_PROPERTIES.position:\n case PATH_PROPERTIES.scale:\n TypedKeyframeTrack = VectorKeyframeTrack;\n break;\n default:\n switch (outputAccessor.itemSize) {\n case 1:\n TypedKeyframeTrack = NumberKeyframeTrack;\n break;\n case 2:\n case 3:\n default:\n TypedKeyframeTrack = VectorKeyframeTrack;\n break;\n }\n break;\n }\n const interpolation = sampler.interpolation !== undefined ? INTERPOLATION[sampler.interpolation] : InterpolateLinear;\n const outputArray = this._getArrayFromAccessor(outputAccessor);\n for (let j = 0, jl = targetNames.length; j < jl; j++) {\n const track = new TypedKeyframeTrack(targetNames[j] + '.' + PATH_PROPERTIES[target.path], inputAccessor.array, outputArray, interpolation);\n\n // Override interpolation with custom factory method.\n if (sampler.interpolation === 'CUBICSPLINE') {\n this._createCubicSplineTrackInterpolant(track);\n }\n tracks.push(track);\n }\n return tracks;\n }\n _getArrayFromAccessor(accessor) {\n let outputArray = accessor.array;\n if (accessor.normalized) {\n const scale = getNormalizedComponentScale(outputArray.constructor);\n const scaled = new Float32Array(outputArray.length);\n for (let j = 0, jl = outputArray.length; j < jl; j++) {\n scaled[j] = outputArray[j] * scale;\n }\n outputArray = scaled;\n }\n return outputArray;\n }\n _createCubicSplineTrackInterpolant(track) {\n track.createInterpolant = function InterpolantFactoryMethodGLTFCubicSpline(result) {\n // A CUBICSPLINE keyframe in glTF has three output values for each input value,\n // representing inTangent, splineVertex, and outTangent. As a result, track.getValueSize()\n // must be divided by three to get the interpolant's sampleSize argument.\n\n const interpolantType = this instanceof QuaternionKeyframeTrack ? GLTFCubicSplineQuaternionInterpolant : GLTFCubicSplineInterpolant;\n return new interpolantType(this.times, this.values, this.getValueSize() / 3, result);\n };\n\n // Mark as CUBICSPLINE. `track.getInterpolation()` doesn't support custom interpolants.\n track.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = true;\n }\n}\n\n/**\n * @param {BufferGeometry} geometry\n * @param {GLTF.Primitive} primitiveDef\n * @param {GLTFParser} parser\n */\nfunction computeBounds(geometry, primitiveDef, parser) {\n const attributes = primitiveDef.attributes;\n const box = new Box3();\n if (attributes.POSITION !== undefined) {\n const accessor = parser.json.accessors[attributes.POSITION];\n const min = accessor.min;\n const max = accessor.max;\n\n // glTF requires 'min' and 'max', but VRM (which extends glTF) currently ignores that requirement.\n\n if (min !== undefined && max !== undefined) {\n box.set(new Vector3(min[0], min[1], min[2]), new Vector3(max[0], max[1], max[2]));\n if (accessor.normalized) {\n const boxScale = getNormalizedComponentScale(WEBGL_COMPONENT_TYPES[accessor.componentType]);\n box.min.multiplyScalar(boxScale);\n box.max.multiplyScalar(boxScale);\n }\n } else {\n console.warn('THREE.GLTFLoader: Missing min/max properties for accessor POSITION.');\n return;\n }\n } else {\n return;\n }\n const targets = primitiveDef.targets;\n if (targets !== undefined) {\n const maxDisplacement = new Vector3();\n const vector = new Vector3();\n for (let i = 0, il = targets.length; i < il; i++) {\n const target = targets[i];\n if (target.POSITION !== undefined) {\n const accessor = parser.json.accessors[target.POSITION];\n const min = accessor.min;\n const max = accessor.max;\n\n // glTF requires 'min' and 'max', but VRM (which extends glTF) currently ignores that requirement.\n\n if (min !== undefined && max !== undefined) {\n // we need to get max of absolute components because target weight is [-1,1]\n vector.setX(Math.max(Math.abs(min[0]), Math.abs(max[0])));\n vector.setY(Math.max(Math.abs(min[1]), Math.abs(max[1])));\n vector.setZ(Math.max(Math.abs(min[2]), Math.abs(max[2])));\n if (accessor.normalized) {\n const boxScale = getNormalizedComponentScale(WEBGL_COMPONENT_TYPES[accessor.componentType]);\n vector.multiplyScalar(boxScale);\n }\n\n // Note: this assumes that the sum of all weights is at most 1. This isn't quite correct - it's more conservative\n // to assume that each target can have a max weight of 1. However, for some use cases - notably, when morph targets\n // are used to implement key-frame animations and as such only two are active at a time - this results in very large\n // boxes. So for now we make a box that's sometimes a touch too small but is hopefully mostly of reasonable size.\n maxDisplacement.max(vector);\n } else {\n console.warn('THREE.GLTFLoader: Missing min/max properties for accessor POSITION.');\n }\n }\n }\n\n // As per comment above this box isn't conservative, but has a reasonable size for a very large number of morph targets.\n box.expandByVector(maxDisplacement);\n }\n geometry.boundingBox = box;\n const sphere = new Sphere();\n box.getCenter(sphere.center);\n sphere.radius = box.min.distanceTo(box.max) / 2;\n geometry.boundingSphere = sphere;\n}\n\n/**\n * @param {BufferGeometry} geometry\n * @param {GLTF.Primitive} primitiveDef\n * @param {GLTFParser} parser\n * @return {Promise}\n */\nfunction addPrimitiveAttributes(geometry, primitiveDef, parser) {\n const attributes = primitiveDef.attributes;\n const pending = [];\n function assignAttributeAccessor(accessorIndex, attributeName) {\n return parser.getDependency('accessor', accessorIndex).then(function (accessor) {\n geometry.setAttribute(attributeName, accessor);\n });\n }\n for (const gltfAttributeName in attributes) {\n const threeAttributeName = ATTRIBUTES[gltfAttributeName] || gltfAttributeName.toLowerCase();\n\n // Skip attributes already provided by e.g. Draco extension.\n if (threeAttributeName in geometry.attributes) continue;\n pending.push(assignAttributeAccessor(attributes[gltfAttributeName], threeAttributeName));\n }\n if (primitiveDef.indices !== undefined && !geometry.index) {\n const accessor = parser.getDependency('accessor', primitiveDef.indices).then(function (accessor) {\n geometry.setIndex(accessor);\n });\n pending.push(accessor);\n }\n if (ColorManagement.workingColorSpace !== LinearSRGBColorSpace && 'COLOR_0' in attributes) {\n console.warn(`THREE.GLTFLoader: Converting vertex colors from \"srgb-linear\" to \"${ColorManagement.workingColorSpace}\" not supported.`);\n }\n assignExtrasToUserData(geometry, primitiveDef);\n computeBounds(geometry, primitiveDef, parser);\n return Promise.all(pending).then(function () {\n return primitiveDef.targets !== undefined ? addMorphTargets(geometry, primitiveDef.targets, parser) : geometry;\n });\n}\nexport { GLTFLoader };","import { EventDispatcher, MOUSE, Quaternion, Spherical, TOUCH, Vector2, Vector3, Plane, Ray, MathUtils } from 'three';\n\n// OrbitControls performs orbiting, dollying (zooming), and panning.\n// Unlike TrackballControls, it maintains the \"up\" direction object.up (+Y by default).\n//\n// Orbit - left mouse / touch: one-finger move\n// Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish\n// Pan - right mouse, or left mouse + ctrl/meta/shiftKey, or arrow keys / touch: two-finger move\n\nconst _changeEvent = {\n type: 'change'\n};\nconst _startEvent = {\n type: 'start'\n};\nconst _endEvent = {\n type: 'end'\n};\nconst _ray = new Ray();\nconst _plane = new Plane();\nconst TILT_LIMIT = Math.cos(70 * MathUtils.DEG2RAD);\nclass OrbitControls extends EventDispatcher {\n constructor(object, domElement) {\n super();\n this.object = object;\n this.domElement = domElement;\n this.domElement.style.touchAction = 'none'; // disable touch scroll\n\n // Set to false to disable this control\n this.enabled = true;\n\n // \"target\" sets the location of focus, where the object orbits around\n this.target = new Vector3();\n\n // Sets the 3D cursor (similar to Blender), from which the maxTargetRadius takes effect\n this.cursor = new Vector3();\n\n // How far you can dolly in and out ( PerspectiveCamera only )\n this.minDistance = 0;\n this.maxDistance = Infinity;\n\n // How far you can zoom in and out ( OrthographicCamera only )\n this.minZoom = 0;\n this.maxZoom = Infinity;\n\n // Limit camera target within a spherical area around the cursor\n this.minTargetRadius = 0;\n this.maxTargetRadius = Infinity;\n\n // How far you can orbit vertically, upper and lower limits.\n // Range is 0 to Math.PI radians.\n this.minPolarAngle = 0; // radians\n this.maxPolarAngle = Math.PI; // radians\n\n // How far you can orbit horizontally, upper and lower limits.\n // If set, the interval [ min, max ] must be a sub-interval of [ - 2 PI, 2 PI ], with ( max - min < 2 PI )\n this.minAzimuthAngle = -Infinity; // radians\n this.maxAzimuthAngle = Infinity; // radians\n\n // Set to true to enable damping (inertia)\n // If damping is enabled, you must call controls.update() in your animation loop\n this.enableDamping = false;\n this.dampingFactor = 0.05;\n\n // This option actually enables dollying in and out; left as \"zoom\" for backwards compatibility.\n // Set to false to disable zooming\n this.enableZoom = true;\n this.zoomSpeed = 1.0;\n\n // Set to false to disable rotating\n this.enableRotate = true;\n this.rotateSpeed = 1.0;\n\n // Set to false to disable panning\n this.enablePan = true;\n this.panSpeed = 1.0;\n this.screenSpacePanning = true; // if false, pan orthogonal to world-space direction camera.up\n this.keyPanSpeed = 7.0; // pixels moved per arrow key push\n this.zoomToCursor = false;\n\n // Set to true to automatically rotate around the target\n // If auto-rotate is enabled, you must call controls.update() in your animation loop\n this.autoRotate = false;\n this.autoRotateSpeed = 2.0; // 30 seconds per orbit when fps is 60\n\n // The four arrow keys\n this.keys = {\n LEFT: 'ArrowLeft',\n UP: 'ArrowUp',\n RIGHT: 'ArrowRight',\n BOTTOM: 'ArrowDown'\n };\n\n // Mouse buttons\n this.mouseButtons = {\n LEFT: MOUSE.ROTATE,\n MIDDLE: MOUSE.DOLLY,\n RIGHT: MOUSE.PAN\n };\n\n // Touch fingers\n this.touches = {\n ONE: TOUCH.ROTATE,\n TWO: TOUCH.DOLLY_PAN\n };\n\n // for reset\n this.target0 = this.target.clone();\n this.position0 = this.object.position.clone();\n this.zoom0 = this.object.zoom;\n\n // the target DOM element for key events\n this._domElementKeyEvents = null;\n\n //\n // public methods\n //\n\n this.getPolarAngle = function () {\n return spherical.phi;\n };\n this.getAzimuthalAngle = function () {\n return spherical.theta;\n };\n this.getDistance = function () {\n return this.object.position.distanceTo(this.target);\n };\n this.listenToKeyEvents = function (domElement) {\n domElement.addEventListener('keydown', onKeyDown);\n this._domElementKeyEvents = domElement;\n };\n this.stopListenToKeyEvents = function () {\n this._domElementKeyEvents.removeEventListener('keydown', onKeyDown);\n this._domElementKeyEvents = null;\n };\n this.saveState = function () {\n scope.target0.copy(scope.target);\n scope.position0.copy(scope.object.position);\n scope.zoom0 = scope.object.zoom;\n };\n this.reset = function () {\n scope.target.copy(scope.target0);\n scope.object.position.copy(scope.position0);\n scope.object.zoom = scope.zoom0;\n scope.object.updateProjectionMatrix();\n scope.dispatchEvent(_changeEvent);\n scope.update();\n state = STATE.NONE;\n };\n\n // this method is exposed, but perhaps it would be better if we can make it private...\n this.update = function () {\n const offset = new Vector3();\n\n // so camera.up is the orbit axis\n const quat = new Quaternion().setFromUnitVectors(object.up, new Vector3(0, 1, 0));\n const quatInverse = quat.clone().invert();\n const lastPosition = new Vector3();\n const lastQuaternion = new Quaternion();\n const lastTargetPosition = new Vector3();\n const twoPI = 2 * Math.PI;\n return function update() {\n let deltaTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n const position = scope.object.position;\n offset.copy(position).sub(scope.target);\n\n // rotate offset to \"y-axis-is-up\" space\n offset.applyQuaternion(quat);\n\n // angle from z-axis around y-axis\n spherical.setFromVector3(offset);\n if (scope.autoRotate && state === STATE.NONE) {\n rotateLeft(getAutoRotationAngle(deltaTime));\n }\n if (scope.enableDamping) {\n spherical.theta += sphericalDelta.theta * scope.dampingFactor;\n spherical.phi += sphericalDelta.phi * scope.dampingFactor;\n } else {\n spherical.theta += sphericalDelta.theta;\n spherical.phi += sphericalDelta.phi;\n }\n\n // restrict theta to be between desired limits\n\n let min = scope.minAzimuthAngle;\n let max = scope.maxAzimuthAngle;\n if (isFinite(min) && isFinite(max)) {\n if (min < -Math.PI) min += twoPI;else if (min > Math.PI) min -= twoPI;\n if (max < -Math.PI) max += twoPI;else if (max > Math.PI) max -= twoPI;\n if (min <= max) {\n spherical.theta = Math.max(min, Math.min(max, spherical.theta));\n } else {\n spherical.theta = spherical.theta > (min + max) / 2 ? Math.max(min, spherical.theta) : Math.min(max, spherical.theta);\n }\n }\n\n // restrict phi to be between desired limits\n spherical.phi = Math.max(scope.minPolarAngle, Math.min(scope.maxPolarAngle, spherical.phi));\n spherical.makeSafe();\n\n // move target to panned location\n\n if (scope.enableDamping === true) {\n scope.target.addScaledVector(panOffset, scope.dampingFactor);\n } else {\n scope.target.add(panOffset);\n }\n\n // Limit the target distance from the cursor to create a sphere around the center of interest\n scope.target.sub(scope.cursor);\n scope.target.clampLength(scope.minTargetRadius, scope.maxTargetRadius);\n scope.target.add(scope.cursor);\n let zoomChanged = false;\n // adjust the camera position based on zoom only if we're not zooming to the cursor or if it's an ortho camera\n // we adjust zoom later in these cases\n if (scope.zoomToCursor && performCursorZoom || scope.object.isOrthographicCamera) {\n spherical.radius = clampDistance(spherical.radius);\n } else {\n const prevRadius = spherical.radius;\n spherical.radius = clampDistance(spherical.radius * scale);\n zoomChanged = prevRadius != spherical.radius;\n }\n offset.setFromSpherical(spherical);\n\n // rotate offset back to \"camera-up-vector-is-up\" space\n offset.applyQuaternion(quatInverse);\n position.copy(scope.target).add(offset);\n scope.object.lookAt(scope.target);\n if (scope.enableDamping === true) {\n sphericalDelta.theta *= 1 - scope.dampingFactor;\n sphericalDelta.phi *= 1 - scope.dampingFactor;\n panOffset.multiplyScalar(1 - scope.dampingFactor);\n } else {\n sphericalDelta.set(0, 0, 0);\n panOffset.set(0, 0, 0);\n }\n\n // adjust camera position\n if (scope.zoomToCursor && performCursorZoom) {\n let newRadius = null;\n if (scope.object.isPerspectiveCamera) {\n // move the camera down the pointer ray\n // this method avoids floating point error\n const prevRadius = offset.length();\n newRadius = clampDistance(prevRadius * scale);\n const radiusDelta = prevRadius - newRadius;\n scope.object.position.addScaledVector(dollyDirection, radiusDelta);\n scope.object.updateMatrixWorld();\n zoomChanged = !!radiusDelta;\n } else if (scope.object.isOrthographicCamera) {\n // adjust the ortho camera position based on zoom changes\n const mouseBefore = new Vector3(mouse.x, mouse.y, 0);\n mouseBefore.unproject(scope.object);\n const prevZoom = scope.object.zoom;\n scope.object.zoom = Math.max(scope.minZoom, Math.min(scope.maxZoom, scope.object.zoom / scale));\n scope.object.updateProjectionMatrix();\n zoomChanged = prevZoom !== scope.object.zoom;\n const mouseAfter = new Vector3(mouse.x, mouse.y, 0);\n mouseAfter.unproject(scope.object);\n scope.object.position.sub(mouseAfter).add(mouseBefore);\n scope.object.updateMatrixWorld();\n newRadius = offset.length();\n } else {\n console.warn('WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled.');\n scope.zoomToCursor = false;\n }\n\n // handle the placement of the target\n if (newRadius !== null) {\n if (this.screenSpacePanning) {\n // position the orbit target in front of the new camera position\n scope.target.set(0, 0, -1).transformDirection(scope.object.matrix).multiplyScalar(newRadius).add(scope.object.position);\n } else {\n // get the ray and translation plane to compute target\n _ray.origin.copy(scope.object.position);\n _ray.direction.set(0, 0, -1).transformDirection(scope.object.matrix);\n\n // if the camera is 20 degrees above the horizon then don't adjust the focus target to avoid\n // extremely large values\n if (Math.abs(scope.object.up.dot(_ray.direction)) < TILT_LIMIT) {\n object.lookAt(scope.target);\n } else {\n _plane.setFromNormalAndCoplanarPoint(scope.object.up, scope.target);\n _ray.intersectPlane(_plane, scope.target);\n }\n }\n }\n } else if (scope.object.isOrthographicCamera) {\n const prevZoom = scope.object.zoom;\n scope.object.zoom = Math.max(scope.minZoom, Math.min(scope.maxZoom, scope.object.zoom / scale));\n if (prevZoom !== scope.object.zoom) {\n scope.object.updateProjectionMatrix();\n zoomChanged = true;\n }\n }\n scale = 1;\n performCursorZoom = false;\n\n // update condition is:\n // min(camera displacement, camera rotation in radians)^2 > EPS\n // using small-angle approximation cos(x/2) = 1 - x^2 / 8\n\n if (zoomChanged || lastPosition.distanceToSquared(scope.object.position) > EPS || 8 * (1 - lastQuaternion.dot(scope.object.quaternion)) > EPS || lastTargetPosition.distanceToSquared(scope.target) > EPS) {\n scope.dispatchEvent(_changeEvent);\n lastPosition.copy(scope.object.position);\n lastQuaternion.copy(scope.object.quaternion);\n lastTargetPosition.copy(scope.target);\n return true;\n }\n return false;\n };\n }();\n this.dispose = function () {\n scope.domElement.removeEventListener('contextmenu', onContextMenu);\n scope.domElement.removeEventListener('pointerdown', onPointerDown);\n scope.domElement.removeEventListener('pointercancel', onPointerUp);\n scope.domElement.removeEventListener('wheel', onMouseWheel);\n scope.domElement.removeEventListener('pointermove', onPointerMove);\n scope.domElement.removeEventListener('pointerup', onPointerUp);\n const document = scope.domElement.getRootNode(); // offscreen canvas compatibility\n\n document.removeEventListener('keydown', interceptControlDown, {\n capture: true\n });\n if (scope._domElementKeyEvents !== null) {\n scope._domElementKeyEvents.removeEventListener('keydown', onKeyDown);\n scope._domElementKeyEvents = null;\n }\n\n //scope.dispatchEvent( { type: 'dispose' } ); // should this be added here?\n };\n\n //\n // internals\n //\n\n const scope = this;\n const STATE = {\n NONE: -1,\n ROTATE: 0,\n DOLLY: 1,\n PAN: 2,\n TOUCH_ROTATE: 3,\n TOUCH_PAN: 4,\n TOUCH_DOLLY_PAN: 5,\n TOUCH_DOLLY_ROTATE: 6\n };\n let state = STATE.NONE;\n const EPS = 0.000001;\n\n // current position in spherical coordinates\n const spherical = new Spherical();\n const sphericalDelta = new Spherical();\n let scale = 1;\n const panOffset = new Vector3();\n const rotateStart = new Vector2();\n const rotateEnd = new Vector2();\n const rotateDelta = new Vector2();\n const panStart = new Vector2();\n const panEnd = new Vector2();\n const panDelta = new Vector2();\n const dollyStart = new Vector2();\n const dollyEnd = new Vector2();\n const dollyDelta = new Vector2();\n const dollyDirection = new Vector3();\n const mouse = new Vector2();\n let performCursorZoom = false;\n const pointers = [];\n const pointerPositions = {};\n let controlActive = false;\n function getAutoRotationAngle(deltaTime) {\n if (deltaTime !== null) {\n return 2 * Math.PI / 60 * scope.autoRotateSpeed * deltaTime;\n } else {\n return 2 * Math.PI / 60 / 60 * scope.autoRotateSpeed;\n }\n }\n function getZoomScale(delta) {\n const normalizedDelta = Math.abs(delta * 0.01);\n return Math.pow(0.95, scope.zoomSpeed * normalizedDelta);\n }\n function rotateLeft(angle) {\n sphericalDelta.theta -= angle;\n }\n function rotateUp(angle) {\n sphericalDelta.phi -= angle;\n }\n const panLeft = function () {\n const v = new Vector3();\n return function panLeft(distance, objectMatrix) {\n v.setFromMatrixColumn(objectMatrix, 0); // get X column of objectMatrix\n v.multiplyScalar(-distance);\n panOffset.add(v);\n };\n }();\n const panUp = function () {\n const v = new Vector3();\n return function panUp(distance, objectMatrix) {\n if (scope.screenSpacePanning === true) {\n v.setFromMatrixColumn(objectMatrix, 1);\n } else {\n v.setFromMatrixColumn(objectMatrix, 0);\n v.crossVectors(scope.object.up, v);\n }\n v.multiplyScalar(distance);\n panOffset.add(v);\n };\n }();\n\n // deltaX and deltaY are in pixels; right and down are positive\n const pan = function () {\n const offset = new Vector3();\n return function pan(deltaX, deltaY) {\n const element = scope.domElement;\n if (scope.object.isPerspectiveCamera) {\n // perspective\n const position = scope.object.position;\n offset.copy(position).sub(scope.target);\n let targetDistance = offset.length();\n\n // half of the fov is center to top of screen\n targetDistance *= Math.tan(scope.object.fov / 2 * Math.PI / 180.0);\n\n // we use only clientHeight here so aspect ratio does not distort speed\n panLeft(2 * deltaX * targetDistance / element.clientHeight, scope.object.matrix);\n panUp(2 * deltaY * targetDistance / element.clientHeight, scope.object.matrix);\n } else if (scope.object.isOrthographicCamera) {\n // orthographic\n panLeft(deltaX * (scope.object.right - scope.object.left) / scope.object.zoom / element.clientWidth, scope.object.matrix);\n panUp(deltaY * (scope.object.top - scope.object.bottom) / scope.object.zoom / element.clientHeight, scope.object.matrix);\n } else {\n // camera neither orthographic nor perspective\n console.warn('WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.');\n scope.enablePan = false;\n }\n };\n }();\n function dollyOut(dollyScale) {\n if (scope.object.isPerspectiveCamera || scope.object.isOrthographicCamera) {\n scale /= dollyScale;\n } else {\n console.warn('WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.');\n scope.enableZoom = false;\n }\n }\n function dollyIn(dollyScale) {\n if (scope.object.isPerspectiveCamera || scope.object.isOrthographicCamera) {\n scale *= dollyScale;\n } else {\n console.warn('WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.');\n scope.enableZoom = false;\n }\n }\n function updateZoomParameters(x, y) {\n if (!scope.zoomToCursor) {\n return;\n }\n performCursorZoom = true;\n const rect = scope.domElement.getBoundingClientRect();\n const dx = x - rect.left;\n const dy = y - rect.top;\n const w = rect.width;\n const h = rect.height;\n mouse.x = dx / w * 2 - 1;\n mouse.y = -(dy / h) * 2 + 1;\n dollyDirection.set(mouse.x, mouse.y, 1).unproject(scope.object).sub(scope.object.position).normalize();\n }\n function clampDistance(dist) {\n return Math.max(scope.minDistance, Math.min(scope.maxDistance, dist));\n }\n\n //\n // event callbacks - update the object state\n //\n\n function handleMouseDownRotate(event) {\n rotateStart.set(event.clientX, event.clientY);\n }\n function handleMouseDownDolly(event) {\n updateZoomParameters(event.clientX, event.clientX);\n dollyStart.set(event.clientX, event.clientY);\n }\n function handleMouseDownPan(event) {\n panStart.set(event.clientX, event.clientY);\n }\n function handleMouseMoveRotate(event) {\n rotateEnd.set(event.clientX, event.clientY);\n rotateDelta.subVectors(rotateEnd, rotateStart).multiplyScalar(scope.rotateSpeed);\n const element = scope.domElement;\n rotateLeft(2 * Math.PI * rotateDelta.x / element.clientHeight); // yes, height\n\n rotateUp(2 * Math.PI * rotateDelta.y / element.clientHeight);\n rotateStart.copy(rotateEnd);\n scope.update();\n }\n function handleMouseMoveDolly(event) {\n dollyEnd.set(event.clientX, event.clientY);\n dollyDelta.subVectors(dollyEnd, dollyStart);\n if (dollyDelta.y > 0) {\n dollyOut(getZoomScale(dollyDelta.y));\n } else if (dollyDelta.y < 0) {\n dollyIn(getZoomScale(dollyDelta.y));\n }\n dollyStart.copy(dollyEnd);\n scope.update();\n }\n function handleMouseMovePan(event) {\n panEnd.set(event.clientX, event.clientY);\n panDelta.subVectors(panEnd, panStart).multiplyScalar(scope.panSpeed);\n pan(panDelta.x, panDelta.y);\n panStart.copy(panEnd);\n scope.update();\n }\n function handleMouseWheel(event) {\n updateZoomParameters(event.clientX, event.clientY);\n if (event.deltaY < 0) {\n dollyIn(getZoomScale(event.deltaY));\n } else if (event.deltaY > 0) {\n dollyOut(getZoomScale(event.deltaY));\n }\n scope.update();\n }\n function handleKeyDown(event) {\n let needsUpdate = false;\n switch (event.code) {\n case scope.keys.UP:\n if (event.ctrlKey || event.metaKey || event.shiftKey) {\n rotateUp(2 * Math.PI * scope.rotateSpeed / scope.domElement.clientHeight);\n } else {\n pan(0, scope.keyPanSpeed);\n }\n needsUpdate = true;\n break;\n case scope.keys.BOTTOM:\n if (event.ctrlKey || event.metaKey || event.shiftKey) {\n rotateUp(-2 * Math.PI * scope.rotateSpeed / scope.domElement.clientHeight);\n } else {\n pan(0, -scope.keyPanSpeed);\n }\n needsUpdate = true;\n break;\n case scope.keys.LEFT:\n if (event.ctrlKey || event.metaKey || event.shiftKey) {\n rotateLeft(2 * Math.PI * scope.rotateSpeed / scope.domElement.clientHeight);\n } else {\n pan(scope.keyPanSpeed, 0);\n }\n needsUpdate = true;\n break;\n case scope.keys.RIGHT:\n if (event.ctrlKey || event.metaKey || event.shiftKey) {\n rotateLeft(-2 * Math.PI * scope.rotateSpeed / scope.domElement.clientHeight);\n } else {\n pan(-scope.keyPanSpeed, 0);\n }\n needsUpdate = true;\n break;\n }\n if (needsUpdate) {\n // prevent the browser from scrolling on cursor keys\n event.preventDefault();\n scope.update();\n }\n }\n function handleTouchStartRotate(event) {\n if (pointers.length === 1) {\n rotateStart.set(event.pageX, event.pageY);\n } else {\n const position = getSecondPointerPosition(event);\n const x = 0.5 * (event.pageX + position.x);\n const y = 0.5 * (event.pageY + position.y);\n rotateStart.set(x, y);\n }\n }\n function handleTouchStartPan(event) {\n if (pointers.length === 1) {\n panStart.set(event.pageX, event.pageY);\n } else {\n const position = getSecondPointerPosition(event);\n const x = 0.5 * (event.pageX + position.x);\n const y = 0.5 * (event.pageY + position.y);\n panStart.set(x, y);\n }\n }\n function handleTouchStartDolly(event) {\n const position = getSecondPointerPosition(event);\n const dx = event.pageX - position.x;\n const dy = event.pageY - position.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n dollyStart.set(0, distance);\n }\n function handleTouchStartDollyPan(event) {\n if (scope.enableZoom) handleTouchStartDolly(event);\n if (scope.enablePan) handleTouchStartPan(event);\n }\n function handleTouchStartDollyRotate(event) {\n if (scope.enableZoom) handleTouchStartDolly(event);\n if (scope.enableRotate) handleTouchStartRotate(event);\n }\n function handleTouchMoveRotate(event) {\n if (pointers.length == 1) {\n rotateEnd.set(event.pageX, event.pageY);\n } else {\n const position = getSecondPointerPosition(event);\n const x = 0.5 * (event.pageX + position.x);\n const y = 0.5 * (event.pageY + position.y);\n rotateEnd.set(x, y);\n }\n rotateDelta.subVectors(rotateEnd, rotateStart).multiplyScalar(scope.rotateSpeed);\n const element = scope.domElement;\n rotateLeft(2 * Math.PI * rotateDelta.x / element.clientHeight); // yes, height\n\n rotateUp(2 * Math.PI * rotateDelta.y / element.clientHeight);\n rotateStart.copy(rotateEnd);\n }\n function handleTouchMovePan(event) {\n if (pointers.length === 1) {\n panEnd.set(event.pageX, event.pageY);\n } else {\n const position = getSecondPointerPosition(event);\n const x = 0.5 * (event.pageX + position.x);\n const y = 0.5 * (event.pageY + position.y);\n panEnd.set(x, y);\n }\n panDelta.subVectors(panEnd, panStart).multiplyScalar(scope.panSpeed);\n pan(panDelta.x, panDelta.y);\n panStart.copy(panEnd);\n }\n function handleTouchMoveDolly(event) {\n const position = getSecondPointerPosition(event);\n const dx = event.pageX - position.x;\n const dy = event.pageY - position.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n dollyEnd.set(0, distance);\n dollyDelta.set(0, Math.pow(dollyEnd.y / dollyStart.y, scope.zoomSpeed));\n dollyOut(dollyDelta.y);\n dollyStart.copy(dollyEnd);\n const centerX = (event.pageX + position.x) * 0.5;\n const centerY = (event.pageY + position.y) * 0.5;\n updateZoomParameters(centerX, centerY);\n }\n function handleTouchMoveDollyPan(event) {\n if (scope.enableZoom) handleTouchMoveDolly(event);\n if (scope.enablePan) handleTouchMovePan(event);\n }\n function handleTouchMoveDollyRotate(event) {\n if (scope.enableZoom) handleTouchMoveDolly(event);\n if (scope.enableRotate) handleTouchMoveRotate(event);\n }\n\n //\n // event handlers - FSM: listen for events and reset state\n //\n\n function onPointerDown(event) {\n if (scope.enabled === false) return;\n if (pointers.length === 0) {\n scope.domElement.setPointerCapture(event.pointerId);\n scope.domElement.addEventListener('pointermove', onPointerMove);\n scope.domElement.addEventListener('pointerup', onPointerUp);\n }\n\n //\n\n if (isTrackingPointer(event)) return;\n\n //\n\n addPointer(event);\n if (event.pointerType === 'touch') {\n onTouchStart(event);\n } else {\n onMouseDown(event);\n }\n }\n function onPointerMove(event) {\n if (scope.enabled === false) return;\n if (event.pointerType === 'touch') {\n onTouchMove(event);\n } else {\n onMouseMove(event);\n }\n }\n function onPointerUp(event) {\n removePointer(event);\n switch (pointers.length) {\n case 0:\n scope.domElement.releasePointerCapture(event.pointerId);\n scope.domElement.removeEventListener('pointermove', onPointerMove);\n scope.domElement.removeEventListener('pointerup', onPointerUp);\n scope.dispatchEvent(_endEvent);\n state = STATE.NONE;\n break;\n case 1:\n const pointerId = pointers[0];\n const position = pointerPositions[pointerId];\n\n // minimal placeholder event - allows state correction on pointer-up\n onTouchStart({\n pointerId: pointerId,\n pageX: position.x,\n pageY: position.y\n });\n break;\n }\n }\n function onMouseDown(event) {\n let mouseAction;\n switch (event.button) {\n case 0:\n mouseAction = scope.mouseButtons.LEFT;\n break;\n case 1:\n mouseAction = scope.mouseButtons.MIDDLE;\n break;\n case 2:\n mouseAction = scope.mouseButtons.RIGHT;\n break;\n default:\n mouseAction = -1;\n }\n switch (mouseAction) {\n case MOUSE.DOLLY:\n if (scope.enableZoom === false) return;\n handleMouseDownDolly(event);\n state = STATE.DOLLY;\n break;\n case MOUSE.ROTATE:\n if (event.ctrlKey || event.metaKey || event.shiftKey) {\n if (scope.enablePan === false) return;\n handleMouseDownPan(event);\n state = STATE.PAN;\n } else {\n if (scope.enableRotate === false) return;\n handleMouseDownRotate(event);\n state = STATE.ROTATE;\n }\n break;\n case MOUSE.PAN:\n if (event.ctrlKey || event.metaKey || event.shiftKey) {\n if (scope.enableRotate === false) return;\n handleMouseDownRotate(event);\n state = STATE.ROTATE;\n } else {\n if (scope.enablePan === false) return;\n handleMouseDownPan(event);\n state = STATE.PAN;\n }\n break;\n default:\n state = STATE.NONE;\n }\n if (state !== STATE.NONE) {\n scope.dispatchEvent(_startEvent);\n }\n }\n function onMouseMove(event) {\n switch (state) {\n case STATE.ROTATE:\n if (scope.enableRotate === false) return;\n handleMouseMoveRotate(event);\n break;\n case STATE.DOLLY:\n if (scope.enableZoom === false) return;\n handleMouseMoveDolly(event);\n break;\n case STATE.PAN:\n if (scope.enablePan === false) return;\n handleMouseMovePan(event);\n break;\n }\n }\n function onMouseWheel(event) {\n if (scope.enabled === false || scope.enableZoom === false || state !== STATE.NONE) return;\n event.preventDefault();\n scope.dispatchEvent(_startEvent);\n handleMouseWheel(customWheelEvent(event));\n scope.dispatchEvent(_endEvent);\n }\n function customWheelEvent(event) {\n const mode = event.deltaMode;\n\n // minimal wheel event altered to meet delta-zoom demand\n const newEvent = {\n clientX: event.clientX,\n clientY: event.clientY,\n deltaY: event.deltaY\n };\n switch (mode) {\n case 1:\n // LINE_MODE\n newEvent.deltaY *= 16;\n break;\n case 2:\n // PAGE_MODE\n newEvent.deltaY *= 100;\n break;\n }\n\n // detect if event was triggered by pinching\n if (event.ctrlKey && !controlActive) {\n newEvent.deltaY *= 10;\n }\n return newEvent;\n }\n function interceptControlDown(event) {\n if (event.key === 'Control') {\n controlActive = true;\n const document = scope.domElement.getRootNode(); // offscreen canvas compatibility\n\n document.addEventListener('keyup', interceptControlUp, {\n passive: true,\n capture: true\n });\n }\n }\n function interceptControlUp(event) {\n if (event.key === 'Control') {\n controlActive = false;\n const document = scope.domElement.getRootNode(); // offscreen canvas compatibility\n\n document.removeEventListener('keyup', interceptControlUp, {\n passive: true,\n capture: true\n });\n }\n }\n function onKeyDown(event) {\n if (scope.enabled === false || scope.enablePan === false) return;\n handleKeyDown(event);\n }\n function onTouchStart(event) {\n trackPointer(event);\n switch (pointers.length) {\n case 1:\n switch (scope.touches.ONE) {\n case TOUCH.ROTATE:\n if (scope.enableRotate === false) return;\n handleTouchStartRotate(event);\n state = STATE.TOUCH_ROTATE;\n break;\n case TOUCH.PAN:\n if (scope.enablePan === false) return;\n handleTouchStartPan(event);\n state = STATE.TOUCH_PAN;\n break;\n default:\n state = STATE.NONE;\n }\n break;\n case 2:\n switch (scope.touches.TWO) {\n case TOUCH.DOLLY_PAN:\n if (scope.enableZoom === false && scope.enablePan === false) return;\n handleTouchStartDollyPan(event);\n state = STATE.TOUCH_DOLLY_PAN;\n break;\n case TOUCH.DOLLY_ROTATE:\n if (scope.enableZoom === false && scope.enableRotate === false) return;\n handleTouchStartDollyRotate(event);\n state = STATE.TOUCH_DOLLY_ROTATE;\n break;\n default:\n state = STATE.NONE;\n }\n break;\n default:\n state = STATE.NONE;\n }\n if (state !== STATE.NONE) {\n scope.dispatchEvent(_startEvent);\n }\n }\n function onTouchMove(event) {\n trackPointer(event);\n switch (state) {\n case STATE.TOUCH_ROTATE:\n if (scope.enableRotate === false) return;\n handleTouchMoveRotate(event);\n scope.update();\n break;\n case STATE.TOUCH_PAN:\n if (scope.enablePan === false) return;\n handleTouchMovePan(event);\n scope.update();\n break;\n case STATE.TOUCH_DOLLY_PAN:\n if (scope.enableZoom === false && scope.enablePan === false) return;\n handleTouchMoveDollyPan(event);\n scope.update();\n break;\n case STATE.TOUCH_DOLLY_ROTATE:\n if (scope.enableZoom === false && scope.enableRotate === false) return;\n handleTouchMoveDollyRotate(event);\n scope.update();\n break;\n default:\n state = STATE.NONE;\n }\n }\n function onContextMenu(event) {\n if (scope.enabled === false) return;\n event.preventDefault();\n }\n function addPointer(event) {\n pointers.push(event.pointerId);\n }\n function removePointer(event) {\n delete pointerPositions[event.pointerId];\n for (let i = 0; i < pointers.length; i++) {\n if (pointers[i] == event.pointerId) {\n pointers.splice(i, 1);\n return;\n }\n }\n }\n function isTrackingPointer(event) {\n for (let i = 0; i < pointers.length; i++) {\n if (pointers[i] == event.pointerId) return true;\n }\n return false;\n }\n function trackPointer(event) {\n let position = pointerPositions[event.pointerId];\n if (position === undefined) {\n position = new Vector2();\n pointerPositions[event.pointerId] = position;\n }\n position.set(event.pageX, event.pageY);\n }\n function getSecondPointerPosition(event) {\n const pointerId = event.pointerId === pointers[0] ? pointers[1] : pointers[0];\n return pointerPositions[pointerId];\n }\n\n //\n\n scope.domElement.addEventListener('contextmenu', onContextMenu);\n scope.domElement.addEventListener('pointerdown', onPointerDown);\n scope.domElement.addEventListener('pointercancel', onPointerUp);\n scope.domElement.addEventListener('wheel', onMouseWheel, {\n passive: false\n });\n const document = scope.domElement.getRootNode(); // offscreen canvas compatibility\n\n document.addEventListener('keydown', interceptControlDown, {\n passive: true,\n capture: true\n });\n\n // force an update at start\n\n this.update();\n }\n}\nexport { OrbitControls };","import React, { useRef, useEffect } from 'react'\nimport * as THREE from 'three'\nimport { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader'\nimport { OrbitControls } from 'three/addons/controls/OrbitControls.js'\nimport './index.scss'\n\n// Grober inhalt: Das wir auch 3D moderlierungen machen können und diese auch in die Webseite einbinden können und man z.B auch erweitern kann das der Nutzer z.B oberflächen verändern kann oder das sich das 3D-Objekt bewegt. Das ist der erste schritt für komplexere anwendungen wos darum geht räume in 3d zu gestalten und dann oberflächen entsprechend auszutauschen durch den Nutzer.\n\nconst ThreeDLogo = () => {\n const containerRef = useRef(null)\n\n useEffect(() => {\n const scene = new THREE.Scene()\n const camera = new THREE.PerspectiveCamera(\n 75,\n window.innerWidth / window.innerHeight,\n 0.1,\n 1000\n )\n camera.position.z = 4\n\n // Renderer\n const renderer = new THREE.WebGLRenderer()\n\n containerRef.current.appendChild(renderer.domElement)\n\n // enable antialiasing (smoother edges)\n renderer.setPixelRatio(window.devicePixelRatio)\n\n // set size // If mobile set to 80% of screen size else 50%\n renderer.setSize(\n window.innerWidth >= 768\n ? window.innerWidth * 0.3\n : window.innerWidth * 0.8,\n window.innerWidth >= 768\n ? window.innerHeight * 0.3\n : window.innerHeight * 0.4\n )\n\n // white background\n scene.background = new THREE.Color(0xffffff)\n\n // controls\n const controls = new OrbitControls(camera, renderer.domElement)\n controls.autoRotate = true\n controls.autoRotateSpeed = 3.0\n\n // Lights\n const lightIntensity = 2\n const lights = []\n const directions = [\n [0, 0, 1],\n [0, 0, -1],\n [1, 0, 0],\n [-1, 0, 0],\n [0, 1, 0],\n [0, -1, 0]\n ]\n directions.forEach(direction => {\n const light = new THREE.DirectionalLight(0xffffff, lightIntensity)\n light.position.set(...direction)\n scene.add(light)\n lights.push(light)\n })\n\n // Load 3D-Object\n let object\n const loader = new GLTFLoader()\n loader.load(\n '/logoHw.gltf',\n function(gltf) {\n scene.add(gltf.scene)\n },\n undefined,\n function(error) {\n console.error(error)\n }\n )\n\n // Animations-Loop\n const animate = function() {\n requestAnimationFrame(animate)\n controls.update()\n renderer.render(scene, camera)\n }\n\n animate()\n\n // Clear Scene\n return () => {\n // Clean up controls\n controls.dispose()\n\n // Clean up renderer\n renderer.dispose()\n\n // Remove the renderer's DOM element\n if (containerRef.current) {\n containerRef.current.removeChild(renderer.domElement)\n }\n\n // Clean up lights\n lights.forEach(light => scene.remove(light))\n\n // Clean up object\n if (object) {\n scene.remove(object)\n object.traverse(node => {\n if (node.geometry) {\n node.geometry.dispose()\n }\n if (node.material) {\n if (Array.isArray(node.material)) {\n node.material.forEach(material => material.dispose())\n } else {\n node.material.dispose()\n }\n }\n })\n }\n\n // Dispose of the scene\n // scene.dispose()\n }\n }, [])\n\n return (\n <>\n {/* Schreibe das man bei dem 3D Logo ausprobieren kann reinzuoomen, rauszomen und rotieren */}\n

\n Sie können das 3D-Logo mit dem Mausrad hinein- und herauszoomen sowie\n durch Drücken und Ziehen drehen.\n

\n
\n \n )\n}\n\nexport default ThreeDLogo\n","import React from 'react'\nimport Helmet from 'react-helmet'\nimport {\n Layout,\n BannerSmall,\n TextBox,\n BannerLinks,\n Breadcrumbs,\n BlogSlider,\n Appointment\n} from '../../components'\n\nimport BannerImage from '../../assets/projektuebersicht.jpg'\nimport boxes from '../../components/BannerLinks/DefaultBox'\nimport cards from '../../components/BlogSlider/DefaultCards'\nimport ThreeLogo from '../../components/3DLogo'\nimport { generateBreadcrumbsLinks } from '../../utils/index'\n\nimport Georg from '../../assets/georg_neu.png'\n\nconst SplitScreen = () => {\n const links = generateBreadcrumbsLinks(\n '/blog/interaktive-3d-modelle',\n 'Interaktive 3D-Modelle'\n )\n return (\n \n \n Interaktive 3D-Modelle}\n />\n \n\n \n

\n Interaktive 3D-Modelle für ihre Website\n
\n In der heutigen digitalen Ära ist es für Unternehmen wichtig,\n innovative Wege zu finden, um ihre Online-Präsenz zu stärken und\n ihren Kunden ein beeindruckendes Erlebnis zu bieten. Eine\n aufstrebende Technologie, die dies ermöglicht, sind interaktive\n 3D-Modelle, die nahtlos in Webseiten integriert werden können.\n

\n Unsere neuen Webdesign-Dienstleistungen bieten die Integration von\n interaktiven 3D-Modellen, die es Unternehmen ermöglichen, ihren\n Kunden ein interaktives Erlebnis zu bieten, bei dem Produkte aus\n verschiedenen Blickwinkeln betrachtet werden können.\n

\n Vorteile intaraktiver 3D-Modelle\n
\n Mit interaktiven 3D-Modellen können Nutzer tiefer in Produkte\n eintauchen und sie von allen Seiten betrachten. Aber das ist noch\n nicht alles. Unsere Experten haben auch Funktionen entwickelt, die\n es den Nutzern ermöglichen, Oberflächen anzupassen oder das\n 3D-Objekt in Bewegung zu setzen. Stellen Sie sich vor, Sie könnten\n die Oberfläche eines Möbelstücks ändern, um verschiedene Farben\n oder Texturen auszuprobieren, oder ein Fahrzeug auf virtuellen\n Straßen fahren lassen.\n

\n \n }\n />\n\n \n\n \n

\n Diese Integration bietet Unternehmen die Möglichkeit, Produkte und\n Dienstleistungen auf eine völlig neue Art und Weise zu\n präsentieren und ihren Kunden ein ansprechendes Erlebnis zu\n bieten.\n

\n Kontaktieren Sie uns noch heute, um mehr darüber zu erfahren, wie\n interaktive 3D-Modelle Ihre Online-Präsenz transformieren können.\n Die Zukunft des Webdesigns ist hier, und wir freuen uns darauf,\n Sie auf dieser spannenden Reise zu begleiten.\n

\n \n }\n />\n\n \n \n \n \n
\n )\n}\n\nexport default SplitScreen\n","export default __webpack_public_path__ + \"static/jointheteam-2b1dbe490e7a75b51f62994dbbc68d6e.jpg\";","export default __webpack_public_path__ + \"static/takeoff-081071ac91583c72fc038a1fa6d12b5c.jpg\";","export default __webpack_public_path__ + \"static/georg_neu-1db411ffcd0cb629f57db3b25e17f5cf.png\";","export default __webpack_public_path__ + \"static/handynavigation-91fc394574095530870a49035a74a401.jpg\";","export default __webpack_public_path__ + \"static/internet-explorer-gravestone-overlay-9eb6dd3187a1ad7cf61c865333595e2b.png\";","export default __webpack_public_path__ + \"static/matomo_m-a1b8b0cba88664b4e21ac50941966afe.png\";","export default __webpack_public_path__ + \"static/mouse.opt-9507d21ebc950a844784e0e1902c7923.gif\";","export default __webpack_public_path__ + \"static/projektuebersicht-3b0d0cca7e33df5e55e7b68d779cc633.jpg\";","export default __webpack_public_path__ + \"static/sandsoftime-db449af39aed656c1adcaa07b50ef348.jpg\";","export default __webpack_public_path__ + \"static/splitscreens-bc1232faca8e5ddf4d79d04306bbd664.jpg\";","export default __webpack_public_path__ + \"static/verlauf-b95c462b2f194c577196e2cf773da6f9.jpg\";"],"names":["boxes","text","image","JoinTheTeam","link","linkText","TakeOff","cards","tag","headline","backgroundImage","readingTime","ie_grave","whiteColor","subheadline","matomo_m","blackColor","Farbverlauf","SandsofTime","HandyNav","Mouse","HowIsYourDay","toTrianglesDrawMode","geometry","drawMode","console","warn","index","getIndex","indices","position","getAttribute","undefined","error","i","count","push","setIndex","numberOfTriangles","newIndices","getX","length","newGeometry","clone","clearGroups","GLTFLoader","constructor","manager","super","this","dracoLoader","ktx2Loader","meshoptDecoder","pluginCallbacks","register","parser","GLTFMaterialsClearcoatExtension","GLTFMaterialsDispersionExtension","GLTFTextureBasisUExtension","GLTFTextureWebPExtension","GLTFTextureAVIFExtension","GLTFMaterialsSheenExtension","GLTFMaterialsTransmissionExtension","GLTFMaterialsVolumeExtension","GLTFMaterialsIorExtension","GLTFMaterialsEmissiveStrengthExtension","GLTFMaterialsSpecularExtension","GLTFMaterialsIridescenceExtension","GLTFMaterialsAnisotropyExtension","GLTFMaterialsBumpExtension","GLTFLightsExtension","GLTFMeshoptCompression","GLTFMeshGpuInstancing","load","url","onLoad","onProgress","onError","scope","resourcePath","path","relativeUrl","extractUrlBase","resolveURL","itemStart","_onError","e","itemError","itemEnd","loader","setPath","setResponseType","setRequestHeader","requestHeader","setWithCredentials","withCredentials","data","parse","gltf","setDRACOLoader","setDDSLoader","Error","setKTX2Loader","setMeshoptDecoder","callback","indexOf","unregister","splice","json","extensions","plugins","textDecoder","TextDecoder","JSON","ArrayBuffer","decode","Uint8Array","BINARY_EXTENSION_HEADER_MAGIC","EXTENSIONS","KHR_BINARY_GLTF","GLTFBinaryExtension","content","asset","version","GLTFParser","crossOrigin","fileLoader","plugin","name","extensionsUsed","extensionName","extensionsRequired","KHR_MATERIALS_UNLIT","GLTFMaterialsUnlitExtension","KHR_DRACO_MESH_COMPRESSION","GLTFDracoMeshCompressionExtension","KHR_TEXTURE_TRANSFORM","GLTFTextureTransformExtension","KHR_MESH_QUANTIZATION","GLTFMeshQuantizationExtension","setExtensions","setPlugins","parseAsync","Promise","resolve","reject","GLTFRegistry","objects","get","key","add","object","remove","removeAll","KHR_LIGHTS_PUNCTUAL","KHR_MATERIALS_CLEARCOAT","KHR_MATERIALS_DISPERSION","KHR_MATERIALS_IOR","KHR_MATERIALS_SHEEN","KHR_MATERIALS_SPECULAR","KHR_MATERIALS_TRANSMISSION","KHR_MATERIALS_IRIDESCENCE","KHR_MATERIALS_ANISOTROPY","KHR_MATERIALS_VOLUME","KHR_TEXTURE_BASISU","KHR_MATERIALS_EMISSIVE_STRENGTH","EXT_MATERIALS_BUMP","EXT_TEXTURE_WEBP","EXT_TEXTURE_AVIF","EXT_MESHOPT_COMPRESSION","EXT_MESH_GPU_INSTANCING","cache","refs","uses","_markDefs","nodeDefs","nodes","nodeIndex","nodeLength","nodeDef","light","_addNodeRef","_loadLight","lightIndex","cacheKey","dependency","lightDef","lights","lightNode","color","setRGB","range","type","target","set","distance","spot","innerConeAngle","outerConeAngle","Math","PI","angle","penumbra","decay","assignExtrasToUserData","intensity","createUniqueName","getDependency","createNodeAttachment","self","then","_getNodeRef","getMaterialType","extendParams","materialParams","materialDef","pending","opacity","metallicRoughness","pbrMetallicRoughness","Array","isArray","baseColorFactor","array","baseColorTexture","assignTexture","all","extendMaterialParams","materialIndex","materials","emissiveStrength","emissiveIntensity","extension","clearcoatFactor","clearcoat","clearcoatTexture","clearcoatRoughnessFactor","clearcoatRoughness","clearcoatRoughnessTexture","clearcoatNormalTexture","scale","clearcoatNormalScale","dispersion","iridescenceFactor","iridescence","iridescenceTexture","iridescenceIor","iridescenceIOR","iridescenceThicknessRange","iridescenceThicknessMinimum","iridescenceThicknessMaximum","iridescenceThicknessTexture","sheenColor","sheenRoughness","sheen","sheenColorFactor","colorFactor","sheenRoughnessFactor","sheenColorTexture","sheenRoughnessTexture","transmissionFactor","transmission","transmissionTexture","thickness","thicknessFactor","thicknessTexture","attenuationDistance","Infinity","colorArray","attenuationColor","ior","specularIntensity","specularFactor","specularTexture","specularColorFactor","specularColor","specularColorTexture","bumpScale","bumpFactor","bumpTexture","anisotropyStrength","anisotropy","anisotropyRotation","anisotropyTexture","loadTexture","textureIndex","textureDef","textures","options","loadTextureImage","source","isSupported","images","textureLoader","uri","handler","getHandler","detectSupport","Image","src","onload","onerror","height","loadBufferView","bufferView","bufferViews","extensionDef","buffer","decoder","supported","res","byteOffset","byteLength","stride","byteStride","decodeGltfBufferAsync","mode","filter","ready","result","decodeGltfBuffer","createNodeMesh","mesh","meshDef","meshes","primitive","primitives","WEBGL_CONSTANTS","TRIANGLES","TRIANGLE_STRIP","TRIANGLE_FAN","attributesDef","attributes","accessor","results","nodeObject","pop","isGroup","children","instancedMeshes","m","p","q","s","instancedMesh","material","TRANSLATION","fromBufferAttribute","ROTATION","SCALE","setMatrixAt","compose","attributeName","attr","instanceColor","itemSize","normalized","setAttribute","prototype","copy","call","assignFinalMaterial","clear","BINARY_EXTENSION_CHUNK_TYPES","body","headerView","DataView","header","magic","slice","getUint32","chunkContentsLength","chunkView","chunkIndex","chunkLength","chunkType","contentArray","preload","decodePrimitive","bufferViewIndex","gltfAttributeMap","threeAttributeMap","attributeNormalizedMap","attributeTypeMap","threeAttributeName","ATTRIBUTES","toLowerCase","accessorDef","accessors","componentType","WEBGL_COMPONENT_TYPES","decodeDracoFile","attribute","extendTexture","texture","transform","texCoord","channel","offset","rotation","fromArray","repeat","needsUpdate","GLTFCubicSplineInterpolant","parameterPositions","sampleValues","sampleSize","resultBuffer","copySampleValue_","values","valueSize","interpolate_","i1","t0","t","t1","stride2","stride3","td","pp","ppp","offset1","offset0","s2","s3","s0","s1","p0","m0","p1","m1","_q","GLTFCubicSplineQuaternionInterpolant","normalize","toArray","FLOAT","FLOAT_MAT3","FLOAT_MAT4","FLOAT_VEC2","FLOAT_VEC3","FLOAT_VEC4","LINEAR","REPEAT","SAMPLER_2D","POINTS","LINES","LINE_LOOP","LINE_STRIP","UNSIGNED_BYTE","UNSIGNED_SHORT","Int8Array","Int16Array","Uint16Array","Uint32Array","Float32Array","WEBGL_FILTERS","WEBGL_WRAPPINGS","WEBGL_TYPE_SIZES","POSITION","NORMAL","TANGENT","TEXCOORD_0","TEXCOORD_1","TEXCOORD_2","TEXCOORD_3","COLOR_0","WEIGHTS_0","JOINTS_0","PATH_PROPERTIES","translation","weights","INTERPOLATION","CUBICSPLINE","STEP","ALPHA_MODES","addUnknownExtensionsToUserData","knownExtensions","objectDef","userData","gltfExtensions","gltfDef","extras","Object","assign","updateMorphTargets","il","morphTargetInfluences","targetNames","morphTargetDictionary","createPrimitiveKey","primitiveDef","geometryKey","dracoExtension","createAttributesKey","targets","attributesKey","keys","sort","getNormalizedComponentScale","_identityMatrix","arguments","associations","Map","primitiveCache","nodeCache","meshCache","cameraCache","lightCache","sourceCache","textureCache","nodeNamesUsed","isSafari","isFirefox","firefoxVersion","navigator","test","userAgent","match","createImageBitmap","setCrossOrigin","_invokeAll","ext","beforeRoot","getDependencies","dependencies","scene","scenes","animations","cameras","afterRoot","updateMatrixWorld","catch","skinDefs","skins","meshDefs","skinIndex","skinLength","joints","isBone","skin","isSkinnedMesh","camera","ref","updateMappings","original","mappings","child","entries","_invokeOne","func","unshift","loadScene","loadNode","loadMesh","loadAccessor","loadBuffer","loadMaterial","loadSkin","loadAnimation","loadCamera","defs","map","def","bufferIndex","bufferDef","buffers","bufferViewDef","accessorIndex","sparse","TypedArray","pendingBufferViews","elementBytes","BYTES_PER_ELEMENT","itemBytes","bufferAttribute","ibSlice","floor","ibCacheKey","ib","itemSizeIndices","SCALAR","TypedArrayIndices","byteOffsetIndices","byteOffsetValues","sparseIndices","sparseValues","setX","setY","setZ","setW","sourceIndex","sourceDef","sampler","promise","loadImageSource","flipY","startsWith","samplers","magFilter","minFilter","wrapS","wrapT","URL","webkitURL","sourceURI","isObjectURL","blob","Blob","mimeType","createObjectURL","isImageBitmapLoader","imageBitmap","revokeObjectURL","search","mapName","mapDef","colorSpace","gltfReference","useDerivativeTangents","tangent","useVertexColors","useFlatShading","normal","isPoints","uuid","pointsMaterial","sizeAttenuation","isLine","lineMaterial","cachedMaterial","vertexColors","flatShading","normalScale","y","materialType","kmuExtension","metalness","metallicFactor","roughness","roughnessFactor","metallicRoughnessTexture","doubleSided","side","alphaMode","transparent","depthWrite","alphaTest","alphaCutoff","normalTexture","occlusionTexture","strength","aoMapIntensity","emissiveFactor","emissive","emissiveTexture","originalName","sanitizedName","sanitizeNodeName","loadGeometries","createDracoPrimitive","addPrimitiveAttributes","cached","geometryPromise","meshIndex","depthTest","geometries","normalizeSkinWeights","morphAttributes","group","cameraIndex","cameraDef","params","radToDeg","yfov","aspectRatio","znear","zfar","xmag","ymag","skinDef","_loadNodeShallow","inverseBindMatrices","jointNodes","bones","boneInverses","jointNode","mat","animationIndex","animationDef","animationName","pendingNodes","pendingInputAccessors","pendingOutputAccessors","pendingSamplers","pendingTargets","channels","node","input","parameters","output","inputAccessors","outputAccessors","tracks","inputAccessor","outputAccessor","updateMatrix","createdTracks","_createAnimationTracks","k","traverse","o","isMesh","nodePending","childPending","childrenDef","skeletonPending","skeleton","bind","nodeName","meshPromise","forEach","matrix","applyMatrix4","quaternion","has","sceneIndex","sceneDef","nodeIds","reducedAssociations","value","reduceAssociations","targetName","TypedKeyframeTrack","interpolation","outputArray","_getArrayFromAccessor","j","jl","track","_createCubicSplineTrackInterpolant","scaled","createInterpolant","times","getValueSize","isInterpolantFactoryMethodGLTFCubicSpline","assignAttributeAccessor","gltfAttributeName","workingColorSpace","box","min","max","boxScale","multiplyScalar","maxDisplacement","vector","abs","expandByVector","boundingBox","sphere","getCenter","center","radius","distanceTo","boundingSphere","computeBounds","hasMorphPosition","hasMorphNormal","hasMorphColor","pendingPositionAccessors","pendingNormalAccessors","pendingColorAccessors","pendingAccessor","morphPositions","morphNormals","morphColors","morphTargetsRelative","addMorphTargets","_changeEvent","_startEvent","_endEvent","_ray","_plane","TILT_LIMIT","cos","DEG2RAD","OrbitControls","domElement","style","touchAction","enabled","cursor","minDistance","maxDistance","minZoom","maxZoom","minTargetRadius","maxTargetRadius","minPolarAngle","maxPolarAngle","minAzimuthAngle","maxAzimuthAngle","enableDamping","dampingFactor","enableZoom","zoomSpeed","enableRotate","rotateSpeed","enablePan","panSpeed","screenSpacePanning","keyPanSpeed","zoomToCursor","autoRotate","autoRotateSpeed","LEFT","UP","RIGHT","BOTTOM","mouseButtons","ROTATE","MIDDLE","DOLLY","PAN","touches","ONE","TWO","DOLLY_PAN","target0","position0","zoom0","zoom","_domElementKeyEvents","getPolarAngle","spherical","phi","getAzimuthalAngle","theta","getDistance","listenToKeyEvents","addEventListener","onKeyDown","stopListenToKeyEvents","removeEventListener","saveState","reset","updateProjectionMatrix","dispatchEvent","update","state","STATE","NONE","quat","setFromUnitVectors","up","quatInverse","invert","lastPosition","lastQuaternion","lastTargetPosition","twoPI","deltaTime","sub","applyQuaternion","setFromVector3","rotateLeft","getAutoRotationAngle","sphericalDelta","isFinite","makeSafe","addScaledVector","panOffset","clampLength","zoomChanged","performCursorZoom","isOrthographicCamera","clampDistance","prevRadius","setFromSpherical","lookAt","newRadius","isPerspectiveCamera","radiusDelta","dollyDirection","mouseBefore","mouse","x","unproject","prevZoom","mouseAfter","transformDirection","origin","direction","dot","setFromNormalAndCoplanarPoint","intersectPlane","distanceToSquared","EPS","dispose","onContextMenu","onPointerDown","onPointerUp","onMouseWheel","onPointerMove","getRootNode","interceptControlDown","capture","TOUCH_ROTATE","TOUCH_PAN","TOUCH_DOLLY_PAN","TOUCH_DOLLY_ROTATE","rotateStart","rotateEnd","rotateDelta","panStart","panEnd","panDelta","dollyStart","dollyEnd","dollyDelta","pointers","pointerPositions","controlActive","getZoomScale","delta","normalizedDelta","pow","rotateUp","panLeft","v","objectMatrix","setFromMatrixColumn","panUp","crossVectors","pan","deltaX","deltaY","element","targetDistance","tan","fov","clientHeight","right","left","clientWidth","top","bottom","dollyOut","dollyScale","dollyIn","updateZoomParameters","rect","getBoundingClientRect","dx","dy","w","width","h","dist","handleMouseDownRotate","event","clientX","clientY","handleMouseDownPan","handleTouchStartRotate","pageX","pageY","getSecondPointerPosition","handleTouchStartPan","handleTouchStartDolly","sqrt","handleTouchMoveRotate","subVectors","handleTouchMovePan","handleTouchMoveDolly","setPointerCapture","pointerId","isTrackingPointer","addPointer","pointerType","onTouchStart","mouseAction","button","handleMouseDownDolly","ctrlKey","metaKey","shiftKey","onMouseDown","trackPointer","handleTouchMoveDollyPan","handleTouchMoveDollyRotate","onTouchMove","handleMouseMoveRotate","handleMouseMoveDolly","handleMouseMovePan","onMouseMove","removePointer","releasePointerCapture","preventDefault","handleMouseWheel","deltaMode","newEvent","customWheelEvent","interceptControlUp","passive","code","handleKeyDown","handleTouchStartDollyPan","DOLLY_ROTATE","handleTouchStartDollyRotate","ThreeDLogo","containerRef","useRef","useEffect","THREE","window","innerWidth","innerHeight","z","renderer","current","appendChild","setPixelRatio","devicePixelRatio","setSize","background","controls","_light$position","apply","_toConsumableArray","animate","requestAnimationFrame","render","removeChild","React","textAlign","fontStyle","className","SplitScreen","links","generateBreadcrumbsLinks","Layout","Helmet","title","meta","property","BannerSmall","BannerImage","Breadcrumbs","backLinkAlias","TextBox","ThreeLogo","Appointment","Georg","BlogSlider","singleRow","BannerLinks"],"sourceRoot":""}