From 475d63047f6aba35ae2df412ceafb3710b9b963e Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 26 Nov 2021 12:12:46 -0500 Subject: [PATCH] added human-motion --- README.md | 12 +- assets/screenshot-face3d.jpg | Bin 50813 -> 0 bytes demo/face3d/README.md | 3 - demo/face3d/face3d.js | 189 -- demo/face3d/index.html | 32 - demo/helpers/three-orbitControls.js | 870 -------- demo/helpers/three.js | 3090 --------------------------- test/test.log | 1368 ++++++------ wiki | 2 +- 9 files changed, 693 insertions(+), 4873 deletions(-) delete mode 100644 assets/screenshot-face3d.jpg delete mode 100644 demo/face3d/README.md delete mode 100644 demo/face3d/face3d.js delete mode 100644 demo/face3d/index.html delete mode 100644 demo/helpers/three-orbitControls.js delete mode 100644 demo/helpers/three.js diff --git a/README.md b/README.md index dfc5cf40..f0d4dc42 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ JavaScript module using TensorFlow/JS Machine Learning library - **Face Match** [[*Live*]](https://vladmandic.github.io/human/demo/facematch/index.html) [[*Details*]](https://github.com/vladmandic/human/tree/main/demo/facematch): Extract faces from images, calculates face descriptors and simmilarities and matches them to known database - **Face ID** [[*Live*]](https://vladmandic.github.io/human/demo/faceid/index.html) [[*Details*]](https://github.com/vladmandic/human/tree/main/demo/faceid): Runs multiple checks to validate webcam input before performing face match to faces in IndexDB - **Multi-thread** [[*Live*]](https://vladmandic.github.io/human/demo/multithread/index.html) [[*Details*]](https://github.com/vladmandic/human/tree/main/demo/multithread): Runs each `human` module in a separate web worker for highest possible performance -- **Face 3D** [[*Live*]](https://vladmandic.github.io/human/demo/face3d/index.html) [[*Details*]](https://github.com/vladmandic/human/tree/main/demo/face3d): Uses WebCam as input and draws 3D render of face mesh using `Three.js` +- **3D Analysis** [[*Live*]](https://vladmandic.github.io/human-motion/src/index.html) [[*Details*]](https://github.com/vladmandic/human-motion): 3D tracking and visualization of heead, face, eye, body and hand - **Virtual Avatar** [[*Live*]](https://vladmandic.github.io/human-vrm/src/human-vrm.html) [[*Details*]](https://github.com/vladmandic/human-vrm): VR model with head, face, eye, body and hand tracking ### NodeJS Demos @@ -150,14 +150,18 @@ and optionally matches detected face with database of known people to guess thei
2. **Face3D OpenGL Rendering:** -> [demo/face3d](demo/face3d/index.html) +> [human-motion](https://github.com/vladmandic/human-motion) -![Face Matching](assets/screenshot-face3d.jpg) +![Face3D](https://github.com/vladmandic/human-motion/raw/main/assets/screenshot-face.jpg) +![Body3D](https://github.com/vladmandic/human-motion/raw/main/assets/screenshot-body.jpg) +![Hand3D](https://github.com/vladmandic/human-motion/raw/main/assets/screenshot-hand.jpg)
3. **VR Model Tracking:** -![vrmodel](assets/screenshot-vrm.jpg) +> [human-vrmmotion](https://github.com/vladmandic/human-vrm) + +![VRM](https://github.com/vladmandic/human-vrm/raw/main/assets/human-vrm-screenshot.jpg)
diff --git a/assets/screenshot-face3d.jpg b/assets/screenshot-face3d.jpg deleted file mode 100644 index ed2242a7dd02a2b91345be07ce712b518c9950ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 50813 zcmeFZXH=70w>EsIKtc_nXhI2r1PO?2N~A+VPpF{^ib|8V6)8$nAP~9%LMS34gkDq> z1%+(`rCI<16%`dB(iG_;2>50{=N;!8-}h@j=X~!N?~ijc)?$t1PMK@2IoCC>Iahv< z{hk2CY^&(H?RHunt%Nd^9c?;qaJ$V43?;_rLL*X`=s}PIUph+C?p6M z5fT&<6%|29V5KC)#U+$wF?+GCP zo0q?*=6_!xFa*lS4}AcX6NRYS60{7e{B5R-1=KC5CHiPvHnxC z|BqZqo?Kuk6at0)Ef)wJ&1(=OlutpEU)Kdd z?{ozqvNC61sUmAFJ9i=oe0F3}7JO&8^fz!Ti%?bOy4KJvWnm)J}x)dixc}97d||R`zgOvTaNe;D1^8FIho@x%XIu{ed8P| zbM2!F=`&_D@!sB@o#V@O&l!2yyPcz?cKMxc`6=rkq7^Kt4RtOZw)OIix|PK{lgjGJ z*H*npt4L2P&Iz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&gixQxnyaKU79S(Y*8_e1x$@77lxNd&dC1W2 zz1nr8&=Zu@FY-_d%O~w&Wu-E85}n=|sXa&DSb@N5zf3+V^PD43}D*;(X0rA5}{^^J^)Ttk}L>qA*mlziU~34BtL% z9PP&Uzn6*q(Z4Eg6QZx8V?R%RPf{O|Ze3BC&hR*+5(zEta(>k3fAQIu&3b-ID2hb` z$aa+ZBQ|$cwtk)ZcALHXT)>NGCMuV}F8I{Ci_mDto1i_0e*@?G9-T-W)O#_O4~kHE t_RGzzf&#Ak5C8MH<$tsT|8G>k{_iJH{_Ju0e}DG>EtNl6DrSGb|9@o7O2 diff --git a/demo/face3d/README.md b/demo/face3d/README.md deleted file mode 100644 index 0b31af79..00000000 --- a/demo/face3d/README.md +++ /dev/null @@ -1,3 +0,0 @@ -## Human Face 3D Rendering using OpenGL - -Demo for Browsers that uses `Three.js` for 3D OpenGL rendering of a detected face diff --git a/demo/face3d/face3d.js b/demo/face3d/face3d.js deleted file mode 100644 index 4852f8be..00000000 --- a/demo/face3d/face3d.js +++ /dev/null @@ -1,189 +0,0 @@ -// @ts-nocheck // typescript checks disabled as this is pure javascript - -/** - * Human demo for browsers - * - * Demo for face mesh detection and projection as 3D object using Three.js - */ - -import { DoubleSide, Mesh, MeshBasicMaterial, OrthographicCamera, Scene, sRGBEncoding, VideoTexture, WebGLRenderer, BufferGeometry, BufferAttribute } from '../helpers/three.js'; -import { OrbitControls } from '../helpers/three-orbitControls.js'; -import Human from '../../dist/human.esm.js'; // equivalent of @vladmandic/human - -const userConfig = { - backend: 'wasm', - async: false, - profile: false, - warmup: 'full', - modelBasePath: '../../models/', - // wasmPath: 'https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-wasm@3.9.0/dist/', - filter: { enabled: false }, - face: { enabled: true, - detector: { rotation: false, maxDetected: 1 }, - mesh: { enabled: true }, - iris: { enabled: true }, - description: { enabled: false }, - emotion: { enabled: false }, - }, - hand: { enabled: false }, - gesture: { enabled: false }, - body: { enabled: false }, - object: { enabled: false }, -}; -const human = new Human(userConfig); - -const wireframe = true; // enable wireframe overlay - -const canvas = document.getElementById('canvas'); -let width = 0; -let height = 0; - -const renderer = new WebGLRenderer({ antialias: true, alpha: true, canvas }); -renderer.setClearColor(0x000000); -renderer.outputEncoding = sRGBEncoding; -const camera = new OrthographicCamera(); -const controls = new OrbitControls(camera, renderer.domElement); // pan&zoom controls -controls.enabled = true; -const materialWireFrame = new MeshBasicMaterial({ // create wireframe material - color: 0xffaaaa, - wireframe: true, -}); -const materialFace = new MeshBasicMaterial({ // create material for mask - color: 0xffffff, - map: null, // will be created when the video is ready. - side: DoubleSide, -}); - -class FaceGeometry extends BufferGeometry { - constructor(triangulation) { - super(); - this.positions = new Float32Array(478 * 3); - this.uvs = new Float32Array(478 * 2); - this.setAttribute('position', new BufferAttribute(this.positions, 3)); - this.setAttribute('uv', new BufferAttribute(this.uvs, 2)); - this.setIndex(triangulation); - } - - update(face) { - let ptr = 0; - for (const p of face.mesh) { - this.positions[ptr + 0] = -p[0] + width / 2; - this.positions[ptr + 1] = height - p[1] - height / 2; - this.positions[ptr + 2] = -p[2]; - ptr += 3; - } - ptr = 0; - for (const p of face.meshRaw) { - this.uvs[ptr + 0] = 0 + p[0]; - this.uvs[ptr + 1] = 1 - p[1]; - ptr += 2; - } - materialFace.map.update(); // update textures from video - this.attributes.position.needsUpdate = true; // vertices - this.attributes.uv.needsUpdate = true; // textures - this.computeVertexNormals(); - } -} - -const scene = new Scene(); -const faceGeometry = new FaceGeometry(human.faceTriangulation); // create a new geometry helper -const mesh = new Mesh(faceGeometry, materialFace); // create mask mesh -scene.add(mesh); - -function resize(input) { - width = input.videoWidth; - height = input.videoHeight; - camera.left = -width / 2; - camera.right = width / 2; - camera.top = height / 2; - camera.bottom = -height / 2; - camera.near = -100; - camera.far = 100; - camera.zoom = 2; - camera.updateProjectionMatrix(); - renderer.setSize(width, height); -} - -const isLive = (input) => input.srcObject && (input.srcObject.getVideoTracks()[0].readyState === 'live') && (input.readyState > 2) && (!input.paused); - -async function render(input) { - if (isLive(input)) { - if (width !== input.videoWidth || height !== input.videoHeight) resize(input); // resize orthographic camera to video dimensions if necessary - const res = await human.detect(input); - if (res?.face?.length > 0) { - faceGeometry.update(res.face[0]); - // render the mask - mesh.material = materialFace; - renderer.autoClear = true; - renderer.render(scene, camera); - if (wireframe) { // overlay wireframe - mesh.material = materialWireFrame; - renderer.autoClear = false; - renderer.render(scene, camera); - } - } - } - requestAnimationFrame(() => render(input)); -} - -// setup webcam -async function setupCamera() { - if (!navigator.mediaDevices) return null; - const video = document.getElementById('video'); - canvas.addEventListener('click', () => { - if (isLive(video)) video.pause(); - else video.play(); - }); - const constraints = { - audio: false, - video: { facingMode: 'user', resizeMode: 'crop-and-scale' }, - }; - if (window.innerWidth > window.innerHeight) constraints.video.width = { ideal: window.innerWidth }; - else constraints.video.height = { ideal: window.innerHeight }; - const stream = await navigator.mediaDevices.getUserMedia(constraints); - if (stream) video.srcObject = stream; - else return null; - // get information data - const track = stream.getVideoTracks()[0]; - const settings = track.getSettings(); - // log('camera constraints:', constraints, 'window:', { width: window.innerWidth, height: window.innerHeight }, 'settings:', settings, 'track:', track); - const engineData = human.tf.engine(); - const gpuData = (engineData.backendInstance && engineData.backendInstance.numBytesInGPU > 0) ? `gpu: ${(engineData.backendInstance.numBytesInGPU ? engineData.backendInstance.numBytesInGPU : 0).toLocaleString()} bytes` : ''; - const cameraData = { name: track.label?.toLowerCase(), width: settings.width, height: settings.height, facing: settings.facingMode === 'user' ? 'front' : 'back' }; - const memoryData = `system: ${engineData.state.numBytes.toLocaleString()} bytes ${gpuData} | tensors: ${engineData.state.numTensors.toLocaleString()}`; - document.getElementById('log').innerHTML = ` - video: ${cameraData.name} | facing: ${cameraData.facing} | screen: ${window.innerWidth} x ${window.innerHeight} camera: ${cameraData.width} x ${cameraData.height}
- backend: ${human.tf.getBackend()} | ${memoryData}
- `; - // return when camera is ready - return new Promise((resolve) => { - video.onloadeddata = async () => { - video.width = video.videoWidth; - video.height = video.videoHeight; - canvas.width = video.width; - canvas.height = video.height; - video.play(); - resolve(video); - }; - }); -} - -async function main() { - window.addEventListener('unhandledrejection', (evt) => { - // eslint-disable-next-line no-console - console.error(evt.reason || evt); - document.getElementById('log').innerHTML = evt?.reason?.message || evt?.reason || evt; - evt.preventDefault(); - }); - - await human.load(); - const video = await setupCamera(); - if (video) { - const videoTexture = new VideoTexture(video); // now load textures from video - videoTexture.encoding = sRGBEncoding; - materialFace.map = videoTexture; - render(video); - } -} - -window.onload = main; diff --git a/demo/face3d/index.html b/demo/face3d/index.html deleted file mode 100644 index c4baf228..00000000 --- a/demo/face3d/index.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - Human - - - - - - - - - - - - - - -
- - -
-
- - diff --git a/demo/helpers/three-orbitControls.js b/demo/helpers/three-orbitControls.js deleted file mode 100644 index 5faedf02..00000000 --- a/demo/helpers/three-orbitControls.js +++ /dev/null @@ -1,870 +0,0 @@ -// @ts-nocheck - -import { Vector2, Vector3, Spherical, MOUSE, Quaternion, EventDispatcher } from './three.js'; - -/** - * @author qiao / https://github.com/qiao - * @author mrdoob / http://mrdoob.com - * @author alteredq / http://alteredqualia.com/ - * @author WestLangley / http://github.com/WestLangley - * @author erich666 / http://erichaines.com - */ - -// This set of controls performs orbiting, dollying (zooming), and panning. -// Unlike TrackballControls, it maintains the "up" direction object.up (+Y by default). -// -// Orbit - left mouse / touch: one-finger move -// Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish -// Pan - right mouse, or left mouse + ctrl/metaKey, or arrow keys / touch: two-finger move - -const OrbitControls = function (object, domElement) { - this.object = object; - - this.domElement = (domElement !== undefined) ? domElement : document; - - // Set to false to disable this control - this.enabled = true; - - // "target" sets the location of focus, where the object orbits around - this.target = new Vector3(); - - // How far you can dolly in and out ( PerspectiveCamera only ) - this.minDistance = 0; - this.maxDistance = Infinity; - - // How far you can zoom in and out ( OrthographicCamera only ) - this.minZoom = 0; - this.maxZoom = Infinity; - - // How far you can orbit vertically, upper and lower limits. - // Range is 0 to Math.PI radians. - this.minPolarAngle = 0; // radians - this.maxPolarAngle = Math.PI; // radians - - // How far you can orbit horizontally, upper and lower limits. - // If set, must be a sub-interval of the interval [ - Math.PI, Math.PI ]. - this.minAzimuthAngle = -Infinity; // radians - this.maxAzimuthAngle = Infinity; // radians - - // Set to true to enable damping (inertia) - // If damping is enabled, you must call controls.update() in your animation loop - this.enableDamping = false; - this.dampingFactor = 0.25; - - // This option actually enables dollying in and out; left as "zoom" for backwards compatibility. - // Set to false to disable zooming - this.enableZoom = true; - this.zoomSpeed = 1.0; - - // Set to false to disable rotating - this.enableRotate = true; - this.rotateSpeed = 1.0; - - // Set to false to disable panning - this.enablePan = true; - this.panSpeed = 1.0; - this.screenSpacePanning = false; // if true, pan in screen-space - this.keyPanSpeed = 7.0; // pixels moved per arrow key push - - // Set to true to automatically rotate around the target - // If auto-rotate is enabled, you must call controls.update() in your animation loop - this.autoRotate = false; - this.autoRotateSpeed = 2.0; // 30 seconds per round when fps is 60 - - // Set to false to disable use of the keys - this.enableKeys = true; - - // The four arrow keys - this.keys = { LEFT: 37, UP: 38, RIGHT: 39, BOTTOM: 40 }; - - // Mouse buttons - this.mouseButtons = { LEFT: MOUSE.LEFT, MIDDLE: MOUSE.MIDDLE, RIGHT: MOUSE.RIGHT }; - - // for reset - this.target0 = this.target.clone(); - this.position0 = this.object.position.clone(); - this.zoom0 = this.object.zoom; - - // - // public methods - // - - this.getPolarAngle = function () { - return spherical.phi; - }; - - this.getAzimuthalAngle = function () { - return spherical.theta; - }; - - this.saveState = function () { - scope.target0.copy(scope.target); - scope.position0.copy(scope.object.position); - scope.zoom0 = scope.object.zoom; - }; - - this.reset = function () { - scope.target.copy(scope.target0); - scope.object.position.copy(scope.position0); - scope.object.zoom = scope.zoom0; - - scope.object.updateProjectionMatrix(); - scope.dispatchEvent(changeEvent); - - scope.update(); - - state = STATE.NONE; - }; - - // this method is exposed, but perhaps it would be better if we can make it private... - this.update = (function () { - const offset = new Vector3(); - - // so camera.up is the orbit axis - const quat = new Quaternion().setFromUnitVectors(object.up, new Vector3(0, 1, 0)); - const quatInverse = quat.clone().invert(); - - const lastPosition = new Vector3(); - const lastQuaternion = new Quaternion(); - - return function update() { - const position = scope.object.position; - - offset.copy(position).sub(scope.target); - - // rotate offset to "y-axis-is-up" space - offset.applyQuaternion(quat); - - // angle from z-axis around y-axis - spherical.setFromVector3(offset); - - if (scope.autoRotate && state === STATE.NONE) { - rotateLeft(getAutoRotationAngle()); - } - - spherical.theta += sphericalDelta.theta; - spherical.phi += sphericalDelta.phi; - - // restrict theta to be between desired limits - spherical.theta = Math.max(scope.minAzimuthAngle, Math.min(scope.maxAzimuthAngle, spherical.theta)); - - // restrict phi to be between desired limits - spherical.phi = Math.max(scope.minPolarAngle, Math.min(scope.maxPolarAngle, spherical.phi)); - - spherical.makeSafe(); - - spherical.radius *= scale; - - // restrict radius to be between desired limits - spherical.radius = Math.max(scope.minDistance, Math.min(scope.maxDistance, spherical.radius)); - - // move target to panned location - scope.target.add(panOffset); - - offset.setFromSpherical(spherical); - - // rotate offset back to "camera-up-vector-is-up" space - offset.applyQuaternion(quatInverse); - - position.copy(scope.target).add(offset); - - scope.object.lookAt(scope.target); - - if (scope.enableDamping === true) { - sphericalDelta.theta *= (1 - scope.dampingFactor); - sphericalDelta.phi *= (1 - scope.dampingFactor); - - panOffset.multiplyScalar(1 - scope.dampingFactor); - } else { - sphericalDelta.set(0, 0, 0); - - panOffset.set(0, 0, 0); - } - - scale = 1; - - // update condition is: - // min(camera displacement, camera rotation in radians)^2 > EPS - // using small-angle approximation cos(x/2) = 1 - x^2 / 8 - - if (zoomChanged - || lastPosition.distanceToSquared(scope.object.position) > EPS - || 8 * (1 - lastQuaternion.dot(scope.object.quaternion)) > EPS) { - scope.dispatchEvent(changeEvent); - - lastPosition.copy(scope.object.position); - lastQuaternion.copy(scope.object.quaternion); - zoomChanged = false; - - return true; - } - - return false; - }; - }()); - - this.dispose = function () { - scope.domElement.removeEventListener('contextmenu', onContextMenu, false); - scope.domElement.removeEventListener('mousedown', onMouseDown, false); - scope.domElement.removeEventListener('wheel', onMouseWheel, false); - - scope.domElement.removeEventListener('touchstart', onTouchStart, false); - scope.domElement.removeEventListener('touchend', onTouchEnd, false); - scope.domElement.removeEventListener('touchmove', onTouchMove, false); - - document.removeEventListener('mousemove', onMouseMove, false); - document.removeEventListener('mouseup', onMouseUp, false); - - window.removeEventListener('keydown', onKeyDown, false); - - // scope.dispatchEvent( { type: 'dispose' } ); // should this be added here? - }; - - // - // internals - // - - var scope = this; - - var changeEvent = { type: 'change' }; - const startEvent = { type: 'start' }; - const endEvent = { type: 'end' }; - - var STATE = { NONE: -1, ROTATE: 0, DOLLY: 1, PAN: 2, TOUCH_ROTATE: 3, TOUCH_DOLLY_PAN: 4 }; - - var state = STATE.NONE; - - var EPS = 0.000001; - - // current position in spherical coordinates - var spherical = new Spherical(); - var sphericalDelta = new Spherical(); - - var scale = 1; - var panOffset = new Vector3(); - var zoomChanged = false; - - const rotateStart = new Vector2(); - const rotateEnd = new Vector2(); - const rotateDelta = new Vector2(); - - const panStart = new Vector2(); - const panEnd = new Vector2(); - const panDelta = new Vector2(); - - const dollyStart = new Vector2(); - const dollyEnd = new Vector2(); - const dollyDelta = new Vector2(); - - function getAutoRotationAngle() { - return 2 * Math.PI / 60 / 60 * scope.autoRotateSpeed; - } - - function getZoomScale() { - return Math.pow(0.95, scope.zoomSpeed); - } - - function rotateLeft(angle) { - sphericalDelta.theta -= angle; - } - - function rotateUp(angle) { - sphericalDelta.phi -= angle; - } - - const panLeft = (function () { - const v = new Vector3(); - - return function panLeft(distance, objectMatrix) { - v.setFromMatrixColumn(objectMatrix, 0); // get X column of objectMatrix - v.multiplyScalar(-distance); - - panOffset.add(v); - }; - }()); - - const panUp = (function () { - const v = new Vector3(); - - return function panUp(distance, objectMatrix) { - if (scope.screenSpacePanning === true) { - v.setFromMatrixColumn(objectMatrix, 1); - } else { - v.setFromMatrixColumn(objectMatrix, 0); - v.crossVectors(scope.object.up, v); - } - - v.multiplyScalar(distance); - - panOffset.add(v); - }; - }()); - - // deltaX and deltaY are in pixels; right and down are positive - const pan = (function () { - const offset = new Vector3(); - - return function pan(deltaX, deltaY) { - const element = scope.domElement === document ? scope.domElement.body : scope.domElement; - - if (scope.object.isPerspectiveCamera) { - // perspective - const position = scope.object.position; - offset.copy(position).sub(scope.target); - let targetDistance = offset.length(); - - // half of the fov is center to top of screen - targetDistance *= Math.tan((scope.object.fov / 2) * Math.PI / 180.0); - - // we use only clientHeight here so aspect ratio does not distort speed - panLeft(2 * deltaX * targetDistance / element.clientHeight, scope.object.matrix); - panUp(2 * deltaY * targetDistance / element.clientHeight, scope.object.matrix); - } else if (scope.object.isOrthographicCamera) { - // orthographic - panLeft(deltaX * (scope.object.right - scope.object.left) / scope.object.zoom / element.clientWidth, - scope.object.matrix); - panUp(deltaY * (scope.object.top - scope.object.bottom) / scope.object.zoom / element.clientHeight, scope - .object.matrix); - } else { - // camera neither orthographic nor perspective - scope.enablePan = false; - } - }; - }()); - - function dollyIn(dollyScale) { - if (scope.object.isPerspectiveCamera) { - scale /= dollyScale; - } else if (scope.object.isOrthographicCamera) { - scope.object.zoom = Math.max(scope.minZoom, Math.min(scope.maxZoom, scope.object.zoom * dollyScale)); - scope.object.updateProjectionMatrix(); - zoomChanged = true; - } else { - scope.enableZoom = false; - } - } - - function dollyOut(dollyScale) { - if (scope.object.isPerspectiveCamera) { - scale *= dollyScale; - } else if (scope.object.isOrthographicCamera) { - scope.object.zoom = Math.max(scope.minZoom, Math.min(scope.maxZoom, scope.object.zoom / dollyScale)); - scope.object.updateProjectionMatrix(); - zoomChanged = true; - } else { - scope.enableZoom = false; - } - } - - // - // event callbacks - update the object state - // - - function handleMouseDownRotate(event) { - // console.log( 'handleMouseDownRotate' ); - - rotateStart.set(event.clientX, event.clientY); - } - - function handleMouseDownDolly(event) { - // console.log( 'handleMouseDownDolly' ); - - dollyStart.set(event.clientX, event.clientY); - } - - function handleMouseDownPan(event) { - // console.log( 'handleMouseDownPan' ); - - panStart.set(event.clientX, event.clientY); - } - - function handleMouseMoveRotate(event) { - // console.log( 'handleMouseMoveRotate' ); - - rotateEnd.set(event.clientX, event.clientY); - - rotateDelta.subVectors(rotateEnd, rotateStart).multiplyScalar(scope.rotateSpeed); - - const element = scope.domElement === document ? scope.domElement.body : scope.domElement; - - rotateLeft(2 * Math.PI * rotateDelta.x / element.clientHeight); // yes, height - - rotateUp(2 * Math.PI * rotateDelta.y / element.clientHeight); - - rotateStart.copy(rotateEnd); - - scope.update(); - } - - function handleMouseMoveDolly(event) { - // console.log( 'handleMouseMoveDolly' ); - - dollyEnd.set(event.clientX, event.clientY); - - dollyDelta.subVectors(dollyEnd, dollyStart); - - if (dollyDelta.y > 0) { - dollyIn(getZoomScale()); - } else if (dollyDelta.y < 0) { - dollyOut(getZoomScale()); - } - - dollyStart.copy(dollyEnd); - - scope.update(); - } - - function handleMouseMovePan(event) { - // console.log( 'handleMouseMovePan' ); - - panEnd.set(event.clientX, event.clientY); - - panDelta.subVectors(panEnd, panStart).multiplyScalar(scope.panSpeed); - - pan(panDelta.x, panDelta.y); - - panStart.copy(panEnd); - - scope.update(); - } - - function handleMouseUp(event) { - - // console.log( 'handleMouseUp' ); - - } - - function handleMouseWheel(event) { - // console.log( 'handleMouseWheel' ); - - if (event.deltaY < 0) { - dollyOut(getZoomScale()); - } else if (event.deltaY > 0) { - dollyIn(getZoomScale()); - } - - scope.update(); - } - - function handleKeyDown(event) { - // console.log( 'handleKeyDown' ); - - switch (event.keyCode) { - case scope.keys.UP: - pan(0, scope.keyPanSpeed); - scope.update(); - break; - - case scope.keys.BOTTOM: - pan(0, -scope.keyPanSpeed); - scope.update(); - break; - - case scope.keys.LEFT: - pan(scope.keyPanSpeed, 0); - scope.update(); - break; - - case scope.keys.RIGHT: - pan(-scope.keyPanSpeed, 0); - scope.update(); - break; - } - } - - function handleTouchStartRotate(event) { - // console.log( 'handleTouchStartRotate' ); - - rotateStart.set(event.touches[0].pageX, event.touches[0].pageY); - } - - function handleTouchStartDollyPan(event) { - // console.log( 'handleTouchStartDollyPan' ); - - if (scope.enableZoom) { - const dx = event.touches[0].pageX - event.touches[1].pageX; - const dy = event.touches[0].pageY - event.touches[1].pageY; - - const distance = Math.sqrt(dx * dx + dy * dy); - - dollyStart.set(0, distance); - } - - if (scope.enablePan) { - const x = 0.5 * (event.touches[0].pageX + event.touches[1].pageX); - const y = 0.5 * (event.touches[0].pageY + event.touches[1].pageY); - - panStart.set(x, y); - } - } - - function handleTouchMoveRotate(event) { - // console.log( 'handleTouchMoveRotate' ); - - rotateEnd.set(event.touches[0].pageX, event.touches[0].pageY); - - rotateDelta.subVectors(rotateEnd, rotateStart).multiplyScalar(scope.rotateSpeed); - - const element = scope.domElement === document ? scope.domElement.body : scope.domElement; - - rotateLeft(2 * Math.PI * rotateDelta.x / element.clientHeight); // yes, height - - rotateUp(2 * Math.PI * rotateDelta.y / element.clientHeight); - - rotateStart.copy(rotateEnd); - - scope.update(); - } - - function handleTouchMoveDollyPan(event) { - // console.log( 'handleTouchMoveDollyPan' ); - - if (scope.enableZoom) { - const dx = event.touches[0].pageX - event.touches[1].pageX; - const dy = event.touches[0].pageY - event.touches[1].pageY; - - const distance = Math.sqrt(dx * dx + dy * dy); - - dollyEnd.set(0, distance); - - dollyDelta.set(0, Math.pow(dollyEnd.y / dollyStart.y, scope.zoomSpeed)); - - dollyIn(dollyDelta.y); - - dollyStart.copy(dollyEnd); - } - - if (scope.enablePan) { - const x = 0.5 * (event.touches[0].pageX + event.touches[1].pageX); - const y = 0.5 * (event.touches[0].pageY + event.touches[1].pageY); - - panEnd.set(x, y); - - panDelta.subVectors(panEnd, panStart).multiplyScalar(scope.panSpeed); - - pan(panDelta.x, panDelta.y); - - panStart.copy(panEnd); - } - - scope.update(); - } - - function handleTouchEnd(event) { - - // console.log( 'handleTouchEnd' ); - - } - - // - // event handlers - FSM: listen for events and reset state - // - - function onMouseDown(event) { - if (scope.enabled === false) return; - - event.preventDefault(); - - switch (event.button) { - case scope.mouseButtons.LEFT: - - if (event.ctrlKey || event.metaKey) { - if (scope.enablePan === false) return; - - handleMouseDownPan(event); - - state = STATE.PAN; - } else { - if (scope.enableRotate === false) return; - - handleMouseDownRotate(event); - - state = STATE.ROTATE; - } - - break; - - case scope.mouseButtons.MIDDLE: - - if (scope.enableZoom === false) return; - - handleMouseDownDolly(event); - - state = STATE.DOLLY; - - break; - - case scope.mouseButtons.RIGHT: - - if (scope.enablePan === false) return; - - handleMouseDownPan(event); - - state = STATE.PAN; - - break; - } - - if (state !== STATE.NONE) { - document.addEventListener('mousemove', onMouseMove, false); - document.addEventListener('mouseup', onMouseUp, false); - - scope.dispatchEvent(startEvent); - } - } - - function onMouseMove(event) { - if (scope.enabled === false) return; - - event.preventDefault(); - - switch (state) { - case STATE.ROTATE: - - if (scope.enableRotate === false) return; - - handleMouseMoveRotate(event); - - break; - - case STATE.DOLLY: - - if (scope.enableZoom === false) return; - - handleMouseMoveDolly(event); - - break; - - case STATE.PAN: - - if (scope.enablePan === false) return; - - handleMouseMovePan(event); - - break; - } - } - - function onMouseUp(event) { - if (scope.enabled === false) return; - - handleMouseUp(event); - - document.removeEventListener('mousemove', onMouseMove, false); - document.removeEventListener('mouseup', onMouseUp, false); - - scope.dispatchEvent(endEvent); - - state = STATE.NONE; - } - - function onMouseWheel(event) { - if (scope.enabled === false || scope.enableZoom === false || (state !== STATE.NONE && state !== STATE.ROTATE)) return; - - event.preventDefault(); - event.stopPropagation(); - - scope.dispatchEvent(startEvent); - - handleMouseWheel(event); - - scope.dispatchEvent(endEvent); - } - - function onKeyDown(event) { - if (scope.enabled === false || scope.enableKeys === false || scope.enablePan === false) return; - - handleKeyDown(event); - } - - function onTouchStart(event) { - if (scope.enabled === false) return; - - event.preventDefault(); - - switch (event.touches.length) { - case 1: // one-fingered touch: rotate - - if (scope.enableRotate === false) return; - - handleTouchStartRotate(event); - - state = STATE.TOUCH_ROTATE; - - break; - - case 2: // two-fingered touch: dolly-pan - - if (scope.enableZoom === false && scope.enablePan === false) return; - - handleTouchStartDollyPan(event); - - state = STATE.TOUCH_DOLLY_PAN; - - break; - - default: - - state = STATE.NONE; - } - - if (state !== STATE.NONE) { - scope.dispatchEvent(startEvent); - } - } - - function onTouchMove(event) { - if (scope.enabled === false) return; - - event.preventDefault(); - event.stopPropagation(); - - switch (event.touches.length) { - case 1: // one-fingered touch: rotate - - if (scope.enableRotate === false) return; - if (state !== STATE.TOUCH_ROTATE) return; // is this needed? - - handleTouchMoveRotate(event); - - break; - - case 2: // two-fingered touch: dolly-pan - - if (scope.enableZoom === false && scope.enablePan === false) return; - if (state !== STATE.TOUCH_DOLLY_PAN) return; // is this needed? - - handleTouchMoveDollyPan(event); - - break; - - default: - - state = STATE.NONE; - } - } - - function onTouchEnd(event) { - if (scope.enabled === false) return; - - handleTouchEnd(event); - - scope.dispatchEvent(endEvent); - - state = STATE.NONE; - } - - function onContextMenu(event) { - if (scope.enabled === false) return; - - event.preventDefault(); - } - - // - - scope.domElement.addEventListener('contextmenu', onContextMenu, false); - - scope.domElement.addEventListener('mousedown', onMouseDown, false); - scope.domElement.addEventListener('wheel', onMouseWheel, false); - - scope.domElement.addEventListener('touchstart', onTouchStart, false); - scope.domElement.addEventListener('touchend', onTouchEnd, false); - scope.domElement.addEventListener('touchmove', onTouchMove, false); - - window.addEventListener('keydown', onKeyDown, false); - - // force an update at start - - this.update(); -}; - -OrbitControls.prototype = Object.create(EventDispatcher.prototype); -OrbitControls.prototype.constructor = OrbitControls; - -Object.defineProperties(OrbitControls.prototype, { - - center: { - - get() { - return this.target; - }, - - }, - - // backward compatibility - - noZoom: { - - get() { - return !this.enableZoom; - }, - - set(value) { - this.enableZoom = !value; - }, - - }, - - noRotate: { - - get() { - return !this.enableRotate; - }, - - set(value) { - this.enableRotate = !value; - }, - - }, - - noPan: { - - get() { - return !this.enablePan; - }, - - set(value) { - this.enablePan = !value; - }, - - }, - - noKeys: { - - get() { - return !this.enableKeys; - }, - - set(value) { - this.enableKeys = !value; - }, - - }, - - staticMoving: { - - get() { - return !this.enableDamping; - }, - - set(value) { - this.enableDamping = !value; - }, - - }, - - dynamicDampingFactor: { - - get() { - return this.dampingFactor; - }, - - set(value) { - this.dampingFactor = value; - }, - - }, - -}); - -export { OrbitControls }; diff --git a/demo/helpers/three.js b/demo/helpers/three.js deleted file mode 100644 index 48c1bd32..00000000 --- a/demo/helpers/three.js +++ /dev/null @@ -1,3090 +0,0 @@ -var $a="128",Oy={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Uy={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},su=0,Qa=1,ou=2,Hy=3,Gy=0,Ka=1,au=2,Mi=3,Si=0,Qe=1,fr=2,el=1,ky=2,en=0,Ti=1,tl=2,nl=3,il=4,lu=5,Gn=100,cu=101,hu=102,rl=103,sl=104,uu=200,du=201,fu=202,pu=203,ol=204,al=205,mu=206,gu=207,xu=208,yu=209,vu=210,_u=0,wu=1,bu=2,Gs=3,Mu=4,Su=5,Tu=6,Eu=7,pr=0,Au=1,Lu=2,kn=0,Ru=1,Cu=2,Pu=3,Iu=4,Du=5,ks=300,mr=301,gr=302,Vs=303,Ws=304,Ei=306,xr=307,yr=1e3,xt=1001,vr=1002,nt=1003,qs=1004,Vy=1004,Xs=1005,Wy=1005,it=1006,ll=1007,qy=1007,Ai=1008,Xy=1008,Li=1009,Fu=1010,Nu=1011,_r=1012,Bu=1013,wr=1014,tn=1015,br=1016,zu=1017,Ou=1018,Uu=1019,Ri=1020,Hu=1021,Sn=1022,Tt=1023,Gu=1024,ku=1025,Vu=Tt,Vn=1026,Ci=1027,Wu=1028,qu=1029,Xu=1030,Yu=1031,Zu=1032,Ju=1033,cl=33776,hl=33777,ul=33778,dl=33779,fl=35840,pl=35841,ml=35842,gl=35843,ju=36196,xl=37492,yl=37496,$u=37808,Qu=37809,Ku=37810,ed=37811,td=37812,nd=37813,id=37814,rd=37815,sd=37816,od=37817,ad=37818,ld=37819,cd=37820,hd=37821,ud=36492,dd=37840,fd=37841,pd=37842,md=37843,gd=37844,xd=37845,yd=37846,vd=37847,_d=37848,wd=37849,bd=37850,Md=37851,Sd=37852,Td=37853,Ed=2200,Ad=2201,Ld=2202,Mr=2300,Sr=2301,Ys=2302,Wn=2400,qn=2401,Tr=2402,Zs=2500,vl=2501,Rd=0,Yy=1,Zy=2,yt=3e3,Er=3001,Js=3007,js=3002,Cd=3003,_l=3004,wl=3005,bl=3006,Pd=3200,Id=3201,Xn=0,Dd=1,Jy=0,$s=7680,jy=7681,$y=7682,Qy=7683,Ky=34055,ev=34056,tv=5386,nv=512,iv=513,rv=514,sv=515,ov=516,av=517,lv=518,Fd=519,Pi=35044,Ii=35048,cv=35040,hv=35045,uv=35049,dv=35041,fv=35046,pv=35050,mv=35042,gv="100",Ml="300 es",nn=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;let n=this._listeners;return n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;let i=this._listeners[e];if(i!==void 0){let r=i.indexOf(t);r!==-1&&i.splice(r,1)}}dispatchEvent(e){if(this._listeners===void 0)return;let n=this._listeners[e.type];if(n!==void 0){e.target=this;let i=n.slice(0);for(let r=0,o=i.length;r>8&255]+lt[s>>16&255]+lt[s>>24&255]+"-"+lt[e&255]+lt[e>>8&255]+"-"+lt[e>>16&15|64]+lt[e>>24&255]+"-"+lt[t&63|128]+lt[t>>8&255]+"-"+lt[t>>16&255]+lt[t>>24&255]+lt[n&255]+lt[n>>8&255]+lt[n>>16&255]+lt[n>>24&255]).toUpperCase()}function ct(s,e,t){return Math.max(e,Math.min(t,s))}function Qs(s,e){return(s%e+e)%e}function Nd(s,e,t,n,i){return n+(s-e)*(i-n)/(t-e)}function Bd(s,e,t){return s!==e?(t-s)/(e-s):0}function Fi(s,e,t){return(1-t)*s+t*e}function zd(s,e,t,n){return Fi(s,e,1-Math.exp(-t*n))}function Od(s,e=1){return e-Math.abs(Qs(s,e*2)-e)}function Ud(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*(3-2*s))}function Hd(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*s*(s*(s*6-15)+10))}function Gd(s,e){return s+Math.floor(Math.random()*(e-s+1))}function kd(s,e){return s+Math.random()*(e-s)}function Vd(s){return s*(.5-Math.random())}function Wd(s){return s!==void 0&&(Ar=s%2147483647),Ar=Ar*16807%2147483647,(Ar-1)/2147483646}function qd(s){return s*Tn}function Xd(s){return s*Di}function Ks(s){return(s&s-1)==0&&s!==0}function Sl(s){return Math.pow(2,Math.ceil(Math.log(s)/Math.LN2))}function Tl(s){return Math.pow(2,Math.floor(Math.log(s)/Math.LN2))}function Yd(s,e,t,n,i){let r=Math.cos,o=Math.sin,a=r(t/2),c=o(t/2),l=r((e+n)/2),h=o((e+n)/2),u=r((e-n)/2),d=o((e-n)/2),f=r((n-e)/2),m=o((n-e)/2);switch(i){case"XYX":s.set(a*h,c*u,c*d,a*l);break;case"YZY":s.set(c*d,a*h,c*u,a*l);break;case"ZXZ":s.set(c*u,c*d,a*h,a*l);break;case"XZX":s.set(a*h,c*m,c*f,a*l);break;case"YXY":s.set(c*f,a*h,c*m,a*l);break;case"ZYZ":s.set(c*m,c*f,a*h,a*l);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}var xv=Object.freeze({__proto__:null,DEG2RAD:Tn,RAD2DEG:Di,generateUUID:wt,clamp:ct,euclideanModulo:Qs,mapLinear:Nd,inverseLerp:Bd,lerp:Fi,damp:zd,pingpong:Od,smoothstep:Ud,smootherstep:Hd,randInt:Gd,randFloat:kd,randFloatSpread:Vd,seededRandom:Wd,degToRad:qd,radToDeg:Xd,isPowerOfTwo:Ks,ceilPowerOfTwo:Sl,floorPowerOfTwo:Tl,setQuaternionFromProperEuler:Yd}),W=class{constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,n=this.y,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6],this.y=i[1]*t+i[4]*n+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t,n){return n!==void 0&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let n=Math.cos(t),i=Math.sin(t),r=this.x-e.x,o=this.y-e.y;return this.x=r*n-o*i+e.x,this.y=r*i+o*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}};W.prototype.isVector2=!0;var Ke=class{constructor(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,i,r,o,a,c,l){let h=this.elements;return h[0]=e,h[1]=i,h[2]=a,h[3]=t,h[4]=r,h[5]=c,h[6]=n,h[7]=o,h[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,i=t.elements,r=this.elements,o=n[0],a=n[3],c=n[6],l=n[1],h=n[4],u=n[7],d=n[2],f=n[5],m=n[8],x=i[0],y=i[3],g=i[6],p=i[1],w=i[4],b=i[7],T=i[2],v=i[5],A=i[8];return r[0]=o*x+a*p+c*T,r[3]=o*y+a*w+c*v,r[6]=o*g+a*b+c*A,r[1]=l*x+h*p+u*T,r[4]=l*y+h*w+u*v,r[7]=l*g+h*b+u*A,r[2]=d*x+f*p+m*T,r[5]=d*y+f*w+m*v,r[8]=d*g+f*b+m*A,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],a=e[5],c=e[6],l=e[7],h=e[8];return t*o*h-t*a*l-n*r*h+n*a*c+i*r*l-i*o*c}invert(){let e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],a=e[5],c=e[6],l=e[7],h=e[8],u=h*o-a*l,d=a*c-h*r,f=l*r-o*c,m=t*u+n*d+i*f;if(m===0)return this.set(0,0,0,0,0,0,0,0,0);let x=1/m;return e[0]=u*x,e[1]=(i*l-h*n)*x,e[2]=(a*n-i*o)*x,e[3]=d*x,e[4]=(h*t-i*c)*x,e[5]=(i*r-a*t)*x,e[6]=f*x,e[7]=(n*c-l*t)*x,e[8]=(o*t-n*r)*x,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,i,r,o,a){let c=Math.cos(r),l=Math.sin(r);return this.set(n*c,n*l,-n*(c*o+l*a)+o+e,-i*l,i*c,-i*(-l*o+c*a)+a+t,0,0,1),this}scale(e,t){let n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this}rotate(e){let t=Math.cos(e),n=Math.sin(e),i=this.elements,r=i[0],o=i[3],a=i[6],c=i[1],l=i[4],h=i[7];return i[0]=t*r+n*c,i[3]=t*o+n*l,i[6]=t*a+n*h,i[1]=-n*r+t*c,i[4]=-n*o+t*l,i[7]=-n*a+t*h,this}translate(e,t){let n=this.elements;return n[0]+=e*n[2],n[3]+=e*n[5],n[6]+=e*n[8],n[1]+=t*n[2],n[4]+=t*n[5],n[7]+=t*n[8],this}equals(e){let t=this.elements,n=e.elements;for(let i=0;i<9;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}};Ke.prototype.isMatrix3=!0;var Yn,En=class{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement=="undefined")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{Yn===void 0&&(Yn=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),Yn.width=e.width,Yn.height=e.height;let n=Yn.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=Yn}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}},Zd=0,et=class extends nn{constructor(e=et.DEFAULT_IMAGE,t=et.DEFAULT_MAPPING,n=xt,i=xt,r=it,o=Ai,a=Tt,c=Li,l=1,h=yt){super();Object.defineProperty(this,"id",{value:Zd++}),this.uuid=wt(),this.name="",this.image=e,this.mipmaps=[],this.mapping=t,this.wrapS=n,this.wrapT=i,this.magFilter=r,this.minFilter=o,this.anisotropy=l,this.format=a,this.internalFormat=null,this.type=c,this.offset=new W(0,0),this.repeat=new W(1,1),this.center=new W(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ke,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=h,this.version=0,this.onUpdate=null}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this}toJSON(e){let t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];let n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(this.image!==void 0){let i=this.image;if(i.uuid===void 0&&(i.uuid=wt()),!t&&e.images[i.uuid]===void 0){let r;if(Array.isArray(i)){r=[];for(let o=0,a=i.length;o1)switch(this.wrapS){case yr:e.x=e.x-Math.floor(e.x);break;case xt:e.x=e.x<0?0:1;break;case vr:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case yr:e.y=e.y-Math.floor(e.y);break;case xt:e.y=e.y<0?0:1;break;case vr:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&this.version++}};et.DEFAULT_IMAGE=void 0;et.DEFAULT_MAPPING=ks;et.prototype.isTexture=!0;function eo(s){return typeof HTMLImageElement!="undefined"&&s instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&s instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&s instanceof ImageBitmap?En.getDataURL(s):s.data?{data:Array.prototype.slice.call(s.data),width:s.width,height:s.height,type:s.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}var Fe=class{constructor(e=0,t=0,n=0,i=1){this.x=e,this.y=t,this.z=n,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,i){return this.x=e,this.y=t,this.z=n,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,n=this.y,i=this.z,r=this.w,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*i+o[12]*r,this.y=o[1]*t+o[5]*n+o[9]*i+o[13]*r,this.z=o[2]*t+o[6]*n+o[10]*i+o[14]*r,this.w=o[3]*t+o[7]*n+o[11]*i+o[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,i,r,o=.01,a=.1,c=e.elements,l=c[0],h=c[4],u=c[8],d=c[1],f=c[5],m=c[9],x=c[2],y=c[6],g=c[10];if(Math.abs(h-d)b&&w>T?wT?b=0?1:-1,w=1-g*g;if(w>Number.EPSILON){let T=Math.sqrt(w),v=Math.atan2(T,g*p);y=Math.sin(y*v)/T,a=Math.sin(a*v)/T}let b=a*p;if(c=c*y+d*b,l=l*y+f*b,h=h*y+m*b,u=u*y+x*b,y===1-a){let T=1/Math.sqrt(c*c+l*l+h*h+u*u);c*=T,l*=T,h*=T,u*=T}}e[t]=c,e[t+1]=l,e[t+2]=h,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,i,r,o){let a=n[i],c=n[i+1],l=n[i+2],h=n[i+3],u=r[o],d=r[o+1],f=r[o+2],m=r[o+3];return e[t]=a*m+h*u+c*f-l*d,e[t+1]=c*m+h*d+l*u-a*f,e[t+2]=l*m+h*f+a*d-c*u,e[t+3]=h*m-a*u-c*d-l*f,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,i){return this._x=e,this._y=t,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){if(!(e&&e.isEuler))throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");let n=e._x,i=e._y,r=e._z,o=e._order,a=Math.cos,c=Math.sin,l=a(n/2),h=a(i/2),u=a(r/2),d=c(n/2),f=c(i/2),m=c(r/2);switch(o){case"XYZ":this._x=d*h*u+l*f*m,this._y=l*f*u-d*h*m,this._z=l*h*m+d*f*u,this._w=l*h*u-d*f*m;break;case"YXZ":this._x=d*h*u+l*f*m,this._y=l*f*u-d*h*m,this._z=l*h*m-d*f*u,this._w=l*h*u+d*f*m;break;case"ZXY":this._x=d*h*u-l*f*m,this._y=l*f*u+d*h*m,this._z=l*h*m+d*f*u,this._w=l*h*u-d*f*m;break;case"ZYX":this._x=d*h*u-l*f*m,this._y=l*f*u+d*h*m,this._z=l*h*m-d*f*u,this._w=l*h*u+d*f*m;break;case"YZX":this._x=d*h*u+l*f*m,this._y=l*f*u+d*h*m,this._z=l*h*m-d*f*u,this._w=l*h*u-d*f*m;break;case"XZY":this._x=d*h*u-l*f*m,this._y=l*f*u-d*h*m,this._z=l*h*m+d*f*u,this._w=l*h*u+d*f*m;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],i=t[4],r=t[8],o=t[1],a=t[5],c=t[9],l=t[2],h=t[6],u=t[10],d=n+a+u;if(d>0){let f=.5/Math.sqrt(d+1);this._w=.25/f,this._x=(h-c)*f,this._y=(r-l)*f,this._z=(o-i)*f}else if(n>a&&n>u){let f=2*Math.sqrt(1+n-a-u);this._w=(h-c)/f,this._x=.25*f,this._y=(i+o)/f,this._z=(r+l)/f}else if(a>u){let f=2*Math.sqrt(1+a-n-u);this._w=(r-l)/f,this._x=(i+o)/f,this._y=.25*f,this._z=(c+h)/f}else{let f=2*Math.sqrt(1+u-n-a);this._w=(o-i)/f,this._x=(r+l)/f,this._y=(c+h)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return nMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(ct(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(n===0)return this;let i=Math.min(1,t/n);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e,t){return t!==void 0?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let n=e._x,i=e._y,r=e._z,o=e._w,a=t._x,c=t._y,l=t._z,h=t._w;return this._x=n*h+o*a+i*l-r*c,this._y=i*h+o*c+r*a-n*l,this._z=r*h+o*l+n*c-i*a,this._w=o*h-n*a-i*c-r*l,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);let n=this._x,i=this._y,r=this._z,o=this._w,a=o*e._w+n*e._x+i*e._y+r*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=n,this._y=i,this._z=r,this;let c=1-a*a;if(c<=Number.EPSILON){let f=1-t;return this._w=f*o+t*this._w,this._x=f*n+t*this._x,this._y=f*i+t*this._y,this._z=f*r+t*this._z,this.normalize(),this._onChangeCallback(),this}let l=Math.sqrt(c),h=Math.atan2(l,a),u=Math.sin((1-t)*h)/l,d=Math.sin(t*h)/l;return this._w=o*u+this._w*d,this._x=n*u+this._x*d,this._y=i*u+this._y*d,this._z=r*u+this._z*d,this._onChangeCallback(),this}slerpQuaternions(e,t,n){this.copy(e).slerp(t,n)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}};rt.prototype.isQuaternion=!0;var _=class{constructor(e=0,t=0,n=0){this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e,t){return t!==void 0?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(Al.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Al.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6]*i,this.y=r[1]*t+r[4]*n+r[7]*i,this.z=r[2]*t+r[5]*n+r[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,i=this.z,r=e.elements,o=1/(r[3]*t+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*t+r[4]*n+r[8]*i+r[12])*o,this.y=(r[1]*t+r[5]*n+r[9]*i+r[13])*o,this.z=(r[2]*t+r[6]*n+r[10]*i+r[14])*o,this}applyQuaternion(e){let t=this.x,n=this.y,i=this.z,r=e.x,o=e.y,a=e.z,c=e.w,l=c*t+o*i-a*n,h=c*n+a*t-r*i,u=c*i+r*n-o*t,d=-r*t-o*n-a*i;return this.x=l*c+d*-r+h*-a-u*-o,this.y=h*c+d*-o+u*-r-l*-a,this.z=u*c+d*-a+l*-o-h*-r,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[4]*n+r[8]*i,this.y=r[1]*t+r[5]*n+r[9]*i,this.z=r[2]*t+r[6]*n+r[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e,t){return t!==void 0?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)}crossVectors(e,t){let n=e.x,i=e.y,r=e.z,o=t.x,a=t.y,c=t.z;return this.x=i*c-r*a,this.y=r*o-n*c,this.z=n*a-i*o,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return to.copy(this).projectOnVector(e),this.sub(to)}reflect(e){return this.sub(to.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(ct(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return t*t+n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){let i=Math.sin(t)*e;return this.x=i*Math.sin(n),this.y=Math.cos(t)*e,this.z=i*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=i,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t,n){return n!==void 0&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}};_.prototype.isVector3=!0;var to=new _,Al=new rt,vt=class{constructor(e=new _(Infinity,Infinity,Infinity),t=new _(-Infinity,-Infinity,-Infinity)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){let t=Infinity,n=Infinity,i=Infinity,r=-Infinity,o=-Infinity,a=-Infinity;for(let c=0,l=e.length;cr&&(r=h),u>o&&(o=u),d>a&&(a=d)}return this.min.set(t,n,i),this.max.set(r,o,a),this}setFromBufferAttribute(e){let t=Infinity,n=Infinity,i=Infinity,r=-Infinity,o=-Infinity,a=-Infinity;for(let c=0,l=e.count;cr&&(r=h),u>o&&(o=u),d>a&&(a=d)}return this.min.set(t,n,i),this.max.set(r,o,a),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t===void 0&&(console.warn("THREE.Box3: .getParameter() target is now required"),t=new _),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Ni),Ni.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Bi),Lr.subVectors(this.max,Bi),Zn.subVectors(e.a,Bi),Jn.subVectors(e.b,Bi),jn.subVectors(e.c,Bi),rn.subVectors(Jn,Zn),sn.subVectors(jn,Jn),An.subVectors(Zn,jn);let t=[0,-rn.z,rn.y,0,-sn.z,sn.y,0,-An.z,An.y,rn.z,0,-rn.x,sn.z,0,-sn.x,An.z,0,-An.x,-rn.y,rn.x,0,-sn.y,sn.x,0,-An.y,An.x,0];return!io(t,Zn,Jn,jn,Lr)||(t=[1,0,0,0,1,0,0,0,1],!io(t,Zn,Jn,jn,Lr))?!1:(Rr.crossVectors(rn,sn),t=[Rr.x,Rr.y,Rr.z],io(t,Zn,Jn,jn,Lr))}clampPoint(e,t){return t===void 0&&(console.warn("THREE.Box3: .clampPoint() target is now required"),t=new _),t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return Ni.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return e===void 0&&console.error("THREE.Box3: .getBoundingSphere() target is now required"),this.getCenter(e.center),e.radius=this.getSize(Ni).length()*.5,e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Wt[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Wt[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Wt[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Wt[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Wt[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Wt[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Wt[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Wt[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Wt),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}};vt.prototype.isBox3=!0;var Wt=[new _,new _,new _,new _,new _,new _,new _,new _],Ni=new _,no=new vt,Zn=new _,Jn=new _,jn=new _,rn=new _,sn=new _,An=new _,Bi=new _,Lr=new _,Rr=new _,Ln=new _;function io(s,e,t,n,i){for(let r=0,o=s.length-3;r<=o;r+=3){Ln.fromArray(s,r);let a=i.x*Math.abs(Ln.x)+i.y*Math.abs(Ln.y)+i.z*Math.abs(Ln.z),c=e.dot(Ln),l=t.dot(Ln),h=n.dot(Ln);if(Math.max(-Math.max(c,l,h),Math.min(c,l,h))>a)return!1}return!0}var Jd=new vt,Ll=new _,ro=new _,so=new _,on=class{constructor(e=new _,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let n=this.center;t!==void 0?n.copy(t):Jd.setFromPoints(e).getCenter(n);let i=0;for(let r=0,o=e.length;rthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return e===void 0&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),e=new vt),this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){so.subVectors(e,this.center);let t=so.lengthSq();if(t>this.radius*this.radius){let n=Math.sqrt(t),i=(n-this.radius)*.5;this.center.add(so.multiplyScalar(i/n)),this.radius+=i}return this}union(e){return ro.subVectors(e.center,this.center).normalize().multiplyScalar(e.radius),this.expandByPoint(Ll.copy(e.center).add(ro)),this.expandByPoint(Ll.copy(e.center).sub(ro)),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}},qt=new _,oo=new _,Cr=new _,an=new _,ao=new _,Pr=new _,lo=new _,ln=class{constructor(e=new _,t=new _(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t===void 0&&(console.warn("THREE.Ray: .at() target is now required"),t=new _),t.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,qt)),this}closestPointToPoint(e,t){t===void 0&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),t=new _),t.subVectors(e,this.origin);let n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=qt.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(qt.copy(this.direction).multiplyScalar(t).add(this.origin),qt.distanceToSquared(e))}distanceSqToSegment(e,t,n,i){oo.copy(e).add(t).multiplyScalar(.5),Cr.copy(t).sub(e).normalize(),an.copy(this.origin).sub(oo);let r=e.distanceTo(t)*.5,o=-this.direction.dot(Cr),a=an.dot(this.direction),c=-an.dot(Cr),l=an.lengthSq(),h=Math.abs(1-o*o),u,d,f,m;if(h>0)if(u=o*c-a,d=o*a-c,m=r*h,u>=0)if(d>=-m)if(d<=m){let x=1/h;u*=x,d*=x,f=u*(u+o*d+2*a)+d*(o*u+d+2*c)+l}else d=r,u=Math.max(0,-(o*d+a)),f=-u*u+d*(d+2*c)+l;else d=-r,u=Math.max(0,-(o*d+a)),f=-u*u+d*(d+2*c)+l;else d<=-m?(u=Math.max(0,-(-o*r+a)),d=u>0?-r:Math.min(Math.max(-r,-c),r),f=-u*u+d*(d+2*c)+l):d<=m?(u=0,d=Math.min(Math.max(-r,-c),r),f=d*(d+2*c)+l):(u=Math.max(0,-(o*r+a)),d=u>0?r:Math.min(Math.max(-r,-c),r),f=-u*u+d*(d+2*c)+l);else d=o>0?-r:r,u=Math.max(0,-(o*d+a)),f=-u*u+d*(d+2*c)+l;return n&&n.copy(this.direction).multiplyScalar(u).add(this.origin),i&&i.copy(Cr).multiplyScalar(d).add(oo),f}intersectSphere(e,t){qt.subVectors(e.center,this.origin);let n=qt.dot(this.direction),i=qt.dot(qt)-n*n,r=e.radius*e.radius;if(i>r)return null;let o=Math.sqrt(r-i),a=n-o,c=n+o;return a<0&&c<0?null:a<0?this.at(c,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){let n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,i,r,o,a,c,l=1/this.direction.x,h=1/this.direction.y,u=1/this.direction.z,d=this.origin;return l>=0?(n=(e.min.x-d.x)*l,i=(e.max.x-d.x)*l):(n=(e.max.x-d.x)*l,i=(e.min.x-d.x)*l),h>=0?(r=(e.min.y-d.y)*h,o=(e.max.y-d.y)*h):(r=(e.max.y-d.y)*h,o=(e.min.y-d.y)*h),n>o||r>i||((r>n||n!==n)&&(n=r),(o=0?(a=(e.min.z-d.z)*u,c=(e.max.z-d.z)*u):(a=(e.max.z-d.z)*u,c=(e.min.z-d.z)*u),n>c||a>i)||((a>n||n!==n)&&(n=a),(c=0?n:i,t)}intersectsBox(e){return this.intersectBox(e,qt)!==null}intersectTriangle(e,t,n,i,r){ao.subVectors(t,e),Pr.subVectors(n,e),lo.crossVectors(ao,Pr);let o=this.direction.dot(lo),a;if(o>0){if(i)return null;a=1}else if(o<0)a=-1,o=-o;else return null;an.subVectors(this.origin,e);let c=a*this.direction.dot(Pr.crossVectors(an,Pr));if(c<0)return null;let l=a*this.direction.dot(ao.cross(an));if(l<0||c+l>o)return null;let h=-a*an.dot(lo);return h<0?null:this.at(h/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},le=class{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,i,r,o,a,c,l,h,u,d,f,m,x,y){let g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=i,g[1]=r,g[5]=o,g[9]=a,g[13]=c,g[2]=l,g[6]=h,g[10]=u,g[14]=d,g[3]=f,g[7]=m,g[11]=x,g[15]=y,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new le().fromArray(this.elements)}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){let t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){let t=this.elements,n=e.elements,i=1/$n.setFromMatrixColumn(e,0).length(),r=1/$n.setFromMatrixColumn(e,1).length(),o=1/$n.setFromMatrixColumn(e,2).length();return t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t[3]=0,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=0,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");let t=this.elements,n=e.x,i=e.y,r=e.z,o=Math.cos(n),a=Math.sin(n),c=Math.cos(i),l=Math.sin(i),h=Math.cos(r),u=Math.sin(r);if(e.order==="XYZ"){let d=o*h,f=o*u,m=a*h,x=a*u;t[0]=c*h,t[4]=-c*u,t[8]=l,t[1]=f+m*l,t[5]=d-x*l,t[9]=-a*c,t[2]=x-d*l,t[6]=m+f*l,t[10]=o*c}else if(e.order==="YXZ"){let d=c*h,f=c*u,m=l*h,x=l*u;t[0]=d+x*a,t[4]=m*a-f,t[8]=o*l,t[1]=o*u,t[5]=o*h,t[9]=-a,t[2]=f*a-m,t[6]=x+d*a,t[10]=o*c}else if(e.order==="ZXY"){let d=c*h,f=c*u,m=l*h,x=l*u;t[0]=d-x*a,t[4]=-o*u,t[8]=m+f*a,t[1]=f+m*a,t[5]=o*h,t[9]=x-d*a,t[2]=-o*l,t[6]=a,t[10]=o*c}else if(e.order==="ZYX"){let d=o*h,f=o*u,m=a*h,x=a*u;t[0]=c*h,t[4]=m*l-f,t[8]=d*l+x,t[1]=c*u,t[5]=x*l+d,t[9]=f*l-m,t[2]=-l,t[6]=a*c,t[10]=o*c}else if(e.order==="YZX"){let d=o*c,f=o*l,m=a*c,x=a*l;t[0]=c*h,t[4]=x-d*u,t[8]=m*u+f,t[1]=u,t[5]=o*h,t[9]=-a*h,t[2]=-l*h,t[6]=f*u+m,t[10]=d-x*u}else if(e.order==="XZY"){let d=o*c,f=o*l,m=a*c,x=a*l;t[0]=c*h,t[4]=-u,t[8]=l*h,t[1]=d*u+x,t[5]=o*h,t[9]=f*u-m,t[2]=m*u-f,t[6]=a*h,t[10]=x*u+d}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(jd,e,$d)}lookAt(e,t,n){let i=this.elements;return bt.subVectors(e,t),bt.lengthSq()===0&&(bt.z=1),bt.normalize(),cn.crossVectors(n,bt),cn.lengthSq()===0&&(Math.abs(n.z)===1?bt.x+=1e-4:bt.z+=1e-4,bt.normalize(),cn.crossVectors(n,bt)),cn.normalize(),Ir.crossVectors(bt,cn),i[0]=cn.x,i[4]=Ir.x,i[8]=bt.x,i[1]=cn.y,i[5]=Ir.y,i[9]=bt.y,i[2]=cn.z,i[6]=Ir.z,i[10]=bt.z,this}multiply(e,t){return t!==void 0?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,i=t.elements,r=this.elements,o=n[0],a=n[4],c=n[8],l=n[12],h=n[1],u=n[5],d=n[9],f=n[13],m=n[2],x=n[6],y=n[10],g=n[14],p=n[3],w=n[7],b=n[11],T=n[15],v=i[0],A=i[4],L=i[8],I=i[12],N=i[1],U=i[5],z=i[9],R=i[13],D=i[2],F=i[6],P=i[10],X=i[14],$=i[3],Z=i[7],oe=i[11],re=i[15];return r[0]=o*v+a*N+c*D+l*$,r[4]=o*A+a*U+c*F+l*Z,r[8]=o*L+a*z+c*P+l*oe,r[12]=o*I+a*R+c*X+l*re,r[1]=h*v+u*N+d*D+f*$,r[5]=h*A+u*U+d*F+f*Z,r[9]=h*L+u*z+d*P+f*oe,r[13]=h*I+u*R+d*X+f*re,r[2]=m*v+x*N+y*D+g*$,r[6]=m*A+x*U+y*F+g*Z,r[10]=m*L+x*z+y*P+g*oe,r[14]=m*I+x*R+y*X+g*re,r[3]=p*v+w*N+b*D+T*$,r[7]=p*A+w*U+b*F+T*Z,r[11]=p*L+w*z+b*P+T*oe,r[15]=p*I+w*R+b*X+T*re,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[4],i=e[8],r=e[12],o=e[1],a=e[5],c=e[9],l=e[13],h=e[2],u=e[6],d=e[10],f=e[14],m=e[3],x=e[7],y=e[11],g=e[15];return m*(+r*c*u-i*l*u-r*a*d+n*l*d+i*a*f-n*c*f)+x*(+t*c*f-t*l*d+r*o*d-i*o*f+i*l*h-r*c*h)+y*(+t*l*u-t*a*f-r*o*u+n*o*f+r*a*h-n*l*h)+g*(-i*a*h-t*c*u+t*a*d+i*o*u-n*o*d+n*c*h)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){let i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=t,i[14]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],o=e[4],a=e[5],c=e[6],l=e[7],h=e[8],u=e[9],d=e[10],f=e[11],m=e[12],x=e[13],y=e[14],g=e[15],p=u*y*l-x*d*l+x*c*f-a*y*f-u*c*g+a*d*g,w=m*d*l-h*y*l-m*c*f+o*y*f+h*c*g-o*d*g,b=h*x*l-m*u*l+m*a*f-o*x*f-h*a*g+o*u*g,T=m*u*c-h*x*c-m*a*d+o*x*d+h*a*y-o*u*y,v=t*p+n*w+i*b+r*T;if(v===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let A=1/v;return e[0]=p*A,e[1]=(x*d*r-u*y*r-x*i*f+n*y*f+u*i*g-n*d*g)*A,e[2]=(a*y*r-x*c*r+x*i*l-n*y*l-a*i*g+n*c*g)*A,e[3]=(u*c*r-a*d*r-u*i*l+n*d*l+a*i*f-n*c*f)*A,e[4]=w*A,e[5]=(h*y*r-m*d*r+m*i*f-t*y*f-h*i*g+t*d*g)*A,e[6]=(m*c*r-o*y*r-m*i*l+t*y*l+o*i*g-t*c*g)*A,e[7]=(o*d*r-h*c*r+h*i*l-t*d*l-o*i*f+t*c*f)*A,e[8]=b*A,e[9]=(m*u*r-h*x*r-m*n*f+t*x*f+h*n*g-t*u*g)*A,e[10]=(o*x*r-m*a*r+m*n*l-t*x*l-o*n*g+t*a*g)*A,e[11]=(h*a*r-o*u*r-h*n*l+t*u*l+o*n*f-t*a*f)*A,e[12]=T*A,e[13]=(h*x*i-m*u*i+m*n*d-t*x*d-h*n*y+t*u*y)*A,e[14]=(m*a*i-o*x*i-m*n*c+t*x*c+o*n*y-t*a*y)*A,e[15]=(o*u*i-h*a*i+h*n*c-t*u*c-o*n*d+t*a*d)*A,this}scale(e){let t=this.elements,n=e.x,i=e.y,r=e.z;return t[0]*=n,t[4]*=i,t[8]*=r,t[1]*=n,t[5]*=i,t[9]*=r,t[2]*=n,t[6]*=i,t[10]*=r,t[3]*=n,t[7]*=i,t[11]*=r,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,i))}makeTranslation(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let n=Math.cos(t),i=Math.sin(t),r=1-n,o=e.x,a=e.y,c=e.z,l=r*o,h=r*a;return this.set(l*o+n,l*a-i*c,l*c+i*a,0,l*a+i*c,h*a+n,h*c-i*o,0,l*c-i*a,h*c+i*o,r*c*c+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n){return this.set(1,t,n,0,e,1,n,0,e,t,1,0,0,0,0,1),this}compose(e,t,n){let i=this.elements,r=t._x,o=t._y,a=t._z,c=t._w,l=r+r,h=o+o,u=a+a,d=r*l,f=r*h,m=r*u,x=o*h,y=o*u,g=a*u,p=c*l,w=c*h,b=c*u,T=n.x,v=n.y,A=n.z;return i[0]=(1-(x+g))*T,i[1]=(f+b)*T,i[2]=(m-w)*T,i[3]=0,i[4]=(f-b)*v,i[5]=(1-(d+g))*v,i[6]=(y+p)*v,i[7]=0,i[8]=(m+w)*A,i[9]=(y-p)*A,i[10]=(1-(d+x))*A,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,t,n){let i=this.elements,r=$n.set(i[0],i[1],i[2]).length(),o=$n.set(i[4],i[5],i[6]).length(),a=$n.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),e.x=i[12],e.y=i[13],e.z=i[14],At.copy(this);let l=1/r,h=1/o,u=1/a;return At.elements[0]*=l,At.elements[1]*=l,At.elements[2]*=l,At.elements[4]*=h,At.elements[5]*=h,At.elements[6]*=h,At.elements[8]*=u,At.elements[9]*=u,At.elements[10]*=u,t.setFromRotationMatrix(At),n.x=r,n.y=o,n.z=a,this}makePerspective(e,t,n,i,r,o){o===void 0&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");let a=this.elements,c=2*r/(t-e),l=2*r/(n-i),h=(t+e)/(t-e),u=(n+i)/(n-i),d=-(o+r)/(o-r),f=-2*o*r/(o-r);return a[0]=c,a[4]=0,a[8]=h,a[12]=0,a[1]=0,a[5]=l,a[9]=u,a[13]=0,a[2]=0,a[6]=0,a[10]=d,a[14]=f,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,t,n,i,r,o){let a=this.elements,c=1/(t-e),l=1/(n-i),h=1/(o-r),u=(t+e)*c,d=(n+i)*l,f=(o+r)*h;return a[0]=2*c,a[4]=0,a[8]=0,a[12]=-u,a[1]=0,a[5]=2*l,a[9]=0,a[13]=-d,a[2]=0,a[6]=0,a[10]=-2*h,a[14]=-f,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){let t=this.elements,n=e.elements;for(let i=0;i<16;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}};le.prototype.isMatrix4=!0;var $n=new _,At=new le,jd=new _(0,0,0),$d=new _(1,1,1),cn=new _,Ir=new _,bt=new _,Rl=new le,Cl=new rt,Rn=class{constructor(e=0,t=0,n=0,i=Rn.DefaultOrder){this._x=e,this._y=t,this._z=n,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,i){return this._x=e,this._y=t,this._z=n,this._order=i||this._order,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t,n){let i=e.elements,r=i[0],o=i[4],a=i[8],c=i[1],l=i[5],h=i[9],u=i[2],d=i[6],f=i[10];switch(t=t||this._order,t){case"XYZ":this._y=Math.asin(ct(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-h,f),this._z=Math.atan2(-o,r)):(this._x=Math.atan2(d,l),this._z=0);break;case"YXZ":this._x=Math.asin(-ct(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(a,f),this._z=Math.atan2(c,l)):(this._y=Math.atan2(-u,r),this._z=0);break;case"ZXY":this._x=Math.asin(ct(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-u,f),this._z=Math.atan2(-o,l)):(this._y=0,this._z=Math.atan2(c,r));break;case"ZYX":this._y=Math.asin(-ct(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(d,f),this._z=Math.atan2(c,r)):(this._x=0,this._z=Math.atan2(-o,l));break;case"YZX":this._z=Math.asin(ct(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,l),this._y=Math.atan2(-u,r)):(this._x=0,this._y=Math.atan2(a,f));break;case"XZY":this._z=Math.asin(-ct(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(d,l),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-h,f),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,n!==!1&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return Rl.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Rl,t,n)}setFromVector3(e,t){return this.set(e.x,e.y,e.z,t||this._order)}reorder(e){return Cl.setFromEuler(this),this.setFromQuaternion(Cl,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}toVector3(e){return e?e.set(this._x,this._y,this._z):new _(this._x,this._y,this._z)}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}};Rn.prototype.isEuler=!0;Rn.DefaultOrder="XYZ";Rn.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];var co=class{constructor(){this.mask=1|0}set(e){this.mask=1<1){for(let t=0;t1){for(let n=0;n0){i.children=[];for(let a=0;a0){i.animations=[];for(let a=0;a0&&(n.geometries=a),c.length>0&&(n.materials=c),l.length>0&&(n.textures=l),h.length>0&&(n.images=h),u.length>0&&(n.shapes=u),d.length>0&&(n.skeletons=d),f.length>0&&(n.animations=f)}return n.object=i,n;function o(a){let c=[];for(let l in a){let h=a[l];delete h.metadata,c.push(h)}return c}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let n=0;n1?null:t.copy(n).multiplyScalar(r).add(e.start)}intersectsLine(e){let t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e===void 0&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),e=new _),e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){let n=t||rf.getNormalMatrix(e),i=this.coplanarPoint(ho).applyMatrix4(e),r=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}};Lt.prototype.isPlane=!0;var Rt=new _,Yt=new _,uo=new _,Zt=new _,Kn=new _,ei=new _,Bl=new _,fo=new _,po=new _,mo=new _,qe=class{constructor(e=new _,t=new _,n=new _){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,i){i===void 0&&(console.warn("THREE.Triangle: .getNormal() target is now required"),i=new _),i.subVectors(n,t),Rt.subVectors(e,t),i.cross(Rt);let r=i.lengthSq();return r>0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(e,t,n,i,r){Rt.subVectors(i,t),Yt.subVectors(n,t),uo.subVectors(e,t);let o=Rt.dot(Rt),a=Rt.dot(Yt),c=Rt.dot(uo),l=Yt.dot(Yt),h=Yt.dot(uo),u=o*l-a*a;if(r===void 0&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),r=new _),u===0)return r.set(-2,-1,-1);let d=1/u,f=(l*c-a*h)*d,m=(o*h-a*c)*d;return r.set(1-f-m,m,f)}static containsPoint(e,t,n,i){return this.getBarycoord(e,t,n,i,Zt),Zt.x>=0&&Zt.y>=0&&Zt.x+Zt.y<=1}static getUV(e,t,n,i,r,o,a,c){return this.getBarycoord(e,t,n,i,Zt),c.set(0,0),c.addScaledVector(r,Zt.x),c.addScaledVector(o,Zt.y),c.addScaledVector(a,Zt.z),c}static isFrontFacing(e,t,n,i){return Rt.subVectors(n,t),Yt.subVectors(e,t),Rt.cross(Yt).dot(i)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,i){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[i]),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Rt.subVectors(this.c,this.b),Yt.subVectors(this.a,this.b),Rt.cross(Yt).length()*.5}getMidpoint(e){return e===void 0&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),e=new _),e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return qe.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e===void 0&&(console.warn("THREE.Triangle: .getPlane() target is now required"),e=new Lt),e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return qe.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,i,r){return qe.getUV(e,this.a,this.b,this.c,t,n,i,r)}containsPoint(e){return qe.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return qe.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){t===void 0&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),t=new _);let n=this.a,i=this.b,r=this.c,o,a;Kn.subVectors(i,n),ei.subVectors(r,n),fo.subVectors(e,n);let c=Kn.dot(fo),l=ei.dot(fo);if(c<=0&&l<=0)return t.copy(n);po.subVectors(e,i);let h=Kn.dot(po),u=ei.dot(po);if(h>=0&&u<=h)return t.copy(i);let d=c*u-h*l;if(d<=0&&c>=0&&h<=0)return o=c/(c-h),t.copy(n).addScaledVector(Kn,o);mo.subVectors(e,r);let f=Kn.dot(mo),m=ei.dot(mo);if(m>=0&&f<=m)return t.copy(r);let x=f*l-c*m;if(x<=0&&l>=0&&m<=0)return a=l/(l-m),t.copy(n).addScaledVector(ei,a);let y=h*m-f*u;if(y<=0&&u-h>=0&&f-m>=0)return Bl.subVectors(r,i),a=(u-h)/(u-h+(f-m)),t.copy(i).addScaledVector(Bl,a);let g=1/(y+x+d);return o=x*g,a=d*g,t.copy(n).addScaledVector(Kn,o).addScaledVector(ei,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},sf=0;function tt(){Object.defineProperty(this,"id",{value:sf++}),this.uuid=wt(),this.name="",this.type="Material",this.fog=!0,this.blending=Ti,this.side=Si,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=ol,this.blendDst=al,this.blendEquation=Gn,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Gs,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Fd,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=$s,this.stencilZFail=$s,this.stencilZPass=$s,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0}tt.prototype=Object.assign(Object.create(nn.prototype),{constructor:tt,isMaterial:!0,onBuild:function(){},onBeforeCompile:function(){},customProgramCacheKey:function(){return this.onBeforeCompile.toString()},setValues:function(s){if(s!==void 0)for(let e in s){let t=s[e];if(t===void 0){console.warn("THREE.Material: '"+e+"' parameter is undefined.");continue}if(e==="shading"){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===el;continue}let n=this[e];if(n===void 0){console.warn("THREE."+this.type+": '"+e+"' is not a property of this material.");continue}n&&n.isColor?n.set(t):n&&n.isVector3&&t&&t.isVector3?n.copy(t):this[e]=t}},toJSON:function(s){let e=s===void 0||typeof s=="string";e&&(s={textures:{},images:{}});let t={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};t.uuid=this.uuid,t.type=this.type,this.name!==""&&(t.name=this.name),this.color&&this.color.isColor&&(t.color=this.color.getHex()),this.roughness!==void 0&&(t.roughness=this.roughness),this.metalness!==void 0&&(t.metalness=this.metalness),this.sheen&&this.sheen.isColor&&(t.sheen=this.sheen.getHex()),this.emissive&&this.emissive.isColor&&(t.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(t.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(t.specular=this.specular.getHex()),this.shininess!==void 0&&(t.shininess=this.shininess),this.clearcoat!==void 0&&(t.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(t.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(t.clearcoatMap=this.clearcoatMap.toJSON(s).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(t.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(s).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(t.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(s).uuid,t.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(t.map=this.map.toJSON(s).uuid),this.matcap&&this.matcap.isTexture&&(t.matcap=this.matcap.toJSON(s).uuid),this.alphaMap&&this.alphaMap.isTexture&&(t.alphaMap=this.alphaMap.toJSON(s).uuid),this.lightMap&&this.lightMap.isTexture&&(t.lightMap=this.lightMap.toJSON(s).uuid,t.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(t.aoMap=this.aoMap.toJSON(s).uuid,t.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(t.bumpMap=this.bumpMap.toJSON(s).uuid,t.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(t.normalMap=this.normalMap.toJSON(s).uuid,t.normalMapType=this.normalMapType,t.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(t.displacementMap=this.displacementMap.toJSON(s).uuid,t.displacementScale=this.displacementScale,t.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(t.roughnessMap=this.roughnessMap.toJSON(s).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(t.metalnessMap=this.metalnessMap.toJSON(s).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(t.emissiveMap=this.emissiveMap.toJSON(s).uuid),this.specularMap&&this.specularMap.isTexture&&(t.specularMap=this.specularMap.toJSON(s).uuid),this.envMap&&this.envMap.isTexture&&(t.envMap=this.envMap.toJSON(s).uuid,this.combine!==void 0&&(t.combine=this.combine)),this.envMapIntensity!==void 0&&(t.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(t.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(t.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(t.gradientMap=this.gradientMap.toJSON(s).uuid),this.size!==void 0&&(t.size=this.size),this.shadowSide!==null&&(t.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(t.sizeAttenuation=this.sizeAttenuation),this.blending!==Ti&&(t.blending=this.blending),this.side!==Si&&(t.side=this.side),this.vertexColors&&(t.vertexColors=!0),this.opacity<1&&(t.opacity=this.opacity),this.transparent===!0&&(t.transparent=this.transparent),t.depthFunc=this.depthFunc,t.depthTest=this.depthTest,t.depthWrite=this.depthWrite,t.colorWrite=this.colorWrite,t.stencilWrite=this.stencilWrite,t.stencilWriteMask=this.stencilWriteMask,t.stencilFunc=this.stencilFunc,t.stencilRef=this.stencilRef,t.stencilFuncMask=this.stencilFuncMask,t.stencilFail=this.stencilFail,t.stencilZFail=this.stencilZFail,t.stencilZPass=this.stencilZPass,this.rotation&&this.rotation!==0&&(t.rotation=this.rotation),this.polygonOffset===!0&&(t.polygonOffset=!0),this.polygonOffsetFactor!==0&&(t.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(t.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&this.linewidth!==1&&(t.linewidth=this.linewidth),this.dashSize!==void 0&&(t.dashSize=this.dashSize),this.gapSize!==void 0&&(t.gapSize=this.gapSize),this.scale!==void 0&&(t.scale=this.scale),this.dithering===!0&&(t.dithering=!0),this.alphaTest>0&&(t.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(t.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(t.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(t.wireframe=this.wireframe),this.wireframeLinewidth>1&&(t.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(t.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(t.wireframeLinejoin=this.wireframeLinejoin),this.morphTargets===!0&&(t.morphTargets=!0),this.morphNormals===!0&&(t.morphNormals=!0),this.skinning===!0&&(t.skinning=!0),this.flatShading===!0&&(t.flatShading=this.flatShading),this.visible===!1&&(t.visible=!1),this.toneMapped===!1&&(t.toneMapped=!1),JSON.stringify(this.userData)!=="{}"&&(t.userData=this.userData);function n(i){let r=[];for(let o in i){let a=i[o];delete a.metadata,r.push(a)}return r}if(e){let i=n(s.textures),r=n(s.images);i.length>0&&(t.textures=i),r.length>0&&(t.images=r)}return t},clone:function(){return new this.constructor().copy(this)},copy:function(s){this.name=s.name,this.fog=s.fog,this.blending=s.blending,this.side=s.side,this.vertexColors=s.vertexColors,this.opacity=s.opacity,this.transparent=s.transparent,this.blendSrc=s.blendSrc,this.blendDst=s.blendDst,this.blendEquation=s.blendEquation,this.blendSrcAlpha=s.blendSrcAlpha,this.blendDstAlpha=s.blendDstAlpha,this.blendEquationAlpha=s.blendEquationAlpha,this.depthFunc=s.depthFunc,this.depthTest=s.depthTest,this.depthWrite=s.depthWrite,this.stencilWriteMask=s.stencilWriteMask,this.stencilFunc=s.stencilFunc,this.stencilRef=s.stencilRef,this.stencilFuncMask=s.stencilFuncMask,this.stencilFail=s.stencilFail,this.stencilZFail=s.stencilZFail,this.stencilZPass=s.stencilZPass,this.stencilWrite=s.stencilWrite;let e=s.clippingPlanes,t=null;if(e!==null){let n=e.length;t=new Array(n);for(let i=0;i!==n;++i)t[i]=e[i].clone()}return this.clippingPlanes=t,this.clipIntersection=s.clipIntersection,this.clipShadows=s.clipShadows,this.shadowSide=s.shadowSide,this.colorWrite=s.colorWrite,this.precision=s.precision,this.polygonOffset=s.polygonOffset,this.polygonOffsetFactor=s.polygonOffsetFactor,this.polygonOffsetUnits=s.polygonOffsetUnits,this.dithering=s.dithering,this.alphaTest=s.alphaTest,this.alphaToCoverage=s.alphaToCoverage,this.premultipliedAlpha=s.premultipliedAlpha,this.visible=s.visible,this.toneMapped=s.toneMapped,this.userData=JSON.parse(JSON.stringify(s.userData)),this},dispose:function(){this.dispatchEvent({type:"dispose"})}});Object.defineProperty(tt.prototype,"needsUpdate",{set:function(s){s===!0&&this.version++}});var zl={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Ct={h:0,s:0,l:0},Fr={h:0,s:0,l:0};function go(s,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?s+(e-s)*6*t:t<1/2?e:t<2/3?s+(e-s)*6*(2/3-t):s}function xo(s){return s<.04045?s*.0773993808:Math.pow(s*.9478672986+.0521327014,2.4)}function yo(s){return s<.0031308?s*12.92:1.055*Math.pow(s,.41666)-.055}var se=class{constructor(e,t,n){return t===void 0&&n===void 0?this.set(e):this.setRGB(e,t,n)}set(e){return e&&e.isColor?this.copy(e):typeof e=="number"?this.setHex(e):typeof e=="string"&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,this}setRGB(e,t,n){return this.r=e,this.g=t,this.b=n,this}setHSL(e,t,n){if(e=Qs(e,1),t=ct(t,0,1),n=ct(n,0,1),t===0)this.r=this.g=this.b=n;else{let i=n<=.5?n*(1+t):n+t-n*t,r=2*n-i;this.r=go(r,i,e+1/3),this.g=go(r,i,e),this.b=go(r,i,e-1/3)}return this}setStyle(e){function t(i){i!==void 0&&parseFloat(i)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let n;if(n=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let i,r=n[1],o=n[2];switch(r){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(i[1],10))/255,this.g=Math.min(255,parseInt(i[2],10))/255,this.b=Math.min(255,parseInt(i[3],10))/255,t(i[4]),this;if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(i[1],10))/100,this.g=Math.min(100,parseInt(i[2],10))/100,this.b=Math.min(100,parseInt(i[3],10))/100,t(i[4]),this;break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o)){let a=parseFloat(i[1])/360,c=parseInt(i[2],10)/100,l=parseInt(i[3],10)/100;return t(i[4]),this.setHSL(a,c,l)}break}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){let i=n[1],r=i.length;if(r===3)return this.r=parseInt(i.charAt(0)+i.charAt(0),16)/255,this.g=parseInt(i.charAt(1)+i.charAt(1),16)/255,this.b=parseInt(i.charAt(2)+i.charAt(2),16)/255,this;if(r===6)return this.r=parseInt(i.charAt(0)+i.charAt(1),16)/255,this.g=parseInt(i.charAt(2)+i.charAt(3),16)/255,this.b=parseInt(i.charAt(4)+i.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this}setColorName(e){let t=zl[e.toLowerCase()];return t!==void 0?this.setHex(t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copyGammaToLinear(e,t=2){return this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this}copyLinearToGamma(e,t=2){let n=t>0?1/t:1;return this.r=Math.pow(e.r,n),this.g=Math.pow(e.g,n),this.b=Math.pow(e.b,n),this}convertGammaToLinear(e){return this.copyGammaToLinear(this,e),this}convertLinearToGamma(e){return this.copyLinearToGamma(this,e),this}copySRGBToLinear(e){return this.r=xo(e.r),this.g=xo(e.g),this.b=xo(e.b),this}copyLinearToSRGB(e){return this.r=yo(e.r),this.g=yo(e.g),this.b=yo(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return this.r*255<<16^this.g*255<<8^this.b*255<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(e){e===void 0&&(console.warn("THREE.Color: .getHSL() target is now required"),e={h:0,s:0,l:0});let t=this.r,n=this.g,i=this.b,r=Math.max(t,n,i),o=Math.min(t,n,i),a,c,l=(o+r)/2;if(o===r)a=0,c=0;else{let h=r-o;switch(c=l<=.5?h/(r+o):h/(2-r-o),r){case t:a=(n-i)/h+(ne&&(e=s[t]);return e}var of={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Oi(s,e){return new of[s](e)}var af=0,Nt=new le,vo=new Se,ti=new _,Mt=new vt,Ui=new vt,st=new _,ue=class extends nn{constructor(){super();Object.defineProperty(this,"id",{value:af++}),this.uuid=wt(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:Infinity},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(ql(e)>65535?zr:Br)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);let n=this.attributes.normal;if(n!==void 0){let r=new Ke().getNormalMatrix(e);n.applyNormalMatrix(r),n.needsUpdate=!0}let i=this.attributes.tangent;return i!==void 0&&(i.transformDirection(e),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}rotateX(e){return Nt.makeRotationX(e),this.applyMatrix4(Nt),this}rotateY(e){return Nt.makeRotationY(e),this.applyMatrix4(Nt),this}rotateZ(e){return Nt.makeRotationZ(e),this.applyMatrix4(Nt),this}translate(e,t,n){return Nt.makeTranslation(e,t,n),this.applyMatrix4(Nt),this}scale(e,t,n){return Nt.makeScale(e,t,n),this.applyMatrix4(Nt),this}lookAt(e){return vo.lookAt(e),vo.updateMatrix(),this.applyMatrix4(vo.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(ti).negate(),this.translate(ti.x,ti.y,ti.z),this}setFromPoints(e){let t=[];for(let n=0,i=e.length;n0&&(e.userData=this.userData),this.parameters!==void 0){let c=this.parameters;for(let l in c)c[l]!==void 0&&(e[l]=c[l]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let n=this.attributes;for(let c in n){let l=n[c];e.data.attributes[c]=l.toJSON(e.data)}let i={},r=!1;for(let c in this.morphAttributes){let l=this.morphAttributes[c],h=[];for(let u=0,d=l.length;u0&&(i[c]=h,r=!0)}r&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);let o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));let a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new ue().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let n=e.index;n!==null&&this.setIndex(n.clone(t));let i=e.attributes;for(let l in i){let h=i[l];this.setAttribute(l,h.clone(t))}let r=e.morphAttributes;for(let l in r){let h=[],u=r[l];for(let d=0,f=u.length;d0){let i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;r0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(e,t){let n=this.geometry,i=this.material,r=this.matrixWorld;if(i===void 0||(n.boundingSphere===null&&n.computeBoundingSphere(),_o.copy(n.boundingSphere),_o.applyMatrix4(r),e.ray.intersectsSphere(_o)===!1)||(Xl.copy(r).invert(),ni.copy(e.ray).applyMatrix4(Xl),n.boundingBox!==null&&ni.intersectsBox(n.boundingBox)===!1))return;let o;if(n.isBufferGeometry){let a=n.index,c=n.attributes.position,l=n.morphAttributes.position,h=n.morphTargetsRelative,u=n.attributes.uv,d=n.attributes.uv2,f=n.groups,m=n.drawRange;if(a!==null)if(Array.isArray(i))for(let x=0,y=f.length;xt.far?null:{distance:l,point:Wr.clone(),object:s}}function qr(s,e,t,n,i,r,o,a,c,l,h,u){hn.fromBufferAttribute(i,l),un.fromBufferAttribute(i,h),dn.fromBufferAttribute(i,u);let d=s.morphTargetInfluences;if(e.morphTargets&&r&&d){Or.set(0,0,0),Ur.set(0,0,0),Hr.set(0,0,0);for(let m=0,x=r.length;m0?1:-1,h.push(Z.x,Z.y,Z.z),u.push(fe/A),u.push(1-oe/L),X+=1}}for(let oe=0;oe0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;let n={};for(let i in this.extensions)this.extensions[i]===!0&&(n[i]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}};jt.prototype.isShaderMaterial=!0;var Hi=class extends Se{constructor(){super();this.type="Camera",this.matrixWorldInverse=new le,this.projectionMatrix=new le,this.projectionMatrixInverse=new le}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){e===void 0&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new _),this.updateWorldMatrix(!0,!1);let t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}};Hi.prototype.isCamera=!0;var ot=class extends Hi{constructor(e=50,t=1,n=.1,i=2e3){super();this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){let t=.5*this.getFilmHeight()/e;this.fov=Di*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){let e=Math.tan(Tn*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Di*2*Math.atan(Math.tan(Tn*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,i,r,o){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=this.near,t=e*Math.tan(Tn*.5*this.fov)/this.zoom,n=2*t,i=this.aspect*n,r=-.5*i,o=this.view;if(this.view!==null&&this.view.enabled){let c=o.fullWidth,l=o.fullHeight;r+=o.offsetX*i/c,t-=o.offsetY*n/l,i*=o.width/c,n*=o.height/l}let a=this.filmOffset;a!==0&&(r+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,t,t-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}};ot.prototype.isPerspectiveCamera=!0;var si=90,oi=1,Xr=class extends Se{constructor(e,t,n){super();if(this.type="CubeCamera",n.isWebGLCubeRenderTarget!==!0){console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");return}this.renderTarget=n;let i=new ot(si,oi,e,t);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new _(1,0,0)),this.add(i);let r=new ot(si,oi,e,t);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new _(-1,0,0)),this.add(r);let o=new ot(si,oi,e,t);o.layers=this.layers,o.up.set(0,0,1),o.lookAt(new _(0,1,0)),this.add(o);let a=new ot(si,oi,e,t);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(new _(0,-1,0)),this.add(a);let c=new ot(si,oi,e,t);c.layers=this.layers,c.up.set(0,-1,0),c.lookAt(new _(0,0,1)),this.add(c);let l=new ot(si,oi,e,t);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new _(0,0,-1)),this.add(l)}update(e,t){this.parent===null&&this.updateMatrixWorld();let n=this.renderTarget,[i,r,o,a,c,l]=this.children,h=e.xr.enabled,u=e.getRenderTarget();e.xr.enabled=!1;let d=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,i),e.setRenderTarget(n,1),e.render(t,r),e.setRenderTarget(n,2),e.render(t,o),e.setRenderTarget(n,3),e.render(t,a),e.setRenderTarget(n,4),e.render(t,c),n.texture.generateMipmaps=d,e.setRenderTarget(n,5),e.render(t,l),e.setRenderTarget(u),e.xr.enabled=h}},ai=class extends et{constructor(e,t,n,i,r,o,a,c,l,h){e=e!==void 0?e:[],t=t!==void 0?t:mr,a=a!==void 0?a:Sn,super(e,t,n,i,r,o,a,c,l,h),this._needsFlipEnvMap=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}};ai.prototype.isCubeTexture=!0;var Yr=class extends Vt{constructor(e,t,n){Number.isInteger(t)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),t=n),super(e,e,t),t=t||{},this.texture=new ai(void 0,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:it,this.texture._needsFlipEnvMap=!1}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.format=Tt,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;let n={uniforms:{tEquirect:{value:null}},vertexShader:` - - varying vec3 vWorldDirection; - - vec3 transformDirection( in vec3 dir, in mat4 matrix ) { - - return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); - - } - - void main() { - - vWorldDirection = transformDirection( position, modelMatrix ); - - #include - #include - - } - `,fragmentShader:` - - uniform sampler2D tEquirect; - - varying vec3 vWorldDirection; - - #include - - void main() { - - vec3 direction = normalize( vWorldDirection ); - - vec2 sampleUV = equirectUv( direction ); - - gl_FragColor = texture2D( tEquirect, sampleUV ); - - } - `},i=new ii(5,5,5),r=new jt({name:"CubemapFromEquirect",uniforms:ri(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:Qe,blending:en});r.uniforms.tEquirect.value=t;let o=new je(i,r),a=t.minFilter;return t.minFilter===Ai&&(t.minFilter=it),new Xr(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,n,i){let r=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,n,i);e.setRenderTarget(r)}};Yr.prototype.isWebGLCubeRenderTarget=!0;var li=class extends et{constructor(e,t,n,i,r,o,a,c,l,h,u,d){super(null,o,a,c,l,h,i,r,u,d);this.image={data:e||null,width:t||1,height:n||1},this.magFilter=l!==void 0?l:nt,this.minFilter=h!==void 0?h:nt,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}};li.prototype.isDataTexture=!0;var ci=new on,Zr=new _,Gi=class{constructor(e=new Lt,t=new Lt,n=new Lt,i=new Lt,r=new Lt,o=new Lt){this.planes=[e,t,n,i,r,o]}set(e,t,n,i,r,o){let a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(n),a[3].copy(i),a[4].copy(r),a[5].copy(o),this}copy(e){let t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){let t=this.planes,n=e.elements,i=n[0],r=n[1],o=n[2],a=n[3],c=n[4],l=n[5],h=n[6],u=n[7],d=n[8],f=n[9],m=n[10],x=n[11],y=n[12],g=n[13],p=n[14],w=n[15];return t[0].setComponents(a-i,u-c,x-d,w-y).normalize(),t[1].setComponents(a+i,u+c,x+d,w+y).normalize(),t[2].setComponents(a+r,u+l,x+f,w+g).normalize(),t[3].setComponents(a-r,u-l,x-f,w-g).normalize(),t[4].setComponents(a-o,u-h,x-m,w-p).normalize(),t[5].setComponents(a+o,u+h,x+m,w+p).normalize(),this}intersectsObject(e){let t=e.geometry;return t.boundingSphere===null&&t.computeBoundingSphere(),ci.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(ci)}intersectsSprite(e){return ci.center.set(0,0,0),ci.radius=.7071067811865476,ci.applyMatrix4(e.matrixWorld),this.intersectsSphere(ci)}intersectsSphere(e){let t=this.planes,n=e.center,i=-e.radius;for(let r=0;r<6;r++)if(t[r].distanceToPoint(n)0?e.max.x:e.min.x,Zr.y=i.normal.y>0?e.max.y:e.min.y,Zr.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(Zr)<0)return!1}return!0}containsPoint(e){let t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function Yl(){let s=null,e=!1,t=null,n=null;function i(r,o){t(r,o),n=s.requestAnimationFrame(i)}return{start:function(){e!==!0&&t!==null&&(n=s.requestAnimationFrame(i),e=!0)},stop:function(){s.cancelAnimationFrame(n),e=!1},setAnimationLoop:function(r){t=r},setContext:function(r){s=r}}}function df(s,e){let t=e.isWebGL2,n=new WeakMap;function i(l,h){let u=l.array,d=l.usage,f=s.createBuffer();s.bindBuffer(h,f),s.bufferData(h,u,d),l.onUploadCallback();let m=5126;return u instanceof Float32Array?m=5126:u instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):u instanceof Uint16Array?l.isFloat16BufferAttribute?t?m=5131:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):m=5123:u instanceof Int16Array?m=5122:u instanceof Uint32Array?m=5125:u instanceof Int32Array?m=5124:u instanceof Int8Array?m=5120:u instanceof Uint8Array&&(m=5121),{buffer:f,type:m,bytesPerElement:u.BYTES_PER_ELEMENT,version:l.version}}function r(l,h,u){let d=h.array,f=h.updateRange;s.bindBuffer(u,l),f.count===-1?s.bufferSubData(u,0,d):(t?s.bufferSubData(u,f.offset*d.BYTES_PER_ELEMENT,d,f.offset,f.count):s.bufferSubData(u,f.offset*d.BYTES_PER_ELEMENT,d.subarray(f.offset,f.offset+f.count)),f.count=-1)}function o(l){return l.isInterleavedBufferAttribute&&(l=l.data),n.get(l)}function a(l){l.isInterleavedBufferAttribute&&(l=l.data);let h=n.get(l);h&&(s.deleteBuffer(h.buffer),n.delete(l))}function c(l,h){if(l.isGLBufferAttribute){let d=n.get(l);(!d||d.version 0.0 ) { - distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); - } - return distanceFalloff; -#else - if( cutoffDistance > 0.0 && decayExponent > 0.0 ) { - return pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent ); - } - return 1.0; -#endif -} -vec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) { - return RECIPROCAL_PI * diffuseColor; -} -vec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) { - float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH ); - return ( 1.0 - specularColor ) * fresnel + specularColor; -} -vec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) { - float fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV ); - vec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0; - return Fr * fresnel + F0; -} -float G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) { - float a2 = pow2( alpha ); - float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); - float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); - return 1.0 / ( gl * gv ); -} -float G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { - float a2 = pow2( alpha ); - float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); - float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); - return 0.5 / max( gv + gl, EPSILON ); -} -float D_GGX( const in float alpha, const in float dotNH ) { - float a2 = pow2( alpha ); - float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; - return RECIPROCAL_PI * a2 / pow2( denom ); -} -vec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) { - float alpha = pow2( roughness ); - vec3 halfDir = normalize( incidentLight.direction + viewDir ); - float dotNL = saturate( dot( normal, incidentLight.direction ) ); - float dotNV = saturate( dot( normal, viewDir ) ); - float dotNH = saturate( dot( normal, halfDir ) ); - float dotLH = saturate( dot( incidentLight.direction, halfDir ) ); - vec3 F = F_Schlick( specularColor, dotLH ); - float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV ); - float D = D_GGX( alpha, dotNH ); - return F * ( G * D ); -} -vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { - const float LUT_SIZE = 64.0; - const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; - const float LUT_BIAS = 0.5 / LUT_SIZE; - float dotNV = saturate( dot( N, V ) ); - vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); - uv = uv * LUT_SCALE + LUT_BIAS; - return uv; -} -float LTC_ClippedSphereFormFactor( const in vec3 f ) { - float l = length( f ); - return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); -} -vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { - float x = dot( v1, v2 ); - float y = abs( x ); - float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; - float b = 3.4175940 + ( 4.1616724 + y ) * y; - float v = a / b; - float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; - return cross( v1, v2 ) * theta_sintheta; -} -vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { - vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; - vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; - vec3 lightNormal = cross( v1, v2 ); - if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); - vec3 T1, T2; - T1 = normalize( V - N * dot( V, N ) ); - T2 = - cross( N, T1 ); - mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); - vec3 coords[ 4 ]; - coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); - coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); - coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); - coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); - coords[ 0 ] = normalize( coords[ 0 ] ); - coords[ 1 ] = normalize( coords[ 1 ] ); - coords[ 2 ] = normalize( coords[ 2 ] ); - coords[ 3 ] = normalize( coords[ 3 ] ); - vec3 vectorFormFactor = vec3( 0.0 ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); - float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); - return vec3( result ); -} -vec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) { - float dotNV = saturate( dot( normal, viewDir ) ); - vec2 brdf = integrateSpecularBRDF( dotNV, roughness ); - return specularColor * brdf.x + brdf.y; -} -void BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { - float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) ); - vec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness ); - vec2 brdf = integrateSpecularBRDF( dotNV, roughness ); - vec3 FssEss = F * brdf.x + brdf.y; - float Ess = brdf.x + brdf.y; - float Ems = 1.0 - Ess; - vec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); - singleScatter += FssEss; - multiScatter += Fms * Ems; -} -float G_BlinnPhong_Implicit( ) { - return 0.25; -} -float D_BlinnPhong( const in float shininess, const in float dotNH ) { - return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess ); -} -vec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) { - vec3 halfDir = normalize( incidentLight.direction + geometry.viewDir ); - float dotNH = saturate( dot( geometry.normal, halfDir ) ); - float dotLH = saturate( dot( incidentLight.direction, halfDir ) ); - vec3 F = F_Schlick( specularColor, dotLH ); - float G = G_BlinnPhong_Implicit( ); - float D = D_BlinnPhong( shininess, dotNH ); - return F * ( G * D ); -} -float GGXRoughnessToBlinnExponent( const in float ggxRoughness ) { - return ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 ); -} -float BlinnExponentToGGXRoughness( const in float blinnExponent ) { - return sqrt( 2.0 / ( blinnExponent + 2.0 ) ); -} -#if defined( USE_SHEEN ) -float D_Charlie(float roughness, float NoH) { - float invAlpha = 1.0 / roughness; - float cos2h = NoH * NoH; - float sin2h = max(1.0 - cos2h, 0.0078125); return (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI); -} -float V_Neubelt(float NoV, float NoL) { - return saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV))); -} -vec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) { - vec3 N = geometry.normal; - vec3 V = geometry.viewDir; - vec3 H = normalize( V + L ); - float dotNH = saturate( dot( N, H ) ); - return specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) ); -} -#endif`,wf=`#ifdef USE_BUMPMAP - uniform sampler2D bumpMap; - uniform float bumpScale; - vec2 dHdxy_fwd() { - vec2 dSTdx = dFdx( vUv ); - vec2 dSTdy = dFdy( vUv ); - float Hll = bumpScale * texture2D( bumpMap, vUv ).x; - float dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll; - float dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll; - return vec2( dBx, dBy ); - } - vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) { - vec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) ); - vec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) ); - vec3 vN = surf_norm; - vec3 R1 = cross( vSigmaY, vN ); - vec3 R2 = cross( vN, vSigmaX ); - float fDet = dot( vSigmaX, R1 ) * faceDirection; - vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); - return normalize( abs( fDet ) * surf_norm - vGrad ); - } -#endif`,bf=`#if NUM_CLIPPING_PLANES > 0 - vec4 plane; - #pragma unroll_loop_start - for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { - plane = clippingPlanes[ i ]; - if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; - } - #pragma unroll_loop_end - #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES - bool clipped = true; - #pragma unroll_loop_start - for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { - plane = clippingPlanes[ i ]; - clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; - } - #pragma unroll_loop_end - if ( clipped ) discard; - #endif -#endif`,Mf=`#if NUM_CLIPPING_PLANES > 0 - varying vec3 vClipPosition; - uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,Sf=`#if NUM_CLIPPING_PLANES > 0 - varying vec3 vClipPosition; -#endif`,Tf=`#if NUM_CLIPPING_PLANES > 0 - vClipPosition = - mvPosition.xyz; -#endif`,Ef=`#if defined( USE_COLOR_ALPHA ) - diffuseColor *= vColor; -#elif defined( USE_COLOR ) - diffuseColor.rgb *= vColor; -#endif`,Af=`#if defined( USE_COLOR_ALPHA ) - varying vec4 vColor; -#elif defined( USE_COLOR ) - varying vec3 vColor; -#endif`,Lf=`#if defined( USE_COLOR_ALPHA ) - varying vec4 vColor; -#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) - varying vec3 vColor; -#endif`,Rf=`#if defined( USE_COLOR_ALPHA ) - vColor = vec4( 1.0 ); -#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) - vColor = vec3( 1.0 ); -#endif -#ifdef USE_COLOR - vColor *= color; -#endif -#ifdef USE_INSTANCING_COLOR - vColor.xyz *= instanceColor.xyz; -#endif`,Cf=`#define PI 3.141592653589793 -#define PI2 6.283185307179586 -#define PI_HALF 1.5707963267948966 -#define RECIPROCAL_PI 0.3183098861837907 -#define RECIPROCAL_PI2 0.15915494309189535 -#define EPSILON 1e-6 -#ifndef saturate -#define saturate(a) clamp( a, 0.0, 1.0 ) -#endif -#define whiteComplement(a) ( 1.0 - saturate( a ) ) -float pow2( const in float x ) { return x*x; } -float pow3( const in float x ) { return x*x*x; } -float pow4( const in float x ) { float x2 = x*x; return x2*x2; } -float average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); } -highp float rand( const in vec2 uv ) { - const highp float a = 12.9898, b = 78.233, c = 43758.5453; - highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); - return fract(sin(sn) * c); -} -#ifdef HIGH_PRECISION - float precisionSafeLength( vec3 v ) { return length( v ); } -#else - float max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); } - float precisionSafeLength( vec3 v ) { - float maxComponent = max3( abs( v ) ); - return length( v / maxComponent ) * maxComponent; - } -#endif -struct IncidentLight { - vec3 color; - vec3 direction; - bool visible; -}; -struct ReflectedLight { - vec3 directDiffuse; - vec3 directSpecular; - vec3 indirectDiffuse; - vec3 indirectSpecular; -}; -struct GeometricContext { - vec3 position; - vec3 normal; - vec3 viewDir; -#ifdef CLEARCOAT - vec3 clearcoatNormal; -#endif -}; -vec3 transformDirection( in vec3 dir, in mat4 matrix ) { - return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); -} -vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { - return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); -} -vec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) { - float distance = dot( planeNormal, point - pointOnPlane ); - return - distance * planeNormal + point; -} -float sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) { - return sign( dot( point - pointOnPlane, planeNormal ) ); -} -vec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) { - return lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine; -} -mat3 transposeMat3( const in mat3 m ) { - mat3 tmp; - tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); - tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); - tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); - return tmp; -} -float linearToRelativeLuminance( const in vec3 color ) { - vec3 weights = vec3( 0.2126, 0.7152, 0.0722 ); - return dot( weights, color.rgb ); -} -bool isPerspectiveMatrix( mat4 m ) { - return m[ 2 ][ 3 ] == - 1.0; -} -vec2 equirectUv( in vec3 dir ) { - float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; - float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; - return vec2( u, v ); -}`,Pf=`#ifdef ENVMAP_TYPE_CUBE_UV - #define cubeUV_maxMipLevel 8.0 - #define cubeUV_minMipLevel 4.0 - #define cubeUV_maxTileSize 256.0 - #define cubeUV_minTileSize 16.0 - float getFace( vec3 direction ) { - vec3 absDirection = abs( direction ); - float face = - 1.0; - if ( absDirection.x > absDirection.z ) { - if ( absDirection.x > absDirection.y ) - face = direction.x > 0.0 ? 0.0 : 3.0; - else - face = direction.y > 0.0 ? 1.0 : 4.0; - } else { - if ( absDirection.z > absDirection.y ) - face = direction.z > 0.0 ? 2.0 : 5.0; - else - face = direction.y > 0.0 ? 1.0 : 4.0; - } - return face; - } - vec2 getUV( vec3 direction, float face ) { - vec2 uv; - if ( face == 0.0 ) { - uv = vec2( direction.z, direction.y ) / abs( direction.x ); - } else if ( face == 1.0 ) { - uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); - } else if ( face == 2.0 ) { - uv = vec2( - direction.x, direction.y ) / abs( direction.z ); - } else if ( face == 3.0 ) { - uv = vec2( - direction.z, direction.y ) / abs( direction.x ); - } else if ( face == 4.0 ) { - uv = vec2( - direction.x, direction.z ) / abs( direction.y ); - } else { - uv = vec2( direction.x, direction.y ) / abs( direction.z ); - } - return 0.5 * ( uv + 1.0 ); - } - vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { - float face = getFace( direction ); - float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); - mipInt = max( mipInt, cubeUV_minMipLevel ); - float faceSize = exp2( mipInt ); - float texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize ); - vec2 uv = getUV( direction, face ) * ( faceSize - 1.0 ); - vec2 f = fract( uv ); - uv += 0.5 - f; - if ( face > 2.0 ) { - uv.y += faceSize; - face -= 3.0; - } - uv.x += face * faceSize; - if ( mipInt < cubeUV_maxMipLevel ) { - uv.y += 2.0 * cubeUV_maxTileSize; - } - uv.y += filterInt * 2.0 * cubeUV_minTileSize; - uv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize ); - uv *= texelSize; - vec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb; - uv.x += texelSize; - vec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb; - uv.y += texelSize; - vec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb; - uv.x -= texelSize; - vec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb; - vec3 tm = mix( tl, tr, f.x ); - vec3 bm = mix( bl, br, f.x ); - return mix( tm, bm, f.y ); - } - #define r0 1.0 - #define v0 0.339 - #define m0 - 2.0 - #define r1 0.8 - #define v1 0.276 - #define m1 - 1.0 - #define r4 0.4 - #define v4 0.046 - #define m4 2.0 - #define r5 0.305 - #define v5 0.016 - #define m5 3.0 - #define r6 0.21 - #define v6 0.0038 - #define m6 4.0 - float roughnessToMip( float roughness ) { - float mip = 0.0; - if ( roughness >= r1 ) { - mip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0; - } else if ( roughness >= r4 ) { - mip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1; - } else if ( roughness >= r5 ) { - mip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4; - } else if ( roughness >= r6 ) { - mip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5; - } else { - mip = - 2.0 * log2( 1.16 * roughness ); } - return mip; - } - vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { - float mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel ); - float mipF = fract( mip ); - float mipInt = floor( mip ); - vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); - if ( mipF == 0.0 ) { - return vec4( color0, 1.0 ); - } else { - vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); - return vec4( mix( color0, color1, mipF ), 1.0 ); - } - } -#endif`,If=`vec3 transformedNormal = objectNormal; -#ifdef USE_INSTANCING - mat3 m = mat3( instanceMatrix ); - transformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) ); - transformedNormal = m * transformedNormal; -#endif -transformedNormal = normalMatrix * transformedNormal; -#ifdef FLIP_SIDED - transformedNormal = - transformedNormal; -#endif -#ifdef USE_TANGENT - vec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz; - #ifdef FLIP_SIDED - transformedTangent = - transformedTangent; - #endif -#endif`,Df=`#ifdef USE_DISPLACEMENTMAP - uniform sampler2D displacementMap; - uniform float displacementScale; - uniform float displacementBias; -#endif`,Ff=`#ifdef USE_DISPLACEMENTMAP - transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias ); -#endif`,Nf=`#ifdef USE_EMISSIVEMAP - vec4 emissiveColor = texture2D( emissiveMap, vUv ); - emissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb; - totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,Bf=`#ifdef USE_EMISSIVEMAP - uniform sampler2D emissiveMap; -#endif`,zf="gl_FragColor = linearToOutputTexel( gl_FragColor );",Of=` -vec4 LinearToLinear( in vec4 value ) { - return value; -} -vec4 GammaToLinear( in vec4 value, in float gammaFactor ) { - return vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a ); -} -vec4 LinearToGamma( in vec4 value, in float gammaFactor ) { - return vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a ); -} -vec4 sRGBToLinear( in vec4 value ) { - return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a ); -} -vec4 LinearTosRGB( in vec4 value ) { - return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); -} -vec4 RGBEToLinear( in vec4 value ) { - return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 ); -} -vec4 LinearToRGBE( in vec4 value ) { - float maxComponent = max( max( value.r, value.g ), value.b ); - float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 ); - return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 ); -} -vec4 RGBMToLinear( in vec4 value, in float maxRange ) { - return vec4( value.rgb * value.a * maxRange, 1.0 ); -} -vec4 LinearToRGBM( in vec4 value, in float maxRange ) { - float maxRGB = max( value.r, max( value.g, value.b ) ); - float M = clamp( maxRGB / maxRange, 0.0, 1.0 ); - M = ceil( M * 255.0 ) / 255.0; - return vec4( value.rgb / ( M * maxRange ), M ); -} -vec4 RGBDToLinear( in vec4 value, in float maxRange ) { - return vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 ); -} -vec4 LinearToRGBD( in vec4 value, in float maxRange ) { - float maxRGB = max( value.r, max( value.g, value.b ) ); - float D = max( maxRange / maxRGB, 1.0 ); - D = clamp( floor( D ) / 255.0, 0.0, 1.0 ); - return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D ); -} -const mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 ); -vec4 LinearToLogLuv( in vec4 value ) { - vec3 Xp_Y_XYZp = cLogLuvM * value.rgb; - Xp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) ); - vec4 vResult; - vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z; - float Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0; - vResult.w = fract( Le ); - vResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0; - return vResult; -} -const mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 ); -vec4 LogLuvToLinear( in vec4 value ) { - float Le = value.z * 255.0 + value.w; - vec3 Xp_Y_XYZp; - Xp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 ); - Xp_Y_XYZp.z = Xp_Y_XYZp.y / value.y; - Xp_Y_XYZp.x = value.x * Xp_Y_XYZp.z; - vec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb; - return vec4( max( vRGB, 0.0 ), 1.0 ); -}`,Uf=`#ifdef USE_ENVMAP - #ifdef ENV_WORLDPOS - vec3 cameraToFrag; - if ( isOrthographic ) { - cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); - } else { - cameraToFrag = normalize( vWorldPosition - cameraPosition ); - } - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - #ifdef ENVMAP_MODE_REFLECTION - vec3 reflectVec = reflect( cameraToFrag, worldNormal ); - #else - vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); - #endif - #else - vec3 reflectVec = vReflect; - #endif - #ifdef ENVMAP_TYPE_CUBE - vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); - #elif defined( ENVMAP_TYPE_CUBE_UV ) - vec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 ); - #else - vec4 envColor = vec4( 0.0 ); - #endif - #ifndef ENVMAP_TYPE_CUBE_UV - envColor = envMapTexelToLinear( envColor ); - #endif - #ifdef ENVMAP_BLENDING_MULTIPLY - outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); - #elif defined( ENVMAP_BLENDING_MIX ) - outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); - #elif defined( ENVMAP_BLENDING_ADD ) - outgoingLight += envColor.xyz * specularStrength * reflectivity; - #endif -#endif`,Hf=`#ifdef USE_ENVMAP - uniform float envMapIntensity; - uniform float flipEnvMap; - uniform int maxMipLevel; - #ifdef ENVMAP_TYPE_CUBE - uniform samplerCube envMap; - #else - uniform sampler2D envMap; - #endif - -#endif`,Gf=`#ifdef USE_ENVMAP - uniform float reflectivity; - #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) - #define ENV_WORLDPOS - #endif - #ifdef ENV_WORLDPOS - varying vec3 vWorldPosition; - uniform float refractionRatio; - #else - varying vec3 vReflect; - #endif -#endif`,kf=`#ifdef USE_ENVMAP - #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG ) - #define ENV_WORLDPOS - #endif - #ifdef ENV_WORLDPOS - - varying vec3 vWorldPosition; - #else - varying vec3 vReflect; - uniform float refractionRatio; - #endif -#endif`,Vf=`#ifdef USE_ENVMAP - #ifdef ENV_WORLDPOS - vWorldPosition = worldPosition.xyz; - #else - vec3 cameraToVertex; - if ( isOrthographic ) { - cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); - } else { - cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); - } - vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); - #ifdef ENVMAP_MODE_REFLECTION - vReflect = reflect( cameraToVertex, worldNormal ); - #else - vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); - #endif - #endif -#endif`,Wf=`#ifdef USE_FOG - fogDepth = - mvPosition.z; -#endif`,qf=`#ifdef USE_FOG - varying float fogDepth; -#endif`,Xf=`#ifdef USE_FOG - #ifdef FOG_EXP2 - float fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth ); - #else - float fogFactor = smoothstep( fogNear, fogFar, fogDepth ); - #endif - gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif`,Yf=`#ifdef USE_FOG - uniform vec3 fogColor; - varying float fogDepth; - #ifdef FOG_EXP2 - uniform float fogDensity; - #else - uniform float fogNear; - uniform float fogFar; - #endif -#endif`,Zf=`#ifdef USE_GRADIENTMAP - uniform sampler2D gradientMap; -#endif -vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { - float dotNL = dot( normal, lightDirection ); - vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); - #ifdef USE_GRADIENTMAP - return texture2D( gradientMap, coord ).rgb; - #else - return ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 ); - #endif -}`,Jf=`#ifdef USE_LIGHTMAP - vec4 lightMapTexel= texture2D( lightMap, vUv2 ); - reflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity; -#endif`,jf=`#ifdef USE_LIGHTMAP - uniform sampler2D lightMap; - uniform float lightMapIntensity; -#endif`,$f=`vec3 diffuse = vec3( 1.0 ); -GeometricContext geometry; -geometry.position = mvPosition.xyz; -geometry.normal = normalize( transformedNormal ); -geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz ); -GeometricContext backGeometry; -backGeometry.position = geometry.position; -backGeometry.normal = -geometry.normal; -backGeometry.viewDir = geometry.viewDir; -vLightFront = vec3( 0.0 ); -vIndirectFront = vec3( 0.0 ); -#ifdef DOUBLE_SIDED - vLightBack = vec3( 0.0 ); - vIndirectBack = vec3( 0.0 ); -#endif -IncidentLight directLight; -float dotNL; -vec3 directLightColor_Diffuse; -vIndirectFront += getAmbientLightIrradiance( ambientLightColor ); -vIndirectFront += getLightProbeIrradiance( lightProbe, geometry ); -#ifdef DOUBLE_SIDED - vIndirectBack += getAmbientLightIrradiance( ambientLightColor ); - vIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry ); -#endif -#if NUM_POINT_LIGHTS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { - getPointDirectLightIrradiance( pointLights[ i ], geometry, directLight ); - dotNL = dot( geometry.normal, directLight.direction ); - directLightColor_Diffuse = PI * directLight.color; - vLightFront += saturate( dotNL ) * directLightColor_Diffuse; - #ifdef DOUBLE_SIDED - vLightBack += saturate( -dotNL ) * directLightColor_Diffuse; - #endif - } - #pragma unroll_loop_end -#endif -#if NUM_SPOT_LIGHTS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { - getSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight ); - dotNL = dot( geometry.normal, directLight.direction ); - directLightColor_Diffuse = PI * directLight.color; - vLightFront += saturate( dotNL ) * directLightColor_Diffuse; - #ifdef DOUBLE_SIDED - vLightBack += saturate( -dotNL ) * directLightColor_Diffuse; - #endif - } - #pragma unroll_loop_end -#endif -#if NUM_DIR_LIGHTS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { - getDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight ); - dotNL = dot( geometry.normal, directLight.direction ); - directLightColor_Diffuse = PI * directLight.color; - vLightFront += saturate( dotNL ) * directLightColor_Diffuse; - #ifdef DOUBLE_SIDED - vLightBack += saturate( -dotNL ) * directLightColor_Diffuse; - #endif - } - #pragma unroll_loop_end -#endif -#if NUM_HEMI_LIGHTS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { - vIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry ); - #ifdef DOUBLE_SIDED - vIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry ); - #endif - } - #pragma unroll_loop_end -#endif`,Qf=`uniform bool receiveShadow; -uniform vec3 ambientLightColor; -uniform vec3 lightProbe[ 9 ]; -vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { - float x = normal.x, y = normal.y, z = normal.z; - vec3 result = shCoefficients[ 0 ] * 0.886227; - result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; - result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; - result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; - result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; - result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; - result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); - result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; - result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); - return result; -} -vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) { - vec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix ); - vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); - return irradiance; -} -vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { - vec3 irradiance = ambientLightColor; - #ifndef PHYSICALLY_CORRECT_LIGHTS - irradiance *= PI; - #endif - return irradiance; -} -#if NUM_DIR_LIGHTS > 0 - struct DirectionalLight { - vec3 direction; - vec3 color; - }; - uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; - void getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) { - directLight.color = directionalLight.color; - directLight.direction = directionalLight.direction; - directLight.visible = true; - } -#endif -#if NUM_POINT_LIGHTS > 0 - struct PointLight { - vec3 position; - vec3 color; - float distance; - float decay; - }; - uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; - void getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) { - vec3 lVector = pointLight.position - geometry.position; - directLight.direction = normalize( lVector ); - float lightDistance = length( lVector ); - directLight.color = pointLight.color; - directLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay ); - directLight.visible = ( directLight.color != vec3( 0.0 ) ); - } -#endif -#if NUM_SPOT_LIGHTS > 0 - struct SpotLight { - vec3 position; - vec3 direction; - vec3 color; - float distance; - float decay; - float coneCos; - float penumbraCos; - }; - uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; - void getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) { - vec3 lVector = spotLight.position - geometry.position; - directLight.direction = normalize( lVector ); - float lightDistance = length( lVector ); - float angleCos = dot( directLight.direction, spotLight.direction ); - if ( angleCos > spotLight.coneCos ) { - float spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos ); - directLight.color = spotLight.color; - directLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay ); - directLight.visible = true; - } else { - directLight.color = vec3( 0.0 ); - directLight.visible = false; - } - } -#endif -#if NUM_RECT_AREA_LIGHTS > 0 - struct RectAreaLight { - vec3 color; - vec3 position; - vec3 halfWidth; - vec3 halfHeight; - }; - uniform sampler2D ltc_1; uniform sampler2D ltc_2; - uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; -#endif -#if NUM_HEMI_LIGHTS > 0 - struct HemisphereLight { - vec3 direction; - vec3 skyColor; - vec3 groundColor; - }; - uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; - vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) { - float dotNL = dot( geometry.normal, hemiLight.direction ); - float hemiDiffuseWeight = 0.5 * dotNL + 0.5; - vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); - #ifndef PHYSICALLY_CORRECT_LIGHTS - irradiance *= PI; - #endif - return irradiance; - } -#endif`,Kf=`#if defined( USE_ENVMAP ) - #ifdef ENVMAP_MODE_REFRACTION - uniform float refractionRatio; - #endif - vec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) { - vec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix ); - #ifdef ENVMAP_TYPE_CUBE - vec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz ); - #ifdef TEXTURE_LOD_EXT - vec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) ); - #else - vec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) ); - #endif - envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb; - #elif defined( ENVMAP_TYPE_CUBE_UV ) - vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 ); - #else - vec4 envMapColor = vec4( 0.0 ); - #endif - return PI * envMapColor.rgb * envMapIntensity; - } - float getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) { - float maxMIPLevelScalar = float( maxMIPLevel ); - float sigma = PI * roughness * roughness / ( 1.0 + roughness ); - float desiredMIPLevel = maxMIPLevelScalar + log2( sigma ); - return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar ); - } - vec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) { - #ifdef ENVMAP_MODE_REFLECTION - vec3 reflectVec = reflect( -viewDir, normal ); - reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); - #else - vec3 reflectVec = refract( -viewDir, normal, refractionRatio ); - #endif - reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); - float specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel ); - #ifdef ENVMAP_TYPE_CUBE - vec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz ); - #ifdef TEXTURE_LOD_EXT - vec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel ); - #else - vec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel ); - #endif - envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb; - #elif defined( ENVMAP_TYPE_CUBE_UV ) - vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ); - #endif - return envMapColor.rgb * envMapIntensity; - } -#endif`,ep=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,tp=`varying vec3 vViewPosition; -#ifndef FLAT_SHADED - varying vec3 vNormal; -#endif -struct ToonMaterial { - vec3 diffuseColor; -}; -void RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { - vec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color; - #ifndef PHYSICALLY_CORRECT_LIGHTS - irradiance *= PI; - #endif - reflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor ); -} -void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon -#define Material_LightProbeLOD( material ) (0)`,np=`BlinnPhongMaterial material; -material.diffuseColor = diffuseColor.rgb; -material.specularColor = specular; -material.specularShininess = shininess; -material.specularStrength = specularStrength;`,ip=`varying vec3 vViewPosition; -#ifndef FLAT_SHADED - varying vec3 vNormal; -#endif -struct BlinnPhongMaterial { - vec3 diffuseColor; - vec3 specularColor; - float specularShininess; - float specularStrength; -}; -void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - #ifndef PHYSICALLY_CORRECT_LIGHTS - irradiance *= PI; - #endif - reflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor ); - reflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength; -} -void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong -#define Material_LightProbeLOD( material ) (0)`,rp=`PhysicalMaterial material; -material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); -vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) ); -float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); -material.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness; -material.specularRoughness = min( material.specularRoughness, 1.0 ); -#ifdef REFLECTIVITY - material.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor ); -#else - material.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor ); -#endif -#ifdef CLEARCOAT - material.clearcoat = clearcoat; - material.clearcoatRoughness = clearcoatRoughness; - #ifdef USE_CLEARCOATMAP - material.clearcoat *= texture2D( clearcoatMap, vUv ).x; - #endif - #ifdef USE_CLEARCOAT_ROUGHNESSMAP - material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y; - #endif - material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); - material.clearcoatRoughness += geometryRoughness; - material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); -#endif -#ifdef USE_SHEEN - material.sheenColor = sheen; -#endif`,sp=`struct PhysicalMaterial { - vec3 diffuseColor; - float specularRoughness; - vec3 specularColor; -#ifdef CLEARCOAT - float clearcoat; - float clearcoatRoughness; -#endif -#ifdef USE_SHEEN - vec3 sheenColor; -#endif -}; -#define MAXIMUM_SPECULAR_COEFFICIENT 0.16 -#define DEFAULT_SPECULAR_COEFFICIENT 0.04 -float clearcoatDHRApprox( const in float roughness, const in float dotNL ) { - return DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) ); -} -#if NUM_RECT_AREA_LIGHTS > 0 - void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - vec3 normal = geometry.normal; - vec3 viewDir = geometry.viewDir; - vec3 position = geometry.position; - vec3 lightPos = rectAreaLight.position; - vec3 halfWidth = rectAreaLight.halfWidth; - vec3 halfHeight = rectAreaLight.halfHeight; - vec3 lightColor = rectAreaLight.color; - float roughness = material.specularRoughness; - vec3 rectCoords[ 4 ]; - rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; - rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; - rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; - vec2 uv = LTC_Uv( normal, viewDir, roughness ); - vec4 t1 = texture2D( ltc_1, uv ); - vec4 t2 = texture2D( ltc_2, uv ); - mat3 mInv = mat3( - vec3( t1.x, 0, t1.y ), - vec3( 0, 1, 0 ), - vec3( t1.z, 0, t1.w ) - ); - vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); - reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); - reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); - } -#endif -void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - #ifndef PHYSICALLY_CORRECT_LIGHTS - irradiance *= PI; - #endif - #ifdef CLEARCOAT - float ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) ); - vec3 ccIrradiance = ccDotNL * directLight.color; - #ifndef PHYSICALLY_CORRECT_LIGHTS - ccIrradiance *= PI; - #endif - float clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL ); - reflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness ); - #else - float clearcoatDHR = 0.0; - #endif - #ifdef USE_SHEEN - reflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen( - material.specularRoughness, - directLight.direction, - geometry, - material.sheenColor - ); - #else - reflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness); - #endif - reflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor ); -} -void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor ); -} -void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { - #ifdef CLEARCOAT - float ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) ); - reflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness ); - float ccDotNL = ccDotNV; - float clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL ); - #else - float clearcoatDHR = 0.0; - #endif - float clearcoatInv = 1.0 - clearcoatDHR; - vec3 singleScattering = vec3( 0.0 ); - vec3 multiScattering = vec3( 0.0 ); - vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; - BRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering ); - vec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) ); - reflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering; - reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; - reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; -} -#define RE_Direct RE_Direct_Physical -#define RE_Direct_RectArea RE_Direct_RectArea_Physical -#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical -#define RE_IndirectSpecular RE_IndirectSpecular_Physical -float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { - return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}`,op=` -GeometricContext geometry; -geometry.position = - vViewPosition; -geometry.normal = normal; -geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); -#ifdef CLEARCOAT - geometry.clearcoatNormal = clearcoatNormal; -#endif -IncidentLight directLight; -#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) - PointLight pointLight; - #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 - PointLightShadow pointLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { - pointLight = pointLights[ i ]; - getPointDirectLightIrradiance( pointLight, geometry, directLight ); - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) - pointLightShadow = pointLightShadows[ i ]; - directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; - #endif - RE_Direct( directLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) - SpotLight spotLight; - #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 - SpotLightShadow spotLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { - spotLight = spotLights[ i ]; - getSpotDirectLightIrradiance( spotLight, geometry, directLight ); - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) - spotLightShadow = spotLightShadows[ i ]; - directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0; - #endif - RE_Direct( directLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) - DirectionalLight directionalLight; - #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 - DirectionalLightShadow directionalLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { - directionalLight = directionalLights[ i ]; - getDirectionalDirectLightIrradiance( directionalLight, geometry, directLight ); - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) - directionalLightShadow = directionalLightShadows[ i ]; - directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; - #endif - RE_Direct( directLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) - RectAreaLight rectAreaLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { - rectAreaLight = rectAreaLights[ i ]; - RE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if defined( RE_IndirectDiffuse ) - vec3 iblIrradiance = vec3( 0.0 ); - vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); - irradiance += getLightProbeIrradiance( lightProbe, geometry ); - #if ( NUM_HEMI_LIGHTS > 0 ) - #pragma unroll_loop_start - for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { - irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry ); - } - #pragma unroll_loop_end - #endif -#endif -#if defined( RE_IndirectSpecular ) - vec3 radiance = vec3( 0.0 ); - vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,ap=`#if defined( RE_IndirectDiffuse ) - #ifdef USE_LIGHTMAP - vec4 lightMapTexel= texture2D( lightMap, vUv2 ); - vec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity; - #ifndef PHYSICALLY_CORRECT_LIGHTS - lightMapIrradiance *= PI; - #endif - irradiance += lightMapIrradiance; - #endif - #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) - iblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel ); - #endif -#endif -#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) - radiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel ); - #ifdef CLEARCOAT - clearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel ); - #endif -#endif`,lp=`#if defined( RE_IndirectDiffuse ) - RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight ); -#endif -#if defined( RE_IndirectSpecular ) - RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight ); -#endif`,cp=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) - gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,hp=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) - uniform float logDepthBufFC; - varying float vFragDepth; - varying float vIsPerspective; -#endif`,up=`#ifdef USE_LOGDEPTHBUF - #ifdef USE_LOGDEPTHBUF_EXT - varying float vFragDepth; - varying float vIsPerspective; - #else - uniform float logDepthBufFC; - #endif -#endif`,dp=`#ifdef USE_LOGDEPTHBUF - #ifdef USE_LOGDEPTHBUF_EXT - vFragDepth = 1.0 + gl_Position.w; - vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); - #else - if ( isPerspectiveMatrix( projectionMatrix ) ) { - gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0; - gl_Position.z *= gl_Position.w; - } - #endif -#endif`,fp=`#ifdef USE_MAP - vec4 texelColor = texture2D( map, vUv ); - texelColor = mapTexelToLinear( texelColor ); - diffuseColor *= texelColor; -#endif`,pp=`#ifdef USE_MAP - uniform sampler2D map; -#endif`,mp=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) - vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; -#endif -#ifdef USE_MAP - vec4 mapTexel = texture2D( map, uv ); - diffuseColor *= mapTexelToLinear( mapTexel ); -#endif -#ifdef USE_ALPHAMAP - diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,gp=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) - uniform mat3 uvTransform; -#endif -#ifdef USE_MAP - uniform sampler2D map; -#endif -#ifdef USE_ALPHAMAP - uniform sampler2D alphaMap; -#endif`,xp=`float metalnessFactor = metalness; -#ifdef USE_METALNESSMAP - vec4 texelMetalness = texture2D( metalnessMap, vUv ); - metalnessFactor *= texelMetalness.b; -#endif`,yp=`#ifdef USE_METALNESSMAP - uniform sampler2D metalnessMap; -#endif`,vp=`#ifdef USE_MORPHNORMALS - objectNormal *= morphTargetBaseInfluence; - objectNormal += morphNormal0 * morphTargetInfluences[ 0 ]; - objectNormal += morphNormal1 * morphTargetInfluences[ 1 ]; - objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; - objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; -#endif`,_p=`#ifdef USE_MORPHTARGETS - uniform float morphTargetBaseInfluence; - #ifndef USE_MORPHNORMALS - uniform float morphTargetInfluences[ 8 ]; - #else - uniform float morphTargetInfluences[ 4 ]; - #endif -#endif`,wp=`#ifdef USE_MORPHTARGETS - transformed *= morphTargetBaseInfluence; - transformed += morphTarget0 * morphTargetInfluences[ 0 ]; - transformed += morphTarget1 * morphTargetInfluences[ 1 ]; - transformed += morphTarget2 * morphTargetInfluences[ 2 ]; - transformed += morphTarget3 * morphTargetInfluences[ 3 ]; - #ifndef USE_MORPHNORMALS - transformed += morphTarget4 * morphTargetInfluences[ 4 ]; - transformed += morphTarget5 * morphTargetInfluences[ 5 ]; - transformed += morphTarget6 * morphTargetInfluences[ 6 ]; - transformed += morphTarget7 * morphTargetInfluences[ 7 ]; - #endif -#endif`,bp=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; -#ifdef FLAT_SHADED - vec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) ); - vec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) ); - vec3 normal = normalize( cross( fdx, fdy ) ); -#else - vec3 normal = normalize( vNormal ); - #ifdef DOUBLE_SIDED - normal = normal * faceDirection; - #endif - #ifdef USE_TANGENT - vec3 tangent = normalize( vTangent ); - vec3 bitangent = normalize( vBitangent ); - #ifdef DOUBLE_SIDED - tangent = tangent * faceDirection; - bitangent = bitangent * faceDirection; - #endif - #if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP ) - mat3 vTBN = mat3( tangent, bitangent, normal ); - #endif - #endif -#endif -vec3 geometryNormal = normal;`,Mp=`#ifdef OBJECTSPACE_NORMALMAP - normal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0; - #ifdef FLIP_SIDED - normal = - normal; - #endif - #ifdef DOUBLE_SIDED - normal = normal * faceDirection; - #endif - normal = normalize( normalMatrix * normal ); -#elif defined( TANGENTSPACE_NORMALMAP ) - vec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0; - mapN.xy *= normalScale; - #ifdef USE_TANGENT - normal = normalize( vTBN * mapN ); - #else - normal = perturbNormal2Arb( -vViewPosition, normal, mapN, faceDirection ); - #endif -#elif defined( USE_BUMPMAP ) - normal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,Sp=`#ifdef USE_NORMALMAP - uniform sampler2D normalMap; - uniform vec2 normalScale; -#endif -#ifdef OBJECTSPACE_NORMALMAP - uniform mat3 normalMatrix; -#endif -#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) ) - vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) { - vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) ); - vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) ); - vec2 st0 = dFdx( vUv.st ); - vec2 st1 = dFdy( vUv.st ); - vec3 N = surf_norm; - vec3 q1perp = cross( q1, N ); - vec3 q0perp = cross( N, q0 ); - vec3 T = q1perp * st0.x + q0perp * st1.x; - vec3 B = q1perp * st0.y + q0perp * st1.y; - float det = max( dot( T, T ), dot( B, B ) ); - float scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det ); - return normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z ); - } -#endif`,Tp=`#ifdef CLEARCOAT - vec3 clearcoatNormal = geometryNormal; -#endif`,Ep=`#ifdef USE_CLEARCOAT_NORMALMAP - vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0; - clearcoatMapN.xy *= clearcoatNormalScale; - #ifdef USE_TANGENT - clearcoatNormal = normalize( vTBN * clearcoatMapN ); - #else - clearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection ); - #endif -#endif`,Ap=`#ifdef USE_CLEARCOATMAP - uniform sampler2D clearcoatMap; -#endif -#ifdef USE_CLEARCOAT_ROUGHNESSMAP - uniform sampler2D clearcoatRoughnessMap; -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - uniform sampler2D clearcoatNormalMap; - uniform vec2 clearcoatNormalScale; -#endif`,Lp=`vec3 packNormalToRGB( const in vec3 normal ) { - return normalize( normal ) * 0.5 + 0.5; -} -vec3 unpackRGBToNormal( const in vec3 rgb ) { - return 2.0 * rgb.xyz - 1.0; -} -const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.; -const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. ); -const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. ); -const float ShiftRight8 = 1. / 256.; -vec4 packDepthToRGBA( const in float v ) { - vec4 r = vec4( fract( v * PackFactors ), v ); - r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale; -} -float unpackRGBAToDepth( const in vec4 v ) { - return dot( v, UnpackFactors ); -} -vec4 pack2HalfToRGBA( vec2 v ) { - vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 )); - return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w); -} -vec2 unpackRGBATo2Half( vec4 v ) { - return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); -} -float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { - return ( viewZ + near ) / ( near - far ); -} -float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) { - return linearClipZ * ( near - far ) - near; -} -float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { - return (( near + viewZ ) * far ) / (( far - near ) * viewZ ); -} -float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) { - return ( near * far ) / ( ( far - near ) * invClipZ - far ); -}`,Rp=`#ifdef PREMULTIPLIED_ALPHA - gl_FragColor.rgb *= gl_FragColor.a; -#endif`,Cp=`vec4 mvPosition = vec4( transformed, 1.0 ); -#ifdef USE_INSTANCING - mvPosition = instanceMatrix * mvPosition; -#endif -mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,Pp=`#ifdef DITHERING - gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,Ip=`#ifdef DITHERING - vec3 dithering( vec3 color ) { - float grid_position = rand( gl_FragCoord.xy ); - vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); - dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); - return color + dither_shift_RGB; - } -#endif`,Dp=`float roughnessFactor = roughness; -#ifdef USE_ROUGHNESSMAP - vec4 texelRoughness = texture2D( roughnessMap, vUv ); - roughnessFactor *= texelRoughness.g; -#endif`,Fp=`#ifdef USE_ROUGHNESSMAP - uniform sampler2D roughnessMap; -#endif`,Np=`#ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; - varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; - struct DirectionalLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; - varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ]; - struct SpotLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; - varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; - struct PointLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - float shadowCameraNear; - float shadowCameraFar; - }; - uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; - #endif - float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { - return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); - } - vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { - return unpackRGBATo2Half( texture2D( shadow, uv ) ); - } - float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ - float occlusion = 1.0; - vec2 distribution = texture2DDistribution( shadow, uv ); - float hard_shadow = step( compare , distribution.x ); - if (hard_shadow != 1.0 ) { - float distance = compare - distribution.x ; - float variance = max( 0.00000, distribution.y * distribution.y ); - float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); - } - return occlusion; - } - float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { - float shadow = 1.0; - shadowCoord.xyz /= shadowCoord.w; - shadowCoord.z += shadowBias; - bvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 ); - bool inFrustum = all( inFrustumVec ); - bvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 ); - bool frustumTest = all( frustumTestVec ); - if ( frustumTest ) { - #if defined( SHADOWMAP_TYPE_PCF ) - vec2 texelSize = vec2( 1.0 ) / shadowMapSize; - float dx0 = - texelSize.x * shadowRadius; - float dy0 = - texelSize.y * shadowRadius; - float dx1 = + texelSize.x * shadowRadius; - float dy1 = + texelSize.y * shadowRadius; - float dx2 = dx0 / 2.0; - float dy2 = dy0 / 2.0; - float dx3 = dx1 / 2.0; - float dy3 = dy1 / 2.0; - shadow = ( - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) - ) * ( 1.0 / 17.0 ); - #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) - vec2 texelSize = vec2( 1.0 ) / shadowMapSize; - float dx = texelSize.x; - float dy = texelSize.y; - vec2 uv = shadowCoord.xy; - vec2 f = fract( uv * shadowMapSize + 0.5 ); - uv -= f * texelSize; - shadow = ( - texture2DCompare( shadowMap, uv, shadowCoord.z ) + - texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + - texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + - mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), - f.x ) + - mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), - f.x ) + - mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), - f.y ) + - mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), - f.y ) + - mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), - f.x ), - mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), - f.x ), - f.y ) - ) * ( 1.0 / 9.0 ); - #elif defined( SHADOWMAP_TYPE_VSM ) - shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); - #else - shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); - #endif - } - return shadow; - } - vec2 cubeToUV( vec3 v, float texelSizeY ) { - vec3 absV = abs( v ); - float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); - absV *= scaleToCube; - v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); - vec2 planar = v.xy; - float almostATexel = 1.5 * texelSizeY; - float almostOne = 1.0 - almostATexel; - if ( absV.z >= almostOne ) { - if ( v.z > 0.0 ) - planar.x = 4.0 - v.x; - } else if ( absV.x >= almostOne ) { - float signX = sign( v.x ); - planar.x = v.z * signX + 2.0 * signX; - } else if ( absV.y >= almostOne ) { - float signY = sign( v.y ); - planar.x = v.x + 2.0 * signY + 2.0; - planar.y = v.z * signY - 2.0; - } - return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); - } - float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { - vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); - vec3 lightToPosition = shadowCoord.xyz; - float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; - vec3 bd3D = normalize( lightToPosition ); - #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) - vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; - return ( - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) - ) * ( 1.0 / 9.0 ); - #else - return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); - #endif - } -#endif`,Bp=`#ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; - varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; - struct DirectionalLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - uniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ]; - varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ]; - struct SpotLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; - varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; - struct PointLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - float shadowCameraNear; - float shadowCameraFar; - }; - uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; - #endif -#endif`,zp=`#ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 - vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); - vec4 shadowWorldPosition; - #endif - #if NUM_DIR_LIGHT_SHADOWS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { - shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); - vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { - shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 ); - vSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { - shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); - vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end - #endif -#endif`,Op=`float getShadowMask() { - float shadow = 1.0; - #ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - DirectionalLightShadow directionalLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { - directionalLight = directionalLightShadows[ i ]; - shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; - } - #pragma unroll_loop_end - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - SpotLightShadow spotLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { - spotLight = spotLightShadows[ i ]; - shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0; - } - #pragma unroll_loop_end - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - PointLightShadow pointLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { - pointLight = pointLightShadows[ i ]; - shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; - } - #pragma unroll_loop_end - #endif - #endif - return shadow; -}`,Up=`#ifdef USE_SKINNING - mat4 boneMatX = getBoneMatrix( skinIndex.x ); - mat4 boneMatY = getBoneMatrix( skinIndex.y ); - mat4 boneMatZ = getBoneMatrix( skinIndex.z ); - mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,Hp=`#ifdef USE_SKINNING - uniform mat4 bindMatrix; - uniform mat4 bindMatrixInverse; - #ifdef BONE_TEXTURE - uniform highp sampler2D boneTexture; - uniform int boneTextureSize; - mat4 getBoneMatrix( const in float i ) { - float j = i * 4.0; - float x = mod( j, float( boneTextureSize ) ); - float y = floor( j / float( boneTextureSize ) ); - float dx = 1.0 / float( boneTextureSize ); - float dy = 1.0 / float( boneTextureSize ); - y = dy * ( y + 0.5 ); - vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) ); - vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) ); - vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) ); - vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) ); - mat4 bone = mat4( v1, v2, v3, v4 ); - return bone; - } - #else - uniform mat4 boneMatrices[ MAX_BONES ]; - mat4 getBoneMatrix( const in float i ) { - mat4 bone = boneMatrices[ int(i) ]; - return bone; - } - #endif -#endif`,Gp=`#ifdef USE_SKINNING - vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); - vec4 skinned = vec4( 0.0 ); - skinned += boneMatX * skinVertex * skinWeight.x; - skinned += boneMatY * skinVertex * skinWeight.y; - skinned += boneMatZ * skinVertex * skinWeight.z; - skinned += boneMatW * skinVertex * skinWeight.w; - transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,kp=`#ifdef USE_SKINNING - mat4 skinMatrix = mat4( 0.0 ); - skinMatrix += skinWeight.x * boneMatX; - skinMatrix += skinWeight.y * boneMatY; - skinMatrix += skinWeight.z * boneMatZ; - skinMatrix += skinWeight.w * boneMatW; - skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; - objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; - #ifdef USE_TANGENT - objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; - #endif -#endif`,Vp=`float specularStrength; -#ifdef USE_SPECULARMAP - vec4 texelSpecular = texture2D( specularMap, vUv ); - specularStrength = texelSpecular.r; -#else - specularStrength = 1.0; -#endif`,Wp=`#ifdef USE_SPECULARMAP - uniform sampler2D specularMap; -#endif`,qp=`#if defined( TONE_MAPPING ) - gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,Xp=`#ifndef saturate -#define saturate(a) clamp( a, 0.0, 1.0 ) -#endif -uniform float toneMappingExposure; -vec3 LinearToneMapping( vec3 color ) { - return toneMappingExposure * color; -} -vec3 ReinhardToneMapping( vec3 color ) { - color *= toneMappingExposure; - return saturate( color / ( vec3( 1.0 ) + color ) ); -} -vec3 OptimizedCineonToneMapping( vec3 color ) { - color *= toneMappingExposure; - color = max( vec3( 0.0 ), color - 0.004 ); - return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); -} -vec3 RRTAndODTFit( vec3 v ) { - vec3 a = v * ( v + 0.0245786 ) - 0.000090537; - vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; - return a / b; -} -vec3 ACESFilmicToneMapping( vec3 color ) { - const mat3 ACESInputMat = mat3( - vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), - vec3( 0.04823, 0.01566, 0.83777 ) - ); - const mat3 ACESOutputMat = mat3( - vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), - vec3( -0.07367, -0.00605, 1.07602 ) - ); - color *= toneMappingExposure / 0.6; - color = ACESInputMat * color; - color = RRTAndODTFit( color ); - color = ACESOutputMat * color; - return saturate( color ); -} -vec3 CustomToneMapping( vec3 color ) { return color; }`,Yp=`#ifdef USE_TRANSMISSIONMAP - totalTransmission *= texture2D( transmissionMap, vUv ).r; -#endif`,Zp=`#ifdef USE_TRANSMISSIONMAP - uniform sampler2D transmissionMap; -#endif`,Jp=`#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) ) - varying vec2 vUv; -#endif`,jp=`#ifdef USE_UV - #ifdef UVS_VERTEX_ONLY - vec2 vUv; - #else - varying vec2 vUv; - #endif - uniform mat3 uvTransform; -#endif`,$p=`#ifdef USE_UV - vUv = ( uvTransform * vec3( uv, 1 ) ).xy; -#endif`,Qp=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) - varying vec2 vUv2; -#endif`,Kp=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) - attribute vec2 uv2; - varying vec2 vUv2; - uniform mat3 uv2Transform; -#endif`,em=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) - vUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy; -#endif`,tm=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) - vec4 worldPosition = vec4( transformed, 1.0 ); - #ifdef USE_INSTANCING - worldPosition = instanceMatrix * worldPosition; - #endif - worldPosition = modelMatrix * worldPosition; -#endif`,nm=`uniform sampler2D t2D; -varying vec2 vUv; -void main() { - vec4 texColor = texture2D( t2D, vUv ); - gl_FragColor = mapTexelToLinear( texColor ); - #include - #include -}`,im=`varying vec2 vUv; -uniform mat3 uvTransform; -void main() { - vUv = ( uvTransform * vec3( uv, 1 ) ).xy; - gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,rm=`#include -uniform float opacity; -varying vec3 vWorldDirection; -#include -void main() { - vec3 vReflect = vWorldDirection; - #include - gl_FragColor = envColor; - gl_FragColor.a *= opacity; - #include - #include -}`,sm=`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include - gl_Position.z = gl_Position.w; -}`,om=`#if DEPTH_PACKING == 3200 - uniform float opacity; -#endif -#include -#include -#include -#include -#include -#include -#include -varying vec2 vHighPrecisionZW; -void main() { - #include - vec4 diffuseColor = vec4( 1.0 ); - #if DEPTH_PACKING == 3200 - diffuseColor.a = opacity; - #endif - #include - #include - #include - #include - float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; - #if DEPTH_PACKING == 3200 - gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); - #elif DEPTH_PACKING == 3201 - gl_FragColor = packDepthToRGBA( fragCoordZ ); - #endif -}`,am=`#include -#include -#include -#include -#include -#include -#include -varying vec2 vHighPrecisionZW; -void main() { - #include - #include - #ifdef USE_DISPLACEMENTMAP - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - vHighPrecisionZW = gl_Position.zw; -}`,lm=`#define DISTANCE -uniform vec3 referencePosition; -uniform float nearDistance; -uniform float farDistance; -varying vec3 vWorldPosition; -#include -#include -#include -#include -#include -#include -void main () { - #include - vec4 diffuseColor = vec4( 1.0 ); - #include - #include - #include - float dist = length( vWorldPosition - referencePosition ); - dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); - dist = saturate( dist ); - gl_FragColor = packDepthToRGBA( dist ); -}`,cm=`#define DISTANCE -varying vec3 vWorldPosition; -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #ifdef USE_DISPLACEMENTMAP - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - vWorldPosition = worldPosition.xyz; -}`,hm=`uniform sampler2D tEquirect; -varying vec3 vWorldDirection; -#include -void main() { - vec3 direction = normalize( vWorldDirection ); - vec2 sampleUV = equirectUv( direction ); - vec4 texColor = texture2D( tEquirect, sampleUV ); - gl_FragColor = mapTexelToLinear( texColor ); - #include - #include -}`,um=`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include -}`,dm=`uniform vec3 diffuse; -uniform float opacity; -uniform float dashSize; -uniform float totalSize; -varying float vLineDistance; -#include -#include -#include -#include -#include -void main() { - #include - if ( mod( vLineDistance, totalSize ) > dashSize ) { - discard; - } - vec3 outgoingLight = vec3( 0.0 ); - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - outgoingLight = diffuseColor.rgb; - gl_FragColor = vec4( outgoingLight, diffuseColor.a ); - #include - #include - #include - #include -}`,fm=`uniform float scale; -attribute float lineDistance; -varying float vLineDistance; -#include -#include -#include -#include -#include -#include -void main() { - vLineDistance = scale * lineDistance; - #include - #include - #include - #include - #include - #include - #include -}`,pm=`uniform vec3 diffuse; -uniform float opacity; -#ifndef FLAT_SHADED - varying vec3 vNormal; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - #include - #include - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - #ifdef USE_LIGHTMAP - - vec4 lightMapTexel= texture2D( lightMap, vUv2 ); - reflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity; - #else - reflectedLight.indirectDiffuse += vec3( 1.0 ); - #endif - #include - reflectedLight.indirectDiffuse *= diffuseColor.rgb; - vec3 outgoingLight = reflectedLight.indirectDiffuse; - #include - gl_FragColor = vec4( outgoingLight, diffuseColor.a ); - #include - #include - #include - #include - #include -}`,mm=`#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #ifdef USE_ENVMAP - #include - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - #include - #include -}`,gm=`uniform vec3 diffuse; -uniform vec3 emissive; -uniform float opacity; -varying vec3 vLightFront; -varying vec3 vIndirectFront; -#ifdef DOUBLE_SIDED - varying vec3 vLightBack; - varying vec3 vIndirectBack; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #ifdef DOUBLE_SIDED - reflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack; - #else - reflectedLight.indirectDiffuse += vIndirectFront; - #endif - #include - reflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ); - #ifdef DOUBLE_SIDED - reflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack; - #else - reflectedLight.directDiffuse = vLightFront; - #endif - reflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask(); - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; - #include - gl_FragColor = vec4( outgoingLight, diffuseColor.a ); - #include - #include - #include - #include - #include -}`,xm=`#define LAMBERT -varying vec3 vLightFront; -varying vec3 vIndirectFront; -#ifdef DOUBLE_SIDED - varying vec3 vLightBack; - varying vec3 vIndirectBack; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include -}`,ym=`#define MATCAP -uniform vec3 diffuse; -uniform float opacity; -uniform sampler2D matcap; -varying vec3 vViewPosition; -#ifndef FLAT_SHADED - varying vec3 vNormal; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - #include - #include - #include - vec3 viewDir = normalize( vViewPosition ); - vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); - vec3 y = cross( viewDir, x ); - vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; - #ifdef USE_MATCAP - vec4 matcapColor = texture2D( matcap, uv ); - matcapColor = matcapTexelToLinear( matcapColor ); - #else - vec4 matcapColor = vec4( 1.0 ); - #endif - vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; - gl_FragColor = vec4( outgoingLight, diffuseColor.a ); - #include - #include - #include - #include - #include -}`,vm=`#define MATCAP -varying vec3 vViewPosition; -#ifndef FLAT_SHADED - varying vec3 vNormal; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #ifndef FLAT_SHADED - vNormal = normalize( transformedNormal ); - #endif - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; -}`,_m=`#define TOON -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; - gl_FragColor = vec4( outgoingLight, diffuseColor.a ); - #include - #include - #include - #include - #include -}`,wm=`#define TOON -varying vec3 vViewPosition; -#ifndef FLAT_SHADED - varying vec3 vNormal; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include -#ifndef FLAT_SHADED - vNormal = normalize( transformedNormal ); -#endif - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include -}`,bm=`#define PHONG -uniform vec3 diffuse; -uniform vec3 emissive; -uniform vec3 specular; -uniform float shininess; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; - #include - gl_FragColor = vec4( outgoingLight, diffuseColor.a ); - #include - #include - #include - #include - #include -}`,Mm=`#define PHONG -varying vec3 vViewPosition; -#ifndef FLAT_SHADED - varying vec3 vNormal; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include -#ifndef FLAT_SHADED - vNormal = normalize( transformedNormal ); -#endif - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include - #include -}`,Sm=`#define STANDARD -#ifdef PHYSICAL - #define REFLECTIVITY - #define CLEARCOAT - #define TRANSMISSION -#endif -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float roughness; -uniform float metalness; -uniform float opacity; -#ifdef TRANSMISSION - uniform float transmission; -#endif -#ifdef REFLECTIVITY - uniform float reflectivity; -#endif -#ifdef CLEARCOAT - uniform float clearcoat; - uniform float clearcoatRoughness; -#endif -#ifdef USE_SHEEN - uniform vec3 sheen; -#endif -varying vec3 vViewPosition; -#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #ifdef TRANSMISSION - float totalTransmission = transmission; - #endif - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; - #ifdef TRANSMISSION - diffuseColor.a *= mix( saturate( 1. - totalTransmission + linearToRelativeLuminance( reflectedLight.directSpecular + reflectedLight.indirectSpecular ) ), 1.0, metalness ); - #endif - gl_FragColor = vec4( outgoingLight, diffuseColor.a ); - #include - #include - #include - #include - #include -}`,Tm=`#define STANDARD -varying vec3 vViewPosition; -#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include -#ifndef FLAT_SHADED - vNormal = normalize( transformedNormal ); - #ifdef USE_TANGENT - vTangent = normalize( transformedTangent ); - vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); - #endif -#endif - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include -}`,Em=`#define NORMAL -uniform float opacity; -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) - varying vec3 vViewPosition; -#endif -#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - gl_FragColor = vec4( packNormalToRGB( normal ), opacity ); -}`,Am=`#define NORMAL -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) - varying vec3 vViewPosition; -#endif -#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include -#ifndef FLAT_SHADED - vNormal = normalize( transformedNormal ); - #ifdef USE_TANGENT - vTangent = normalize( transformedTangent ); - vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); - #endif -#endif - #include - #include - #include - #include - #include - #include - #include -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) - vViewPosition = - mvPosition.xyz; -#endif -}`,Lm=`uniform vec3 diffuse; -uniform float opacity; -#include -#include -#include -#include -#include -#include -void main() { - #include - vec3 outgoingLight = vec3( 0.0 ); - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - outgoingLight = diffuseColor.rgb; - gl_FragColor = vec4( outgoingLight, diffuseColor.a ); - #include - #include - #include - #include -}`,Rm=`uniform float size; -uniform float scale; -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - gl_PointSize = size; - #ifdef USE_SIZEATTENUATION - bool isPerspective = isPerspectiveMatrix( projectionMatrix ); - if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); - #endif - #include - #include - #include - #include -}`,Cm=`uniform vec3 color; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -void main() { - gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); - #include - #include - #include -}`,Pm=`#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include -}`,Im=`uniform vec3 diffuse; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec3 outgoingLight = vec3( 0.0 ); - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - outgoingLight = diffuseColor.rgb; - gl_FragColor = vec4( outgoingLight, diffuseColor.a ); - #include - #include - #include -}`,Dm=`uniform float rotation; -uniform vec2 center; -#include -#include -#include -#include -#include -void main() { - #include - vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); - vec2 scale; - scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); - scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); - #ifndef USE_SIZEATTENUATION - bool isPerspective = isPerspectiveMatrix( projectionMatrix ); - if ( isPerspective ) scale *= - mvPosition.z; - #endif - vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; - vec2 rotatedPosition; - rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; - rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; - mvPosition.xy += rotatedPosition; - gl_Position = projectionMatrix * mvPosition; - #include - #include - #include -}`,Ee={alphamap_fragment:ff,alphamap_pars_fragment:pf,alphatest_fragment:mf,aomap_fragment:gf,aomap_pars_fragment:xf,begin_vertex:yf,beginnormal_vertex:vf,bsdfs:_f,bumpmap_pars_fragment:wf,clipping_planes_fragment:bf,clipping_planes_pars_fragment:Mf,clipping_planes_pars_vertex:Sf,clipping_planes_vertex:Tf,color_fragment:Ef,color_pars_fragment:Af,color_pars_vertex:Lf,color_vertex:Rf,common:Cf,cube_uv_reflection_fragment:Pf,defaultnormal_vertex:If,displacementmap_pars_vertex:Df,displacementmap_vertex:Ff,emissivemap_fragment:Nf,emissivemap_pars_fragment:Bf,encodings_fragment:zf,encodings_pars_fragment:Of,envmap_fragment:Uf,envmap_common_pars_fragment:Hf,envmap_pars_fragment:Gf,envmap_pars_vertex:kf,envmap_physical_pars_fragment:Kf,envmap_vertex:Vf,fog_vertex:Wf,fog_pars_vertex:qf,fog_fragment:Xf,fog_pars_fragment:Yf,gradientmap_pars_fragment:Zf,lightmap_fragment:Jf,lightmap_pars_fragment:jf,lights_lambert_vertex:$f,lights_pars_begin:Qf,lights_toon_fragment:ep,lights_toon_pars_fragment:tp,lights_phong_fragment:np,lights_phong_pars_fragment:ip,lights_physical_fragment:rp,lights_physical_pars_fragment:sp,lights_fragment_begin:op,lights_fragment_maps:ap,lights_fragment_end:lp,logdepthbuf_fragment:cp,logdepthbuf_pars_fragment:hp,logdepthbuf_pars_vertex:up,logdepthbuf_vertex:dp,map_fragment:fp,map_pars_fragment:pp,map_particle_fragment:mp,map_particle_pars_fragment:gp,metalnessmap_fragment:xp,metalnessmap_pars_fragment:yp,morphnormal_vertex:vp,morphtarget_pars_vertex:_p,morphtarget_vertex:wp,normal_fragment_begin:bp,normal_fragment_maps:Mp,normalmap_pars_fragment:Sp,clearcoat_normal_fragment_begin:Tp,clearcoat_normal_fragment_maps:Ep,clearcoat_pars_fragment:Ap,packing:Lp,premultiplied_alpha_fragment:Rp,project_vertex:Cp,dithering_fragment:Pp,dithering_pars_fragment:Ip,roughnessmap_fragment:Dp,roughnessmap_pars_fragment:Fp,shadowmap_pars_fragment:Np,shadowmap_pars_vertex:Bp,shadowmap_vertex:zp,shadowmask_pars_fragment:Op,skinbase_vertex:Up,skinning_pars_vertex:Hp,skinning_vertex:Gp,skinnormal_vertex:kp,specularmap_fragment:Vp,specularmap_pars_fragment:Wp,tonemapping_fragment:qp,tonemapping_pars_fragment:Xp,transmissionmap_fragment:Yp,transmissionmap_pars_fragment:Zp,uv_pars_fragment:Jp,uv_pars_vertex:jp,uv_vertex:$p,uv2_pars_fragment:Qp,uv2_pars_vertex:Kp,uv2_vertex:em,worldpos_vertex:tm,background_frag:nm,background_vert:im,cube_frag:rm,cube_vert:sm,depth_frag:om,depth_vert:am,distanceRGBA_frag:lm,distanceRGBA_vert:cm,equirect_frag:hm,equirect_vert:um,linedashed_frag:dm,linedashed_vert:fm,meshbasic_frag:pm,meshbasic_vert:mm,meshlambert_frag:gm,meshlambert_vert:xm,meshmatcap_frag:ym,meshmatcap_vert:vm,meshtoon_frag:_m,meshtoon_vert:wm,meshphong_frag:bm,meshphong_vert:Mm,meshphysical_frag:Sm,meshphysical_vert:Tm,normal_frag:Em,normal_vert:Am,points_frag:Lm,points_vert:Rm,shadow_frag:Cm,shadow_vert:Pm,sprite_frag:Im,sprite_vert:Dm},K={common:{diffuse:{value:new se(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new Ke},uv2Transform:{value:new Ke},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new W(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new se(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new se(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new Ke}},sprite:{diffuse:{value:new se(15658734)},opacity:{value:1},center:{value:new W(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},uvTransform:{value:new Ke}}},Bt={basic:{uniforms:ht([K.common,K.specularmap,K.envmap,K.aomap,K.lightmap,K.fog]),vertexShader:Ee.meshbasic_vert,fragmentShader:Ee.meshbasic_frag},lambert:{uniforms:ht([K.common,K.specularmap,K.envmap,K.aomap,K.lightmap,K.emissivemap,K.fog,K.lights,{emissive:{value:new se(0)}}]),vertexShader:Ee.meshlambert_vert,fragmentShader:Ee.meshlambert_frag},phong:{uniforms:ht([K.common,K.specularmap,K.envmap,K.aomap,K.lightmap,K.emissivemap,K.bumpmap,K.normalmap,K.displacementmap,K.fog,K.lights,{emissive:{value:new se(0)},specular:{value:new se(1118481)},shininess:{value:30}}]),vertexShader:Ee.meshphong_vert,fragmentShader:Ee.meshphong_frag},standard:{uniforms:ht([K.common,K.envmap,K.aomap,K.lightmap,K.emissivemap,K.bumpmap,K.normalmap,K.displacementmap,K.roughnessmap,K.metalnessmap,K.fog,K.lights,{emissive:{value:new se(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Ee.meshphysical_vert,fragmentShader:Ee.meshphysical_frag},toon:{uniforms:ht([K.common,K.aomap,K.lightmap,K.emissivemap,K.bumpmap,K.normalmap,K.displacementmap,K.gradientmap,K.fog,K.lights,{emissive:{value:new se(0)}}]),vertexShader:Ee.meshtoon_vert,fragmentShader:Ee.meshtoon_frag},matcap:{uniforms:ht([K.common,K.bumpmap,K.normalmap,K.displacementmap,K.fog,{matcap:{value:null}}]),vertexShader:Ee.meshmatcap_vert,fragmentShader:Ee.meshmatcap_frag},points:{uniforms:ht([K.points,K.fog]),vertexShader:Ee.points_vert,fragmentShader:Ee.points_frag},dashed:{uniforms:ht([K.common,K.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ee.linedashed_vert,fragmentShader:Ee.linedashed_frag},depth:{uniforms:ht([K.common,K.displacementmap]),vertexShader:Ee.depth_vert,fragmentShader:Ee.depth_frag},normal:{uniforms:ht([K.common,K.bumpmap,K.normalmap,K.displacementmap,{opacity:{value:1}}]),vertexShader:Ee.normal_vert,fragmentShader:Ee.normal_frag},sprite:{uniforms:ht([K.sprite,K.fog]),vertexShader:Ee.sprite_vert,fragmentShader:Ee.sprite_frag},background:{uniforms:{uvTransform:{value:new Ke},t2D:{value:null}},vertexShader:Ee.background_vert,fragmentShader:Ee.background_frag},cube:{uniforms:ht([K.envmap,{opacity:{value:1}}]),vertexShader:Ee.cube_vert,fragmentShader:Ee.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ee.equirect_vert,fragmentShader:Ee.equirect_frag},distanceRGBA:{uniforms:ht([K.common,K.displacementmap,{referencePosition:{value:new _},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ee.distanceRGBA_vert,fragmentShader:Ee.distanceRGBA_frag},shadow:{uniforms:ht([K.lights,K.fog,{color:{value:new se(0)},opacity:{value:1}}]),vertexShader:Ee.shadow_vert,fragmentShader:Ee.shadow_frag}};Bt.physical={uniforms:ht([Bt.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new W(1,1)},clearcoatNormalMap:{value:null},sheen:{value:new se(0)},transmission:{value:0},transmissionMap:{value:null}}]),vertexShader:Ee.meshphysical_vert,fragmentShader:Ee.meshphysical_frag};function Fm(s,e,t,n,i){let r=new se(0),o=0,a,c,l=null,h=0,u=null;function d(m,x,y,g){let p=x.isScene===!0?x.background:null;p&&p.isTexture&&(p=e.get(p));let w=s.xr,b=w.getSession&&w.getSession();b&&b.environmentBlendMode==="additive"&&(p=null),p===null?f(r,o):p&&p.isColor&&(f(p,1),g=!0),(s.autoClear||g)&&s.clear(s.autoClearColor,s.autoClearDepth,s.autoClearStencil),p&&(p.isCubeTexture||p.mapping===Ei)?(c===void 0&&(c=new je(new ii(1,1,1),new jt({name:"BackgroundCubeMaterial",uniforms:ri(Bt.cube.uniforms),vertexShader:Bt.cube.vertexShader,fragmentShader:Bt.cube.fragmentShader,side:Qe,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(T,v,A){this.matrixWorld.copyPosition(A.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),n.update(c)),c.material.uniforms.envMap.value=p,c.material.uniforms.flipEnvMap.value=p.isCubeTexture&&p._needsFlipEnvMap?-1:1,(l!==p||h!==p.version||u!==s.toneMapping)&&(c.material.needsUpdate=!0,l=p,h=p.version,u=s.toneMapping),m.unshift(c,c.geometry,c.material,0,0,null)):p&&p.isTexture&&(a===void 0&&(a=new je(new Jr(2,2),new jt({name:"BackgroundMaterial",uniforms:ri(Bt.background.uniforms),vertexShader:Bt.background.vertexShader,fragmentShader:Bt.background.fragmentShader,side:Si,depthTest:!1,depthWrite:!1,fog:!1})),a.geometry.deleteAttribute("normal"),Object.defineProperty(a.material,"map",{get:function(){return this.uniforms.t2D.value}}),n.update(a)),a.material.uniforms.t2D.value=p,p.matrixAutoUpdate===!0&&p.updateMatrix(),a.material.uniforms.uvTransform.value.copy(p.matrix),(l!==p||h!==p.version||u!==s.toneMapping)&&(a.material.needsUpdate=!0,l=p,h=p.version,u=s.toneMapping),m.unshift(a,a.geometry,a.material,0,0,null))}function f(m,x){t.buffers.color.setClear(m.r,m.g,m.b,x,i)}return{getClearColor:function(){return r},setClearColor:function(m,x=1){r.set(m),o=x,f(r,o)},getClearAlpha:function(){return o},setClearAlpha:function(m){o=m,f(r,o)},render:d}}function Nm(s,e,t,n){let i=s.getParameter(34921),r=n.isWebGL2?null:e.get("OES_vertex_array_object"),o=n.isWebGL2||r!==null,a={},c=x(null),l=c;function h(R,D,F,P,X){let $=!1;if(o){let Z=m(P,F,D);l!==Z&&(l=Z,d(l.object)),$=y(P,X),$&&g(P,X)}else{let Z=D.wireframe===!0;(l.geometry!==P.id||l.program!==F.id||l.wireframe!==Z)&&(l.geometry=P.id,l.program=F.id,l.wireframe=Z,$=!0)}R.isInstancedMesh===!0&&($=!0),X!==null&&t.update(X,34963),$&&(A(R,D,F,P),X!==null&&s.bindBuffer(34963,t.get(X).buffer))}function u(){return n.isWebGL2?s.createVertexArray():r.createVertexArrayOES()}function d(R){return n.isWebGL2?s.bindVertexArray(R):r.bindVertexArrayOES(R)}function f(R){return n.isWebGL2?s.deleteVertexArray(R):r.deleteVertexArrayOES(R)}function m(R,D,F){let P=F.wireframe===!0,X=a[R.id];X===void 0&&(X={},a[R.id]=X);let $=X[D.id];$===void 0&&($={},X[D.id]=$);let Z=$[P];return Z===void 0&&(Z=x(u()),$[P]=Z),Z}function x(R){let D=[],F=[],P=[];for(let X=0;X=0){let fe=X[oe];if(fe!==void 0){let ve=fe.normalized,G=fe.itemSize,ze=t.get(fe);if(ze===void 0)continue;let Le=ze.buffer,_e=ze.type,pe=ze.bytesPerElement;if(fe.isInterleavedBufferAttribute){let Pe=fe.data,Me=Pe.stride,Ae=fe.offset;Pe&&Pe.isInstancedInterleavedBuffer?(b(re,Pe.meshPerAttribute),P._maxInstanceCount===void 0&&(P._maxInstanceCount=Pe.meshPerAttribute*Pe.count)):w(re),s.bindBuffer(34962,Le),v(re,G,_e,ve,Me*pe,Ae*pe)}else fe.isInstancedBufferAttribute?(b(re,fe.meshPerAttribute),P._maxInstanceCount===void 0&&(P._maxInstanceCount=fe.meshPerAttribute*fe.count)):w(re),s.bindBuffer(34962,Le),v(re,G,_e,ve,0,0)}else if(oe==="instanceMatrix"){let ve=t.get(R.instanceMatrix);if(ve===void 0)continue;let G=ve.buffer,ze=ve.type;b(re+0,1),b(re+1,1),b(re+2,1),b(re+3,1),s.bindBuffer(34962,G),s.vertexAttribPointer(re+0,4,ze,!1,64,0),s.vertexAttribPointer(re+1,4,ze,!1,64,16),s.vertexAttribPointer(re+2,4,ze,!1,64,32),s.vertexAttribPointer(re+3,4,ze,!1,64,48)}else if(oe==="instanceColor"){let ve=t.get(R.instanceColor);if(ve===void 0)continue;let G=ve.buffer,ze=ve.type;b(re,1),s.bindBuffer(34962,G),s.vertexAttribPointer(re,3,ze,!1,12,0)}else if(Z!==void 0){let ve=Z[oe];if(ve!==void 0)switch(ve.length){case 2:s.vertexAttrib2fv(re,ve);break;case 3:s.vertexAttrib3fv(re,ve);break;case 4:s.vertexAttrib4fv(re,ve);break;default:s.vertexAttrib1fv(re,ve)}}}}T()}function L(){U();for(let R in a){let D=a[R];for(let F in D){let P=D[F];for(let X in P)f(P[X].object),delete P[X];delete D[F]}delete a[R]}}function I(R){if(a[R.id]===void 0)return;let D=a[R.id];for(let F in D){let P=D[F];for(let X in P)f(P[X].object),delete P[X];delete D[F]}delete a[R.id]}function N(R){for(let D in a){let F=a[D];if(F[R.id]===void 0)continue;let P=F[R.id];for(let X in P)f(P[X].object),delete P[X];delete F[R.id]}}function U(){z(),l!==c&&(l=c,d(l.object))}function z(){c.geometry=null,c.program=null,c.wireframe=!1}return{setup:h,reset:U,resetDefaultState:z,dispose:L,releaseStatesOfGeometry:I,releaseStatesOfProgram:N,initAttributes:p,enableAttribute:w,disableUnusedAttributes:T}}function Bm(s,e,t,n){let i=n.isWebGL2,r;function o(l){r=l}function a(l,h){s.drawArrays(r,l,h),t.update(h,r,1)}function c(l,h,u){if(u===0)return;let d,f;if(i)d=s,f="drawArraysInstanced";else if(d=e.get("ANGLE_instanced_arrays"),f="drawArraysInstancedANGLE",d===null){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}d[f](r,l,h,u),t.update(h,r,u)}this.setMode=o,this.render=a,this.renderInstances=c}function zm(s,e,t){let n;function i(){if(n!==void 0)return n;if(e.has("EXT_texture_filter_anisotropic")===!0){let v=e.get("EXT_texture_filter_anisotropic");n=s.getParameter(v.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else n=0;return n}function r(v){if(v==="highp"){if(s.getShaderPrecisionFormat(35633,36338).precision>0&&s.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";v="mediump"}return v==="mediump"&&s.getShaderPrecisionFormat(35633,36337).precision>0&&s.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}let o=typeof WebGL2RenderingContext!="undefined"&&s instanceof WebGL2RenderingContext||typeof WebGL2ComputeRenderingContext!="undefined"&&s instanceof WebGL2ComputeRenderingContext,a=t.precision!==void 0?t.precision:"highp",c=r(a);c!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",c,"instead."),a=c);let l=t.logarithmicDepthBuffer===!0,h=s.getParameter(34930),u=s.getParameter(35660),d=s.getParameter(3379),f=s.getParameter(34076),m=s.getParameter(34921),x=s.getParameter(36347),y=s.getParameter(36348),g=s.getParameter(36349),p=u>0,w=o||e.has("OES_texture_float"),b=p&&w,T=o?s.getParameter(36183):0;return{isWebGL2:o,getMaxAnisotropy:i,getMaxPrecision:r,precision:a,logarithmicDepthBuffer:l,maxTextures:h,maxVertexTextures:u,maxTextureSize:d,maxCubemapSize:f,maxAttributes:m,maxVertexUniforms:x,maxVaryings:y,maxFragmentUniforms:g,vertexTextures:p,floatFragmentTextures:w,floatVertexTextures:b,maxSamples:T}}function Om(s){let e=this,t=null,n=0,i=!1,r=!1,o=new Lt,a=new Ke,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(u,d,f){let m=u.length!==0||d||n!==0||i;return i=d,t=h(u,f,0),n=u.length,m},this.beginShadows=function(){r=!0,h(null)},this.endShadows=function(){r=!1,l()},this.setState=function(u,d,f){let m=u.clippingPlanes,x=u.clipIntersection,y=u.clipShadows,g=s.get(u);if(!i||m===null||m.length===0||r&&!y)r?h(null):l();else{let p=r?0:n,w=p*4,b=g.clippingState||null;c.value=b,b=h(m,d,w,f);for(let T=0;T!==w;++T)b[T]=t[T];g.clippingState=b,this.numIntersection=x?this.numPlanes:0,this.numPlanes+=p}};function l(){c.value!==t&&(c.value=t,c.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function h(u,d,f,m){let x=u!==null?u.length:0,y=null;if(x!==0){if(y=c.value,m!==!0||y===null){let g=f+x*4,p=d.matrixWorldInverse;a.getNormalMatrix(p),(y===null||y.length0){let l=s.getRenderTarget(),h=new Yr(c.height/2);return h.fromEquirectangularTexture(s,o),e.set(o,h),s.setRenderTarget(l),o.addEventListener("dispose",i),t(h.texture,o.mapping)}else return null}}return o}function i(o){let a=o.target;a.removeEventListener("dispose",i);let c=e.get(a);c!==void 0&&(e.delete(a),c.dispose())}function r(){e=new WeakMap}return{get:n,dispose:r}}function Hm(s){let e={};function t(n){if(e[n]!==void 0)return e[n];let i;switch(n){case"WEBGL_depth_texture":i=s.getExtension("WEBGL_depth_texture")||s.getExtension("MOZ_WEBGL_depth_texture")||s.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=s.getExtension("EXT_texture_filter_anisotropic")||s.getExtension("MOZ_EXT_texture_filter_anisotropic")||s.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=s.getExtension("WEBGL_compressed_texture_s3tc")||s.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||s.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=s.getExtension("WEBGL_compressed_texture_pvrtc")||s.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=s.getExtension(n)}return e[n]=i,i}return{has:function(n){return t(n)!==null},init:function(n){n.isWebGL2?t("EXT_color_buffer_float"):(t("WEBGL_depth_texture"),t("OES_texture_float"),t("OES_texture_half_float"),t("OES_texture_half_float_linear"),t("OES_standard_derivatives"),t("OES_element_index_uint"),t("OES_vertex_array_object"),t("ANGLE_instanced_arrays")),t("OES_texture_float_linear"),t("EXT_color_buffer_half_float")},get:function(n){let i=t(n);return i===null&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),i}}}function Gm(s,e,t,n){let i={},r=new WeakMap;function o(u){let d=u.target;d.index!==null&&e.remove(d.index);for(let m in d.attributes)e.remove(d.attributes[m]);d.removeEventListener("dispose",o),delete i[d.id];let f=r.get(d);f&&(e.remove(f),r.delete(d)),n.releaseStatesOfGeometry(d),d.isInstancedBufferGeometry===!0&&delete d._maxInstanceCount,t.memory.geometries--}function a(u,d){return i[d.id]===!0||(d.addEventListener("dispose",o),i[d.id]=!0,t.memory.geometries++),d}function c(u){let d=u.attributes;for(let m in d)e.update(d[m],34962);let f=u.morphAttributes;for(let m in f){let x=f[m];for(let y=0,g=x.length;y65535?zr:Br)(d,1);y.version=x;let g=r.get(u);g&&e.remove(g),r.set(u,y)}function h(u){let d=r.get(u);if(d){let f=u.index;f!==null&&d.version0)return s;let i=e*t,r=jl[i];if(r===void 0&&(r=new Float32Array(i),jl[i]=r),e!==0){n.toArray(r,0);for(let o=1,a=0;o!==e;++o)a+=t,s[o].toArray(r,a)}return r}function pt(s,e){if(s.length!==e.length)return!1;for(let t=0,n=s.length;t/gm;function Lo(s){return s.replace(Vg,Wg)}function Wg(s,e){let t=Ee[e];if(t===void 0)throw new Error("Can not resolve #include <"+e+">");return Lo(t)}var qg=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Xg=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function uc(s){return s.replace(Xg,hc).replace(qg,Yg)}function Yg(s,e,t,n){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),hc(s,e,t,n)}function hc(s,e,t,n){let i="";for(let r=parseInt(e);r0?s.gammaFactor:1,f=t.isWebGL2?"":Hg(t),m=Gg(r),x=i.createProgram(),y,g,p=t.glslVersion?"#version "+t.glslVersion+` -`:"";t.isRawShaderMaterial?(y=[m].filter(Vi).join(` -`),y.length>0&&(y+=` -`),g=[f,m].filter(Vi).join(` -`),g.length>0&&(g+=` -`)):(y=[dc(t),"#define SHADER_NAME "+t.shaderName,m,t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+d,"#define MAX_BONES "+t.maxBones,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+h:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMap&&t.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",t.normalMap&&t.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.displacementMap&&t.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs?"#define USE_UV":"",t.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.useVertexTexture?"#define BONE_TEXTURE":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+c:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` -`].filter(Vi).join(` -`),g=[f,dc(t),"#define SHADER_NAME "+t.shaderName,m,t.alphaTest?"#define ALPHATEST "+t.alphaTest+(t.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+d,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+l:"",t.envMap?"#define "+h:"",t.envMap?"#define "+u:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMap&&t.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",t.normalMap&&t.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.sheen?"#define USE_SHEEN":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs?"#define USE_UV":"",t.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+c:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(t.extensionShaderTextureLOD||t.envMap)&&t.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==kn?"#define TONE_MAPPING":"",t.toneMapping!==kn?Ee.tonemapping_pars_fragment:"",t.toneMapping!==kn?Ug("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",Ee.encodings_pars_fragment,t.map?ki("mapTexelToLinear",t.mapEncoding):"",t.matcap?ki("matcapTexelToLinear",t.matcapEncoding):"",t.envMap?ki("envMapTexelToLinear",t.envMapEncoding):"",t.emissiveMap?ki("emissiveMapTexelToLinear",t.emissiveMapEncoding):"",t.lightMap?ki("lightMapTexelToLinear",t.lightMapEncoding):"",Og("linearToOutputTexel",t.outputEncoding),t.depthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` -`].filter(Vi).join(` -`)),o=Lo(o),o=lc(o,t),o=cc(o,t),a=Lo(a),a=lc(a,t),a=cc(a,t),o=uc(o),a=uc(a),t.isWebGL2&&t.isRawShaderMaterial!==!0&&(p=`#version 300 es -`,y=["#define attribute in","#define varying out","#define texture2D texture"].join(` -`)+` -`+y,g=["#define varying in",t.glslVersion===Ml?"":"out highp vec4 pc_fragColor;",t.glslVersion===Ml?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` -`)+` -`+g);let w=p+y+o,b=p+g+a,T=sc(i,35633,w),v=sc(i,35632,b);if(i.attachShader(x,T),i.attachShader(x,v),t.index0AttributeName!==void 0?i.bindAttribLocation(x,0,t.index0AttributeName):t.morphTargets===!0&&i.bindAttribLocation(x,0,"position"),i.linkProgram(x),s.debug.checkShaderErrors){let I=i.getProgramInfoLog(x).trim(),N=i.getShaderInfoLog(T).trim(),U=i.getShaderInfoLog(v).trim(),z=!0,R=!0;if(i.getProgramParameter(x,35714)===!1){z=!1;let D=ac(i,T,"vertex"),F=ac(i,v,"fragment");console.error("THREE.WebGLProgram: shader error: ",i.getError(),"35715",i.getProgramParameter(x,35715),"gl.getProgramInfoLog",I,D,F)}else I!==""?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",I):(N===""||U==="")&&(R=!1);R&&(this.diagnostics={runnable:z,programLog:I,vertexShader:{log:N,prefix:y},fragmentShader:{log:U,prefix:g}})}i.deleteShader(T),i.deleteShader(v);let A;this.getUniforms=function(){return A===void 0&&(A=new fn(i,x)),A};let L;return this.getAttributes=function(){return L===void 0&&(L=kg(i,x)),L},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(x),this.program=void 0},this.name=t.shaderName,this.id=Bg++,this.cacheKey=e,this.usedTimes=1,this.program=x,this.vertexShader=T,this.fragmentShader=v,this}function Kg(s,e,t,n,i,r){let o=[],a=n.isWebGL2,c=n.logarithmicDepthBuffer,l=n.floatVertexTextures,h=n.maxVertexUniforms,u=n.vertexTextures,d=n.precision,f={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},m=["precision","isWebGL2","supportsVertexTextures","outputEncoding","instancing","instancingColor","map","mapEncoding","matcap","matcapEncoding","envMap","envMapMode","envMapEncoding","envMapCubeUV","lightMap","lightMapEncoding","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","objectSpaceNormalMap","tangentSpaceNormalMap","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","vertexAlphas","vertexTangents","vertexUvs","uvsVertexOnly","fog","useFog","fogExp2","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","numDirLightShadows","numPointLightShadows","numSpotLightShadows","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering","sheen","transmissionMap"];function x(v){let L=v.skeleton.bones;if(l)return 1024;{let N=Math.floor((h-20)/4),U=Math.min(N,L.length);return U0,maxBones:F,useVertexTexture:l,morphTargets:v.morphTargets,morphNormals:v.morphNormals,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numClippingPlanes:r.numPlanes,numClipIntersection:r.numIntersection,dithering:v.dithering,shadowMapEnabled:s.shadowMap.enabled&&L.length>0,shadowMapType:s.shadowMap.type,toneMapping:v.toneMapped?s.toneMapping:kn,physicallyCorrectLights:s.physicallyCorrectLights,premultipliedAlpha:v.premultipliedAlpha,alphaTest:v.alphaTest,doubleSided:v.side===fr,flipSided:v.side===Qe,depthPacking:v.depthPacking!==void 0?v.depthPacking:!1,index0AttributeName:v.index0AttributeName,extensionDerivatives:v.extensions&&v.extensions.derivatives,extensionFragDepth:v.extensions&&v.extensions.fragDepth,extensionDrawBuffers:v.extensions&&v.extensions.drawBuffers,extensionShaderTextureLOD:v.extensions&&v.extensions.shaderTextureLOD,rendererExtensionFragDepth:a||t.has("EXT_frag_depth"),rendererExtensionDrawBuffers:a||t.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:a||t.has("EXT_shader_texture_lod"),customProgramCacheKey:v.customProgramCacheKey()}}function p(v){let A=[];if(v.shaderID?A.push(v.shaderID):(A.push(v.fragmentShader),A.push(v.vertexShader)),v.defines!==void 0)for(let L in v.defines)A.push(L),A.push(v.defines[L]);if(v.isRawShaderMaterial===!1){for(let L=0;L1&&n.sort(d||tx),i.length>1&&i.sort(f||nx)}function u(){for(let d=t,f=e.length;d=e.get(i).length?(o=new fc(s),e.get(i).push(o)):o=e.get(i)[r],o}function n(){e=new WeakMap}return{get:t,dispose:n}}function rx(){let s={};return{get:function(e){if(s[e.id]!==void 0)return s[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new _,color:new se};break;case"SpotLight":t={position:new _,direction:new _,color:new se,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new _,color:new se,distance:0,decay:0};break;case"HemisphereLight":t={direction:new _,skyColor:new se,groundColor:new se};break;case"RectAreaLight":t={color:new se,position:new _,halfWidth:new _,halfHeight:new _};break}return s[e.id]=t,t}}}function sx(){let s={};return{get:function(e){if(s[e.id]!==void 0)return s[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new W};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new W};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new W,shadowCameraNear:1,shadowCameraFar:1e3};break}return s[e.id]=t,t}}}var ox=0;function ax(s,e){return(e.castShadow?1:0)-(s.castShadow?1:0)}function lx(s,e){let t=new rx,n=sx(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let h=0;h<9;h++)i.probe.push(new _);let r=new _,o=new le,a=new le;function c(h){let u=0,d=0,f=0;for(let A=0;A<9;A++)i.probe[A].set(0,0,0);let m=0,x=0,y=0,g=0,p=0,w=0,b=0,T=0;h.sort(ax);for(let A=0,L=h.length;A0&&(e.isWebGL2||s.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=K.LTC_FLOAT_1,i.rectAreaLTC2=K.LTC_FLOAT_2):s.has("OES_texture_half_float_linear")===!0?(i.rectAreaLTC1=K.LTC_HALF_1,i.rectAreaLTC2=K.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=u,i.ambient[1]=d,i.ambient[2]=f;let v=i.hash;(v.directionalLength!==m||v.pointLength!==x||v.spotLength!==y||v.rectAreaLength!==g||v.hemiLength!==p||v.numDirectionalShadows!==w||v.numPointShadows!==b||v.numSpotShadows!==T)&&(i.directional.length=m,i.spot.length=y,i.rectArea.length=g,i.point.length=x,i.hemi.length=p,i.directionalShadow.length=w,i.directionalShadowMap.length=w,i.pointShadow.length=b,i.pointShadowMap.length=b,i.spotShadow.length=T,i.spotShadowMap.length=T,i.directionalShadowMatrix.length=w,i.pointShadowMatrix.length=b,i.spotShadowMatrix.length=T,v.directionalLength=m,v.pointLength=x,v.spotLength=y,v.rectAreaLength=g,v.hemiLength=p,v.numDirectionalShadows=w,v.numPointShadows=b,v.numSpotShadows=T,i.version=ox++)}function l(h,u){let d=0,f=0,m=0,x=0,y=0,g=u.matrixWorldInverse;for(let p=0,w=h.length;p=t.get(r).length?(a=new pc(s,e),t.get(r).push(a)):a=t.get(r)[o],a}function i(){t=new WeakMap}return{get:n,dispose:i}}var jr=class extends tt{constructor(e){super();this.type="MeshDepthMaterial",this.depthPacking=Pd,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}};jr.prototype.isMeshDepthMaterial=!0;var $r=class extends tt{constructor(e){super();this.type="MeshDistanceMaterial",this.referencePosition=new _,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}};$r.prototype.isMeshDistanceMaterial=!0;var hx=`uniform sampler2D shadow_pass; -uniform vec2 resolution; -uniform float radius; -#include -void main() { - float mean = 0.0; - float squared_mean = 0.0; - float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) ); - for ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) { - #ifdef HORIZONTAL_PASS - vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) ); - mean += distribution.x; - squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; - #else - float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) ); - mean += depth; - squared_mean += depth * depth; - #endif - } - mean = mean * HALF_SAMPLE_RATE; - squared_mean = squared_mean * HALF_SAMPLE_RATE; - float std_dev = sqrt( squared_mean - mean * mean ); - gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`,ux=`void main() { - gl_Position = vec4( position, 1.0 ); -}`;function mc(s,e,t){let n=new Gi,i=new W,r=new W,o=new Fe,a=[],c=[],l={},h=t.maxTextureSize,u={0:Qe,1:Si,2:fr},d=new jt({defines:{SAMPLE_RATE:2/8,HALF_SAMPLE_RATE:1/8},uniforms:{shadow_pass:{value:null},resolution:{value:new W},radius:{value:4}},vertexShader:ux,fragmentShader:hx}),f=d.clone();f.defines.HORIZONTAL_PASS=1;let m=new ue;m.setAttribute("position",new Te(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let x=new je(m,d),y=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Ka,this.render=function(v,A,L){if(y.enabled===!1||y.autoUpdate===!1&&y.needsUpdate===!1||v.length===0)return;let I=s.getRenderTarget(),N=s.getActiveCubeFace(),U=s.getActiveMipmapLevel(),z=s.state;z.setBlending(en),z.buffers.color.setClear(1,1,1,1),z.buffers.depth.setTest(!0),z.setScissorTest(!1);for(let R=0,D=v.length;Rh||i.y>h)&&(i.x>h&&(r.x=Math.floor(h/X.x),i.x=r.x*X.x,P.mapSize.x=r.x),i.y>h&&(r.y=Math.floor(h/X.y),i.y=r.y*X.y,P.mapSize.y=r.y)),P.map===null&&!P.isPointLightShadow&&this.type===Mi){let Z={minFilter:it,magFilter:it,format:Tt};P.map=new Vt(i.x,i.y,Z),P.map.texture.name=F.name+".shadowMap",P.mapPass=new Vt(i.x,i.y,Z),P.camera.updateProjectionMatrix()}if(P.map===null){let Z={minFilter:nt,magFilter:nt,format:Tt};P.map=new Vt(i.x,i.y,Z),P.map.texture.name=F.name+".shadowMap",P.camera.updateProjectionMatrix()}s.setRenderTarget(P.map),s.clear();let $=P.getViewportCount();for(let Z=0;Z<$;Z++){let oe=P.getViewport(Z);o.set(r.x*oe.x,r.y*oe.y,r.x*oe.z,r.y*oe.w),z.viewport(o),P.updateMatrices(F,Z),n=P.getFrustum(),T(A,L,P.camera,F,this.type)}!P.isPointLightShadow&&this.type===Mi&&g(P,L),P.needsUpdate=!1}y.needsUpdate=!1,s.setRenderTarget(I,N,U)};function g(v,A){let L=e.update(x);d.uniforms.shadow_pass.value=v.map.texture,d.uniforms.resolution.value=v.mapSize,d.uniforms.radius.value=v.radius,s.setRenderTarget(v.mapPass),s.clear(),s.renderBufferDirect(A,null,L,d,x,null),f.uniforms.shadow_pass.value=v.mapPass.texture,f.uniforms.resolution.value=v.mapSize,f.uniforms.radius.value=v.radius,s.setRenderTarget(v.map),s.clear(),s.renderBufferDirect(A,null,L,f,x,null)}function p(v,A,L){let I=v<<0|A<<1|L<<2,N=a[I];return N===void 0&&(N=new jr({depthPacking:Id,morphTargets:v,skinning:A}),a[I]=N),N}function w(v,A,L){let I=v<<0|A<<1|L<<2,N=c[I];return N===void 0&&(N=new $r({morphTargets:v,skinning:A}),c[I]=N),N}function b(v,A,L,I,N,U,z){let R=null,D=p,F=v.customDepthMaterial;if(I.isPointLight===!0&&(D=w,F=v.customDistanceMaterial),F===void 0){let P=!1;L.morphTargets===!0&&(P=A.morphAttributes&&A.morphAttributes.position&&A.morphAttributes.position.length>0);let X=!1;v.isSkinnedMesh===!0&&(L.skinning===!0?X=!0:console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",v));let $=v.isInstancedMesh===!0;R=D(P,X,$)}else R=F;if(s.localClippingEnabled&&L.clipShadows===!0&&L.clippingPlanes.length!==0){let P=R.uuid,X=L.uuid,$=l[P];$===void 0&&($={},l[P]=$);let Z=$[X];Z===void 0&&(Z=R.clone(),$[X]=Z),R=Z}return R.visible=L.visible,R.wireframe=L.wireframe,z===Mi?R.side=L.shadowSide!==null?L.shadowSide:L.side:R.side=L.shadowSide!==null?L.shadowSide:u[L.side],R.clipShadows=L.clipShadows,R.clippingPlanes=L.clippingPlanes,R.clipIntersection=L.clipIntersection,R.wireframeLinewidth=L.wireframeLinewidth,R.linewidth=L.linewidth,I.isPointLight===!0&&R.isMeshDistanceMaterial===!0&&(R.referencePosition.setFromMatrixPosition(I.matrixWorld),R.nearDistance=N,R.farDistance=U),R}function T(v,A,L,I,N){if(v.visible===!1)return;if(v.layers.test(A.layers)&&(v.isMesh||v.isLine||v.isPoints)&&(v.castShadow||v.receiveShadow&&N===Mi)&&(!v.frustumCulled||n.intersectsObject(v))){v.modelViewMatrix.multiplyMatrices(L.matrixWorldInverse,v.matrixWorld);let R=e.update(v),D=v.material;if(Array.isArray(D)){let F=R.groups;for(let P=0,X=F.length;P=1):F.indexOf("OpenGL ES")!==-1&&(D=parseFloat(/^OpenGL ES (\d)/.exec(F)[1]),R=D>=2);let P=null,X={},$=new Fe(0,0,s.canvas.width,s.canvas.height),Z=new Fe(0,0,s.canvas.width,s.canvas.height);function oe(C,J,Q){let de=new Uint8Array(4),q=s.createTexture();s.bindTexture(C,q),s.texParameteri(C,10241,9728),s.texParameteri(C,10240,9728);for(let me=0;meV||E.height>V)&&(ie=V/Math.max(E.width,E.height)),ie<1||S===!0)if(typeof HTMLImageElement!="undefined"&&E instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&E instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&E instanceof ImageBitmap){let ce=S?Tl:Math.floor,Ie=ce(ie*E.width),ge=ce(ie*E.height);f===void 0&&(f=x(Ie,ge));let C=k?x(Ie,ge):f;return C.width=Ie,C.height=ge,C.getContext("2d").drawImage(E,0,0,Ie,ge),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+E.width+"x"+E.height+") to ("+Ie+"x"+ge+")."),C}else return"data"in E&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+E.width+"x"+E.height+")."),E;return E}function g(E){return Ks(E.width)&&Ks(E.height)}function p(E){return a?!1:E.wrapS!==xt||E.wrapT!==xt||E.minFilter!==nt&&E.minFilter!==it}function w(E,S){return E.generateMipmaps&&S&&E.minFilter!==nt&&E.minFilter!==it}function b(E,S,k,V){s.generateMipmap(E);let ie=n.get(S);ie.__maxMipLevel=Math.log2(Math.max(k,V))}function T(E,S,k){if(a===!1)return S;if(E!==null){if(s[E]!==void 0)return s[E];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+E+"'")}let V=S;return S===6403&&(k===5126&&(V=33326),k===5131&&(V=33325),k===5121&&(V=33321)),S===6407&&(k===5126&&(V=34837),k===5131&&(V=34843),k===5121&&(V=32849)),S===6408&&(k===5126&&(V=34836),k===5131&&(V=34842),k===5121&&(V=32856)),(V===33325||V===33326||V===34842||V===34836)&&e.get("EXT_color_buffer_float"),V}function v(E){return E===nt||E===qs||E===Xs?9728:9729}function A(E){let S=E.target;S.removeEventListener("dispose",A),I(S),S.isVideoTexture&&d.delete(S),o.memory.textures--}function L(E){let S=E.target;S.removeEventListener("dispose",L),N(S),o.memory.textures--}function I(E){let S=n.get(E);S.__webglInit!==void 0&&(s.deleteTexture(S.__webglTexture),n.remove(E))}function N(E){let S=E.texture,k=n.get(E),V=n.get(S);if(!!E){if(V.__webglTexture!==void 0&&s.deleteTexture(V.__webglTexture),E.depthTexture&&E.depthTexture.dispose(),E.isWebGLCubeRenderTarget)for(let ie=0;ie<6;ie++)s.deleteFramebuffer(k.__webglFramebuffer[ie]),k.__webglDepthbuffer&&s.deleteRenderbuffer(k.__webglDepthbuffer[ie]);else s.deleteFramebuffer(k.__webglFramebuffer),k.__webglDepthbuffer&&s.deleteRenderbuffer(k.__webglDepthbuffer),k.__webglMultisampledFramebuffer&&s.deleteFramebuffer(k.__webglMultisampledFramebuffer),k.__webglColorRenderbuffer&&s.deleteRenderbuffer(k.__webglColorRenderbuffer),k.__webglDepthRenderbuffer&&s.deleteRenderbuffer(k.__webglDepthRenderbuffer);n.remove(S),n.remove(E)}}let U=0;function z(){U=0}function R(){let E=U;return E>=c&&console.warn("THREE.WebGLTextures: Trying to use "+E+" texture units while this GPU supports only "+c),U+=1,E}function D(E,S){let k=n.get(E);if(E.isVideoTexture&&Y(E),E.version>0&&k.__version!==E.version){let V=E.image;if(V===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(V.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{fe(k,E,S);return}}t.activeTexture(33984+S),t.bindTexture(3553,k.__webglTexture)}function F(E,S){let k=n.get(E);if(E.version>0&&k.__version!==E.version){fe(k,E,S);return}t.activeTexture(33984+S),t.bindTexture(35866,k.__webglTexture)}function P(E,S){let k=n.get(E);if(E.version>0&&k.__version!==E.version){fe(k,E,S);return}t.activeTexture(33984+S),t.bindTexture(32879,k.__webglTexture)}function X(E,S){let k=n.get(E);if(E.version>0&&k.__version!==E.version){ve(k,E,S);return}t.activeTexture(33984+S),t.bindTexture(34067,k.__webglTexture)}let $={[yr]:10497,[xt]:33071,[vr]:33648},Z={[nt]:9728,[qs]:9984,[Xs]:9986,[it]:9729,[ll]:9985,[Ai]:9987};function oe(E,S,k){if(k?(s.texParameteri(E,10242,$[S.wrapS]),s.texParameteri(E,10243,$[S.wrapT]),(E===32879||E===35866)&&s.texParameteri(E,32882,$[S.wrapR]),s.texParameteri(E,10240,Z[S.magFilter]),s.texParameteri(E,10241,Z[S.minFilter])):(s.texParameteri(E,10242,33071),s.texParameteri(E,10243,33071),(E===32879||E===35866)&&s.texParameteri(E,32882,33071),(S.wrapS!==xt||S.wrapT!==xt)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),s.texParameteri(E,10240,v(S.magFilter)),s.texParameteri(E,10241,v(S.minFilter)),S.minFilter!==nt&&S.minFilter!==it&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),e.has("EXT_texture_filter_anisotropic")===!0){let V=e.get("EXT_texture_filter_anisotropic");if(S.type===tn&&e.has("OES_texture_float_linear")===!1||a===!1&&S.type===br&&e.has("OES_texture_half_float_linear")===!1)return;(S.anisotropy>1||n.get(S).__currentAnisotropy)&&(s.texParameterf(E,V.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(S.anisotropy,i.getMaxAnisotropy())),n.get(S).__currentAnisotropy=S.anisotropy)}}function re(E,S){E.__webglInit===void 0&&(E.__webglInit=!0,S.addEventListener("dispose",A),E.__webglTexture=s.createTexture(),o.memory.textures++)}function fe(E,S,k){let V=3553;S.isDataTexture2DArray&&(V=35866),S.isDataTexture3D&&(V=32879),re(E,S),t.activeTexture(33984+k),t.bindTexture(V,E.__webglTexture),s.pixelStorei(37440,S.flipY),s.pixelStorei(37441,S.premultiplyAlpha),s.pixelStorei(3317,S.unpackAlignment),s.pixelStorei(37443,0);let ie=p(S)&&g(S.image)===!1,ce=y(S.image,ie,!1,h),Ie=g(ce)||a,ge=r.convert(S.format),C=r.convert(S.type),J=T(S.internalFormat,ge,C);oe(V,S,Ie);let Q,de=S.mipmaps;if(S.isDepthTexture)J=6402,a?S.type===tn?J=36012:S.type===wr?J=33190:S.type===Ri?J=35056:J=33189:S.type===tn&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),S.format===Vn&&J===6402&&S.type!==_r&&S.type!==wr&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),S.type=_r,C=r.convert(S.type)),S.format===Ci&&J===6402&&(J=34041,S.type!==Ri&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),S.type=Ri,C=r.convert(S.type))),t.texImage2D(3553,0,J,ce.width,ce.height,0,ge,C,null);else if(S.isDataTexture)if(de.length>0&&Ie){for(let q=0,me=de.length;q0&&Ie){for(let q=0,me=de.length;qf+m?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&d<=f-m&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else c!==null&&e.gripSpace&&(r=t.getPose(e.gripSpace,n),r!==null&&(c.matrix.fromArray(r.transform.matrix),c.matrix.decompose(c.position,c.rotation,c.scale),r.linearVelocity?(c.hasLinearVelocity=!0,c.linearVelocity.copy(r.linearVelocity)):c.hasLinearVelocity=!1,r.angularVelocity?(c.hasAngularVelocity=!0,c.angularVelocity.copy(r.angularVelocity)):c.hasAngularVelocity=!1));return a!==null&&(a.visible=i!==null),c!==null&&(c.visible=r!==null),l!==null&&(l.visible=o!==null),this}},gc=class extends nn{constructor(e,t){super();let n=this,i=e.state,r=null,o=1,a=null,c="local-floor",l=null,h=[],u=new Map,d=new ot;d.layers.enable(1),d.viewport=new Fe;let f=new ot;f.layers.enable(2),f.viewport=new Fe;let m=[d,f],x=new Ro;x.layers.enable(1),x.layers.enable(2);let y=null,g=null;this.enabled=!1,this.isPresenting=!1,this.getController=function(z){let R=h[z];return R===void 0&&(R=new Qr,h[z]=R),R.getTargetRaySpace()},this.getControllerGrip=function(z){let R=h[z];return R===void 0&&(R=new Qr,h[z]=R),R.getGripSpace()},this.getHand=function(z){let R=h[z];return R===void 0&&(R=new Qr,h[z]=R),R.getHandSpace()};function p(z){let R=u.get(z.inputSource);R&&R.dispatchEvent({type:z.type,data:z.inputSource})}function w(){u.forEach(function(z,R){z.disconnect(R)}),u.clear(),y=null,g=null,i.bindXRFramebuffer(null),e.setRenderTarget(e.getRenderTarget()),U.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(z){o=z,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(z){c=z,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return a},this.getSession=function(){return r},this.setSession=async function(z){if(r=z,r!==null){r.addEventListener("select",p),r.addEventListener("selectstart",p),r.addEventListener("selectend",p),r.addEventListener("squeeze",p),r.addEventListener("squeezestart",p),r.addEventListener("squeezeend",p),r.addEventListener("end",w),r.addEventListener("inputsourceschange",b);let R=t.getContextAttributes();R.xrCompatible!==!0&&await t.makeXRCompatible();let D={antialias:R.antialias,alpha:R.alpha,depth:R.depth,stencil:R.stencil,framebufferScaleFactor:o},F=new XRWebGLLayer(r,t,D);r.updateRenderState({baseLayer:F}),a=await r.requestReferenceSpace(c),U.setContext(r),U.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}};function b(z){let R=r.inputSources;for(let D=0;D0&&Ya(Re,M,O),xe.length>0&&Ya(xe,M,O),w!==null&&(Ae.updateRenderTargetMipmap(w),Ae.updateMultisampleRenderTarget(w)),M.isScene===!0&&M.onAfterRender(x,M,O),pe.buffers.depth.setTest(!0),pe.buffers.depth.setMask(!0),pe.buffers.color.setMask(!0),pe.setPolygonOffset(!1),Q.resetDefaultState(),b=-1,T=null,m.pop(),m.length>0?d=m[m.length-1]:d=null,f.pop(),f.length>0?u=f[f.length-1]:u=null};function Xa(M,O,B,H){if(M.visible===!1)return;if(M.layers.test(O.layers)){if(M.isGroup)B=M.renderOrder;else if(M.isLOD)M.autoUpdate===!0&&M.update(O);else if(M.isLight)d.pushLight(M),M.castShadow&&d.pushShadow(M);else if(M.isSprite){if(!M.frustumCulled||X.intersectsSprite(M)){H&&re.setFromMatrixPosition(M.matrixWorld).applyMatrix4(oe);let xe=he.update(M),be=M.material;be.visible&&u.push(M,xe,be,B,re.z,null)}}else if(M.isImmediateRenderObject)H&&re.setFromMatrixPosition(M.matrixWorld).applyMatrix4(oe),u.push(M,null,M.material,B,re.z,null);else if((M.isMesh||M.isLine||M.isPoints)&&(M.isSkinnedMesh&&M.skeleton.frame!==Pe.render.frame&&(M.skeleton.update(),M.skeleton.frame=Pe.render.frame),!M.frustumCulled||X.intersectsObject(M))){H&&re.setFromMatrixPosition(M.matrixWorld).applyMatrix4(oe);let xe=he.update(M),be=M.material;if(Array.isArray(be)){let Oe=xe.groups;for(let we=0,De=Oe.length;we=0&&O<=M.width-H&&B>=0&&B<=M.height-te&&G.readPixels(O,B,H,te,J.convert(we),J.convert(De),Re):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{let Oe=w!==null?Me.get(w).__webglFramebuffer:null;pe.bindFramebuffer(36160,Oe)}}},this.copyFramebufferToTexture=function(M,O,B=0){let H=Math.pow(2,-B),te=Math.floor(O.image.width*H),Re=Math.floor(O.image.height*H),xe=J.convert(O.format);Ae.setTexture2D(O,0),G.copyTexImage2D(3553,B,xe,M.x,M.y,te,Re,0),pe.unbindTexture()},this.copyTextureToTexture=function(M,O,B,H=0){let te=O.image.width,Re=O.image.height,xe=J.convert(B.format),be=J.convert(B.type);Ae.setTexture2D(B,0),G.pixelStorei(37440,B.flipY),G.pixelStorei(37441,B.premultiplyAlpha),G.pixelStorei(3317,B.unpackAlignment),O.isDataTexture?G.texSubImage2D(3553,H,M.x,M.y,te,Re,xe,be,O.image.data):O.isCompressedTexture?G.compressedTexSubImage2D(3553,H,M.x,M.y,O.mipmaps[0].width,O.mipmaps[0].height,xe,O.mipmaps[0].data):G.texSubImage2D(3553,H,M.x,M.y,xe,be,O.image),H===0&&B.generateMipmaps&&G.generateMipmap(3553),pe.unbindTexture()},this.copyTextureToTexture3D=function(M,O,B,H,te=0){if(x.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}let{width:Re,height:xe,data:be}=B.image,Oe=J.convert(H.format),we=J.convert(H.type),De;if(H.isDataTexture3D)Ae.setTexture3D(H,0),De=32879;else if(H.isDataTexture2DArray)Ae.setTexture2DArray(H,0),De=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}G.pixelStorei(37440,H.flipY),G.pixelStorei(37441,H.premultiplyAlpha),G.pixelStorei(3317,H.unpackAlignment);let ye=G.getParameter(3314),Be=G.getParameter(32878),Ft=G.getParameter(3316),ft=G.getParameter(3315),bn=G.getParameter(32877);G.pixelStorei(3314,Re),G.pixelStorei(32878,xe),G.pixelStorei(3316,M.min.x),G.pixelStorei(3315,M.min.y),G.pixelStorei(32877,M.min.z),G.texSubImage3D(De,te,O.x,O.y,O.z,M.max.x-M.min.x+1,M.max.y-M.min.y+1,M.max.z-M.min.z+1,Oe,we,be),G.pixelStorei(3314,ye),G.pixelStorei(32878,Be),G.pixelStorei(3316,Ft),G.pixelStorei(3315,ft),G.pixelStorei(32877,bn),te===0&&H.generateMipmaps&&G.generateMipmap(De),pe.unbindTexture()},this.initTexture=function(M){Ae.setTexture2D(M,0),pe.unbindTexture()},this.resetState=function(){g=0,p=0,w=null,pe.reset(),Q.reset()},typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}var xc=class extends Ue{};xc.prototype.isWebGL1Renderer=!0;var Wi=class{constructor(e,t=25e-5){this.name="",this.color=new se(e),this.density=t}clone(){return new Wi(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}};Wi.prototype.isFogExp2=!0;var qi=class{constructor(e,t=1,n=1e3){this.name="",this.color=new se(e),this.near=t,this.far=n}clone(){return new qi(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}};qi.prototype.isFog=!0;var Kr=class extends Se{constructor(){super();this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){let t=super.toJSON(e);return this.background!==null&&(t.object.background=this.background.toJSON(e)),this.environment!==null&&(t.object.environment=this.environment.toJSON(e)),this.fog!==null&&(t.object.fog=this.fog.toJSON()),t}};Kr.prototype.isScene=!0;var $t=class{constructor(e,t){this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Pi,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=wt(),this.onUploadCallback=function(){}}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let i=0,r=this.stride;ie.far||t.push({distance:c,point:Xi.clone(),uv:qe.getUV(Xi,ts,Zi,ns,vc,Co,_c,new W),face:null,object:this})}copy(e){return super.copy(e),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}};is.prototype.isSprite=!0;function rs(s,e,t,n,i,r){pi.subVectors(s,t).addScalar(.5).multiply(n),i!==void 0?(Yi.x=r*pi.x-i*pi.y,Yi.y=i*pi.x+r*pi.y):Yi.copy(pi),s.copy(e),s.x+=Yi.x,s.y+=Yi.y,s.applyMatrix4(yc)}var ss=new _,wc=new _,bc=class extends Se{constructor(){super();this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);let t=e.levels;for(let n=0,i=t.length;n0){let n,i;for(n=1,i=t.length;n0){ss.setFromMatrixPosition(this.matrixWorld);let i=e.ray.origin.distanceTo(ss);this.getObjectForDistance(i).raycast(e,t)}}update(e){let t=this.levels;if(t.length>1){ss.setFromMatrixPosition(e.matrixWorld),wc.setFromMatrixPosition(this.matrixWorld);let n=ss.distanceTo(wc)/e.zoom;t[0].object.visible=!0;let i,r;for(i=1,r=t.length;i=t[i].distance;i++)t[i-1].object.visible=!1,t[i].object.visible=!0;for(this._currentLevel=i-1;ic)continue;d.applyMatrix4(this.matrixWorld);let L=e.ray.origin.distanceTo(d);Le.far||t.push({distance:L,point:u.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}else{let g=Math.max(0,o.start),p=Math.min(y.count,o.start+o.count);for(let w=g,b=p-1;wc)continue;d.applyMatrix4(this.matrixWorld);let v=e.ray.origin.distanceTo(d);ve.far||t.push({distance:v,point:u.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){let e=this.geometry;if(e.isBufferGeometry){let t=e.morphAttributes,n=Object.keys(t);if(n.length>0){let i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;r0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}};Qt.prototype.isLine=!0;var Dc=new _,Fc=new _,_t=class extends Qt{constructor(e,t){super(e,t);this.type="LineSegments"}computeLineDistances(){let e=this.geometry;if(e.isBufferGeometry)if(e.index===null){let t=e.attributes.position,n=[];for(let i=0,r=t.count;i0){let i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=i.length;r0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}};ji.prototype.isPoints=!0;function Bc(s,e,t,n,i,r,o){let a=Fo.distanceSqToPoint(s);if(ai.far)return;r.push({distance:l,distanceToRay:Math.sqrt(a),point:c,index:e,face:null,object:o})}}var zc=class extends et{constructor(e,t,n,i,r,o,a,c,l){super(e,t,n,i,r,o,a,c,l);this.format=a!==void 0?a:Sn,this.minFilter=o!==void 0?o:it,this.magFilter=r!==void 0?r:it,this.generateMipmaps=!1;let h=this;function u(){h.needsUpdate=!0,e.requestVideoFrameCallback(u)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(u)}clone(){return new this.constructor(this.image).copy(this)}update(){let e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}};zc.prototype.isVideoTexture=!0;var No=class extends et{constructor(e,t,n,i,r,o,a,c,l,h,u,d){super(null,o,a,c,l,h,i,r,u,d);this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}};No.prototype.isCompressedTexture=!0;var Oc=class extends et{constructor(e,t,n,i,r,o,a,c,l){super(e,t,n,i,r,o,a,c,l);this.needsUpdate=!0}};Oc.prototype.isCanvasTexture=!0;var Uc=class extends et{constructor(e,t,n,i,r,o,a,c,l,h){if(h=h!==void 0?h:Vn,h!==Vn&&h!==Ci)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");n===void 0&&h===Vn&&(n=_r),n===void 0&&h===Ci&&(n=Ri),super(null,i,r,o,a,c,h,n,l),this.image={width:e,height:t},this.magFilter=a!==void 0?a:nt,this.minFilter=c!==void 0?c:nt,this.flipY=!1,this.generateMipmaps=!1}};Uc.prototype.isDepthTexture=!0;var Bo=class extends ue{constructor(e=1,t=8,n=0,i=Math.PI*2){super();this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:i},t=Math.max(3,t);let r=[],o=[],a=[],c=[],l=new _,h=new W;o.push(0,0,0),a.push(0,0,1),c.push(.5,.5);for(let u=0,d=3;u<=t;u++,d+=3){let f=n+u/t*i;l.x=e*Math.cos(f),l.y=e*Math.sin(f),o.push(l.x,l.y,l.z),a.push(0,0,1),h.x=(o[d]/e+1)/2,h.y=(o[d+1]/e+1)/2,c.push(h.x,h.y)}for(let u=1;u<=t;u++)r.push(u,u+1,0);this.setIndex(r),this.setAttribute("position",new ae(o,3)),this.setAttribute("normal",new ae(a,3)),this.setAttribute("uv",new ae(c,2))}},$i=class extends ue{constructor(e=1,t=1,n=1,i=8,r=1,o=!1,a=0,c=Math.PI*2){super();this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:i,heightSegments:r,openEnded:o,thetaStart:a,thetaLength:c};let l=this;i=Math.floor(i),r=Math.floor(r);let h=[],u=[],d=[],f=[],m=0,x=[],y=n/2,g=0;p(),o===!1&&(e>0&&w(!0),t>0&&w(!1)),this.setIndex(h),this.setAttribute("position",new ae(u,3)),this.setAttribute("normal",new ae(d,3)),this.setAttribute("uv",new ae(f,2));function p(){let b=new _,T=new _,v=0,A=(t-e)/n;for(let L=0;L<=r;L++){let I=[],N=L/r,U=N*(t-e)+e;for(let z=0;z<=i;z++){let R=z/i,D=R*c+a,F=Math.sin(D),P=Math.cos(D);T.x=U*F,T.y=-N*n+y,T.z=U*P,u.push(T.x,T.y,T.z),b.set(F,A,P).normalize(),d.push(b.x,b.y,b.z),f.push(R,1-N),I.push(m++)}x.push(I)}for(let L=0;L.9&&A<.1&&(w<.2&&(o[p+0]+=1),b<.2&&(o[p+2]+=1),T<.2&&(o[p+4]+=1))}}function d(p){r.push(p.x,p.y,p.z)}function f(p,w){let b=p*3;w.x=e[b+0],w.y=e[b+1],w.z=e[b+2]}function m(){let p=new _,w=new _,b=new _,T=new _,v=new W,A=new W,L=new W;for(let I=0,N=0;I80*t){a=l=s[0],c=h=s[1];for(let m=t;ml&&(l=u),d>h&&(h=d);f=Math.max(l-a,h-c),f=f!==0?1/f:0}return Qi(r,o,t,a,c,f),o}};function Hc(s,e,t,n,i){let r,o;if(i===bx(s,e,t,n)>0)for(r=e;r=e;r-=n)o=Gc(r,s[r],s[r+1],o);return o&&gs(o,o.next)&&(Ki(o),o=o.next),o}function mn(s,e){if(!s)return s;e||(e=s);let t=s,n;do if(n=!1,!t.steiner&&(gs(t,t.next)||ke(t.prev,t,t.next)===0)){if(Ki(t),t=e=t.prev,t===t.next)break;n=!0}else t=t.next;while(n||t!==e);return e}function Qi(s,e,t,n,i,r,o){if(!s)return;!o&&r&&Ax(s,n,i,r);let a=s,c,l;for(;s.prev!==s.next;){if(c=s.prev,l=s.next,r?Sx(s,n,i,r):Mx(s)){e.push(c.i/t),e.push(s.i/t),e.push(l.i/t),Ki(s),s=l.next,a=l.next;continue}if(s=l,s===a){o?o===1?(s=Tx(mn(s),e,t),Qi(s,e,t,n,i,r,2)):o===2&&Ex(s,e,t,n,i,r):Qi(mn(s),e,t,n,i,r,1);break}}}function Mx(s){let e=s.prev,t=s,n=s.next;if(ke(e,t,n)>=0)return!1;let i=s.next.next;for(;i!==s.prev;){if(mi(e.x,e.y,t.x,t.y,n.x,n.y,i.x,i.y)&&ke(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Sx(s,e,t,n){let i=s.prev,r=s,o=s.next;if(ke(i,r,o)>=0)return!1;let a=i.xr.x?i.x>o.x?i.x:o.x:r.x>o.x?r.x:o.x,h=i.y>r.y?i.y>o.y?i.y:o.y:r.y>o.y?r.y:o.y,u=Go(a,c,e,t,n),d=Go(l,h,e,t,n),f=s.prevZ,m=s.nextZ;for(;f&&f.z>=u&&m&&m.z<=d;){if(f!==s.prev&&f!==s.next&&mi(i.x,i.y,r.x,r.y,o.x,o.y,f.x,f.y)&&ke(f.prev,f,f.next)>=0||(f=f.prevZ,m!==s.prev&&m!==s.next&&mi(i.x,i.y,r.x,r.y,o.x,o.y,m.x,m.y)&&ke(m.prev,m,m.next)>=0))return!1;m=m.nextZ}for(;f&&f.z>=u;){if(f!==s.prev&&f!==s.next&&mi(i.x,i.y,r.x,r.y,o.x,o.y,f.x,f.y)&&ke(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;m&&m.z<=d;){if(m!==s.prev&&m!==s.next&&mi(i.x,i.y,r.x,r.y,o.x,o.y,m.x,m.y)&&ke(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function Tx(s,e,t){let n=s;do{let i=n.prev,r=n.next.next;!gs(i,r)&&kc(i,n,n.next,r)&&er(i,r)&&er(r,i)&&(e.push(i.i/t),e.push(n.i/t),e.push(r.i/t),Ki(n),Ki(n.next),n=s=r),n=n.next}while(n!==s);return mn(n)}function Ex(s,e,t,n,i,r){let o=s;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&Lx(o,a)){let c=Vc(o,a);o=mn(o,o.next),c=mn(c,c.next),Qi(o,e,t,n,i,r),Qi(c,e,t,n,i,r);return}a=a.next}o=o.next}while(o!==s)}function _x(s,e,t,n){let i=[],r,o,a,c,l;for(r=0,o=e.length;r=t.next.y&&t.next.y!==t.y){let d=t.x+(i-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(d<=n&&d>r){if(r=d,d===n){if(i===t.y)return t;if(i===t.next.y)return t.next}o=t.x=t.x&&t.x>=c&&n!==t.x&&mi(io.x||t.x===o.x&&Dx(o,t)))&&(o=t,h=u)),t=t.next;while(t!==a);return o}function Dx(s,e){return ke(s.prev,s,e.prev)<0&&ke(e.next,s,s.next)<0}function Ax(s,e,t,n){let i=s;do i.z===null&&(i.z=Go(i.x,i.y,e,t,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==s);i.prevZ.nextZ=null,i.prevZ=null,Fx(i)}function Fx(s){let e,t,n,i,r,o,a,c,l=1;do{for(t=s,s=null,r=null,o=0;t;){for(o++,n=t,a=0,e=0;e0||c>0&&n;)a!==0&&(c===0||!n||t.z<=n.z)?(i=t,t=t.nextZ,a--):(i=n,n=n.nextZ,c--),r?r.nextZ=i:s=i,i.prevZ=r,r=i;t=n}r.nextZ=null,l*=2}while(o>1);return s}function Go(s,e,t,n,i){return s=32767*(s-t)*i,e=32767*(e-n)*i,s=(s|s<<8)&16711935,s=(s|s<<4)&252645135,s=(s|s<<2)&858993459,s=(s|s<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,s|e<<1}function Px(s){let e=s,t=s;do(e.x=0&&(s-o)*(n-a)-(t-o)*(e-a)>=0&&(t-o)*(r-a)-(i-o)*(n-a)>=0}function Lx(s,e){return s.next.i!==e.i&&s.prev.i!==e.i&&!Nx(s,e)&&(er(s,e)&&er(e,s)&&Bx(s,e)&&(ke(s.prev,s,e.prev)||ke(s,e.prev,e))||gs(s,e)&&ke(s.prev,s,s.next)>0&&ke(e.prev,e,e.next)>0)}function ke(s,e,t){return(e.y-s.y)*(t.x-e.x)-(e.x-s.x)*(t.y-e.y)}function gs(s,e){return s.x===e.x&&s.y===e.y}function kc(s,e,t,n){let i=ys(ke(s,e,t)),r=ys(ke(s,e,n)),o=ys(ke(t,n,s)),a=ys(ke(t,n,e));return!!(i!==r&&o!==a||i===0&&xs(s,t,e)||r===0&&xs(s,n,e)||o===0&&xs(t,s,n)||a===0&&xs(t,e,n))}function xs(s,e,t){return e.x<=Math.max(s.x,t.x)&&e.x>=Math.min(s.x,t.x)&&e.y<=Math.max(s.y,t.y)&&e.y>=Math.min(s.y,t.y)}function ys(s){return s>0?1:s<0?-1:0}function Nx(s,e){let t=s;do{if(t.i!==s.i&&t.next.i!==s.i&&t.i!==e.i&&t.next.i!==e.i&&kc(t,t.next,s,e))return!0;t=t.next}while(t!==s);return!1}function er(s,e){return ke(s.prev,s,s.next)<0?ke(s,e,s.next)>=0&&ke(s,s.prev,e)>=0:ke(s,e,s.prev)<0||ke(s,s.next,e)<0}function Bx(s,e){let t=s,n=!1,i=(s.x+e.x)/2,r=(s.y+e.y)/2;do t.y>r!=t.next.y>r&&t.next.y!==t.y&&i<(t.next.x-t.x)*(r-t.y)/(t.next.y-t.y)+t.x&&(n=!n),t=t.next;while(t!==s);return n}function Vc(s,e){let t=new ko(s.i,s.x,s.y),n=new ko(e.i,e.x,e.y),i=s.next,r=e.prev;return s.next=e,e.prev=s,t.next=i,i.prev=t,n.next=t,t.prev=n,r.next=n,n.prev=r,n}function Gc(s,e,t,n){let i=new ko(s,e,t);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Ki(s){s.next.prev=s.prev,s.prev.next=s.next,s.prevZ&&(s.prevZ.nextZ=s.nextZ),s.nextZ&&(s.nextZ.prevZ=s.prevZ)}function ko(s,e,t){this.i=s,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function bx(s,e,t,n){let i=0;for(let r=e,o=t-n;r2&&s[e-1].equals(s[0])&&s.pop()}function qc(s,e){for(let t=0;tNumber.EPSILON){let ge=Math.sqrt(ce),C=Math.sqrt(V*V+ie*ie),J=j.x-k/ge,Q=j.y+S/ge,de=ee.x-ie/C,q=ee.y+V/C,me=((de-J)*ie-(q-Q)*V)/(S*ie-k*V);he=J+S*me-Y.x,ne=Q+k*me-Y.y;let Ne=he*he+ne*ne;if(Ne<=2)return new W(he,ne);E=Math.sqrt(Ne/2)}else{let ge=!1;S>Number.EPSILON?V>Number.EPSILON&&(ge=!0):S<-Number.EPSILON?V<-Number.EPSILON&&(ge=!0):Math.sign(k)===Math.sign(ie)&&(ge=!0),ge?(he=-k,ne=S,E=Math.sqrt(ce)):(he=S,ne=k,E=Math.sqrt(ce/2))}return new W(he/E,ne/E)}let Z=[];for(let Y=0,j=D.length,ee=j-1,he=Y+1;Y=0;Y--){let j=Y/y,ee=f*Math.cos(j*Math.PI/2),he=m*Math.sin(j*Math.PI/2)+x;for(let ne=0,E=D.length;ne=0;){let he=ee,ne=ee-1;ne<0&&(ne=Y.length-1);for(let E=0,S=h+y*2;E=0?(e(p-c,y,u),d.subVectors(h,u)):(e(p+c,y,u),d.subVectors(u,h)),y-c>=0?(e(p,y-c,u),f.subVectors(h,u)):(e(p,y+c,u),f.subVectors(u,h)),l.crossVectors(d,f).normalize(),o.push(l.x,l.y,l.z),a.push(p,y)}}for(let x=0;x0)&&f.push(w,b,v),(g!==n-1||c=n)){u.push(l.times[f]);for(let x=0;xr.tracks[c].times[0]&&(a=r.tracks[c].times[0]);for(let c=0;c=a.times[m]){let g=m*u+h,p=g+u-h;x=Ge.arraySlice(a.values,g,p)}else{let g=a.createInterpolant(),p=h,w=u-h;g.evaluate(r),x=Ge.arraySlice(g.resultBuffer,p,w)}c==="quaternion"&&new rt().fromArray(x).normalize().conjugate().toArray(x);let y=l.times.length;for(let g=0;g=r)){let a=t[1];e=r)break t}o=n,n=0;break n}break e}for(;n>>1;et;)--o;if(++o,r!==0||o!==i){r>=o&&(o=Math.max(o,1),r=o-1);let a=this.getValueSize();this.times=Ge.arraySlice(n,r,o),this.values=Ge.arraySlice(this.values,r*a,o*a)}return this}validate(){let e=!0,t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);let n=this.times,i=this.values,r=n.length;r===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==r;a++){let c=n[a];if(typeof c=="number"&&isNaN(c)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,c),e=!1;break}if(o!==null&&o>c){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,c,o),e=!1;break}o=c}if(i!==void 0&&Ge.isTypedArray(i))for(let a=0,c=i.length;a!==c;++a){let l=i[a];if(isNaN(l)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,l),e=!1;break}}return e}optimize(){let e=Ge.arraySlice(this.times),t=Ge.arraySlice(this.values),n=this.getValueSize(),i=this.getInterpolation()===Ys,r=e.length-1,o=1;for(let a=1;a0){e[o]=e[r];for(let a=r*n,c=o*n,l=0;l!==n;++l)t[c+l]=t[a+l];++o}return o!==e.length?(this.times=Ge.arraySlice(e,0,o),this.values=Ge.arraySlice(t,0,o*n)):(this.times=e,this.values=t),this}clone(){let e=Ge.arraySlice(this.times,0),t=Ge.arraySlice(this.values,0),n=this.constructor,i=new n(this.name,e,t);return i.createInterpolant=this.createInterpolant,i}};Pt.prototype.TimeBufferType=Float32Array;Pt.prototype.ValueBufferType=Float32Array;Pt.prototype.DefaultInterpolation=Sr;var Dn=class extends Pt{};Dn.prototype.ValueTypeName="bool";Dn.prototype.ValueBufferType=Array;Dn.prototype.DefaultInterpolation=Mr;Dn.prototype.InterpolantFactoryMethodLinear=void 0;Dn.prototype.InterpolantFactoryMethodSmooth=void 0;var la=class extends Pt{};la.prototype.ValueTypeName="color";var tr=class extends Pt{};tr.prototype.ValueTypeName="number";var Zc=class extends Kt{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){let r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,c=(n-t)/(i-t),l=e*a;for(let h=l+a;l!==h;l+=4)rt.slerpFlat(r,0,o,l-a,o,l,c);return r}},xi=class extends Pt{InterpolantFactoryMethodLinear(e){return new Zc(this.times,this.values,this.getValueSize(),e)}};xi.prototype.ValueTypeName="quaternion";xi.prototype.DefaultInterpolation=Sr;xi.prototype.InterpolantFactoryMethodSmooth=void 0;var Fn=class extends Pt{};Fn.prototype.ValueTypeName="string";Fn.prototype.ValueBufferType=Array;Fn.prototype.DefaultInterpolation=Mr;Fn.prototype.InterpolantFactoryMethodLinear=void 0;Fn.prototype.InterpolantFactoryMethodSmooth=void 0;var nr=class extends Pt{};nr.prototype.ValueTypeName="vector";var ir=class{constructor(e,t=-1,n,i=Zs){this.name=e,this.tracks=n,this.duration=t,this.blendMode=i,this.uuid=wt(),this.duration<0&&this.resetDuration()}static parse(e){let t=[],n=e.tracks,i=1/(e.fps||1);for(let o=0,a=n.length;o!==a;++o)t.push(Gx(n[o]).scale(i));let r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){let t=[],n=e.tracks,i={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let r=0,o=n.length;r!==o;++r)t.push(Pt.toJSON(n[r]));return i}static CreateFromMorphTargetSequence(e,t,n,i){let r=t.length,o=[];for(let a=0;a1){let u=h[1],d=i[u];d||(i[u]=d=[]),d.push(l)}}let o=[];for(let a in i)o.push(this.CreateFromMorphTargetSequence(a,i[a],t,n));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;let n=function(u,d,f,m,x){if(f.length!==0){let y=[],g=[];Ge.flattenJSON(f,y,g,m),y.length!==0&&x.push(new u(d,y,g))}},i=[],r=e.name||"default",o=e.fps||30,a=e.blendMode,c=e.length||-1,l=e.hierarchy||[];for(let u=0;u0||e.search(/^data\:image\/jpeg/)===0;r.format=c?Sn:Tt,r.needsUpdate=!0,t!==void 0&&t(r)},n,i),r}},St=class{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){let n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){let t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){let t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){let e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;let t=[],n,i=this.getPoint(0),r=0;t.push(0);for(let o=1;o<=e;o++)n=this.getPoint(o/e),r+=n.distanceTo(i),t.push(r),i=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){let n=this.getLengths(),i=0,r=n.length,o;t?o=t:o=e*n[r-1];let a=0,c=r-1,l;for(;a<=c;)if(i=Math.floor(a+(c-a)/2),l=n[i]-o,l<0)a=i+1;else if(l>0)c=i-1;else{c=i;break}if(i=c,n[i]===o)return i/(r-1);let h=n[i],d=n[i+1]-h,f=(o-h)/d;return(i+f)/(r-1)}getTangent(e,t){let n=1e-4,i=e-n,r=e+n;i<0&&(i=0),r>1&&(r=1);let o=this.getPoint(i),a=this.getPoint(r),c=t||(o.isVector2?new W:new _);return c.copy(a).sub(o).normalize(),c}getTangentAt(e,t){let n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){let n=new _,i=[],r=[],o=[],a=new _,c=new le;for(let f=0;f<=e;f++){let m=f/e;i[f]=this.getTangentAt(m,new _),i[f].normalize()}r[0]=new _,o[0]=new _;let l=Number.MAX_VALUE,h=Math.abs(i[0].x),u=Math.abs(i[0].y),d=Math.abs(i[0].z);h<=l&&(l=h,n.set(1,0,0)),u<=l&&(l=u,n.set(0,1,0)),d<=l&&n.set(0,0,1),a.crossVectors(i[0],n).normalize(),r[0].crossVectors(i[0],a),o[0].crossVectors(i[0],r[0]);for(let f=1;f<=e;f++){if(r[f]=r[f-1].clone(),o[f]=o[f-1].clone(),a.crossVectors(i[f-1],i[f]),a.length()>Number.EPSILON){a.normalize();let m=Math.acos(ct(i[f-1].dot(i[f]),-1,1));r[f].applyMatrix4(c.makeRotationAxis(a,m))}o[f].crossVectors(i[f],r[f])}if(t===!0){let f=Math.acos(ct(r[0].dot(r[e]),-1,1));f/=e,i[0].dot(a.crossVectors(r[0],r[e]))>0&&(f=-f);for(let m=1;m<=e;m++)r[m].applyMatrix4(c.makeRotationAxis(i[m],f*m)),o[m].crossVectors(i[m],r[m])}return{tangents:i,normals:r,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){let e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}},rr=class extends St{constructor(e=0,t=0,n=1,i=1,r=0,o=Math.PI*2,a=!1,c=0){super();this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=i,this.aStartAngle=r,this.aEndAngle=o,this.aClockwise=a,this.aRotation=c}getPoint(e,t){let n=t||new W,i=Math.PI*2,r=this.aEndAngle-this.aStartAngle,o=Math.abs(r)i;)r-=i;r0?0:(Math.floor(Math.abs(a)/r)+1)*r:c===0&&a===r-1&&(a=r-2,c=1);let l,h;this.closed||a>0?l=i[(a-1)%r]:(Ss.subVectors(i[0],i[1]).add(i[0]),l=Ss);let u=i[a%r],d=i[(a+1)%r];if(this.closed||a+2i.length-2?i.length-1:o+1],u=i[o>i.length-3?i.length-1:o+2];return n.set(Qc(a,c.x,l.x,h.x,u.x),Qc(a,c.y,l.y,h.y,u.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t=t){let r=n[i]-t,o=this.curves[i],a=o.getLength(),c=a===0?0:1-r/a;return o.getPointAt(c)}i++}return null}getLength(){let e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;let e=[],t=0;for(let n=0,i=this.curves.length;n1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t0){let u=l.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(l);let h=l.getPoint(1);return this.currentPoint.copy(h),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){let e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}},xn=class extends lr{constructor(e){super(e);this.uuid=wt(),this.type="Shape",this.holes=[]}getPointsHoles(e){let t=[];for(let n=0,i=this.holes.length;n0:i.vertexColors=e.vertexColors),e.uniforms!==void 0)for(let r in e.uniforms){let o=e.uniforms[r];switch(i.uniforms[r]={},o.type){case"t":i.uniforms[r].value=n(o.value);break;case"c":i.uniforms[r].value=new se().setHex(o.value);break;case"v2":i.uniforms[r].value=new W().fromArray(o.value);break;case"v3":i.uniforms[r].value=new _().fromArray(o.value);break;case"v4":i.uniforms[r].value=new Fe().fromArray(o.value);break;case"m3":i.uniforms[r].value=new Ke().fromArray(o.value);break;case"m4":i.uniforms[r].value=new le().fromArray(o.value);break;default:i.uniforms[r].value=o.value}}if(e.defines!==void 0&&(i.defines=e.defines),e.vertexShader!==void 0&&(i.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(i.fragmentShader=e.fragmentShader),e.extensions!==void 0)for(let r in e.extensions)i.extensions[r]=e.extensions[r];if(e.shading!==void 0&&(i.flatShading=e.shading===1),e.size!==void 0&&(i.size=e.size),e.sizeAttenuation!==void 0&&(i.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(i.map=n(e.map)),e.matcap!==void 0&&(i.matcap=n(e.matcap)),e.alphaMap!==void 0&&(i.alphaMap=n(e.alphaMap)),e.bumpMap!==void 0&&(i.bumpMap=n(e.bumpMap)),e.bumpScale!==void 0&&(i.bumpScale=e.bumpScale),e.normalMap!==void 0&&(i.normalMap=n(e.normalMap)),e.normalMapType!==void 0&&(i.normalMapType=e.normalMapType),e.normalScale!==void 0){let r=e.normalScale;Array.isArray(r)===!1&&(r=[r,r]),i.normalScale=new W().fromArray(r)}return e.displacementMap!==void 0&&(i.displacementMap=n(e.displacementMap)),e.displacementScale!==void 0&&(i.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(i.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(i.roughnessMap=n(e.roughnessMap)),e.metalnessMap!==void 0&&(i.metalnessMap=n(e.metalnessMap)),e.emissiveMap!==void 0&&(i.emissiveMap=n(e.emissiveMap)),e.emissiveIntensity!==void 0&&(i.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(i.specularMap=n(e.specularMap)),e.envMap!==void 0&&(i.envMap=n(e.envMap)),e.envMapIntensity!==void 0&&(i.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(i.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(i.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(i.lightMap=n(e.lightMap)),e.lightMapIntensity!==void 0&&(i.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(i.aoMap=n(e.aoMap)),e.aoMapIntensity!==void 0&&(i.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(i.gradientMap=n(e.gradientMap)),e.clearcoatMap!==void 0&&(i.clearcoatMap=n(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(i.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(i.clearcoatNormalMap=n(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(i.clearcoatNormalScale=new W().fromArray(e.clearcoatNormalScale)),e.transmission!==void 0&&(i.transmission=e.transmission),e.transmissionMap!==void 0&&(i.transmissionMap=n(e.transmissionMap)),i}setTextures(e){return this.textures=e,this}},Ca=class{static decodeText(e){if(typeof TextDecoder!="undefined")return new TextDecoder().decode(e);let t="";for(let n=0,i=e.length;n0){let c=new ca(t);r=new Ms(c),r.setCrossOrigin(this.crossOrigin);for(let l=0,h=e.length;lNumber.EPSILON){if(U<0&&(L=w[A],N=-N,I=w[v],U=-U),p.yI.y)continue;if(p.y===L.y){if(p.x===L.x)return!0}else{let z=U*(p.x-L.x)-N*(p.y-L.y);if(z===0)return!0;if(z<0)continue;T=!T}}else{if(p.y!==L.y)continue;if(I.x<=p.x&&p.x<=L.x||L.x<=p.x&&p.x<=I.x)return!0}}return T}let r=zt.isClockWise,o=this.subPaths;if(o.length===0)return[];if(t===!0)return n(o);let a,c,l,h=[];if(o.length===1)return c=o[0],l=new xn,l.curves=c.curves,h.push(l),h;let u=!r(o[0].getPoints());u=e?!u:u;let d=[],f=[],m=[],x=0,y;f[x]=void 0,m[x]=[];for(let p=0,w=o.length;p1){let p=!1,w=[];for(let b=0,T=f.length;b0&&(p||(m=d))}let g;for(let p=0,w=f.length;p0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(n,i,this._addIndex*t,1,t);for(let c=t,l=t+t;c!==l;++c)if(n[c]!==n[c+t]){a.setValue(n,i);break}}saveOriginalState(){let e=this.binding,t=this.buffer,n=this.valueSize,i=n*this._origIndex;e.getValue(t,i);for(let r=n,o=i;r!==o;++r)t[r]=t[i+r%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){let e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){let e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n=.5)for(let o=0;o!==r;++o)e[t+o]=e[n+o]}_slerp(e,t,n,i){rt.slerpFlat(e,t,e,t,e,n,i)}_slerpAdditive(e,t,n,i,r){let o=this._workIndex*r;rt.multiplyQuaternionsFlat(e,o,e,t,e,n),rt.slerpFlat(e,t,e,t,e,o,i)}_lerp(e,t,n,i,r){let o=1-i;for(let a=0;a!==r;++a){let c=t+a;e[c]=e[c]*o+e[n+a]*i}}_lerpAdditive(e,t,n,i,r){for(let o=0;o!==r;++o){let a=t+o;e[a]=e[a]+e[n+o]*i}}},Na="\\[\\]\\.:\\/",cy=new RegExp("["+Na+"]","g"),Ba="[^"+Na+"]",hy="[^"+Na.replace("\\.","")+"]",uy=/((?:WC+[\/:])*)/.source.replace("WC",Ba),dy=/(WCOD+)?/.source.replace("WCOD",hy),fy=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Ba),py=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Ba),my=new RegExp("^"+uy+dy+fy+py+"$"),gy=["material","materials","bones"],Mh=class{constructor(e,t,n){let i=n||Ce.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,i)}getValue(e,t){this.bind();let n=this._targetGroup.nCachedObjects_,i=this._bindings[n];i!==void 0&&i.getValue(e,t)}setValue(e,t){let n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,r=n.length;i!==r;++i)n[i].setValue(e,t)}bind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},Ce=class{constructor(e,t,n){this.path=t,this.parsedPath=n||Ce.parseTrackName(t),this.node=Ce.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new Ce.Composite(e,t,n):new Ce(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(cy,"")}static parseTrackName(e){let t=my.exec(e);if(!t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);let n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){let r=n.nodeName.substring(i+1);gy.indexOf(r)!==-1&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=r)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(!t||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){let n=e.skeleton.getBoneByName(t);if(n!==void 0)return n}if(e.children){let n=function(r){for(let o=0;o=r){let u=r++,d=e[u];t[d.uuid]=h,e[h]=d,t[l]=u,e[u]=c;for(let f=0,m=i;f!==m;++f){let x=n[f],y=x[u],g=x[h];x[h]=y,x[u]=g}}}this.nCachedObjects_=r}uncache(){let e=this._objects,t=this._indicesByUUID,n=this._bindings,i=n.length,r=this.nCachedObjects_,o=e.length;for(let a=0,c=arguments.length;a!==c;++a){let l=arguments[a],h=l.uuid,u=t[h];if(u!==void 0)if(delete t[h],u0&&(t[f.uuid]=u),e[u]=f,e.pop();for(let m=0,x=i;m!==x;++m){let y=n[m];y[u]=y[d],y.pop()}}}this.nCachedObjects_=r}subscribe_(e,t){let n=this._bindingsIndicesByPath,i=n[e],r=this._bindings;if(i!==void 0)return r[i];let o=this._paths,a=this._parsedPaths,c=this._objects,l=c.length,h=this.nCachedObjects_,u=new Array(l);i=r.length,n[e]=i,o.push(e),a.push(t),r.push(u);for(let d=h,f=c.length;d!==f;++d){let m=c[d];u[d]=new Ce(m,e,t)}return u}unsubscribe_(e){let t=this._bindingsIndicesByPath,n=t[e];if(n!==void 0){let i=this._paths,r=this._parsedPaths,o=this._bindings,a=o.length-1,c=o[a],l=e[a];t[l]=n,o[n]=c,o.pop(),r[n]=r[a],r.pop(),i[n]=i[a],i.pop()}}};Sh.prototype.isAnimationObjectGroup=!0;var Th=class{constructor(e,t,n=null,i=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=i;let r=t.tracks,o=r.length,a=new Array(o),c={endingStart:Wn,endingEnd:Wn};for(let l=0;l!==o;++l){let h=r[l].createInterpolant(null);a[l]=h,h.settings=c}this._interpolantSettings=c,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Ad,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=Infinity,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){let i=this._clip.duration,r=e._clip.duration,o=r/i,a=i/r;e.warp(1,o,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,n){return e.crossFadeFrom(this,t,n)}stopFading(){let e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){let i=this._mixer,r=i.time,o=this.timeScale,a=this._timeScaleInterpolant;a===null&&(a=i._lendControlInterpolant(),this._timeScaleInterpolant=a);let c=a.parameterPositions,l=a.sampleValues;return c[0]=r,c[1]=r+n,l[0]=e/o,l[1]=t/o,this}stopWarping(){let e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,i){if(!this.enabled){this._updateWeight(e);return}let r=this._startTime;if(r!==null){let c=(e-r)*n;if(c<0||n===0)return;this._startTime=null,t=n*c}t*=this._updateTimeScale(e);let o=this._updateTime(t),a=this._updateWeight(e);if(a>0){let c=this._interpolants,l=this._propertyBindings;switch(this.blendMode){case vl:for(let h=0,u=c.length;h!==u;++h)c[h].evaluate(o),l[h].accumulateAdditive(a);break;case Zs:default:for(let h=0,u=c.length;h!==u;++h)c[h].evaluate(o),l[h].accumulate(i,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;let n=this._weightInterpolant;if(n!==null){let i=n.evaluate(e)[0];t*=i,e>n.parameterPositions[1]&&(this.stopFading(),i===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;let n=this._timeScaleInterpolant;n!==null&&(t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t))}return this._effectiveTimeScale=t,t}_updateTime(e){let t=this._clip.duration,n=this.loop,i=this.time+e,r=this._loopCount,o=n===Ld;if(e===0)return r===-1?i:o&&(r&1)==1?t-i:i;if(n===Ed){r===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(i>=t)i=t;else if(i<0)i=0;else{this.time=i;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(r===-1&&(e>=0?(r=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),i>=t||i<0){let a=Math.floor(i/t);i-=t*a,r+=Math.abs(a);let c=this.repetitions-r;if(c<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=e>0?t:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(c===1){let l=e<0;this._setEndings(l,!l,o)}else this._setEndings(!1,!1,o);this._loopCount=r,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=i;if(o&&(r&1)==1)return t-i}return i}_setEndings(e,t,n){let i=this._interpolantSettings;n?(i.endingStart=qn,i.endingEnd=qn):(e?i.endingStart=this.zeroSlopeAtStart?qn:Wn:i.endingStart=Tr,t?i.endingEnd=this.zeroSlopeAtEnd?qn:Wn:i.endingEnd=Tr)}_scheduleFading(e,t,n){let i=this._mixer,r=i.time,o=this._weightInterpolant;o===null&&(o=i._lendControlInterpolant(),this._weightInterpolant=o);let a=o.parameterPositions,c=o.sampleValues;return a[0]=r,c[0]=t,a[1]=r+e,c[1]=n,this}},Eh=class extends nn{constructor(e){super();this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){let n=e._localRoot||this._root,i=e._clip.tracks,r=i.length,o=e._propertyBindings,a=e._interpolants,c=n.uuid,l=this._bindingsByRootAndName,h=l[c];h===void 0&&(h={},l[c]=h);for(let u=0;u!==r;++u){let d=i[u],f=d.name,m=h[f];if(m!==void 0)o[u]=m;else{if(m=o[u],m!==void 0){m._cacheIndex===null&&(++m.referenceCount,this._addInactiveBinding(m,c,f));continue}let x=t&&t._propertyBindings[u].binding.parsedPath;m=new bh(Ce.create(n,f,x),d.ValueTypeName,d.getValueSize()),++m.referenceCount,this._addInactiveBinding(m,c,f),o[u]=m}a[u].resultBuffer=m.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){let n=(e._localRoot||this._root).uuid,i=e._clip.uuid,r=this._actionsByClip[i];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,i,n)}let t=e._propertyBindings;for(let n=0,i=t.length;n!==i;++n){let r=t[n];r.useCount++==0&&(this._lendBinding(r),r.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){let t=e._propertyBindings;for(let n=0,i=t.length;n!==i;++n){let r=t[n];--r.useCount==0&&(r.restoreOriginalState(),this._takeBackBinding(r))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){let t=e._cacheIndex;return t!==null&&t=0;--n)e[n].stop();return this}update(e){e*=this.timeScale;let t=this._actions,n=this._nActiveActions,i=this.time+=e,r=Math.sign(e),o=this._accuIndex^=1;for(let l=0;l!==n;++l)t[l]._update(i,e,r,o);let a=this._bindings,c=this._nActiveBindings;for(let l=0;l!==c;++l)a[l].apply(o);return this}setTime(e){this.time=0;for(let t=0;tthis.max.x||e.ythis.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t===void 0&&(console.warn("THREE.Box2: .getParameter() target is now required"),t=new W),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,t){return t===void 0&&(console.warn("THREE.Box2: .clampPoint() target is now required"),t=new W),t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return Ch.copy(e).clamp(this.min,this.max).sub(e).length()}intersect(e){return this.min.max(e.min),this.max.min(e.max),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}};vi.prototype.isBox2=!0;var Ph=new _,Ps=new _,Ih=class{constructor(e=new _,t=new _){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e===void 0&&(console.warn("THREE.Line3: .getCenter() target is now required"),e=new _),e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e===void 0&&(console.warn("THREE.Line3: .delta() target is now required"),e=new _),e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return t===void 0&&(console.warn("THREE.Line3: .at() target is now required"),t=new _),this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){Ph.subVectors(e,this.start),Ps.subVectors(this.end,this.start);let n=Ps.dot(Ps),r=Ps.dot(Ph)/n;return t&&(r=ct(r,0,1)),r}closestPointToPoint(e,t,n){let i=this.closestPointToPointParameter(e,t);return n===void 0&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new _),this.delta(n).multiplyScalar(i).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}},Dh=class extends Se{constructor(e){super();this.material=e,this.render=function(){},this.hasPositions=!1,this.hasNormals=!1,this.hasColors=!1,this.hasUvs=!1,this.positionArray=null,this.normalArray=null,this.colorArray=null,this.uvArray=null,this.count=0}};Dh.prototype.isImmediateRenderObject=!0;var Fh=new _,_y=class extends Se{constructor(e,t){super();this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;let n=new ue,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let o=0,a=1,c=32;o.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{Vh.set(e.z,0,-e.x).normalize();let t=Math.acos(e.y);this.quaternion.setFromAxisAngle(Vh,t)}}setLength(e,t=e*.2,n=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}},Wh=class extends _t{constructor(e=1){let t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],i=new ue;i.setAttribute("position",new ae(t,3)),i.setAttribute("color",new ae(n,3));let r=new at({vertexColors:!0,toneMapped:!1});super(i,r);this.type="AxesHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}},qh=new Float32Array(1),Cy=new Int32Array(qh.buffer),Py=class{static toHalfFloat(e){qh[0]=e;let t=Cy[0],n=t>>16&32768,i=t>>12&2047,r=t>>23&255;return r<103?n:r>142?(n|=31744,n|=(r==255?0:1)&&t&8388607,n):r<113?(i|=2048,n|=(i>>114-r)+(i>>113-r&1),n):(n|=r-112<<10|i>>1,n+=i&1,n)}},_i=4,vn=8,Ut=Math.pow(2,vn),Xh=[.125,.215,.35,.446,.526,.582],Yh=vn-_i+1+Xh.length,wi=20,Ht={[yt]:0,[Er]:1,[js]:2,[_l]:3,[wl]:4,[bl]:5,[Js]:6},Un=new Jt({side:Qe,depthWrite:!1,depthTest:!1}),Iy=new je(new ii,Un),Ha=new hr,{_lodPlanes:dr,_sizeLods:Zh,_sigmas:zs}=Dy(),Jh=new se,Ga=null,Hn=(1+Math.sqrt(5))/2,bi=1/Hn,jh=[new _(1,1,1),new _(-1,1,1),new _(1,1,-1),new _(-1,1,-1),new _(0,Hn,bi),new _(0,Hn,-bi),new _(bi,0,Hn),new _(-bi,0,Hn),new _(Hn,bi,0),new _(-Hn,bi,0)];function $h(s){let e=Math.max(s.r,s.g,s.b),t=Math.min(Math.max(Math.ceil(Math.log2(e)),-128),127);return s.multiplyScalar(Math.pow(2,-t)),(t+128)/255}var Fy=class{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._blurMaterial=By(wi),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,i=100){Ga=this._renderer.getRenderTarget();let r=this._allocateTargets();return this._sceneToCubeUV(e,n,i,r),t>0&&this._blur(r,0,0,t),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e){return this._fromTexture(e)}fromCubemap(e){return this._fromTexture(e)}compileCubemapShader(){this._cubemapShader===null&&(this._cubemapShader=eu(),this._compileMaterial(this._cubemapShader))}compileEquirectangularShader(){this._equirectShader===null&&(this._equirectShader=Kh(),this._compileMaterial(this._equirectShader))}dispose(){this._blurMaterial.dispose(),this._cubemapShader!==null&&this._cubemapShader.dispose(),this._equirectShader!==null&&this._equirectShader.dispose();for(let e=0;e2?Ut:0,Ut,Ut),h.setRenderTarget(i),m&&h.render(Iy,a),h.render(e,a)}h.toneMapping=f,h.outputEncoding=d,h.autoClear=u}_textureToCubeUV(e,t){let n=this._renderer;e.isCubeTexture?this._cubemapShader==null&&(this._cubemapShader=eu()):this._equirectShader==null&&(this._equirectShader=Kh());let i=e.isCubeTexture?this._cubemapShader:this._equirectShader,r=new je(dr[0],i),o=i.uniforms;o.envMap.value=e,e.isCubeTexture||o.texelSize.value.set(1/e.image.width,1/e.image.height),o.inputEncoding.value=Ht[e.encoding],o.outputEncoding.value=Ht[t.texture.encoding],Os(t,0,0,3*Ut,2*Ut),n.setRenderTarget(t),n.render(r,Ha)}_applyPMREM(e){let t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let i=1;iwi&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${y} samples when the maximum is set to ${wi}`);let g=[],p=0;for(let v=0;vvn-_i?i-vn+_i:0);Os(t,b,T,3*w,2*w),c.setRenderTarget(t),c.render(u,Ha)}};function Ny(s){return s===void 0||s.type!==Li?!1:s.encoding===yt||s.encoding===Er||s.encoding===Js}function Dy(){let s=[],e=[],t=[],n=vn;for(let i=0;ivn-_i?o=Xh[i-vn+_i-1]:i==0&&(o=0),t.push(o);let a=1/(r-1),c=-a/2,l=1+a/2,h=[c,c,l,c,l,l,c,c,l,l,c,l],u=6,d=6,f=3,m=2,x=1,y=new Float32Array(f*d*u),g=new Float32Array(m*d*u),p=new Float32Array(x*d*u);for(let b=0;b2?0:-1,A=[T,v,0,T+2/3,v,0,T+2/3,v+1,0,T,v,0,T+2/3,v+1,0,T,v+1,0];y.set(A,f*d*b),g.set(h,m*d*b);let L=[b,b,b,b,b,b];p.set(L,x*d*b)}let w=new ue;w.setAttribute("position",new Te(y,f)),w.setAttribute("uv",new Te(g,m)),w.setAttribute("faceIndex",new Te(p,x)),s.push(w),n>_i&&n--}return{_lodPlanes:s,_sizeLods:e,_sigmas:t}}function Qh(s){let e=new Vt(3*Ut,3*Ut,s);return e.texture.mapping=Ei,e.texture.name="PMREM.cubeUv",e.scissorTest=!0,e}function Os(s,e,t,n,i){s.viewport.set(e,t,n,i),s.scissor.set(e,t,n,i)}function By(s){let e=new Float32Array(s),t=new _(0,1,0);return new gi({name:"SphericalGaussianBlur",defines:{n:s},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:e},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:t},inputEncoding:{value:Ht[yt]},outputEncoding:{value:Ht[yt]}},vertexShader:ka(),fragmentShader:` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform sampler2D envMap; - uniform int samples; - uniform float weights[ n ]; - uniform bool latitudinal; - uniform float dTheta; - uniform float mipInt; - uniform vec3 poleAxis; - - ${Va()} - - #define ENVMAP_TYPE_CUBE_UV - #include - - vec3 getSample( float theta, vec3 axis ) { - - float cosTheta = cos( theta ); - // Rodrigues' axis-angle rotation - vec3 sampleDirection = vOutputDirection * cosTheta - + cross( axis, vOutputDirection ) * sin( theta ) - + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); - - return bilinearCubeUV( envMap, sampleDirection, mipInt ); - - } - - void main() { - - vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); - - if ( all( equal( axis, vec3( 0.0 ) ) ) ) { - - axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); - - } - - axis = normalize( axis ); - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); - - for ( int i = 1; i < n; i++ ) { - - if ( i >= samples ) { - - break; - - } - - float theta = dTheta * float( i ); - gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); - gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); - - } - - gl_FragColor = linearToOutputTexel( gl_FragColor ); - - } - `,blending:en,depthTest:!1,depthWrite:!1})}function Kh(){let s=new W(1,1);return new gi({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:s},inputEncoding:{value:Ht[yt]},outputEncoding:{value:Ht[yt]}},vertexShader:ka(),fragmentShader:` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform sampler2D envMap; - uniform vec2 texelSize; - - ${Va()} - - #include - - void main() { - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - - vec3 outputDirection = normalize( vOutputDirection ); - vec2 uv = equirectUv( outputDirection ); - - vec2 f = fract( uv / texelSize - 0.5 ); - uv -= f * texelSize; - vec3 tl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb; - uv.x += texelSize.x; - vec3 tr = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb; - uv.y += texelSize.y; - vec3 br = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb; - uv.x -= texelSize.x; - vec3 bl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb; - - vec3 tm = mix( tl, tr, f.x ); - vec3 bm = mix( bl, br, f.x ); - gl_FragColor.rgb = mix( tm, bm, f.y ); - - gl_FragColor = linearToOutputTexel( gl_FragColor ); - - } - `,blending:en,depthTest:!1,depthWrite:!1})}function eu(){return new gi({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},inputEncoding:{value:Ht[yt]},outputEncoding:{value:Ht[yt]}},vertexShader:ka(),fragmentShader:` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform samplerCube envMap; - - ${Va()} - - void main() { - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - gl_FragColor.rgb = envMapTexelToLinear( textureCube( envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ) ) ).rgb; - gl_FragColor = linearToOutputTexel( gl_FragColor ); - - } - `,blending:en,depthTest:!1,depthWrite:!1})}function ka(){return` - - precision mediump float; - precision mediump int; - - attribute vec3 position; - attribute vec2 uv; - attribute float faceIndex; - - varying vec3 vOutputDirection; - - // RH coordinate system; PMREM face-indexing convention - vec3 getDirection( vec2 uv, float face ) { - - uv = 2.0 * uv - 1.0; - - vec3 direction = vec3( uv, 1.0 ); - - if ( face == 0.0 ) { - - direction = direction.zyx; // ( 1, v, u ) pos x - - } else if ( face == 1.0 ) { - - direction = direction.xzy; - direction.xz *= -1.0; // ( -u, 1, -v ) pos y - - } else if ( face == 2.0 ) { - - direction.x *= -1.0; // ( -u, v, 1 ) pos z - - } else if ( face == 3.0 ) { - - direction = direction.zyx; - direction.xz *= -1.0; // ( -1, v, -u ) neg x - - } else if ( face == 4.0 ) { - - direction = direction.xzy; - direction.xy *= -1.0; // ( -u, -1, v ) neg y - - } else if ( face == 5.0 ) { - - direction.z *= -1.0; // ( u, v, -1 ) neg z - - } - - return direction; - - } - - void main() { - - vOutputDirection = getDirection( uv, faceIndex ); - gl_Position = vec4( position, 1.0 ); - - } - `}function Va(){return` - - uniform int inputEncoding; - uniform int outputEncoding; - - #include - - vec4 inputTexelToLinear( vec4 value ) { - - if ( inputEncoding == 0 ) { - - return value; - - } else if ( inputEncoding == 1 ) { - - return sRGBToLinear( value ); - - } else if ( inputEncoding == 2 ) { - - return RGBEToLinear( value ); - - } else if ( inputEncoding == 3 ) { - - return RGBMToLinear( value, 7.0 ); - - } else if ( inputEncoding == 4 ) { - - return RGBMToLinear( value, 16.0 ); - - } else if ( inputEncoding == 5 ) { - - return RGBDToLinear( value, 256.0 ); - - } else { - - return GammaToLinear( value, 2.2 ); - - } - - } - - vec4 linearToOutputTexel( vec4 value ) { - - if ( outputEncoding == 0 ) { - - return value; - - } else if ( outputEncoding == 1 ) { - - return LinearTosRGB( value ); - - } else if ( outputEncoding == 2 ) { - - return LinearToRGBE( value ); - - } else if ( outputEncoding == 3 ) { - - return LinearToRGBM( value, 7.0 ); - - } else if ( outputEncoding == 4 ) { - - return LinearToRGBM( value, 16.0 ); - - } else if ( outputEncoding == 5 ) { - - return LinearToRGBD( value, 256.0 ); - - } else { - - return LinearToGamma( value, 2.2 ); - - } - - } - - vec4 envMapTexelToLinear( vec4 color ) { - - return inputTexelToLinear( color ); - - } - `}var yv=0,vv=1,_v=0,wv=1,bv=2;function Mv(s){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),s}function Sv(s=[]){return console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),s.isMultiMaterial=!0,s.materials=s,s.clone=function(){return s.slice()},s}function Tv(s,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new ji(s,e)}function Ev(s){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new is(s)}function Av(s,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new ji(s,e)}function Lv(s){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Pn(s)}function Rv(s){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Pn(s)}function Cv(s){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Pn(s)}function Pv(s,e,t){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new _(s,e,t)}function Iv(s,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."),new Te(s,e).setUsage(Ii)}function Dv(s,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new Ol(s,e)}function Fv(s,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new Ul(s,e)}function Nv(s,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new Hl(s,e)}function Bv(s,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new Gl(s,e)}function zv(s,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Br(s,e)}function Ov(s,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new kl(s,e)}function Uv(s,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new zr(s,e)}function Hv(s,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new ae(s,e)}function Gv(s,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Wl(s,e)}St.create=function(s,e){return console.log("THREE.Curve.create() has been deprecated"),s.prototype=Object.create(St.prototype),s.prototype.constructor=s,s.prototype.getPoint=e,s};lr.prototype.fromPoints=function(s){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(s)};function kv(s){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new Wh(s)}function Vv(s,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new kh(s,e)}function Wv(s,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new _t(new Ho(s.geometry),new at({color:e!==void 0?e:16777215}))}Uh.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")};Nh.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")};function qv(s,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new _t(new Qo(s.geometry),new at({color:e!==void 0?e:16777215}))}dt.prototype.extractUrlBase=function(s){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Ca.extractUrlBase(s)};dt.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}};function Xv(s){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Ot(s)}function Yv(s){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new jc(s)}vi.prototype.center=function(s){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(s)};vi.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()};vi.prototype.isIntersectionBox=function(s){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(s)};vi.prototype.size=function(s){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(s)};vt.prototype.center=function(s){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(s)};vt.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()};vt.prototype.isIntersectionBox=function(s){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(s)};vt.prototype.isIntersectionSphere=function(s){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(s)};vt.prototype.size=function(s){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(s)};on.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()};Gi.prototype.setFromMatrix=function(s){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(s)};Ih.prototype.center=function(s){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(s)};Ke.prototype.flattenToArrayOffset=function(s,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(s,e)};Ke.prototype.multiplyVector3=function(s){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),s.applyMatrix3(this)};Ke.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")};Ke.prototype.applyToBufferAttribute=function(s){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),s.applyMatrix3(this)};Ke.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")};Ke.prototype.getInverse=function(s){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(s).invert()};le.prototype.extractPosition=function(s){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(s)};le.prototype.flattenToArrayOffset=function(s,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(s,e)};le.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),new _().setFromMatrixColumn(this,3)};le.prototype.setRotationFromQuaternion=function(s){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(s)};le.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")};le.prototype.multiplyVector3=function(s){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),s.applyMatrix4(this)};le.prototype.multiplyVector4=function(s){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),s.applyMatrix4(this)};le.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")};le.prototype.rotateAxis=function(s){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),s.transformDirection(this)};le.prototype.crossVector=function(s){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),s.applyMatrix4(this)};le.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")};le.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")};le.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")};le.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")};le.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")};le.prototype.applyToBufferAttribute=function(s){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),s.applyMatrix4(this)};le.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")};le.prototype.makeFrustum=function(s,e,t,n,i,r){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(s,e,n,t,i,r)};le.prototype.getInverse=function(s){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(s).invert()};Lt.prototype.isIntersectionLine=function(s){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(s)};rt.prototype.multiplyVector3=function(s){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),s.applyQuaternion(this)};rt.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()};ln.prototype.isIntersectionBox=function(s){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(s)};ln.prototype.isIntersectionPlane=function(s){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(s)};ln.prototype.isIntersectionSphere=function(s){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(s)};qe.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()};qe.prototype.barycoordFromPoint=function(s,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(s,e)};qe.prototype.midpoint=function(s){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(s)};qe.prototypenormal=function(s){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(s)};qe.prototype.plane=function(s){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(s)};qe.barycoordFromPoint=function(s,e,t,n,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),qe.getBarycoord(s,e,t,n,i)};qe.normal=function(s,e,t,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),qe.getNormal(s,e,t,n)};xn.prototype.extractAllPoints=function(s){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(s)};xn.prototype.extrude=function(s){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new gn(this,s)};xn.prototype.makeGeometry=function(s){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new _s(this,s)};W.prototype.fromAttribute=function(s,e,t){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(s,e,t)};W.prototype.distanceToManhattan=function(s){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(s)};W.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};_.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")};_.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")};_.prototype.getPositionFromMatrix=function(s){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(s)};_.prototype.getScaleFromMatrix=function(s){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(s)};_.prototype.getColumnFromMatrix=function(s,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(e,s)};_.prototype.applyProjection=function(s){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(s)};_.prototype.fromAttribute=function(s,e,t){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(s,e,t)};_.prototype.distanceToManhattan=function(s){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(s)};_.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};Fe.prototype.fromAttribute=function(s,e,t){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(s,e,t)};Fe.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};Se.prototype.getChildByName=function(s){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(s)};Se.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")};Se.prototype.translate=function(s,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,s)};Se.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")};Se.prototype.applyMatrix=function(s){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(s)};Object.defineProperties(Se.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(s){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=s}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}});je.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")};Object.defineProperties(je.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),Rd},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}});os.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")};ot.prototype.setLens=function(s,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),e!==void 0&&(this.filmGauge=e),this.setFocalLength(s)};Object.defineProperties(Dt.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(s){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=s}},shadowCameraLeft:{set:function(s){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=s}},shadowCameraRight:{set:function(s){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=s}},shadowCameraTop:{set:function(s){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=s}},shadowCameraBottom:{set:function(s){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=s}},shadowCameraNear:{set:function(s){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=s}},shadowCameraFar:{set:function(s){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=s}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(s){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=s}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(s){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=s}},shadowMapHeight:{set:function(s){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=s}}});Object.defineProperties(Te.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===Ii},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(Ii)}}});Te.prototype.setDynamic=function(s){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(s===!0?Ii:Pi),this};Te.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},Te.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")};ue.prototype.addIndex=function(s){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(s)};ue.prototype.addAttribute=function(s,e){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),!(e&&e.isBufferAttribute)&&!(e&&e.isInterleavedBufferAttribute)?(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(s,new Te(arguments[1],arguments[2]))):s==="index"?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(e),this):this.setAttribute(s,e)};ue.prototype.addDrawCall=function(s,e,t){t!==void 0&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(s,e)};ue.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()};ue.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")};ue.prototype.removeAttribute=function(s){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(s)};ue.prototype.applyMatrix=function(s){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(s)};Object.defineProperties(ue.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}});$t.prototype.setDynamic=function(s){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(s===!0?Ii:Pi),this};$t.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")};gn.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")};gn.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")};gn.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")};Kr.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")};Cs.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this};Object.defineProperties(tt.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new se}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(s){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=s===el}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(s){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=s}}});Object.defineProperties(jt.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(s){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=s}}});Ue.prototype.clearTarget=function(s,e,t,n){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(s),this.clear(e,t,n)};Ue.prototype.animate=function(s){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(s)};Ue.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()};Ue.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()};Ue.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision};Ue.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()};Ue.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")};Ue.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")};Ue.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")};Ue.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")};Ue.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")};Ue.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")};Ue.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures};Ue.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")};Ue.prototype.enableScissorTest=function(s){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(s)};Ue.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")};Ue.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")};Ue.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")};Ue.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")};Ue.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")};Ue.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")};Ue.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")};Ue.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")};Ue.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")};Ue.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()};Object.defineProperties(Ue.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(s){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=s}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(s){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=s}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(s){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=s===!0?Er:yt}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}}});Object.defineProperties(mc.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}});function Zv(s,e,t){return console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."),new Yr(s,t)}Object.defineProperties(Vt.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(s){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=s}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(s){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=s}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(s){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=s}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(s){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=s}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(s){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=s}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(s){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=s}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(s){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=s}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(s){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=s}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(s){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=s}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(s){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=s}}});Fa.prototype.load=function(s){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");let e=this;return new dh().load(s,function(n){e.setBuffer(n)}),this};wh.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()};Xr.prototype.updateCubeMap=function(s,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(s,e)};Xr.prototype.clear=function(s,e,t,n){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(s,e,t,n)};En.crossOrigin=void 0;En.loadTexture=function(s,e,t,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");let i=new $c;i.setCrossOrigin(this.crossOrigin);let r=i.load(s,t,void 0,n);return e&&(r.mapping=e),r};En.loadTextureCube=function(s,e,t,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");let i=new Jc;i.setCrossOrigin(this.crossOrigin);let r=i.load(s,t,void 0,n);return e&&(r.mapping=e),r};En.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")};En.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};function Jv(){console.error("THREE.CanvasRenderer has been removed")}function jv(){console.error("THREE.JSONLoader has been removed.")}var $v={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};function Qv(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")}typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:$a}}));typeof window!="undefined"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=$a);export{Iu as ACESFilmicToneMapping,Gn as AddEquation,Lu as AddOperation,vl as AdditiveAnimationBlendMode,tl as AdditiveBlending,Hu as AlphaFormat,wu as AlwaysDepth,Fd as AlwaysStencilFunc,Aa as AmbientLight,ph as AmbientLightProbe,ir as AnimationClip,Wx as AnimationLoader,Eh as AnimationMixer,Sh as AnimationObjectGroup,Ge as AnimationUtils,ha as ArcCurve,Ro as ArrayCamera,Ry as ArrowHelper,Fa as Audio,wh as AudioAnalyser,uh as AudioContext,oy as AudioListener,dh as AudioLoader,Wh as AxesHelper,kv as AxisHelper,Qe as BackSide,Pd as BasicDepthPacking,Gy as BasicShadowMap,Yv as BinaryTextureLoader,as as Bone,Dn as BooleanKeyframeTrack,Vv as BoundingBoxHelper,vi as Box2,vt as Box3,Ay as Box3Helper,ii as BoxBufferGeometry,ii as BoxGeometry,kh as BoxHelper,Te as BufferAttribute,ue as BufferGeometry,oh as BufferGeometryLoader,Fu as ByteType,yi as Cache,Hi as Camera,Ey as CameraHelper,Jv as CanvasRenderer,Oc as CanvasTexture,ma as CatmullRomCurve3,Pu as CineonToneMapping,Bo as CircleBufferGeometry,Bo as CircleGeometry,xt as ClampToEdgeWrapping,xh as Clock,se as Color,la as ColorKeyframeTrack,No as CompressedTexture,qx as CompressedTextureLoader,zo as ConeBufferGeometry,zo as ConeGeometry,Xr as CubeCamera,mr as CubeReflectionMapping,gr as CubeRefractionMapping,ai as CubeTexture,Jc as CubeTextureLoader,Ei as CubeUVReflectionMapping,xr as CubeUVRefractionMapping,Ts as CubicBezierCurve,ga as CubicBezierCurve3,Xc as CubicInterpolant,Qa as CullFaceBack,ou as CullFaceFront,Hy as CullFaceFrontBack,su as CullFaceNone,St as Curve,eh as CurvePath,lu as CustomBlending,Du as CustomToneMapping,$i as CylinderBufferGeometry,$i as CylinderGeometry,vy as Cylindrical,li as DataTexture,To as DataTexture2DArray,Eo as DataTexture3D,jc as DataTextureLoader,Py as DataUtils,Qy as DecrementStencilOp,ev as DecrementWrapStencilOp,Vx as DefaultLoadingManager,Vn as DepthFormat,Ci as DepthStencilFormat,Uc as DepthTexture,Ea as DirectionalLight,Ty as DirectionalLightHelper,Yc as DiscreteInterpolant,Oo as DodecahedronBufferGeometry,Oo as DodecahedronGeometry,fr as DoubleSide,mu as DstAlphaFactor,xu as DstColorFactor,Iv as DynamicBufferAttribute,pv as DynamicCopyUsage,Ii as DynamicDrawUsage,uv as DynamicReadUsage,Ho as EdgesGeometry,Wv as EdgesHelper,rr as EllipseCurve,Mu as EqualDepth,rv as EqualStencilFunc,Vs as EquirectangularReflectionMapping,Ws as EquirectangularRefractionMapping,Rn as Euler,nn as EventDispatcher,gn as ExtrudeBufferGeometry,gn as ExtrudeGeometry,wv as FaceColors,Ot as FileLoader,el as FlatShading,Vl as Float16BufferAttribute,Hv as Float32Attribute,ae as Float32BufferAttribute,Gv as Float64Attribute,Wl as Float64BufferAttribute,tn as FloatType,qi as Fog,Wi as FogExp2,Da as Font,iy as FontLoader,Si as FrontSide,Gi as Frustum,Lh as GLBufferAttribute,gv as GLSL1,Ml as GLSL3,Js as GammaEncoding,Tu as GreaterDepth,Su as GreaterEqualDepth,lv as GreaterEqualStencilFunc,ov as GreaterStencilFunc,Uh as GridHelper,Cn as Group,br as HalfFloatType,va as HemisphereLight,My as HemisphereLightHelper,fh as HemisphereLightProbe,Vo as IcosahedronBufferGeometry,Vo as IcosahedronGeometry,ch as ImageBitmapLoader,Ms as ImageLoader,En as ImageUtils,Dh as ImmediateRenderObject,$y as IncrementStencilOp,Ky as IncrementWrapStencilOp,Ia as InstancedBufferAttribute,Pa as InstancedBufferGeometry,Ah as InstancedInterleavedBuffer,Po as InstancedMesh,Bv as Int16Attribute,Gl as Int16BufferAttribute,Ov as Int32Attribute,kl as Int32BufferAttribute,Dv as Int8Attribute,Ol as Int8BufferAttribute,Bu as IntType,$t as InterleavedBuffer,pn as InterleavedBufferAttribute,Kt as Interpolant,Mr as InterpolateDiscrete,Sr as InterpolateLinear,Ys as InterpolateSmooth,tv as InvertStencilOp,jv as JSONLoader,$s as KeepStencilOp,Pt as KeyframeTrack,bc as LOD,Wo as LatheBufferGeometry,Wo as LatheGeometry,co as Layers,Qv as LensFlare,bu as LessDepth,Gs as LessEqualDepth,sv as LessEqualStencilFunc,iv as LessStencilFunc,Dt as Light,ur as LightProbe,Qt as Line,Ih as Line3,at as LineBasicMaterial,ar as LineCurve,Kc as LineCurve3,oa as LineDashedMaterial,Do as LineLoop,vv as LinePieces,_t as LineSegments,yv as LineStrip,yt as LinearEncoding,it as LinearFilter,aa as LinearInterpolant,Xy as LinearMipMapLinearFilter,qy as LinearMipMapNearestFilter,Ai as LinearMipmapLinearFilter,ll as LinearMipmapNearestFilter,Ru as LinearToneMapping,dt as Loader,Ca as LoaderUtils,ca as LoadingManager,Cd as LogLuvEncoding,Ed as LoopOnce,Ld as LoopPingPong,Ad as LoopRepeat,ku as LuminanceAlphaFormat,Gu as LuminanceFormat,Oy as MOUSE,tt as Material,sh as MaterialLoader,xv as Math,xv as MathUtils,Ke as Matrix3,le as Matrix4,sl as MaxEquation,je as Mesh,Jt as MeshBasicMaterial,jr as MeshDepthMaterial,$r as MeshDistanceMaterial,Mv as MeshFaceMaterial,ra as MeshLambertMaterial,sa as MeshMatcapMaterial,ia as MeshNormalMaterial,ta as MeshPhongMaterial,ea as MeshPhysicalMaterial,bs as MeshStandardMaterial,na as MeshToonMaterial,rl as MinEquation,vr as MirroredRepeatWrapping,Au as MixOperation,Sv as MultiMaterial,il as MultiplyBlending,pr as MultiplyOperation,nt as NearestFilter,Wy as NearestMipMapLinearFilter,Vy as NearestMipMapNearestFilter,Xs as NearestMipmapLinearFilter,qs as NearestMipmapNearestFilter,_u as NeverDepth,nv as NeverStencilFunc,en as NoBlending,_v as NoColors,kn as NoToneMapping,Zs as NormalAnimationBlendMode,Ti as NormalBlending,Eu as NotEqualDepth,av as NotEqualStencilFunc,tr as NumberKeyframeTrack,Se as Object3D,Kx as ObjectLoader,Dd as ObjectSpaceNormalMap,vs as OctahedronBufferGeometry,vs as OctahedronGeometry,du as OneFactor,gu as OneMinusDstAlphaFactor,yu as OneMinusDstColorFactor,al as OneMinusSrcAlphaFactor,pu as OneMinusSrcColorFactor,hr as OrthographicCamera,Ka as PCFShadowMap,au as PCFSoftShadowMap,Fy as PMREMGenerator,qo as ParametricBufferGeometry,qo as ParametricGeometry,Ev as Particle,Rv as ParticleBasicMaterial,Av as ParticleSystem,Cv as ParticleSystemMaterial,lr as Path,ot as PerspectiveCamera,Lt as Plane,Jr as PlaneBufferGeometry,Jr as PlaneGeometry,Ly as PlaneHelper,Tv as PointCloud,Lv as PointCloudMaterial,Sa as PointLight,wy as PointLightHelper,ji as Points,Pn as PointsMaterial,Sy as PolarGridHelper,In as PolyhedronBufferGeometry,In as PolyhedronGeometry,ly as PositionalAudio,Ce as PropertyBinding,bh as PropertyMixer,Es as QuadraticBezierCurve,xa as QuadraticBezierCurve3,rt as Quaternion,xi as QuaternionKeyframeTrack,Zc as QuaternionLinearInterpolant,$a as REVISION,Id as RGBADepthPacking,Tt as RGBAFormat,Ju as RGBAIntegerFormat,ld as RGBA_ASTC_10x10_Format,sd as RGBA_ASTC_10x5_Format,od as RGBA_ASTC_10x6_Format,ad as RGBA_ASTC_10x8_Format,cd as RGBA_ASTC_12x10_Format,hd as RGBA_ASTC_12x12_Format,$u as RGBA_ASTC_4x4_Format,Qu as RGBA_ASTC_5x4_Format,Ku as RGBA_ASTC_5x5_Format,ed as RGBA_ASTC_6x5_Format,td as RGBA_ASTC_6x6_Format,nd as RGBA_ASTC_8x5_Format,id as RGBA_ASTC_8x6_Format,rd as RGBA_ASTC_8x8_Format,ud as RGBA_BPTC_Format,yl as RGBA_ETC2_EAC_Format,gl as RGBA_PVRTC_2BPPV1_Format,ml as RGBA_PVRTC_4BPPV1_Format,hl as RGBA_S3TC_DXT1_Format,ul as RGBA_S3TC_DXT3_Format,dl as RGBA_S3TC_DXT5_Format,bl as RGBDEncoding,js as RGBEEncoding,Vu as RGBEFormat,Sn as RGBFormat,Zu as RGBIntegerFormat,wl as RGBM16Encoding,_l as RGBM7Encoding,ju as RGB_ETC1_Format,xl as RGB_ETC2_Format,pl as RGB_PVRTC_2BPPV1_Format,fl as RGB_PVRTC_4BPPV1_Format,cl as RGB_S3TC_DXT1_Format,Xu as RGFormat,Yu as RGIntegerFormat,gi as RawShaderMaterial,ln as Ray,xy as Raycaster,La as RectAreaLight,Wu as RedFormat,qu as RedIntegerFormat,Cu as ReinhardToneMapping,yr as RepeatWrapping,jy as ReplaceStencilOp,hu as ReverseSubtractEquation,Xo as RingBufferGeometry,Xo as RingGeometry,Md as SRGB8_ALPHA8_ASTC_10x10_Format,_d as SRGB8_ALPHA8_ASTC_10x5_Format,wd as SRGB8_ALPHA8_ASTC_10x6_Format,bd as SRGB8_ALPHA8_ASTC_10x8_Format,Sd as SRGB8_ALPHA8_ASTC_12x10_Format,Td as SRGB8_ALPHA8_ASTC_12x12_Format,dd as SRGB8_ALPHA8_ASTC_4x4_Format,fd as SRGB8_ALPHA8_ASTC_5x4_Format,pd as SRGB8_ALPHA8_ASTC_5x5_Format,md as SRGB8_ALPHA8_ASTC_6x5_Format,gd as SRGB8_ALPHA8_ASTC_6x6_Format,xd as SRGB8_ALPHA8_ASTC_8x5_Format,yd as SRGB8_ALPHA8_ASTC_8x6_Format,vd as SRGB8_ALPHA8_ASTC_8x8_Format,Kr as Scene,$v as SceneUtils,Ee as ShaderChunk,Bt as ShaderLib,jt as ShaderMaterial,Ko as ShadowMaterial,xn as Shape,_s as ShapeBufferGeometry,_s as ShapeGeometry,hh as ShapePath,zt as ShapeUtils,Nu as ShortType,ls as Skeleton,Nh as SkeletonHelper,os as SkinnedMesh,ky as SmoothShading,on as Sphere,ws as SphereBufferGeometry,ws as SphereGeometry,yy as Spherical,Ra as SphericalHarmonics3,As as SplineCurve,wa as SpotLight,_y as SpotLightHelper,is as Sprite,es as SpriteMaterial,ol as SrcAlphaFactor,vu as SrcAlphaSaturateFactor,fu as SrcColorFactor,fv as StaticCopyUsage,Pi as StaticDrawUsage,hv as StaticReadUsage,ry as StereoCamera,mv as StreamCopyUsage,cv as StreamDrawUsage,dv as StreamReadUsage,Fn as StringKeyframeTrack,cu as SubtractEquation,nl as SubtractiveBlending,Uy as TOUCH,Xn as TangentSpaceNormalMap,Yo as TetrahedronBufferGeometry,Yo as TetrahedronGeometry,Zo as TextBufferGeometry,Zo as TextGeometry,et as Texture,$c as TextureLoader,Jo as TorusBufferGeometry,Jo as TorusGeometry,jo as TorusKnotBufferGeometry,jo as TorusKnotGeometry,qe as Triangle,Zy as TriangleFanDrawMode,Yy as TriangleStripDrawMode,Rd as TrianglesDrawMode,$o as TubeBufferGeometry,$o as TubeGeometry,ks as UVMapping,zv as Uint16Attribute,Br as Uint16BufferAttribute,Uv as Uint32Attribute,zr as Uint32BufferAttribute,Fv as Uint8Attribute,Ul as Uint8BufferAttribute,Nv as Uint8ClampedAttribute,Hl as Uint8ClampedBufferAttribute,Cs as Uniform,K as UniformsLib,cf as UniformsUtils,Li as UnsignedByteType,Ri as UnsignedInt248Type,wr as UnsignedIntType,zu as UnsignedShort4444Type,Ou as UnsignedShort5551Type,Uu as UnsignedShort565Type,_r as UnsignedShortType,Mi as VSMShadowMap,W as Vector2,_ as Vector3,Fe as Vector4,nr as VectorKeyframeTrack,Pv as Vertex,bv as VertexColors,zc as VideoTexture,xc as WebGL1Renderer,Yr as WebGLCubeRenderTarget,El as WebGLMultisampleRenderTarget,Vt as WebGLRenderTarget,Zv as WebGLRenderTargetCube,Ue as WebGLRenderer,px as WebGLUtils,Qo as WireframeGeometry,qv as WireframeHelper,Tr as WrapAroundEnding,Xv as XHRLoader,Wn as ZeroCurvatureEnding,uu as ZeroFactor,qn as ZeroSlopeEnding,Jy as ZeroStencilOp,Er as sRGBEncoding}; -/** - * @license - * Copyright 2010-2021 Three.js Authors - * SPDX-License-Identifier: MIT - */ diff --git a/test/test.log b/test/test.log index 3c3ee6db..075a9577 100644 --- a/test/test.log +++ b/test/test.log @@ -1,684 +1,684 @@ -2021-11-24 16:14:09 INFO:  @vladmandic/human version 2.5.4 -2021-11-24 16:14:09 INFO:  User: vlado Platform: linux Arch: x64 Node: v17.0.1 -2021-11-24 16:14:09 INFO:  tests: ["test-node.js","test-node-gpu.js","test-node-wasm.js"] -2021-11-24 16:14:09 INFO:  demos: ["../demo/nodejs/node.js","../demo/nodejs/node-canvas.js","../demo/nodejs/node-env.js","../demo/nodejs/node-event.js","../demo/nodejs/node-multiprocess.js"] -2021-11-24 16:14:09 INFO:  -2021-11-24 16:14:09 INFO:  test-node.js start -2021-11-24 16:14:10 INFO:  test-node.js test: configuration validation -2021-11-24 16:14:10 STATE: test-node.js passed: configuration default validation [] -2021-11-24 16:14:10 STATE: test-node.js passed: configuration invalid validation [{"reason":"unknown property","where":"config.invalid = true"}] -2021-11-24 16:14:10 INFO:  test-node.js test: model load -2021-11-24 16:14:11 STATE: test-node.js passed: models loaded 22 12 [{"name":"ssrnetage","loaded":false},{"name":"gear","loaded":false},{"name":"blazeposedetect","loaded":false},{"name":"blazepose","loaded":false},{"name":"centernet","loaded":true},{"name":"efficientpose","loaded":false},{"name":"mobilefacenet","loaded":false},{"name":"emotion","loaded":true},{"name":"facedetect","loaded":true},{"name":"faceiris","loaded":true},{"name":"facemesh","loaded":true},{"name":"faceres","loaded":true},{"name":"ssrnetgender","loaded":false},{"name":"handpose","loaded":false},{"name":"handskeleton","loaded":true},{"name":"handtrack","loaded":true},{"name":"liveness","loaded":true},{"name":"movenet","loaded":true},{"name":"nanodet","loaded":false},{"name":"posenet","loaded":false},{"name":"segmentation","loaded":true},{"name":"antispoof","loaded":true}] -2021-11-24 16:14:11 INFO:  test-node.js test: warmup -2021-11-24 16:14:11 STATE: test-node.js passed: create human -2021-11-24 16:14:11 INFO:  test-node.js human version: 2.5.4 -2021-11-24 16:14:11 INFO:  test-node.js platform: linux x64 agent: NodeJS v17.0.1 -2021-11-24 16:14:11 INFO:  test-node.js tfjs version: 3.11.0 -2021-11-24 16:14:11 INFO:  test-node.js tensorflow binding version: 2.6.0-dev20210809 -2021-11-24 16:14:11 STATE: test-node.js passed: set backend: tensorflow -2021-11-24 16:14:11 STATE: test-node.js tensors 1919 -2021-11-24 16:14:11 STATE: test-node.js passed: load models -2021-11-24 16:14:11 STATE: test-node.js result: defined models: 22 loaded models: 12 -2021-11-24 16:14:11 STATE: test-node.js passed: warmup: none default -2021-11-24 16:14:11 DATA:  test-node.js result: face: 0 body: 0 hand: 0 gesture: 0 object: 0 person: 0 {} {} {} -2021-11-24 16:14:11 DATA:  test-node.js result: performance: load: null total: null -2021-11-24 16:14:11 STATE: test-node.js passed: warmup none result match -2021-11-24 16:14:11 STATE: test-node.js event: image -2021-11-24 16:14:13 STATE: test-node.js event: detect -2021-11-24 16:14:13 STATE: test-node.js event: warmup -2021-11-24 16:14:13 STATE: test-node.js passed: warmup: face default -2021-11-24 16:14:13 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 10 object: 1 person: 1 {"score":1,"age":30.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.42,"keypoints":4} -2021-11-24 16:14:13 DATA:  test-node.js result: performance: load: null total: 1740 -2021-11-24 16:14:13 STATE: test-node.js passed: warmup face result match -2021-11-24 16:14:13 STATE: test-node.js event: image -2021-11-24 16:14:14 STATE: test-node.js event: detect -2021-11-24 16:14:14 STATE: test-node.js event: warmup -2021-11-24 16:14:14 STATE: test-node.js passed: warmup: body default -2021-11-24 16:14:14 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:14:14 DATA:  test-node.js result: performance: load: null total: 1347 -2021-11-24 16:14:14 STATE: test-node.js passed: warmup body result match -2021-11-24 16:14:14 STATE: test-node.js details: {"face":{"boxScore":0.92,"faceScore":1,"age":23.6,"gender":"female","genderScore":0.95},"emotion":[{"score":0.55,"emotion":"neutral"},{"score":0.26,"emotion":"fear"},{"score":0.12,"emotion":"sad"}],"body":{"score":0.92,"keypoints":17},"hand":{"boxScore":0.52,"fingerScore":0.73,"keypoints":21},"gestures":[{"face":0,"gesture":"facing right"},{"hand":0,"gesture":"palm forward"},{"hand":0,"gesture":"palm up"},{"hand":0,"gesture":"open palm"},{"iris":0,"gesture":"looking right"},{"iris":0,"gesture":"looking up"}]} -2021-11-24 16:14:14 INFO:  test-node.js test: details verification -2021-11-24 16:14:15 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2021-11-24 16:14:15 STATE: test-node.js event: image -2021-11-24 16:14:16 STATE: test-node.js event: detect -2021-11-24 16:14:16 STATE: test-node.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:14:16 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:14:16 DATA:  test-node.js result: performance: load: null total: 1319 -2021-11-24 16:14:16 STATE: test-node.js passed: details face length 1 -2021-11-24 16:14:16 STATE: test-node.js passed: details face score 1 0.93 1 -2021-11-24 16:14:16 STATE: test-node.js passed: details face age/gender 23.6 female 0.95 73.26 -2021-11-24 16:14:16 STATE: test-node.js passed: details face arrays 4 478 1024 -2021-11-24 16:14:16 STATE: test-node.js passed: details face emotion 3 {"score":0.58,"emotion":"neutral"} -2021-11-24 16:14:16 STATE: test-node.js passed: details face anti-spoofing 0.87 -2021-11-24 16:14:16 STATE: test-node.js passed: details face liveness 0.95 -2021-11-24 16:14:16 STATE: test-node.js passed: details body length 1 -2021-11-24 16:14:16 STATE: test-node.js passed: details body 0.92 17 6 -2021-11-24 16:14:16 STATE: test-node.js passed: details hand length 1 -2021-11-24 16:14:16 STATE: test-node.js passed: details hand 0.51 0.73 point -2021-11-24 16:14:16 STATE: test-node.js passed: details hand arrays 21 5 6 -2021-11-24 16:14:16 STATE: test-node.js passed: details gesture length 6 -2021-11-24 16:14:16 STATE: test-node.js passed: details gesture first {"face":0,"gesture":"facing right"} -2021-11-24 16:14:16 STATE: test-node.js passed: details object length 1 -2021-11-24 16:14:16 STATE: test-node.js passed: details object 0.72 person -2021-11-24 16:14:17 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,4] {"checksum":1371996928} -2021-11-24 16:14:17 STATE: test-node.js event: image -2021-11-24 16:14:18 STATE: test-node.js event: detect -2021-11-24 16:14:18 STATE: test-node.js passed: tensor shape: [1,1200,1200,4] dtype: float32 -2021-11-24 16:14:19 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1200,1200,4] {"checksum":1371996928} -2021-11-24 16:14:19 STATE: test-node.js event: image -2021-11-24 16:14:20 STATE: test-node.js event: detect -2021-11-24 16:14:20 STATE: test-node.js passed: tensor shape: [1200,1200,4] dtype: float32 -2021-11-24 16:14:21 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2021-11-24 16:14:21 STATE: test-node.js event: image -2021-11-24 16:14:22 STATE: test-node.js event: detect -2021-11-24 16:14:22 STATE: test-node.js passed: tensor shape: [1,1200,1200,3] dtype: float32 -2021-11-24 16:14:23 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1200,1200,3] {"checksum":1004796864} -2021-11-24 16:14:23 STATE: test-node.js event: image -2021-11-24 16:14:25 STATE: test-node.js event: detect -2021-11-24 16:14:25 STATE: test-node.js passed: tensor shape: [1200,1200,3] dtype: float32 -2021-11-24 16:14:25 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,4] {"checksum":1371996871} -2021-11-24 16:14:25 STATE: test-node.js event: image -2021-11-24 16:14:27 STATE: test-node.js event: detect -2021-11-24 16:14:27 STATE: test-node.js passed: tensor shape: [1,1200,1200,4] dtype: int32 -2021-11-24 16:14:27 INFO:  test-node.js test default -2021-11-24 16:14:28 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2021-11-24 16:14:28 STATE: test-node.js event: image -2021-11-24 16:14:29 STATE: test-node.js event: detect -2021-11-24 16:14:29 STATE: test-node.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:14:29 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:14:29 DATA:  test-node.js result: performance: load: null total: 1112 -2021-11-24 16:14:29 STATE: test-node.js passed: default result face match 1 female 0.95 -2021-11-24 16:14:29 INFO:  test-node.js test sync -2021-11-24 16:14:30 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2021-11-24 16:14:30 STATE: test-node.js event: image -2021-11-24 16:14:31 STATE: test-node.js event: detect -2021-11-24 16:14:31 STATE: test-node.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:14:31 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:14:31 DATA:  test-node.js result: performance: load: null total: 1124 -2021-11-24 16:14:31 STATE: test-node.js passed: default sync 1 female 0.95 -2021-11-24 16:14:31 INFO:  test-node.js test: image process -2021-11-24 16:14:31 STATE: test-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2021-11-24 16:14:31 STATE: test-node.js passed: image input null [1,256,256,3] -2021-11-24 16:14:31 INFO:  test-node.js test: image null -2021-11-24 16:14:31 STATE: test-node.js passed: invalid input could not convert input to tensor -2021-11-24 16:14:31 INFO:  test-node.js test face similarity -2021-11-24 16:14:31 STATE: test-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2021-11-24 16:14:31 STATE: test-node.js event: image -2021-11-24 16:14:32 STATE: test-node.js event: detect -2021-11-24 16:14:32 STATE: test-node.js passed: detect: samples/in/ai-face.jpg default -2021-11-24 16:14:32 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 8 object: 1 person: 1 {"score":1,"age":30.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":3} -2021-11-24 16:14:32 DATA:  test-node.js result: performance: load: null total: 1115 -2021-11-24 16:14:33 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2021-11-24 16:14:33 STATE: test-node.js event: image -2021-11-24 16:14:34 STATE: test-node.js event: detect -2021-11-24 16:14:34 STATE: test-node.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:14:34 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:14:34 DATA:  test-node.js result: performance: load: null total: 1128 -2021-11-24 16:14:34 STATE: test-node.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289040} -2021-11-24 16:14:34 STATE: test-node.js event: image -2021-11-24 16:14:35 STATE: test-node.js event: detect -2021-11-24 16:14:35 STATE: test-node.js passed: detect: samples/in/ai-upper.jpg default -2021-11-24 16:14:35 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":7} -2021-11-24 16:14:35 DATA:  test-node.js result: performance: load: null total: 1065 -2021-11-24 16:14:35 STATE: test-node.js passed: face descriptor -2021-11-24 16:14:35 STATE: test-node.js passed: face similarity {"similarity":[1,0.5204253812157617,0.5018512391128399],"descriptors":[1024,1024,1024]} -2021-11-24 16:14:35 INFO:  test-node.js test face matching -2021-11-24 16:14:35 STATE: test-node.js passed: face database 57 -2021-11-24 16:14:35 STATE: test-node.js passed: face match {"first":{"index":4,"similarity":0.9339157281721077}} {"second":{"index":4,"similarity":0.5272109558655983}} {"third":{"index":4,"similarity":0.47187667831692687}} -2021-11-24 16:14:35 INFO:  test-node.js test object -2021-11-24 16:14:36 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2021-11-24 16:14:36 STATE: test-node.js event: image -2021-11-24 16:14:37 STATE: test-node.js event: detect -2021-11-24 16:14:37 STATE: test-node.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:14:37 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:14:37 DATA:  test-node.js result: performance: load: null total: 1200 -2021-11-24 16:14:37 STATE: test-node.js passed: object result match -2021-11-24 16:14:37 INFO:  test-node.js test sensitive -2021-11-24 16:14:38 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2021-11-24 16:14:38 STATE: test-node.js event: image -2021-11-24 16:14:40 STATE: test-node.js event: detect -2021-11-24 16:14:40 STATE: test-node.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:14:40 DATA:  test-node.js result: face: 1 body: 1 hand: 2 gesture: 8 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:14:40 DATA:  test-node.js result: performance: load: null total: 1237 -2021-11-24 16:14:40 STATE: test-node.js passed: sensitive result match -2021-11-24 16:14:40 STATE: test-node.js passed: sensitive face result match -2021-11-24 16:14:40 STATE: test-node.js passed: sensitive face emotion result [{"score":0.58,"emotion":"neutral"},{"score":0.24,"emotion":"fear"},{"score":0.11,"emotion":"sad"}] -2021-11-24 16:14:40 STATE: test-node.js passed: sensitive body result match -2021-11-24 16:14:40 STATE: test-node.js passed: sensitive hand result match -2021-11-24 16:14:40 INFO:  test-node.js test detectors -2021-11-24 16:14:40 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2021-11-24 16:14:40 STATE: test-node.js event: image -2021-11-24 16:14:41 STATE: test-node.js event: detect -2021-11-24 16:14:41 STATE: test-node.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:14:41 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 1 person: 1 {"score":0.93} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:14:41 DATA:  test-node.js result: performance: load: null total: 901 -2021-11-24 16:14:41 STATE: test-node.js passed: detector result face match -2021-11-24 16:14:41 STATE: test-node.js passed: detector result hand match -2021-11-24 16:14:41 INFO:  test-node.js test: multi-instance -2021-11-24 16:14:41 STATE: test-node.js event: image -2021-11-24 16:14:42 STATE: test-node.js event: detect -2021-11-24 16:14:42 STATE: test-node.js passed: detect: random default -2021-11-24 16:14:42 DATA:  test-node.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 0 person: 0 {} {} {"score":0.07,"keypoints":15} -2021-11-24 16:14:42 DATA:  test-node.js result: performance: load: null total: 927 -2021-11-24 16:14:42 INFO:  test-node.js test: first instance -2021-11-24 16:14:43 STATE: test-node.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289040} -2021-11-24 16:14:44 STATE: test-node.js passed: detect: samples/in/ai-upper.jpg default -2021-11-24 16:14:44 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} -2021-11-24 16:14:44 DATA:  test-node.js result: performance: load: null total: 866 -2021-11-24 16:14:44 INFO:  test-node.js test: second instance -2021-11-24 16:14:44 STATE: test-node.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289040} -2021-11-24 16:14:45 STATE: test-node.js passed: detect: samples/in/ai-upper.jpg default -2021-11-24 16:14:45 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} -2021-11-24 16:14:45 DATA:  test-node.js result: performance: load: null total: 805 -2021-11-24 16:14:45 INFO:  test-node.js test: concurrent -2021-11-24 16:14:45 STATE: test-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2021-11-24 16:14:45 STATE: test-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2021-11-24 16:14:46 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2021-11-24 16:14:47 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2021-11-24 16:14:47 STATE: test-node.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289040} -2021-11-24 16:14:47 STATE: test-node.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289040} -2021-11-24 16:14:47 STATE: test-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2021-11-24 16:14:48 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2021-11-24 16:14:48 STATE: test-node.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289040} -2021-11-24 16:14:49 STATE: test-node.js event: image -2021-11-24 16:14:49 STATE: test-node.js event: image -2021-11-24 16:14:49 STATE: test-node.js event: image -2021-11-24 16:14:55 STATE: test-node.js passed: detect: samples/in/ai-upper.jpg default -2021-11-24 16:14:55 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} -2021-11-24 16:14:55 DATA:  test-node.js result: performance: load: null total: 7677 -2021-11-24 16:14:55 STATE: test-node.js passed: detect: samples/in/ai-upper.jpg default -2021-11-24 16:14:55 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} -2021-11-24 16:14:55 DATA:  test-node.js result: performance: load: null total: 7677 -2021-11-24 16:14:56 STATE: test-node.js passed: detect: samples/in/ai-face.jpg default -2021-11-24 16:14:56 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 2 object: 1 person: 1 {"score":0.91} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":17} -2021-11-24 16:14:56 DATA:  test-node.js result: performance: load: null total: 8485 -2021-11-24 16:14:56 STATE: test-node.js passed: detect: samples/in/ai-face.jpg default -2021-11-24 16:14:56 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 2 object: 1 person: 1 {"score":0.91} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":17} -2021-11-24 16:14:56 DATA:  test-node.js result: performance: load: null total: 8485 -2021-11-24 16:14:56 STATE: test-node.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:14:56 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 1 person: 1 {"score":0.93} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:14:56 DATA:  test-node.js result: performance: load: null total: 8485 -2021-11-24 16:14:56 STATE: test-node.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:14:56 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 1 person: 1 {"score":0.93} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:14:56 DATA:  test-node.js result: performance: load: null total: 8485 -2021-11-24 16:14:56 STATE: test-node.js event: detect -2021-11-24 16:14:56 STATE: test-node.js passed: detect: samples/in/ai-upper.jpg default -2021-11-24 16:14:56 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} -2021-11-24 16:14:56 DATA:  test-node.js result: performance: load: null total: 7219 -2021-11-24 16:14:56 STATE: test-node.js event: detect -2021-11-24 16:14:56 STATE: test-node.js event: detect -2021-11-24 16:14:56 STATE: test-node.js passed: detect: samples/in/ai-face.jpg default -2021-11-24 16:14:56 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 2 object: 1 person: 1 {"score":0.91} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":17} -2021-11-24 16:14:56 DATA:  test-node.js result: performance: load: null total: 7219 -2021-11-24 16:14:56 STATE: test-node.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:14:56 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 1 person: 1 {"score":0.93} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:14:56 DATA:  test-node.js result: performance: load: null total: 7219 -2021-11-24 16:14:56 INFO:  test-node.js test: monkey-patch -2021-11-24 16:14:56 STATE: test-node.js event: image -2021-11-24 16:14:56 STATE: test-node.js event: detect -2021-11-24 16:14:56 STATE: test-node.js passed: monkey patch -2021-11-24 16:14:57 STATE: test-node.js passed: segmentation [65536] -2021-11-24 16:14:57 STATE: test-node.js passeed: equal usage -2021-11-24 16:14:57 INFO:  test-node.js test: input compare -2021-11-24 16:14:57 STATE: test-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2021-11-24 16:14:58 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2021-11-24 16:14:58 STATE: test-node.js passed: image compare 0 23.275441687091504 -2021-11-24 16:14:58 INFO:  test-node.js events: {"image":21,"detect":21,"warmup":2} -2021-11-24 16:14:58 INFO:  test-node.js tensors 1925 -2021-11-24 16:14:58 INFO:  test-node.js test complete: 47147 ms -2021-11-24 16:14:58 INFO:  -2021-11-24 16:14:58 INFO:  test-node-gpu.js start -2021-11-24 16:14:59 INFO:  test-node-gpu.js test: configuration validation -2021-11-24 16:14:59 STATE: test-node-gpu.js passed: configuration default validation [] -2021-11-24 16:14:59 STATE: test-node-gpu.js passed: configuration invalid validation [{"reason":"unknown property","where":"config.invalid = true"}] -2021-11-24 16:14:59 INFO:  test-node-gpu.js test: model load -2021-11-24 16:14:59 STATE: test-node-gpu.js passed: models loaded 22 12 [{"name":"ssrnetage","loaded":false},{"name":"gear","loaded":false},{"name":"blazeposedetect","loaded":false},{"name":"blazepose","loaded":false},{"name":"centernet","loaded":true},{"name":"efficientpose","loaded":false},{"name":"mobilefacenet","loaded":false},{"name":"emotion","loaded":true},{"name":"facedetect","loaded":true},{"name":"faceiris","loaded":true},{"name":"facemesh","loaded":true},{"name":"faceres","loaded":true},{"name":"ssrnetgender","loaded":false},{"name":"handpose","loaded":false},{"name":"handskeleton","loaded":true},{"name":"handtrack","loaded":true},{"name":"liveness","loaded":true},{"name":"movenet","loaded":true},{"name":"nanodet","loaded":false},{"name":"posenet","loaded":false},{"name":"segmentation","loaded":true},{"name":"antispoof","loaded":true}] -2021-11-24 16:14:59 INFO:  test-node-gpu.js test: warmup -2021-11-24 16:14:59 STATE: test-node-gpu.js passed: create human -2021-11-24 16:14:59 INFO:  test-node-gpu.js human version: 2.5.4 -2021-11-24 16:14:59 INFO:  test-node-gpu.js platform: linux x64 agent: NodeJS v17.0.1 -2021-11-24 16:14:59 INFO:  test-node-gpu.js tfjs version: 3.11.0 -2021-11-24 16:14:59 INFO:  test-node-gpu.js tensorflow binding version: 2.6.0-dev20210809 -2021-11-24 16:14:59 STATE: test-node-gpu.js passed: set backend: tensorflow -2021-11-24 16:14:59 STATE: test-node-gpu.js tensors 1919 -2021-11-24 16:14:59 STATE: test-node-gpu.js passed: load models -2021-11-24 16:14:59 STATE: test-node-gpu.js result: defined models: 22 loaded models: 12 -2021-11-24 16:14:59 STATE: test-node-gpu.js passed: warmup: none default -2021-11-24 16:14:59 DATA:  test-node-gpu.js result: face: 0 body: 0 hand: 0 gesture: 0 object: 0 person: 0 {} {} {} -2021-11-24 16:14:59 DATA:  test-node-gpu.js result: performance: load: null total: null -2021-11-24 16:14:59 STATE: test-node-gpu.js passed: warmup none result match -2021-11-24 16:14:59 STATE: test-node-gpu.js event: image -2021-11-24 16:15:01 STATE: test-node-gpu.js event: detect -2021-11-24 16:15:01 STATE: test-node-gpu.js event: warmup -2021-11-24 16:15:01 STATE: test-node-gpu.js passed: warmup: face default -2021-11-24 16:15:01 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 10 object: 1 person: 1 {"score":1,"age":30.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.42,"keypoints":4} -2021-11-24 16:15:01 DATA:  test-node-gpu.js result: performance: load: null total: 1686 -2021-11-24 16:15:01 STATE: test-node-gpu.js passed: warmup face result match -2021-11-24 16:15:01 STATE: test-node-gpu.js event: image -2021-11-24 16:15:02 STATE: test-node-gpu.js event: detect -2021-11-24 16:15:02 STATE: test-node-gpu.js event: warmup -2021-11-24 16:15:02 STATE: test-node-gpu.js passed: warmup: body default -2021-11-24 16:15:02 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:15:02 DATA:  test-node-gpu.js result: performance: load: null total: 1356 -2021-11-24 16:15:02 STATE: test-node-gpu.js passed: warmup body result match -2021-11-24 16:15:02 STATE: test-node-gpu.js details: {"face":{"boxScore":0.92,"faceScore":1,"age":23.6,"gender":"female","genderScore":0.95},"emotion":[{"score":0.55,"emotion":"neutral"},{"score":0.26,"emotion":"fear"},{"score":0.12,"emotion":"sad"}],"body":{"score":0.92,"keypoints":17},"hand":{"boxScore":0.52,"fingerScore":0.73,"keypoints":21},"gestures":[{"face":0,"gesture":"facing right"},{"hand":0,"gesture":"palm forward"},{"hand":0,"gesture":"palm up"},{"hand":0,"gesture":"open palm"},{"iris":0,"gesture":"looking right"},{"iris":0,"gesture":"looking up"}]} -2021-11-24 16:15:02 INFO:  test-node-gpu.js test: details verification -2021-11-24 16:15:03 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2021-11-24 16:15:03 STATE: test-node-gpu.js event: image -2021-11-24 16:15:05 STATE: test-node-gpu.js event: detect -2021-11-24 16:15:05 STATE: test-node-gpu.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:15:05 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:15:05 DATA:  test-node-gpu.js result: performance: load: null total: 1360 -2021-11-24 16:15:05 STATE: test-node-gpu.js passed: details face length 1 -2021-11-24 16:15:05 STATE: test-node-gpu.js passed: details face score 1 0.93 1 -2021-11-24 16:15:05 STATE: test-node-gpu.js passed: details face age/gender 23.6 female 0.95 73.26 -2021-11-24 16:15:05 STATE: test-node-gpu.js passed: details face arrays 4 478 1024 -2021-11-24 16:15:05 STATE: test-node-gpu.js passed: details face emotion 3 {"score":0.58,"emotion":"neutral"} -2021-11-24 16:15:05 STATE: test-node-gpu.js passed: details face anti-spoofing 0.87 -2021-11-24 16:15:05 STATE: test-node-gpu.js passed: details face liveness 0.95 -2021-11-24 16:15:05 STATE: test-node-gpu.js passed: details body length 1 -2021-11-24 16:15:05 STATE: test-node-gpu.js passed: details body 0.92 17 6 -2021-11-24 16:15:05 STATE: test-node-gpu.js passed: details hand length 1 -2021-11-24 16:15:05 STATE: test-node-gpu.js passed: details hand 0.51 0.73 point -2021-11-24 16:15:05 STATE: test-node-gpu.js passed: details hand arrays 21 5 6 -2021-11-24 16:15:05 STATE: test-node-gpu.js passed: details gesture length 6 -2021-11-24 16:15:05 STATE: test-node-gpu.js passed: details gesture first {"face":0,"gesture":"facing right"} -2021-11-24 16:15:05 STATE: test-node-gpu.js passed: details object length 1 -2021-11-24 16:15:05 STATE: test-node-gpu.js passed: details object 0.72 person -2021-11-24 16:15:06 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,4] {"checksum":1371996928} -2021-11-24 16:15:06 STATE: test-node-gpu.js event: image -2021-11-24 16:15:07 STATE: test-node-gpu.js event: detect -2021-11-24 16:15:07 STATE: test-node-gpu.js passed: tensor shape: [1,1200,1200,4] dtype: float32 -2021-11-24 16:15:08 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1200,1200,4] {"checksum":1371996928} -2021-11-24 16:15:08 STATE: test-node-gpu.js event: image -2021-11-24 16:15:09 STATE: test-node-gpu.js event: detect -2021-11-24 16:15:09 STATE: test-node-gpu.js passed: tensor shape: [1200,1200,4] dtype: float32 -2021-11-24 16:15:10 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2021-11-24 16:15:10 STATE: test-node-gpu.js event: image -2021-11-24 16:15:11 STATE: test-node-gpu.js event: detect -2021-11-24 16:15:11 STATE: test-node-gpu.js passed: tensor shape: [1,1200,1200,3] dtype: float32 -2021-11-24 16:15:12 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1200,1200,3] {"checksum":1004796864} -2021-11-24 16:15:12 STATE: test-node-gpu.js event: image -2021-11-24 16:15:13 STATE: test-node-gpu.js event: detect -2021-11-24 16:15:13 STATE: test-node-gpu.js passed: tensor shape: [1200,1200,3] dtype: float32 -2021-11-24 16:15:14 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,4] {"checksum":1371996871} -2021-11-24 16:15:14 STATE: test-node-gpu.js event: image -2021-11-24 16:15:15 STATE: test-node-gpu.js event: detect -2021-11-24 16:15:15 STATE: test-node-gpu.js passed: tensor shape: [1,1200,1200,4] dtype: int32 -2021-11-24 16:15:15 INFO:  test-node-gpu.js test default -2021-11-24 16:15:16 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2021-11-24 16:15:16 STATE: test-node-gpu.js event: image -2021-11-24 16:15:17 STATE: test-node-gpu.js event: detect -2021-11-24 16:15:17 STATE: test-node-gpu.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:15:17 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:15:17 DATA:  test-node-gpu.js result: performance: load: null total: 1299 -2021-11-24 16:15:17 STATE: test-node-gpu.js passed: default result face match 1 female 0.95 -2021-11-24 16:15:17 INFO:  test-node-gpu.js test sync -2021-11-24 16:15:18 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2021-11-24 16:15:18 STATE: test-node-gpu.js event: image -2021-11-24 16:15:20 STATE: test-node-gpu.js event: detect -2021-11-24 16:15:20 STATE: test-node-gpu.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:15:20 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:15:20 DATA:  test-node-gpu.js result: performance: load: null total: 1197 -2021-11-24 16:15:20 STATE: test-node-gpu.js passed: default sync 1 female 0.95 -2021-11-24 16:15:20 INFO:  test-node-gpu.js test: image process -2021-11-24 16:15:20 STATE: test-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2021-11-24 16:15:20 STATE: test-node-gpu.js passed: image input null [1,256,256,3] -2021-11-24 16:15:20 INFO:  test-node-gpu.js test: image null -2021-11-24 16:15:20 STATE: test-node-gpu.js passed: invalid input could not convert input to tensor -2021-11-24 16:15:20 INFO:  test-node-gpu.js test face similarity -2021-11-24 16:15:20 STATE: test-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2021-11-24 16:15:20 STATE: test-node-gpu.js event: image -2021-11-24 16:15:21 STATE: test-node-gpu.js event: detect -2021-11-24 16:15:21 STATE: test-node-gpu.js passed: detect: samples/in/ai-face.jpg default -2021-11-24 16:15:21 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 8 object: 1 person: 1 {"score":1,"age":30.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":3} -2021-11-24 16:15:21 DATA:  test-node-gpu.js result: performance: load: null total: 1149 -2021-11-24 16:15:22 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2021-11-24 16:15:22 STATE: test-node-gpu.js event: image -2021-11-24 16:15:23 STATE: test-node-gpu.js event: detect -2021-11-24 16:15:23 STATE: test-node-gpu.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:15:23 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:15:23 DATA:  test-node-gpu.js result: performance: load: null total: 1175 -2021-11-24 16:15:23 STATE: test-node-gpu.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289040} -2021-11-24 16:15:23 STATE: test-node-gpu.js event: image -2021-11-24 16:15:24 STATE: test-node-gpu.js event: detect -2021-11-24 16:15:24 STATE: test-node-gpu.js passed: detect: samples/in/ai-upper.jpg default -2021-11-24 16:15:24 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":7} -2021-11-24 16:15:24 DATA:  test-node-gpu.js result: performance: load: null total: 1045 -2021-11-24 16:15:24 STATE: test-node-gpu.js passed: face descriptor -2021-11-24 16:15:24 STATE: test-node-gpu.js passed: face similarity {"similarity":[1,0.5204253812157617,0.5018512391128399],"descriptors":[1024,1024,1024]} -2021-11-24 16:15:24 INFO:  test-node-gpu.js test face matching -2021-11-24 16:15:24 STATE: test-node-gpu.js passed: face database 57 -2021-11-24 16:15:24 STATE: test-node-gpu.js passed: face match {"first":{"index":4,"similarity":0.9339157281721077}} {"second":{"index":4,"similarity":0.5272109558655983}} {"third":{"index":4,"similarity":0.47187667831692687}} -2021-11-24 16:15:24 INFO:  test-node-gpu.js test object -2021-11-24 16:15:25 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2021-11-24 16:15:25 STATE: test-node-gpu.js event: image -2021-11-24 16:15:26 STATE: test-node-gpu.js event: detect -2021-11-24 16:15:26 STATE: test-node-gpu.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:15:26 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:15:26 DATA:  test-node-gpu.js result: performance: load: null total: 1115 -2021-11-24 16:15:26 STATE: test-node-gpu.js passed: object result match -2021-11-24 16:15:26 INFO:  test-node-gpu.js test sensitive -2021-11-24 16:15:27 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2021-11-24 16:15:27 STATE: test-node-gpu.js event: image -2021-11-24 16:15:28 STATE: test-node-gpu.js event: detect -2021-11-24 16:15:28 STATE: test-node-gpu.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:15:28 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 2 gesture: 8 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:15:28 DATA:  test-node-gpu.js result: performance: load: null total: 1199 -2021-11-24 16:15:28 STATE: test-node-gpu.js passed: sensitive result match -2021-11-24 16:15:28 STATE: test-node-gpu.js passed: sensitive face result match -2021-11-24 16:15:28 STATE: test-node-gpu.js passed: sensitive face emotion result [{"score":0.58,"emotion":"neutral"},{"score":0.24,"emotion":"fear"},{"score":0.11,"emotion":"sad"}] -2021-11-24 16:15:28 STATE: test-node-gpu.js passed: sensitive body result match -2021-11-24 16:15:28 STATE: test-node-gpu.js passed: sensitive hand result match -2021-11-24 16:15:28 INFO:  test-node-gpu.js test detectors -2021-11-24 16:15:29 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2021-11-24 16:15:29 STATE: test-node-gpu.js event: image -2021-11-24 16:15:30 STATE: test-node-gpu.js event: detect -2021-11-24 16:15:30 STATE: test-node-gpu.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:15:30 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 1 person: 1 {"score":0.93} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:15:30 DATA:  test-node-gpu.js result: performance: load: null total: 837 -2021-11-24 16:15:30 STATE: test-node-gpu.js passed: detector result face match -2021-11-24 16:15:30 STATE: test-node-gpu.js passed: detector result hand match -2021-11-24 16:15:30 INFO:  test-node-gpu.js test: multi-instance -2021-11-24 16:15:30 STATE: test-node-gpu.js event: image -2021-11-24 16:15:31 STATE: test-node-gpu.js event: detect -2021-11-24 16:15:31 STATE: test-node-gpu.js passed: detect: random default -2021-11-24 16:15:31 DATA:  test-node-gpu.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 0 person: 0 {} {} {"score":0.07,"keypoints":15} -2021-11-24 16:15:31 DATA:  test-node-gpu.js result: performance: load: null total: 789 -2021-11-24 16:15:31 INFO:  test-node-gpu.js test: first instance -2021-11-24 16:15:31 STATE: test-node-gpu.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289040} -2021-11-24 16:15:32 STATE: test-node-gpu.js passed: detect: samples/in/ai-upper.jpg default -2021-11-24 16:15:32 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} -2021-11-24 16:15:32 DATA:  test-node-gpu.js result: performance: load: null total: 797 -2021-11-24 16:15:32 INFO:  test-node-gpu.js test: second instance -2021-11-24 16:15:32 STATE: test-node-gpu.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289040} -2021-11-24 16:15:33 STATE: test-node-gpu.js passed: detect: samples/in/ai-upper.jpg default -2021-11-24 16:15:33 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} -2021-11-24 16:15:33 DATA:  test-node-gpu.js result: performance: load: null total: 841 -2021-11-24 16:15:33 INFO:  test-node-gpu.js test: concurrent -2021-11-24 16:15:33 STATE: test-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2021-11-24 16:15:33 STATE: test-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2021-11-24 16:15:34 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2021-11-24 16:15:35 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2021-11-24 16:15:35 STATE: test-node-gpu.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289040} -2021-11-24 16:15:36 STATE: test-node-gpu.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289040} -2021-11-24 16:15:36 STATE: test-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2021-11-24 16:15:37 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2021-11-24 16:15:37 STATE: test-node-gpu.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289040} -2021-11-24 16:15:38 STATE: test-node-gpu.js event: image -2021-11-24 16:15:38 STATE: test-node-gpu.js event: image -2021-11-24 16:15:38 STATE: test-node-gpu.js event: image -2021-11-24 16:15:44 STATE: test-node-gpu.js passed: detect: samples/in/ai-upper.jpg default -2021-11-24 16:15:44 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} -2021-11-24 16:15:44 DATA:  test-node-gpu.js result: performance: load: null total: 7753 -2021-11-24 16:15:44 STATE: test-node-gpu.js passed: detect: samples/in/ai-upper.jpg default -2021-11-24 16:15:44 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} -2021-11-24 16:15:44 DATA:  test-node-gpu.js result: performance: load: null total: 7753 -2021-11-24 16:15:44 STATE: test-node-gpu.js passed: detect: samples/in/ai-face.jpg default -2021-11-24 16:15:44 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 2 object: 1 person: 1 {"score":0.91} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":17} -2021-11-24 16:15:44 DATA:  test-node-gpu.js result: performance: load: null total: 8560 -2021-11-24 16:15:44 STATE: test-node-gpu.js passed: detect: samples/in/ai-face.jpg default -2021-11-24 16:15:44 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 2 object: 1 person: 1 {"score":0.91} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":17} -2021-11-24 16:15:44 DATA:  test-node-gpu.js result: performance: load: null total: 8560 -2021-11-24 16:15:44 STATE: test-node-gpu.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:15:44 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 1 person: 1 {"score":0.93} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:15:44 DATA:  test-node-gpu.js result: performance: load: null total: 8560 -2021-11-24 16:15:44 STATE: test-node-gpu.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:15:44 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 1 person: 1 {"score":0.93} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:15:44 DATA:  test-node-gpu.js result: performance: load: null total: 8560 -2021-11-24 16:15:44 STATE: test-node-gpu.js event: detect -2021-11-24 16:15:44 STATE: test-node-gpu.js passed: detect: samples/in/ai-upper.jpg default -2021-11-24 16:15:44 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} -2021-11-24 16:15:44 DATA:  test-node-gpu.js result: performance: load: null total: 7248 -2021-11-24 16:15:44 STATE: test-node-gpu.js event: detect -2021-11-24 16:15:44 STATE: test-node-gpu.js event: detect -2021-11-24 16:15:44 STATE: test-node-gpu.js passed: detect: samples/in/ai-face.jpg default -2021-11-24 16:15:44 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 2 object: 1 person: 1 {"score":0.91} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":17} -2021-11-24 16:15:44 DATA:  test-node-gpu.js result: performance: load: null total: 7248 -2021-11-24 16:15:44 STATE: test-node-gpu.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:15:44 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 1 person: 1 {"score":0.93} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:15:44 DATA:  test-node-gpu.js result: performance: load: null total: 7248 -2021-11-24 16:15:44 INFO:  test-node-gpu.js test: monkey-patch -2021-11-24 16:15:44 STATE: test-node-gpu.js event: image -2021-11-24 16:15:45 STATE: test-node-gpu.js event: detect -2021-11-24 16:15:45 STATE: test-node-gpu.js passed: monkey patch -2021-11-24 16:15:45 STATE: test-node-gpu.js passed: segmentation [65536] -2021-11-24 16:15:45 STATE: test-node-gpu.js passeed: equal usage -2021-11-24 16:15:45 INFO:  test-node-gpu.js test: input compare -2021-11-24 16:15:45 STATE: test-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} -2021-11-24 16:15:46 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} -2021-11-24 16:15:46 STATE: test-node-gpu.js passed: image compare 0 23.275441687091504 -2021-11-24 16:15:46 INFO:  test-node-gpu.js events: {"image":21,"detect":21,"warmup":2} -2021-11-24 16:15:46 INFO:  test-node-gpu.js tensors 1925 -2021-11-24 16:15:46 INFO:  test-node-gpu.js test complete: 47476 ms -2021-11-24 16:15:46 INFO:  -2021-11-24 16:15:46 INFO:  test-node-wasm.js start -2021-11-24 16:15:47 STATE: test-node-wasm.js passed: model server: https://vladmandic.github.io/human/models/ -2021-11-24 16:15:47 INFO:  test-node-wasm.js test: configuration validation -2021-11-24 16:15:47 STATE: test-node-wasm.js passed: configuration default validation [] -2021-11-24 16:15:47 STATE: test-node-wasm.js passed: configuration invalid validation [{"reason":"unknown property","where":"config.invalid = true"}] -2021-11-24 16:15:47 INFO:  test-node-wasm.js test: model load -2021-11-24 16:15:49 STATE: test-node-wasm.js passed: models loaded 22 12 [{"name":"ssrnetage","loaded":false},{"name":"gear","loaded":false},{"name":"blazeposedetect","loaded":false},{"name":"blazepose","loaded":false},{"name":"centernet","loaded":true},{"name":"efficientpose","loaded":false},{"name":"mobilefacenet","loaded":false},{"name":"emotion","loaded":true},{"name":"facedetect","loaded":true},{"name":"faceiris","loaded":true},{"name":"facemesh","loaded":true},{"name":"faceres","loaded":true},{"name":"ssrnetgender","loaded":false},{"name":"handpose","loaded":false},{"name":"handskeleton","loaded":true},{"name":"handtrack","loaded":true},{"name":"liveness","loaded":true},{"name":"movenet","loaded":true},{"name":"nanodet","loaded":false},{"name":"posenet","loaded":false},{"name":"segmentation","loaded":true},{"name":"antispoof","loaded":true}] -2021-11-24 16:15:49 INFO:  test-node-wasm.js test: warmup -2021-11-24 16:15:49 STATE: test-node-wasm.js passed: create human -2021-11-24 16:15:49 INFO:  test-node-wasm.js human version: 2.5.4 -2021-11-24 16:15:49 INFO:  test-node-wasm.js platform: linux x64 agent: NodeJS v17.0.1 -2021-11-24 16:15:49 INFO:  test-node-wasm.js tfjs version: 3.11.0 -2021-11-24 16:15:49 STATE: test-node-wasm.js passed: set backend: wasm -2021-11-24 16:15:49 STATE: test-node-wasm.js tensors 1919 -2021-11-24 16:15:49 STATE: test-node-wasm.js passed: load models -2021-11-24 16:15:49 STATE: test-node-wasm.js result: defined models: 22 loaded models: 12 -2021-11-24 16:15:49 STATE: test-node-wasm.js passed: warmup: none default -2021-11-24 16:15:49 DATA:  test-node-wasm.js result: face: 0 body: 0 hand: 0 gesture: 0 object: 0 person: 0 {} {} {} -2021-11-24 16:15:49 DATA:  test-node-wasm.js result: performance: load: null total: null -2021-11-24 16:15:49 STATE: test-node-wasm.js passed: warmup none result match -2021-11-24 16:15:49 STATE: test-node-wasm.js event: image -2021-11-24 16:15:51 STATE: test-node-wasm.js event: detect -2021-11-24 16:15:51 STATE: test-node-wasm.js event: warmup -2021-11-24 16:15:51 STATE: test-node-wasm.js passed: warmup: face default -2021-11-24 16:15:51 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 8 object: 1 person: 1 {"score":1,"age":30.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":3} -2021-11-24 16:15:51 DATA:  test-node-wasm.js result: performance: load: null total: 2005 -2021-11-24 16:15:51 STATE: test-node-wasm.js passed: warmup face result match -2021-11-24 16:15:52 STATE: test-node-wasm.js event: image -2021-11-24 16:15:53 STATE: test-node-wasm.js event: detect -2021-11-24 16:15:53 STATE: test-node-wasm.js event: warmup -2021-11-24 16:15:53 STATE: test-node-wasm.js passed: warmup: body default -2021-11-24 16:15:53 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:15:53 DATA:  test-node-wasm.js result: performance: load: null total: 1380 -2021-11-24 16:15:53 STATE: test-node-wasm.js passed: warmup body result match -2021-11-24 16:15:53 STATE: test-node-wasm.js details: {"face":{"boxScore":0.93,"faceScore":1,"age":23.6,"gender":"female","genderScore":0.95},"emotion":[{"score":0.58,"emotion":"neutral"},{"score":0.24,"emotion":"fear"},{"score":0.11,"emotion":"sad"}],"body":{"score":0.92,"keypoints":17},"hand":{"boxScore":0.51,"fingerScore":0.73,"keypoints":21},"gestures":[{"face":0,"gesture":"facing right"},{"hand":0,"gesture":"palm forward"},{"hand":0,"gesture":"palm up"},{"hand":0,"gesture":"open palm"},{"iris":0,"gesture":"looking right"},{"iris":0,"gesture":"looking up"}]} -2021-11-24 16:15:53 INFO:  test-node-wasm.js test: details verification -2021-11-24 16:15:54 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2021-11-24 16:15:54 STATE: test-node-wasm.js event: image -2021-11-24 16:15:56 STATE: test-node-wasm.js event: detect -2021-11-24 16:15:56 STATE: test-node-wasm.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:15:56 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:15:56 DATA:  test-node-wasm.js result: performance: load: null total: 1400 -2021-11-24 16:15:56 STATE: test-node-wasm.js passed: details face length 1 -2021-11-24 16:15:56 STATE: test-node-wasm.js passed: details face score 1 0.93 1 -2021-11-24 16:15:56 STATE: test-node-wasm.js passed: details face age/gender 23.6 female 0.95 73.26 -2021-11-24 16:15:56 STATE: test-node-wasm.js passed: details face arrays 4 478 1024 -2021-11-24 16:15:56 STATE: test-node-wasm.js passed: details face emotion 3 {"score":0.58,"emotion":"neutral"} -2021-11-24 16:15:56 STATE: test-node-wasm.js passed: details face anti-spoofing 0.87 -2021-11-24 16:15:56 STATE: test-node-wasm.js passed: details face liveness 0.95 -2021-11-24 16:15:56 STATE: test-node-wasm.js passed: details body length 1 -2021-11-24 16:15:56 STATE: test-node-wasm.js passed: details body 0.92 17 6 -2021-11-24 16:15:56 STATE: test-node-wasm.js passed: details hand length 1 -2021-11-24 16:15:56 STATE: test-node-wasm.js passed: details hand 0.51 0.73 point -2021-11-24 16:15:56 STATE: test-node-wasm.js passed: details hand arrays 21 5 6 -2021-11-24 16:15:56 STATE: test-node-wasm.js passed: details gesture length 6 -2021-11-24 16:15:56 STATE: test-node-wasm.js passed: details gesture first {"face":0,"gesture":"facing right"} -2021-11-24 16:15:56 STATE: test-node-wasm.js passed: details object length 1 -2021-11-24 16:15:56 STATE: test-node-wasm.js passed: details object 0.72 person -2021-11-24 16:15:57 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,4] {"checksum":1413675264} -2021-11-24 16:15:57 STATE: test-node-wasm.js event: image -2021-11-24 16:15:58 STATE: test-node-wasm.js event: detect -2021-11-24 16:15:58 STATE: test-node-wasm.js passed: tensor shape: [1,1200,1200,4] dtype: float32 -2021-11-24 16:15:59 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1200,1200,4] {"checksum":1413675264} -2021-11-24 16:15:59 STATE: test-node-wasm.js event: image -2021-11-24 16:16:00 STATE: test-node-wasm.js event: detect -2021-11-24 16:16:00 STATE: test-node-wasm.js passed: tensor shape: [1200,1200,4] dtype: float32 -2021-11-24 16:16:02 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2021-11-24 16:16:02 STATE: test-node-wasm.js event: image -2021-11-24 16:16:03 STATE: test-node-wasm.js event: detect -2021-11-24 16:16:03 STATE: test-node-wasm.js passed: tensor shape: [1,1200,1200,3] dtype: float32 -2021-11-24 16:16:04 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1200,1200,3] {"checksum":1038921856} -2021-11-24 16:16:04 STATE: test-node-wasm.js event: image -2021-11-24 16:16:05 STATE: test-node-wasm.js event: detect -2021-11-24 16:16:05 STATE: test-node-wasm.js passed: tensor shape: [1200,1200,3] dtype: float32 -2021-11-24 16:16:06 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,4] {"checksum":1371996871} -2021-11-24 16:16:06 STATE: test-node-wasm.js event: image -2021-11-24 16:16:07 STATE: test-node-wasm.js event: detect -2021-11-24 16:16:07 STATE: test-node-wasm.js passed: tensor shape: [1,1200,1200,4] dtype: int32 -2021-11-24 16:16:07 INFO:  test-node-wasm.js test default -2021-11-24 16:16:08 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2021-11-24 16:16:08 STATE: test-node-wasm.js event: image -2021-11-24 16:16:10 STATE: test-node-wasm.js event: detect -2021-11-24 16:16:10 STATE: test-node-wasm.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:16:10 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:16:10 DATA:  test-node-wasm.js result: performance: load: null total: 1198 -2021-11-24 16:16:10 STATE: test-node-wasm.js passed: default result face match 1 female 0.94 -2021-11-24 16:16:10 INFO:  test-node-wasm.js test sync -2021-11-24 16:16:11 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2021-11-24 16:16:11 STATE: test-node-wasm.js event: image -2021-11-24 16:16:12 STATE: test-node-wasm.js event: detect -2021-11-24 16:16:12 STATE: test-node-wasm.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:16:12 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:16:12 DATA:  test-node-wasm.js result: performance: load: null total: 1251 -2021-11-24 16:16:12 STATE: test-node-wasm.js passed: default sync 1 female 0.94 -2021-11-24 16:16:12 INFO:  test-node-wasm.js test: image process -2021-11-24 16:16:12 STATE: test-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} -2021-11-24 16:16:12 STATE: test-node-wasm.js passed: image input null [1,256,256,3] -2021-11-24 16:16:12 INFO:  test-node-wasm.js test: image null -2021-11-24 16:16:12 STATE: test-node-wasm.js passed: invalid input could not convert input to tensor -2021-11-24 16:16:12 INFO:  test-node-wasm.js test face similarity -2021-11-24 16:16:12 STATE: test-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} -2021-11-24 16:16:12 STATE: test-node-wasm.js event: image -2021-11-24 16:16:13 STATE: test-node-wasm.js event: detect -2021-11-24 16:16:13 STATE: test-node-wasm.js passed: detect: samples/in/ai-face.jpg default -2021-11-24 16:16:13 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 8 object: 1 person: 1 {"score":1,"age":30.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":3} -2021-11-24 16:16:13 DATA:  test-node-wasm.js result: performance: load: null total: 1156 -2021-11-24 16:16:14 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2021-11-24 16:16:14 STATE: test-node-wasm.js event: image -2021-11-24 16:16:16 STATE: test-node-wasm.js event: detect -2021-11-24 16:16:16 STATE: test-node-wasm.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:16:16 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:16:16 DATA:  test-node-wasm.js result: performance: load: null total: 1236 -2021-11-24 16:16:16 STATE: test-node-wasm.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151155104} -2021-11-24 16:16:16 STATE: test-node-wasm.js event: image -2021-11-24 16:16:17 STATE: test-node-wasm.js event: detect -2021-11-24 16:16:17 STATE: test-node-wasm.js passed: detect: samples/in/ai-upper.jpg default -2021-11-24 16:16:17 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"score":1,"age":23.5,"gender":"female"} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":7} -2021-11-24 16:16:17 DATA:  test-node-wasm.js result: performance: load: null total: 1109 -2021-11-24 16:16:17 STATE: test-node-wasm.js passed: face descriptor -2021-11-24 16:16:17 STATE: test-node-wasm.js passed: face similarity {"similarity":[1,0.5502973648074503,0.49721702784432575],"descriptors":[1024,1024,1024]} -2021-11-24 16:16:17 INFO:  test-node-wasm.js test face matching -2021-11-24 16:16:17 STATE: test-node-wasm.js passed: face database 57 -2021-11-24 16:16:17 STATE: test-node-wasm.js passed: face match {"first":{"index":4,"similarity":0.933916055561213}} {"second":{"index":4,"similarity":0.5456802676954908}} {"third":{"index":4,"similarity":0.4681398205326839}} -2021-11-24 16:16:17 INFO:  test-node-wasm.js test object -2021-11-24 16:16:18 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2021-11-24 16:16:18 STATE: test-node-wasm.js event: image -2021-11-24 16:16:19 STATE: test-node-wasm.js event: detect -2021-11-24 16:16:19 STATE: test-node-wasm.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:16:19 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:16:19 DATA:  test-node-wasm.js result: performance: load: null total: 1198 -2021-11-24 16:16:19 STATE: test-node-wasm.js passed: object result match -2021-11-24 16:16:19 INFO:  test-node-wasm.js test sensitive -2021-11-24 16:16:20 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2021-11-24 16:16:20 STATE: test-node-wasm.js event: image -2021-11-24 16:16:22 STATE: test-node-wasm.js event: detect -2021-11-24 16:16:22 STATE: test-node-wasm.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:16:22 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 2 gesture: 8 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:16:22 DATA:  test-node-wasm.js result: performance: load: null total: 1348 -2021-11-24 16:16:22 STATE: test-node-wasm.js passed: sensitive result match -2021-11-24 16:16:22 STATE: test-node-wasm.js passed: sensitive face result match -2021-11-24 16:16:22 STATE: test-node-wasm.js passed: sensitive face emotion result [{"score":0.92,"emotion":"neutral"}] -2021-11-24 16:16:22 STATE: test-node-wasm.js passed: sensitive body result match -2021-11-24 16:16:22 STATE: test-node-wasm.js passed: sensitive hand result match -2021-11-24 16:16:22 INFO:  test-node-wasm.js test detectors -2021-11-24 16:16:23 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2021-11-24 16:16:23 STATE: test-node-wasm.js event: image -2021-11-24 16:16:24 STATE: test-node-wasm.js event: detect -2021-11-24 16:16:24 STATE: test-node-wasm.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:16:24 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 1 person: 1 {"score":0.93} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:16:24 DATA:  test-node-wasm.js result: performance: load: null total: 869 -2021-11-24 16:16:24 STATE: test-node-wasm.js passed: detector result face match -2021-11-24 16:16:24 STATE: test-node-wasm.js passed: detector result hand match -2021-11-24 16:16:24 INFO:  test-node-wasm.js test: multi-instance -2021-11-24 16:16:24 STATE: test-node-wasm.js event: image -2021-11-24 16:16:25 STATE: test-node-wasm.js event: detect -2021-11-24 16:16:25 STATE: test-node-wasm.js passed: detect: random default -2021-11-24 16:16:25 DATA:  test-node-wasm.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 0 person: 0 {} {} {"score":0.07,"keypoints":15} -2021-11-24 16:16:25 DATA:  test-node-wasm.js result: performance: load: null total: 836 -2021-11-24 16:16:25 INFO:  test-node-wasm.js test: first instance -2021-11-24 16:16:25 STATE: test-node-wasm.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151155104} -2021-11-24 16:16:26 STATE: test-node-wasm.js passed: detect: samples/in/ai-upper.jpg default -2021-11-24 16:16:26 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} -2021-11-24 16:16:26 DATA:  test-node-wasm.js result: performance: load: null total: 871 -2021-11-24 16:16:26 INFO:  test-node-wasm.js test: second instance -2021-11-24 16:16:27 STATE: test-node-wasm.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151155104} -2021-11-24 16:16:27 STATE: test-node-wasm.js passed: detect: samples/in/ai-upper.jpg default -2021-11-24 16:16:27 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} -2021-11-24 16:16:27 DATA:  test-node-wasm.js result: performance: load: null total: 867 -2021-11-24 16:16:27 INFO:  test-node-wasm.js test: concurrent -2021-11-24 16:16:28 STATE: test-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} -2021-11-24 16:16:28 STATE: test-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} -2021-11-24 16:16:29 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2021-11-24 16:16:30 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2021-11-24 16:16:30 STATE: test-node-wasm.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151155104} -2021-11-24 16:16:30 STATE: test-node-wasm.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151155104} -2021-11-24 16:16:30 STATE: test-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} -2021-11-24 16:16:32 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2021-11-24 16:16:32 STATE: test-node-wasm.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151155104} -2021-11-24 16:16:33 STATE: test-node-wasm.js event: image -2021-11-24 16:16:33 STATE: test-node-wasm.js event: image -2021-11-24 16:16:33 STATE: test-node-wasm.js event: image -2021-11-24 16:16:39 STATE: test-node-wasm.js passed: detect: samples/in/ai-upper.jpg default -2021-11-24 16:16:39 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} -2021-11-24 16:16:39 DATA:  test-node-wasm.js result: performance: load: null total: 8430 -2021-11-24 16:16:39 STATE: test-node-wasm.js passed: detect: samples/in/ai-upper.jpg default -2021-11-24 16:16:39 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} -2021-11-24 16:16:39 DATA:  test-node-wasm.js result: performance: load: null total: 8431 -2021-11-24 16:16:40 STATE: test-node-wasm.js passed: detect: samples/in/ai-face.jpg default -2021-11-24 16:16:40 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 2 object: 1 person: 1 {"score":0.91} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":17} -2021-11-24 16:16:40 DATA:  test-node-wasm.js result: performance: load: null total: 9355 -2021-11-24 16:16:40 STATE: test-node-wasm.js passed: detect: samples/in/ai-face.jpg default -2021-11-24 16:16:40 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 2 object: 1 person: 1 {"score":0.91} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":17} -2021-11-24 16:16:40 DATA:  test-node-wasm.js result: performance: load: null total: 9355 -2021-11-24 16:16:40 STATE: test-node-wasm.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:16:40 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 1 person: 1 {"score":0.93} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:16:40 DATA:  test-node-wasm.js result: performance: load: null total: 9355 -2021-11-24 16:16:40 STATE: test-node-wasm.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:16:40 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 1 person: 1 {"score":0.93} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:16:40 DATA:  test-node-wasm.js result: performance: load: null total: 9355 -2021-11-24 16:16:40 STATE: test-node-wasm.js event: detect -2021-11-24 16:16:40 STATE: test-node-wasm.js passed: detect: samples/in/ai-upper.jpg default -2021-11-24 16:16:40 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} -2021-11-24 16:16:40 DATA:  test-node-wasm.js result: performance: load: null total: 7782 -2021-11-24 16:16:40 STATE: test-node-wasm.js event: detect -2021-11-24 16:16:40 STATE: test-node-wasm.js event: detect -2021-11-24 16:16:40 STATE: test-node-wasm.js passed: detect: samples/in/ai-face.jpg default -2021-11-24 16:16:40 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 2 object: 1 person: 1 {"score":0.91} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":17} -2021-11-24 16:16:40 DATA:  test-node-wasm.js result: performance: load: null total: 7783 -2021-11-24 16:16:40 STATE: test-node-wasm.js passed: detect: samples/in/ai-body.jpg default -2021-11-24 16:16:40 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 1 person: 1 {"score":0.93} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} -2021-11-24 16:16:40 DATA:  test-node-wasm.js result: performance: load: null total: 7783 -2021-11-24 16:16:40 INFO:  test-node-wasm.js test: monkey-patch -2021-11-24 16:16:40 STATE: test-node-wasm.js event: image -2021-11-24 16:16:41 STATE: test-node-wasm.js event: detect -2021-11-24 16:16:41 STATE: test-node-wasm.js passed: monkey patch -2021-11-24 16:16:41 STATE: test-node-wasm.js passed: segmentation [65536] -2021-11-24 16:16:41 STATE: test-node-wasm.js passeed: equal usage -2021-11-24 16:16:41 INFO:  test-node-wasm.js test: input compare -2021-11-24 16:16:41 STATE: test-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} -2021-11-24 16:16:42 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} -2021-11-24 16:16:42 STATE: test-node-wasm.js passed: image compare 0 23.280073018790848 -2021-11-24 16:16:42 INFO:  test-node-wasm.js events: {"image":21,"detect":21,"warmup":2} -2021-11-24 16:16:42 INFO:  test-node-wasm.js tensors 1927 -2021-11-24 16:16:42 INFO:  test-node-wasm.js test complete: 54717 ms -2021-11-24 16:16:42 INFO:  all tests complete -2021-11-24 16:16:42 INFO:  failed: {"count":0,"messages":[]} -2021-11-24 16:16:42 INFO:  status: {"test":"test-node.js","passed":101,"failed":0} -2021-11-24 16:16:42 INFO:  status: {"test":"test-node-gpu.js","passed":101,"failed":0} -2021-11-24 16:16:42 INFO:  status: {"test":"test-node-wasm.js","passed":102,"failed":0} +2021-11-26 11:56:00 INFO:  @vladmandic/human version 2.5.4 +2021-11-26 11:56:00 INFO:  User: vlado Platform: linux Arch: x64 Node: v17.0.1 +2021-11-26 11:56:00 INFO:  tests: ["test-node.js","test-node-gpu.js","test-node-wasm.js"] +2021-11-26 11:56:00 INFO:  demos: ["../demo/nodejs/node.js","../demo/nodejs/node-canvas.js","../demo/nodejs/node-env.js","../demo/nodejs/node-event.js","../demo/nodejs/node-multiprocess.js"] +2021-11-26 11:56:00 INFO:  +2021-11-26 11:56:00 INFO:  test-node.js start +2021-11-26 11:56:01 INFO:  test-node.js test: configuration validation +2021-11-26 11:56:01 STATE: test-node.js passed: configuration default validation [] +2021-11-26 11:56:01 STATE: test-node.js passed: configuration invalid validation [{"reason":"unknown property","where":"config.invalid = true"}] +2021-11-26 11:56:01 INFO:  test-node.js test: model load +2021-11-26 11:56:01 STATE: test-node.js passed: models loaded 22 12 [{"name":"ssrnetage","loaded":false},{"name":"gear","loaded":false},{"name":"blazeposedetect","loaded":false},{"name":"blazepose","loaded":false},{"name":"centernet","loaded":true},{"name":"efficientpose","loaded":false},{"name":"mobilefacenet","loaded":false},{"name":"emotion","loaded":true},{"name":"facedetect","loaded":true},{"name":"faceiris","loaded":true},{"name":"facemesh","loaded":true},{"name":"faceres","loaded":true},{"name":"ssrnetgender","loaded":false},{"name":"handpose","loaded":false},{"name":"handskeleton","loaded":true},{"name":"handtrack","loaded":true},{"name":"liveness","loaded":true},{"name":"movenet","loaded":true},{"name":"nanodet","loaded":false},{"name":"posenet","loaded":false},{"name":"segmentation","loaded":true},{"name":"antispoof","loaded":true}] +2021-11-26 11:56:01 INFO:  test-node.js test: warmup +2021-11-26 11:56:01 STATE: test-node.js passed: create human +2021-11-26 11:56:01 INFO:  test-node.js human version: 2.5.4 +2021-11-26 11:56:01 INFO:  test-node.js platform: linux x64 agent: NodeJS v17.0.1 +2021-11-26 11:56:01 INFO:  test-node.js tfjs version: 3.11.0 +2021-11-26 11:56:01 INFO:  test-node.js tensorflow binding version: 2.6.0-dev20210809 +2021-11-26 11:56:01 STATE: test-node.js passed: set backend: tensorflow +2021-11-26 11:56:01 STATE: test-node.js tensors 1919 +2021-11-26 11:56:01 STATE: test-node.js passed: load models +2021-11-26 11:56:01 STATE: test-node.js result: defined models: 22 loaded models: 12 +2021-11-26 11:56:01 STATE: test-node.js passed: warmup: none default +2021-11-26 11:56:01 DATA:  test-node.js result: face: 0 body: 0 hand: 0 gesture: 0 object: 0 person: 0 {} {} {} +2021-11-26 11:56:01 DATA:  test-node.js result: performance: load: null total: null +2021-11-26 11:56:01 STATE: test-node.js passed: warmup none result match +2021-11-26 11:56:02 STATE: test-node.js event: image +2021-11-26 11:56:03 STATE: test-node.js event: detect +2021-11-26 11:56:03 STATE: test-node.js event: warmup +2021-11-26 11:56:03 STATE: test-node.js passed: warmup: face default +2021-11-26 11:56:03 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 10 object: 1 person: 1 {"score":1,"age":30.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.42,"keypoints":4} +2021-11-26 11:56:03 DATA:  test-node.js result: performance: load: null total: 1740 +2021-11-26 11:56:03 STATE: test-node.js passed: warmup face result match +2021-11-26 11:56:03 STATE: test-node.js event: image +2021-11-26 11:56:05 STATE: test-node.js event: detect +2021-11-26 11:56:05 STATE: test-node.js event: warmup +2021-11-26 11:56:05 STATE: test-node.js passed: warmup: body default +2021-11-26 11:56:05 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:56:05 DATA:  test-node.js result: performance: load: null total: 1262 +2021-11-26 11:56:05 STATE: test-node.js passed: warmup body result match +2021-11-26 11:56:05 STATE: test-node.js details: {"face":{"boxScore":0.92,"faceScore":1,"age":23.6,"gender":"female","genderScore":0.95},"emotion":[{"score":0.55,"emotion":"neutral"},{"score":0.26,"emotion":"fear"},{"score":0.12,"emotion":"sad"}],"body":{"score":0.92,"keypoints":17},"hand":{"boxScore":0.52,"fingerScore":0.73,"keypoints":21},"gestures":[{"face":0,"gesture":"facing right"},{"hand":0,"gesture":"palm forward"},{"hand":0,"gesture":"palm up"},{"hand":0,"gesture":"open palm"},{"iris":0,"gesture":"looking right"},{"iris":0,"gesture":"looking up"}]} +2021-11-26 11:56:05 INFO:  test-node.js test: details verification +2021-11-26 11:56:05 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2021-11-26 11:56:05 STATE: test-node.js event: image +2021-11-26 11:56:07 STATE: test-node.js event: detect +2021-11-26 11:56:07 STATE: test-node.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:56:07 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:56:07 DATA:  test-node.js result: performance: load: null total: 1356 +2021-11-26 11:56:07 STATE: test-node.js passed: details face length 1 +2021-11-26 11:56:07 STATE: test-node.js passed: details face score 1 0.93 1 +2021-11-26 11:56:07 STATE: test-node.js passed: details face age/gender 23.6 female 0.95 73.26 +2021-11-26 11:56:07 STATE: test-node.js passed: details face arrays 4 478 1024 +2021-11-26 11:56:07 STATE: test-node.js passed: details face emotion 3 {"score":0.58,"emotion":"neutral"} +2021-11-26 11:56:07 STATE: test-node.js passed: details face anti-spoofing 0.87 +2021-11-26 11:56:07 STATE: test-node.js passed: details face liveness 0.95 +2021-11-26 11:56:07 STATE: test-node.js passed: details body length 1 +2021-11-26 11:56:07 STATE: test-node.js passed: details body 0.92 17 6 +2021-11-26 11:56:07 STATE: test-node.js passed: details hand length 1 +2021-11-26 11:56:07 STATE: test-node.js passed: details hand 0.51 0.73 point +2021-11-26 11:56:07 STATE: test-node.js passed: details hand arrays 21 5 6 +2021-11-26 11:56:07 STATE: test-node.js passed: details gesture length 6 +2021-11-26 11:56:07 STATE: test-node.js passed: details gesture first {"face":0,"gesture":"facing right"} +2021-11-26 11:56:07 STATE: test-node.js passed: details object length 1 +2021-11-26 11:56:07 STATE: test-node.js passed: details object 0.72 person +2021-11-26 11:56:08 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,4] {"checksum":1371996928} +2021-11-26 11:56:08 STATE: test-node.js event: image +2021-11-26 11:56:09 STATE: test-node.js event: detect +2021-11-26 11:56:09 STATE: test-node.js passed: tensor shape: [1,1200,1200,4] dtype: float32 +2021-11-26 11:56:10 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1200,1200,4] {"checksum":1371996928} +2021-11-26 11:56:10 STATE: test-node.js event: image +2021-11-26 11:56:11 STATE: test-node.js event: detect +2021-11-26 11:56:11 STATE: test-node.js passed: tensor shape: [1200,1200,4] dtype: float32 +2021-11-26 11:56:12 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2021-11-26 11:56:12 STATE: test-node.js event: image +2021-11-26 11:56:14 STATE: test-node.js event: detect +2021-11-26 11:56:14 STATE: test-node.js passed: tensor shape: [1,1200,1200,3] dtype: float32 +2021-11-26 11:56:15 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1200,1200,3] {"checksum":1004796864} +2021-11-26 11:56:15 STATE: test-node.js event: image +2021-11-26 11:56:16 STATE: test-node.js event: detect +2021-11-26 11:56:16 STATE: test-node.js passed: tensor shape: [1200,1200,3] dtype: float32 +2021-11-26 11:56:17 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,4] {"checksum":1371996871} +2021-11-26 11:56:17 STATE: test-node.js event: image +2021-11-26 11:56:18 STATE: test-node.js event: detect +2021-11-26 11:56:18 STATE: test-node.js passed: tensor shape: [1,1200,1200,4] dtype: int32 +2021-11-26 11:56:18 INFO:  test-node.js test default +2021-11-26 11:56:19 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2021-11-26 11:56:19 STATE: test-node.js event: image +2021-11-26 11:56:20 STATE: test-node.js event: detect +2021-11-26 11:56:20 STATE: test-node.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:56:20 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:56:20 DATA:  test-node.js result: performance: load: null total: 1204 +2021-11-26 11:56:20 STATE: test-node.js passed: default result face match 1 female 0.95 +2021-11-26 11:56:20 INFO:  test-node.js test sync +2021-11-26 11:56:21 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2021-11-26 11:56:21 STATE: test-node.js event: image +2021-11-26 11:56:22 STATE: test-node.js event: detect +2021-11-26 11:56:22 STATE: test-node.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:56:22 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:56:22 DATA:  test-node.js result: performance: load: null total: 1194 +2021-11-26 11:56:22 STATE: test-node.js passed: default sync 1 female 0.95 +2021-11-26 11:56:22 INFO:  test-node.js test: image process +2021-11-26 11:56:22 STATE: test-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2021-11-26 11:56:22 STATE: test-node.js passed: image input null [1,256,256,3] +2021-11-26 11:56:22 INFO:  test-node.js test: image null +2021-11-26 11:56:22 STATE: test-node.js passed: invalid input could not convert input to tensor +2021-11-26 11:56:22 INFO:  test-node.js test face similarity +2021-11-26 11:56:22 STATE: test-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2021-11-26 11:56:22 STATE: test-node.js event: image +2021-11-26 11:56:23 STATE: test-node.js event: detect +2021-11-26 11:56:23 STATE: test-node.js passed: detect: samples/in/ai-face.jpg default +2021-11-26 11:56:23 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 8 object: 1 person: 1 {"score":1,"age":30.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":3} +2021-11-26 11:56:23 DATA:  test-node.js result: performance: load: null total: 1088 +2021-11-26 11:56:24 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2021-11-26 11:56:24 STATE: test-node.js event: image +2021-11-26 11:56:25 STATE: test-node.js event: detect +2021-11-26 11:56:25 STATE: test-node.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:56:25 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:56:25 DATA:  test-node.js result: performance: load: null total: 1154 +2021-11-26 11:56:26 STATE: test-node.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289040} +2021-11-26 11:56:26 STATE: test-node.js event: image +2021-11-26 11:56:27 STATE: test-node.js event: detect +2021-11-26 11:56:27 STATE: test-node.js passed: detect: samples/in/ai-upper.jpg default +2021-11-26 11:56:27 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":7} +2021-11-26 11:56:27 DATA:  test-node.js result: performance: load: null total: 1048 +2021-11-26 11:56:27 STATE: test-node.js passed: face descriptor +2021-11-26 11:56:27 STATE: test-node.js passed: face similarity {"similarity":[1,0.5204253812157617,0.5018512391128399],"descriptors":[1024,1024,1024]} +2021-11-26 11:56:27 INFO:  test-node.js test face matching +2021-11-26 11:56:27 STATE: test-node.js passed: face database 57 +2021-11-26 11:56:27 STATE: test-node.js passed: face match {"first":{"index":4,"similarity":0.9339157281721077}} {"second":{"index":4,"similarity":0.5272109558655983}} {"third":{"index":4,"similarity":0.47187667831692687}} +2021-11-26 11:56:27 INFO:  test-node.js test object +2021-11-26 11:56:28 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2021-11-26 11:56:28 STATE: test-node.js event: image +2021-11-26 11:56:29 STATE: test-node.js event: detect +2021-11-26 11:56:29 STATE: test-node.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:56:29 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:56:29 DATA:  test-node.js result: performance: load: null total: 1270 +2021-11-26 11:56:29 STATE: test-node.js passed: object result match +2021-11-26 11:56:29 INFO:  test-node.js test sensitive +2021-11-26 11:56:30 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2021-11-26 11:56:30 STATE: test-node.js event: image +2021-11-26 11:56:31 STATE: test-node.js event: detect +2021-11-26 11:56:31 STATE: test-node.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:56:31 DATA:  test-node.js result: face: 1 body: 1 hand: 2 gesture: 8 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:56:31 DATA:  test-node.js result: performance: load: null total: 1338 +2021-11-26 11:56:31 STATE: test-node.js passed: sensitive result match +2021-11-26 11:56:31 STATE: test-node.js passed: sensitive face result match +2021-11-26 11:56:31 STATE: test-node.js passed: sensitive face emotion result [{"score":0.58,"emotion":"neutral"},{"score":0.24,"emotion":"fear"},{"score":0.11,"emotion":"sad"}] +2021-11-26 11:56:31 STATE: test-node.js passed: sensitive body result match +2021-11-26 11:56:31 STATE: test-node.js passed: sensitive hand result match +2021-11-26 11:56:31 INFO:  test-node.js test detectors +2021-11-26 11:56:32 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2021-11-26 11:56:32 STATE: test-node.js event: image +2021-11-26 11:56:33 STATE: test-node.js event: detect +2021-11-26 11:56:33 STATE: test-node.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:56:33 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 1 person: 1 {"score":0.93} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:56:33 DATA:  test-node.js result: performance: load: null total: 926 +2021-11-26 11:56:33 STATE: test-node.js passed: detector result face match +2021-11-26 11:56:33 STATE: test-node.js passed: detector result hand match +2021-11-26 11:56:33 INFO:  test-node.js test: multi-instance +2021-11-26 11:56:33 STATE: test-node.js event: image +2021-11-26 11:56:34 STATE: test-node.js event: detect +2021-11-26 11:56:34 STATE: test-node.js passed: detect: random default +2021-11-26 11:56:34 DATA:  test-node.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 0 person: 0 {} {} {"score":0.07,"keypoints":15} +2021-11-26 11:56:34 DATA:  test-node.js result: performance: load: null total: 817 +2021-11-26 11:56:34 INFO:  test-node.js test: first instance +2021-11-26 11:56:34 STATE: test-node.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289040} +2021-11-26 11:56:35 STATE: test-node.js passed: detect: samples/in/ai-upper.jpg default +2021-11-26 11:56:35 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} +2021-11-26 11:56:35 DATA:  test-node.js result: performance: load: null total: 810 +2021-11-26 11:56:35 INFO:  test-node.js test: second instance +2021-11-26 11:56:36 STATE: test-node.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289040} +2021-11-26 11:56:36 STATE: test-node.js passed: detect: samples/in/ai-upper.jpg default +2021-11-26 11:56:36 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} +2021-11-26 11:56:36 DATA:  test-node.js result: performance: load: null total: 839 +2021-11-26 11:56:36 INFO:  test-node.js test: concurrent +2021-11-26 11:56:37 STATE: test-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2021-11-26 11:56:37 STATE: test-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2021-11-26 11:56:37 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2021-11-26 11:56:38 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2021-11-26 11:56:39 STATE: test-node.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289040} +2021-11-26 11:56:39 STATE: test-node.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289040} +2021-11-26 11:56:39 STATE: test-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2021-11-26 11:56:40 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2021-11-26 11:56:40 STATE: test-node.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289040} +2021-11-26 11:56:41 STATE: test-node.js event: image +2021-11-26 11:56:41 STATE: test-node.js event: image +2021-11-26 11:56:41 STATE: test-node.js event: image +2021-11-26 11:56:47 STATE: test-node.js passed: detect: samples/in/ai-upper.jpg default +2021-11-26 11:56:47 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} +2021-11-26 11:56:47 DATA:  test-node.js result: performance: load: null total: 7792 +2021-11-26 11:56:47 STATE: test-node.js passed: detect: samples/in/ai-upper.jpg default +2021-11-26 11:56:47 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} +2021-11-26 11:56:47 DATA:  test-node.js result: performance: load: null total: 7792 +2021-11-26 11:56:48 STATE: test-node.js passed: detect: samples/in/ai-face.jpg default +2021-11-26 11:56:48 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 2 object: 1 person: 1 {"score":0.91} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":17} +2021-11-26 11:56:48 DATA:  test-node.js result: performance: load: null total: 8756 +2021-11-26 11:56:48 STATE: test-node.js passed: detect: samples/in/ai-face.jpg default +2021-11-26 11:56:48 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 2 object: 1 person: 1 {"score":0.91} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":17} +2021-11-26 11:56:48 DATA:  test-node.js result: performance: load: null total: 8756 +2021-11-26 11:56:48 STATE: test-node.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:56:48 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 1 person: 1 {"score":0.93} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:56:48 DATA:  test-node.js result: performance: load: null total: 8756 +2021-11-26 11:56:48 STATE: test-node.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:56:48 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 1 person: 1 {"score":0.93} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:56:48 DATA:  test-node.js result: performance: load: null total: 8756 +2021-11-26 11:56:48 STATE: test-node.js event: detect +2021-11-26 11:56:48 STATE: test-node.js passed: detect: samples/in/ai-upper.jpg default +2021-11-26 11:56:48 DATA:  test-node.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} +2021-11-26 11:56:48 DATA:  test-node.js result: performance: load: null total: 7455 +2021-11-26 11:56:48 STATE: test-node.js event: detect +2021-11-26 11:56:48 STATE: test-node.js event: detect +2021-11-26 11:56:48 STATE: test-node.js passed: detect: samples/in/ai-face.jpg default +2021-11-26 11:56:48 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 2 object: 1 person: 1 {"score":0.91} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":17} +2021-11-26 11:56:48 DATA:  test-node.js result: performance: load: null total: 7456 +2021-11-26 11:56:48 STATE: test-node.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:56:48 DATA:  test-node.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 1 person: 1 {"score":0.93} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:56:48 DATA:  test-node.js result: performance: load: null total: 7456 +2021-11-26 11:56:48 INFO:  test-node.js test: monkey-patch +2021-11-26 11:56:48 STATE: test-node.js event: image +2021-11-26 11:56:48 STATE: test-node.js event: detect +2021-11-26 11:56:48 STATE: test-node.js passed: monkey patch +2021-11-26 11:56:49 STATE: test-node.js passed: segmentation [65536] +2021-11-26 11:56:49 STATE: test-node.js passeed: equal usage +2021-11-26 11:56:49 INFO:  test-node.js test: input compare +2021-11-26 11:56:49 STATE: test-node.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2021-11-26 11:56:50 STATE: test-node.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2021-11-26 11:56:50 STATE: test-node.js passed: image compare 0 23.275441687091504 +2021-11-26 11:56:50 INFO:  test-node.js events: {"image":21,"detect":21,"warmup":2} +2021-11-26 11:56:50 INFO:  test-node.js tensors 1925 +2021-11-26 11:56:50 INFO:  test-node.js test complete: 48690 ms +2021-11-26 11:56:50 INFO:  +2021-11-26 11:56:50 INFO:  test-node-gpu.js start +2021-11-26 11:56:51 INFO:  test-node-gpu.js test: configuration validation +2021-11-26 11:56:51 STATE: test-node-gpu.js passed: configuration default validation [] +2021-11-26 11:56:51 STATE: test-node-gpu.js passed: configuration invalid validation [{"reason":"unknown property","where":"config.invalid = true"}] +2021-11-26 11:56:51 INFO:  test-node-gpu.js test: model load +2021-11-26 11:56:51 STATE: test-node-gpu.js passed: models loaded 22 12 [{"name":"ssrnetage","loaded":false},{"name":"gear","loaded":false},{"name":"blazeposedetect","loaded":false},{"name":"blazepose","loaded":false},{"name":"centernet","loaded":true},{"name":"efficientpose","loaded":false},{"name":"mobilefacenet","loaded":false},{"name":"emotion","loaded":true},{"name":"facedetect","loaded":true},{"name":"faceiris","loaded":true},{"name":"facemesh","loaded":true},{"name":"faceres","loaded":true},{"name":"ssrnetgender","loaded":false},{"name":"handpose","loaded":false},{"name":"handskeleton","loaded":true},{"name":"handtrack","loaded":true},{"name":"liveness","loaded":true},{"name":"movenet","loaded":true},{"name":"nanodet","loaded":false},{"name":"posenet","loaded":false},{"name":"segmentation","loaded":true},{"name":"antispoof","loaded":true}] +2021-11-26 11:56:51 INFO:  test-node-gpu.js test: warmup +2021-11-26 11:56:51 STATE: test-node-gpu.js passed: create human +2021-11-26 11:56:51 INFO:  test-node-gpu.js human version: 2.5.4 +2021-11-26 11:56:51 INFO:  test-node-gpu.js platform: linux x64 agent: NodeJS v17.0.1 +2021-11-26 11:56:51 INFO:  test-node-gpu.js tfjs version: 3.11.0 +2021-11-26 11:56:51 INFO:  test-node-gpu.js tensorflow binding version: 2.6.0-dev20210809 +2021-11-26 11:56:51 STATE: test-node-gpu.js passed: set backend: tensorflow +2021-11-26 11:56:51 STATE: test-node-gpu.js tensors 1919 +2021-11-26 11:56:51 STATE: test-node-gpu.js passed: load models +2021-11-26 11:56:51 STATE: test-node-gpu.js result: defined models: 22 loaded models: 12 +2021-11-26 11:56:51 STATE: test-node-gpu.js passed: warmup: none default +2021-11-26 11:56:51 DATA:  test-node-gpu.js result: face: 0 body: 0 hand: 0 gesture: 0 object: 0 person: 0 {} {} {} +2021-11-26 11:56:51 DATA:  test-node-gpu.js result: performance: load: null total: null +2021-11-26 11:56:51 STATE: test-node-gpu.js passed: warmup none result match +2021-11-26 11:56:51 STATE: test-node-gpu.js event: image +2021-11-26 11:56:53 STATE: test-node-gpu.js event: detect +2021-11-26 11:56:53 STATE: test-node-gpu.js event: warmup +2021-11-26 11:56:53 STATE: test-node-gpu.js passed: warmup: face default +2021-11-26 11:56:53 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 10 object: 1 person: 1 {"score":1,"age":30.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.42,"keypoints":4} +2021-11-26 11:56:53 DATA:  test-node-gpu.js result: performance: load: null total: 1726 +2021-11-26 11:56:53 STATE: test-node-gpu.js passed: warmup face result match +2021-11-26 11:56:53 STATE: test-node-gpu.js event: image +2021-11-26 11:56:54 STATE: test-node-gpu.js event: detect +2021-11-26 11:56:54 STATE: test-node-gpu.js event: warmup +2021-11-26 11:56:54 STATE: test-node-gpu.js passed: warmup: body default +2021-11-26 11:56:54 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:56:54 DATA:  test-node-gpu.js result: performance: load: null total: 1289 +2021-11-26 11:56:54 STATE: test-node-gpu.js passed: warmup body result match +2021-11-26 11:56:54 STATE: test-node-gpu.js details: {"face":{"boxScore":0.92,"faceScore":1,"age":23.6,"gender":"female","genderScore":0.95},"emotion":[{"score":0.55,"emotion":"neutral"},{"score":0.26,"emotion":"fear"},{"score":0.12,"emotion":"sad"}],"body":{"score":0.92,"keypoints":17},"hand":{"boxScore":0.52,"fingerScore":0.73,"keypoints":21},"gestures":[{"face":0,"gesture":"facing right"},{"hand":0,"gesture":"palm forward"},{"hand":0,"gesture":"palm up"},{"hand":0,"gesture":"open palm"},{"iris":0,"gesture":"looking right"},{"iris":0,"gesture":"looking up"}]} +2021-11-26 11:56:54 INFO:  test-node-gpu.js test: details verification +2021-11-26 11:56:55 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2021-11-26 11:56:55 STATE: test-node-gpu.js event: image +2021-11-26 11:56:57 STATE: test-node-gpu.js event: detect +2021-11-26 11:56:57 STATE: test-node-gpu.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:56:57 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:56:57 DATA:  test-node-gpu.js result: performance: load: null total: 1264 +2021-11-26 11:56:57 STATE: test-node-gpu.js passed: details face length 1 +2021-11-26 11:56:57 STATE: test-node-gpu.js passed: details face score 1 0.93 1 +2021-11-26 11:56:57 STATE: test-node-gpu.js passed: details face age/gender 23.6 female 0.95 73.26 +2021-11-26 11:56:57 STATE: test-node-gpu.js passed: details face arrays 4 478 1024 +2021-11-26 11:56:57 STATE: test-node-gpu.js passed: details face emotion 3 {"score":0.58,"emotion":"neutral"} +2021-11-26 11:56:57 STATE: test-node-gpu.js passed: details face anti-spoofing 0.87 +2021-11-26 11:56:57 STATE: test-node-gpu.js passed: details face liveness 0.95 +2021-11-26 11:56:57 STATE: test-node-gpu.js passed: details body length 1 +2021-11-26 11:56:57 STATE: test-node-gpu.js passed: details body 0.92 17 6 +2021-11-26 11:56:57 STATE: test-node-gpu.js passed: details hand length 1 +2021-11-26 11:56:57 STATE: test-node-gpu.js passed: details hand 0.51 0.73 point +2021-11-26 11:56:57 STATE: test-node-gpu.js passed: details hand arrays 21 5 6 +2021-11-26 11:56:57 STATE: test-node-gpu.js passed: details gesture length 6 +2021-11-26 11:56:57 STATE: test-node-gpu.js passed: details gesture first {"face":0,"gesture":"facing right"} +2021-11-26 11:56:57 STATE: test-node-gpu.js passed: details object length 1 +2021-11-26 11:56:57 STATE: test-node-gpu.js passed: details object 0.72 person +2021-11-26 11:56:58 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,4] {"checksum":1371996928} +2021-11-26 11:56:58 STATE: test-node-gpu.js event: image +2021-11-26 11:56:59 STATE: test-node-gpu.js event: detect +2021-11-26 11:56:59 STATE: test-node-gpu.js passed: tensor shape: [1,1200,1200,4] dtype: float32 +2021-11-26 11:57:00 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1200,1200,4] {"checksum":1371996928} +2021-11-26 11:57:00 STATE: test-node-gpu.js event: image +2021-11-26 11:57:01 STATE: test-node-gpu.js event: detect +2021-11-26 11:57:01 STATE: test-node-gpu.js passed: tensor shape: [1200,1200,4] dtype: float32 +2021-11-26 11:57:02 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2021-11-26 11:57:02 STATE: test-node-gpu.js event: image +2021-11-26 11:57:03 STATE: test-node-gpu.js event: detect +2021-11-26 11:57:03 STATE: test-node-gpu.js passed: tensor shape: [1,1200,1200,3] dtype: float32 +2021-11-26 11:57:04 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1200,1200,3] {"checksum":1004796864} +2021-11-26 11:57:04 STATE: test-node-gpu.js event: image +2021-11-26 11:57:05 STATE: test-node-gpu.js event: detect +2021-11-26 11:57:05 STATE: test-node-gpu.js passed: tensor shape: [1200,1200,3] dtype: float32 +2021-11-26 11:57:06 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,4] {"checksum":1371996871} +2021-11-26 11:57:06 STATE: test-node-gpu.js event: image +2021-11-26 11:57:07 STATE: test-node-gpu.js event: detect +2021-11-26 11:57:07 STATE: test-node-gpu.js passed: tensor shape: [1,1200,1200,4] dtype: int32 +2021-11-26 11:57:07 INFO:  test-node-gpu.js test default +2021-11-26 11:57:08 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2021-11-26 11:57:08 STATE: test-node-gpu.js event: image +2021-11-26 11:57:09 STATE: test-node-gpu.js event: detect +2021-11-26 11:57:09 STATE: test-node-gpu.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:57:09 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:57:09 DATA:  test-node-gpu.js result: performance: load: null total: 1111 +2021-11-26 11:57:09 STATE: test-node-gpu.js passed: default result face match 1 female 0.95 +2021-11-26 11:57:09 INFO:  test-node-gpu.js test sync +2021-11-26 11:57:10 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2021-11-26 11:57:10 STATE: test-node-gpu.js event: image +2021-11-26 11:57:11 STATE: test-node-gpu.js event: detect +2021-11-26 11:57:11 STATE: test-node-gpu.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:57:11 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:57:11 DATA:  test-node-gpu.js result: performance: load: null total: 1201 +2021-11-26 11:57:11 STATE: test-node-gpu.js passed: default sync 1 female 0.95 +2021-11-26 11:57:11 INFO:  test-node-gpu.js test: image process +2021-11-26 11:57:11 STATE: test-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2021-11-26 11:57:11 STATE: test-node-gpu.js passed: image input null [1,256,256,3] +2021-11-26 11:57:11 INFO:  test-node-gpu.js test: image null +2021-11-26 11:57:11 STATE: test-node-gpu.js passed: invalid input could not convert input to tensor +2021-11-26 11:57:11 INFO:  test-node-gpu.js test face similarity +2021-11-26 11:57:11 STATE: test-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2021-11-26 11:57:11 STATE: test-node-gpu.js event: image +2021-11-26 11:57:12 STATE: test-node-gpu.js event: detect +2021-11-26 11:57:12 STATE: test-node-gpu.js passed: detect: samples/in/ai-face.jpg default +2021-11-26 11:57:12 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 8 object: 1 person: 1 {"score":1,"age":30.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":3} +2021-11-26 11:57:12 DATA:  test-node-gpu.js result: performance: load: null total: 1097 +2021-11-26 11:57:13 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2021-11-26 11:57:13 STATE: test-node-gpu.js event: image +2021-11-26 11:57:15 STATE: test-node-gpu.js event: detect +2021-11-26 11:57:15 STATE: test-node-gpu.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:57:15 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:57:15 DATA:  test-node-gpu.js result: performance: load: null total: 1199 +2021-11-26 11:57:15 STATE: test-node-gpu.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289040} +2021-11-26 11:57:15 STATE: test-node-gpu.js event: image +2021-11-26 11:57:16 STATE: test-node-gpu.js event: detect +2021-11-26 11:57:16 STATE: test-node-gpu.js passed: detect: samples/in/ai-upper.jpg default +2021-11-26 11:57:16 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":7} +2021-11-26 11:57:16 DATA:  test-node-gpu.js result: performance: load: null total: 1097 +2021-11-26 11:57:16 STATE: test-node-gpu.js passed: face descriptor +2021-11-26 11:57:16 STATE: test-node-gpu.js passed: face similarity {"similarity":[1,0.5204253812157617,0.5018512391128399],"descriptors":[1024,1024,1024]} +2021-11-26 11:57:16 INFO:  test-node-gpu.js test face matching +2021-11-26 11:57:16 STATE: test-node-gpu.js passed: face database 57 +2021-11-26 11:57:16 STATE: test-node-gpu.js passed: face match {"first":{"index":4,"similarity":0.9339157281721077}} {"second":{"index":4,"similarity":0.5272109558655983}} {"third":{"index":4,"similarity":0.47187667831692687}} +2021-11-26 11:57:16 INFO:  test-node-gpu.js test object +2021-11-26 11:57:17 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2021-11-26 11:57:17 STATE: test-node-gpu.js event: image +2021-11-26 11:57:18 STATE: test-node-gpu.js event: detect +2021-11-26 11:57:18 STATE: test-node-gpu.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:57:18 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:57:18 DATA:  test-node-gpu.js result: performance: load: null total: 1270 +2021-11-26 11:57:18 STATE: test-node-gpu.js passed: object result match +2021-11-26 11:57:18 INFO:  test-node-gpu.js test sensitive +2021-11-26 11:57:19 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2021-11-26 11:57:19 STATE: test-node-gpu.js event: image +2021-11-26 11:57:20 STATE: test-node-gpu.js event: detect +2021-11-26 11:57:20 STATE: test-node-gpu.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:57:20 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 2 gesture: 8 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:57:20 DATA:  test-node-gpu.js result: performance: load: null total: 1250 +2021-11-26 11:57:20 STATE: test-node-gpu.js passed: sensitive result match +2021-11-26 11:57:20 STATE: test-node-gpu.js passed: sensitive face result match +2021-11-26 11:57:20 STATE: test-node-gpu.js passed: sensitive face emotion result [{"score":0.58,"emotion":"neutral"},{"score":0.24,"emotion":"fear"},{"score":0.11,"emotion":"sad"}] +2021-11-26 11:57:20 STATE: test-node-gpu.js passed: sensitive body result match +2021-11-26 11:57:20 STATE: test-node-gpu.js passed: sensitive hand result match +2021-11-26 11:57:20 INFO:  test-node-gpu.js test detectors +2021-11-26 11:57:21 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2021-11-26 11:57:21 STATE: test-node-gpu.js event: image +2021-11-26 11:57:22 STATE: test-node-gpu.js event: detect +2021-11-26 11:57:22 STATE: test-node-gpu.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:57:22 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 1 person: 1 {"score":0.93} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:57:22 DATA:  test-node-gpu.js result: performance: load: null total: 952 +2021-11-26 11:57:22 STATE: test-node-gpu.js passed: detector result face match +2021-11-26 11:57:22 STATE: test-node-gpu.js passed: detector result hand match +2021-11-26 11:57:22 INFO:  test-node-gpu.js test: multi-instance +2021-11-26 11:57:22 STATE: test-node-gpu.js event: image +2021-11-26 11:57:23 STATE: test-node-gpu.js event: detect +2021-11-26 11:57:23 STATE: test-node-gpu.js passed: detect: random default +2021-11-26 11:57:23 DATA:  test-node-gpu.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 0 person: 0 {} {} {"score":0.07,"keypoints":15} +2021-11-26 11:57:23 DATA:  test-node-gpu.js result: performance: load: null total: 842 +2021-11-26 11:57:23 INFO:  test-node-gpu.js test: first instance +2021-11-26 11:57:24 STATE: test-node-gpu.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289040} +2021-11-26 11:57:24 STATE: test-node-gpu.js passed: detect: samples/in/ai-upper.jpg default +2021-11-26 11:57:24 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} +2021-11-26 11:57:24 DATA:  test-node-gpu.js result: performance: load: null total: 924 +2021-11-26 11:57:24 INFO:  test-node-gpu.js test: second instance +2021-11-26 11:57:25 STATE: test-node-gpu.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289040} +2021-11-26 11:57:26 STATE: test-node-gpu.js passed: detect: samples/in/ai-upper.jpg default +2021-11-26 11:57:26 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} +2021-11-26 11:57:26 DATA:  test-node-gpu.js result: performance: load: null total: 842 +2021-11-26 11:57:26 INFO:  test-node-gpu.js test: concurrent +2021-11-26 11:57:26 STATE: test-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2021-11-26 11:57:26 STATE: test-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2021-11-26 11:57:27 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2021-11-26 11:57:28 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2021-11-26 11:57:28 STATE: test-node-gpu.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289040} +2021-11-26 11:57:28 STATE: test-node-gpu.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289040} +2021-11-26 11:57:28 STATE: test-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2021-11-26 11:57:29 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2021-11-26 11:57:29 STATE: test-node-gpu.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151289040} +2021-11-26 11:57:30 STATE: test-node-gpu.js event: image +2021-11-26 11:57:30 STATE: test-node-gpu.js event: image +2021-11-26 11:57:30 STATE: test-node-gpu.js event: image +2021-11-26 11:57:36 STATE: test-node-gpu.js passed: detect: samples/in/ai-upper.jpg default +2021-11-26 11:57:36 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} +2021-11-26 11:57:36 DATA:  test-node-gpu.js result: performance: load: null total: 7901 +2021-11-26 11:57:36 STATE: test-node-gpu.js passed: detect: samples/in/ai-upper.jpg default +2021-11-26 11:57:36 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} +2021-11-26 11:57:36 DATA:  test-node-gpu.js result: performance: load: null total: 7901 +2021-11-26 11:57:37 STATE: test-node-gpu.js passed: detect: samples/in/ai-face.jpg default +2021-11-26 11:57:37 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 2 object: 1 person: 1 {"score":0.91} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":17} +2021-11-26 11:57:37 DATA:  test-node-gpu.js result: performance: load: null total: 8706 +2021-11-26 11:57:37 STATE: test-node-gpu.js passed: detect: samples/in/ai-face.jpg default +2021-11-26 11:57:37 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 2 object: 1 person: 1 {"score":0.91} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":17} +2021-11-26 11:57:37 DATA:  test-node-gpu.js result: performance: load: null total: 8706 +2021-11-26 11:57:37 STATE: test-node-gpu.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:57:37 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 1 person: 1 {"score":0.93} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:57:37 DATA:  test-node-gpu.js result: performance: load: null total: 8706 +2021-11-26 11:57:37 STATE: test-node-gpu.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:57:37 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 1 person: 1 {"score":0.93} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:57:37 DATA:  test-node-gpu.js result: performance: load: null total: 8706 +2021-11-26 11:57:37 STATE: test-node-gpu.js event: detect +2021-11-26 11:57:37 STATE: test-node-gpu.js passed: detect: samples/in/ai-upper.jpg default +2021-11-26 11:57:37 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} +2021-11-26 11:57:37 DATA:  test-node-gpu.js result: performance: load: null total: 7411 +2021-11-26 11:57:37 STATE: test-node-gpu.js event: detect +2021-11-26 11:57:37 STATE: test-node-gpu.js event: detect +2021-11-26 11:57:37 STATE: test-node-gpu.js passed: detect: samples/in/ai-face.jpg default +2021-11-26 11:57:37 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 2 object: 1 person: 1 {"score":0.91} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":17} +2021-11-26 11:57:37 DATA:  test-node-gpu.js result: performance: load: null total: 7412 +2021-11-26 11:57:37 STATE: test-node-gpu.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:57:37 DATA:  test-node-gpu.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 1 person: 1 {"score":0.93} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:57:37 DATA:  test-node-gpu.js result: performance: load: null total: 7412 +2021-11-26 11:57:37 INFO:  test-node-gpu.js test: monkey-patch +2021-11-26 11:57:37 STATE: test-node-gpu.js event: image +2021-11-26 11:57:38 STATE: test-node-gpu.js event: detect +2021-11-26 11:57:38 STATE: test-node-gpu.js passed: monkey patch +2021-11-26 11:57:38 STATE: test-node-gpu.js passed: segmentation [65536] +2021-11-26 11:57:38 STATE: test-node-gpu.js passeed: equal usage +2021-11-26 11:57:38 INFO:  test-node-gpu.js test: input compare +2021-11-26 11:57:38 STATE: test-node-gpu.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34696120} +2021-11-26 11:57:39 STATE: test-node-gpu.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1004796864} +2021-11-26 11:57:39 STATE: test-node-gpu.js passed: image compare 0 23.275441687091504 +2021-11-26 11:57:39 INFO:  test-node-gpu.js events: {"image":21,"detect":21,"warmup":2} +2021-11-26 11:57:39 INFO:  test-node-gpu.js tensors 1925 +2021-11-26 11:57:39 INFO:  test-node-gpu.js test complete: 47934 ms +2021-11-26 11:57:39 INFO:  +2021-11-26 11:57:39 INFO:  test-node-wasm.js start +2021-11-26 11:57:40 STATE: test-node-wasm.js passed: model server: https://vladmandic.github.io/human/models/ +2021-11-26 11:57:40 INFO:  test-node-wasm.js test: configuration validation +2021-11-26 11:57:40 STATE: test-node-wasm.js passed: configuration default validation [] +2021-11-26 11:57:40 STATE: test-node-wasm.js passed: configuration invalid validation [{"reason":"unknown property","where":"config.invalid = true"}] +2021-11-26 11:57:40 INFO:  test-node-wasm.js test: model load +2021-11-26 11:57:42 STATE: test-node-wasm.js passed: models loaded 22 12 [{"name":"ssrnetage","loaded":false},{"name":"gear","loaded":false},{"name":"blazeposedetect","loaded":false},{"name":"blazepose","loaded":false},{"name":"centernet","loaded":true},{"name":"efficientpose","loaded":false},{"name":"mobilefacenet","loaded":false},{"name":"emotion","loaded":true},{"name":"facedetect","loaded":true},{"name":"faceiris","loaded":true},{"name":"facemesh","loaded":true},{"name":"faceres","loaded":true},{"name":"ssrnetgender","loaded":false},{"name":"handpose","loaded":false},{"name":"handskeleton","loaded":true},{"name":"handtrack","loaded":true},{"name":"liveness","loaded":true},{"name":"movenet","loaded":true},{"name":"nanodet","loaded":false},{"name":"posenet","loaded":false},{"name":"segmentation","loaded":true},{"name":"antispoof","loaded":true}] +2021-11-26 11:57:42 INFO:  test-node-wasm.js test: warmup +2021-11-26 11:57:42 STATE: test-node-wasm.js passed: create human +2021-11-26 11:57:42 INFO:  test-node-wasm.js human version: 2.5.4 +2021-11-26 11:57:42 INFO:  test-node-wasm.js platform: linux x64 agent: NodeJS v17.0.1 +2021-11-26 11:57:42 INFO:  test-node-wasm.js tfjs version: 3.11.0 +2021-11-26 11:57:42 STATE: test-node-wasm.js passed: set backend: wasm +2021-11-26 11:57:42 STATE: test-node-wasm.js tensors 1919 +2021-11-26 11:57:42 STATE: test-node-wasm.js passed: load models +2021-11-26 11:57:42 STATE: test-node-wasm.js result: defined models: 22 loaded models: 12 +2021-11-26 11:57:42 STATE: test-node-wasm.js passed: warmup: none default +2021-11-26 11:57:42 DATA:  test-node-wasm.js result: face: 0 body: 0 hand: 0 gesture: 0 object: 0 person: 0 {} {} {} +2021-11-26 11:57:42 DATA:  test-node-wasm.js result: performance: load: null total: null +2021-11-26 11:57:42 STATE: test-node-wasm.js passed: warmup none result match +2021-11-26 11:57:42 STATE: test-node-wasm.js event: image +2021-11-26 11:57:44 STATE: test-node-wasm.js event: detect +2021-11-26 11:57:44 STATE: test-node-wasm.js event: warmup +2021-11-26 11:57:44 STATE: test-node-wasm.js passed: warmup: face default +2021-11-26 11:57:44 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 8 object: 1 person: 1 {"score":1,"age":30.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":3} +2021-11-26 11:57:44 DATA:  test-node-wasm.js result: performance: load: null total: 2020 +2021-11-26 11:57:44 STATE: test-node-wasm.js passed: warmup face result match +2021-11-26 11:57:45 STATE: test-node-wasm.js event: image +2021-11-26 11:57:46 STATE: test-node-wasm.js event: detect +2021-11-26 11:57:46 STATE: test-node-wasm.js event: warmup +2021-11-26 11:57:46 STATE: test-node-wasm.js passed: warmup: body default +2021-11-26 11:57:46 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:57:46 DATA:  test-node-wasm.js result: performance: load: null total: 1385 +2021-11-26 11:57:46 STATE: test-node-wasm.js passed: warmup body result match +2021-11-26 11:57:46 STATE: test-node-wasm.js details: {"face":{"boxScore":0.93,"faceScore":1,"age":23.6,"gender":"female","genderScore":0.95},"emotion":[{"score":0.58,"emotion":"neutral"},{"score":0.24,"emotion":"fear"},{"score":0.11,"emotion":"sad"}],"body":{"score":0.92,"keypoints":17},"hand":{"boxScore":0.51,"fingerScore":0.73,"keypoints":21},"gestures":[{"face":0,"gesture":"facing right"},{"hand":0,"gesture":"palm forward"},{"hand":0,"gesture":"palm up"},{"hand":0,"gesture":"open palm"},{"iris":0,"gesture":"looking right"},{"iris":0,"gesture":"looking up"}]} +2021-11-26 11:57:46 INFO:  test-node-wasm.js test: details verification +2021-11-26 11:57:47 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2021-11-26 11:57:47 STATE: test-node-wasm.js event: image +2021-11-26 11:57:48 STATE: test-node-wasm.js event: detect +2021-11-26 11:57:48 STATE: test-node-wasm.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:57:48 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:57:48 DATA:  test-node-wasm.js result: performance: load: null total: 1399 +2021-11-26 11:57:48 STATE: test-node-wasm.js passed: details face length 1 +2021-11-26 11:57:48 STATE: test-node-wasm.js passed: details face score 1 0.93 1 +2021-11-26 11:57:48 STATE: test-node-wasm.js passed: details face age/gender 23.6 female 0.95 73.26 +2021-11-26 11:57:48 STATE: test-node-wasm.js passed: details face arrays 4 478 1024 +2021-11-26 11:57:48 STATE: test-node-wasm.js passed: details face emotion 3 {"score":0.58,"emotion":"neutral"} +2021-11-26 11:57:48 STATE: test-node-wasm.js passed: details face anti-spoofing 0.87 +2021-11-26 11:57:48 STATE: test-node-wasm.js passed: details face liveness 0.95 +2021-11-26 11:57:48 STATE: test-node-wasm.js passed: details body length 1 +2021-11-26 11:57:48 STATE: test-node-wasm.js passed: details body 0.92 17 6 +2021-11-26 11:57:48 STATE: test-node-wasm.js passed: details hand length 1 +2021-11-26 11:57:48 STATE: test-node-wasm.js passed: details hand 0.51 0.73 point +2021-11-26 11:57:48 STATE: test-node-wasm.js passed: details hand arrays 21 5 6 +2021-11-26 11:57:48 STATE: test-node-wasm.js passed: details gesture length 6 +2021-11-26 11:57:48 STATE: test-node-wasm.js passed: details gesture first {"face":0,"gesture":"facing right"} +2021-11-26 11:57:48 STATE: test-node-wasm.js passed: details object length 1 +2021-11-26 11:57:48 STATE: test-node-wasm.js passed: details object 0.72 person +2021-11-26 11:57:49 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,4] {"checksum":1413675264} +2021-11-26 11:57:50 STATE: test-node-wasm.js event: image +2021-11-26 11:57:51 STATE: test-node-wasm.js event: detect +2021-11-26 11:57:51 STATE: test-node-wasm.js passed: tensor shape: [1,1200,1200,4] dtype: float32 +2021-11-26 11:57:52 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1200,1200,4] {"checksum":1413675264} +2021-11-26 11:57:52 STATE: test-node-wasm.js event: image +2021-11-26 11:57:53 STATE: test-node-wasm.js event: detect +2021-11-26 11:57:53 STATE: test-node-wasm.js passed: tensor shape: [1200,1200,4] dtype: float32 +2021-11-26 11:57:55 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2021-11-26 11:57:55 STATE: test-node-wasm.js event: image +2021-11-26 11:57:56 STATE: test-node-wasm.js event: detect +2021-11-26 11:57:56 STATE: test-node-wasm.js passed: tensor shape: [1,1200,1200,3] dtype: float32 +2021-11-26 11:57:57 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1200,1200,3] {"checksum":1038921856} +2021-11-26 11:57:57 STATE: test-node-wasm.js event: image +2021-11-26 11:57:58 STATE: test-node-wasm.js event: detect +2021-11-26 11:57:58 STATE: test-node-wasm.js passed: tensor shape: [1200,1200,3] dtype: float32 +2021-11-26 11:57:59 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,4] {"checksum":1371996871} +2021-11-26 11:57:59 STATE: test-node-wasm.js event: image +2021-11-26 11:58:01 STATE: test-node-wasm.js event: detect +2021-11-26 11:58:01 STATE: test-node-wasm.js passed: tensor shape: [1,1200,1200,4] dtype: int32 +2021-11-26 11:58:01 INFO:  test-node-wasm.js test default +2021-11-26 11:58:02 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2021-11-26 11:58:02 STATE: test-node-wasm.js event: image +2021-11-26 11:58:03 STATE: test-node-wasm.js event: detect +2021-11-26 11:58:03 STATE: test-node-wasm.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:58:03 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:58:03 DATA:  test-node-wasm.js result: performance: load: null total: 1250 +2021-11-26 11:58:03 STATE: test-node-wasm.js passed: default result face match 1 female 0.94 +2021-11-26 11:58:03 INFO:  test-node-wasm.js test sync +2021-11-26 11:58:04 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2021-11-26 11:58:04 STATE: test-node-wasm.js event: image +2021-11-26 11:58:05 STATE: test-node-wasm.js event: detect +2021-11-26 11:58:05 STATE: test-node-wasm.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:58:05 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:58:05 DATA:  test-node-wasm.js result: performance: load: null total: 1248 +2021-11-26 11:58:05 STATE: test-node-wasm.js passed: default sync 1 female 0.94 +2021-11-26 11:58:05 INFO:  test-node-wasm.js test: image process +2021-11-26 11:58:05 STATE: test-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} +2021-11-26 11:58:05 STATE: test-node-wasm.js passed: image input null [1,256,256,3] +2021-11-26 11:58:05 INFO:  test-node-wasm.js test: image null +2021-11-26 11:58:05 STATE: test-node-wasm.js passed: invalid input could not convert input to tensor +2021-11-26 11:58:05 INFO:  test-node-wasm.js test face similarity +2021-11-26 11:58:05 STATE: test-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} +2021-11-26 11:58:05 STATE: test-node-wasm.js event: image +2021-11-26 11:58:06 STATE: test-node-wasm.js event: detect +2021-11-26 11:58:06 STATE: test-node-wasm.js passed: detect: samples/in/ai-face.jpg default +2021-11-26 11:58:06 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 8 object: 1 person: 1 {"score":1,"age":30.6,"gender":"female"} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":3} +2021-11-26 11:58:06 DATA:  test-node-wasm.js result: performance: load: null total: 1132 +2021-11-26 11:58:08 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2021-11-26 11:58:08 STATE: test-node-wasm.js event: image +2021-11-26 11:58:09 STATE: test-node-wasm.js event: detect +2021-11-26 11:58:09 STATE: test-node-wasm.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:58:09 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:58:09 DATA:  test-node-wasm.js result: performance: load: null total: 1256 +2021-11-26 11:58:09 STATE: test-node-wasm.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151155104} +2021-11-26 11:58:09 STATE: test-node-wasm.js event: image +2021-11-26 11:58:10 STATE: test-node-wasm.js event: detect +2021-11-26 11:58:10 STATE: test-node-wasm.js passed: detect: samples/in/ai-upper.jpg default +2021-11-26 11:58:10 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 4 object: 1 person: 1 {"score":1,"age":23.5,"gender":"female"} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":7} +2021-11-26 11:58:10 DATA:  test-node-wasm.js result: performance: load: null total: 1128 +2021-11-26 11:58:10 STATE: test-node-wasm.js passed: face descriptor +2021-11-26 11:58:10 STATE: test-node-wasm.js passed: face similarity {"similarity":[1,0.5502973648074503,0.49721702784432575],"descriptors":[1024,1024,1024]} +2021-11-26 11:58:10 INFO:  test-node-wasm.js test face matching +2021-11-26 11:58:10 STATE: test-node-wasm.js passed: face database 57 +2021-11-26 11:58:10 STATE: test-node-wasm.js passed: face match {"first":{"index":4,"similarity":0.933916055561213}} {"second":{"index":4,"similarity":0.5456802676954908}} {"third":{"index":4,"similarity":0.4681398205326839}} +2021-11-26 11:58:10 INFO:  test-node-wasm.js test object +2021-11-26 11:58:11 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2021-11-26 11:58:12 STATE: test-node-wasm.js event: image +2021-11-26 11:58:13 STATE: test-node-wasm.js event: detect +2021-11-26 11:58:13 STATE: test-node-wasm.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:58:13 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 6 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:58:13 DATA:  test-node-wasm.js result: performance: load: null total: 1212 +2021-11-26 11:58:13 STATE: test-node-wasm.js passed: object result match +2021-11-26 11:58:13 INFO:  test-node-wasm.js test sensitive +2021-11-26 11:58:14 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2021-11-26 11:58:14 STATE: test-node-wasm.js event: image +2021-11-26 11:58:15 STATE: test-node-wasm.js event: detect +2021-11-26 11:58:15 STATE: test-node-wasm.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:58:15 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 2 gesture: 8 object: 1 person: 1 {"score":1,"age":23.6,"gender":"female"} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:58:15 DATA:  test-node-wasm.js result: performance: load: null total: 1374 +2021-11-26 11:58:15 STATE: test-node-wasm.js passed: sensitive result match +2021-11-26 11:58:15 STATE: test-node-wasm.js passed: sensitive face result match +2021-11-26 11:58:15 STATE: test-node-wasm.js passed: sensitive face emotion result [{"score":0.92,"emotion":"neutral"}] +2021-11-26 11:58:15 STATE: test-node-wasm.js passed: sensitive body result match +2021-11-26 11:58:15 STATE: test-node-wasm.js passed: sensitive hand result match +2021-11-26 11:58:15 INFO:  test-node-wasm.js test detectors +2021-11-26 11:58:16 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2021-11-26 11:58:16 STATE: test-node-wasm.js event: image +2021-11-26 11:58:17 STATE: test-node-wasm.js event: detect +2021-11-26 11:58:17 STATE: test-node-wasm.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:58:17 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 1 person: 1 {"score":0.93} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:58:17 DATA:  test-node-wasm.js result: performance: load: null total: 902 +2021-11-26 11:58:17 STATE: test-node-wasm.js passed: detector result face match +2021-11-26 11:58:17 STATE: test-node-wasm.js passed: detector result hand match +2021-11-26 11:58:17 INFO:  test-node-wasm.js test: multi-instance +2021-11-26 11:58:17 STATE: test-node-wasm.js event: image +2021-11-26 11:58:18 STATE: test-node-wasm.js event: detect +2021-11-26 11:58:18 STATE: test-node-wasm.js passed: detect: random default +2021-11-26 11:58:18 DATA:  test-node-wasm.js result: face: 0 body: 1 hand: 0 gesture: 0 object: 0 person: 0 {} {} {"score":0.07,"keypoints":15} +2021-11-26 11:58:18 DATA:  test-node-wasm.js result: performance: load: null total: 797 +2021-11-26 11:58:18 INFO:  test-node-wasm.js test: first instance +2021-11-26 11:58:19 STATE: test-node-wasm.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151155104} +2021-11-26 11:58:19 STATE: test-node-wasm.js passed: detect: samples/in/ai-upper.jpg default +2021-11-26 11:58:19 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} +2021-11-26 11:58:19 DATA:  test-node-wasm.js result: performance: load: null total: 867 +2021-11-26 11:58:19 INFO:  test-node-wasm.js test: second instance +2021-11-26 11:58:20 STATE: test-node-wasm.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151155104} +2021-11-26 11:58:21 STATE: test-node-wasm.js passed: detect: samples/in/ai-upper.jpg default +2021-11-26 11:58:21 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} +2021-11-26 11:58:21 DATA:  test-node-wasm.js result: performance: load: null total: 848 +2021-11-26 11:58:21 INFO:  test-node-wasm.js test: concurrent +2021-11-26 11:58:21 STATE: test-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} +2021-11-26 11:58:21 STATE: test-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} +2021-11-26 11:58:22 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2021-11-26 11:58:23 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2021-11-26 11:58:23 STATE: test-node-wasm.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151155104} +2021-11-26 11:58:24 STATE: test-node-wasm.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151155104} +2021-11-26 11:58:24 STATE: test-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} +2021-11-26 11:58:25 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2021-11-26 11:58:25 STATE: test-node-wasm.js passed: load image: samples/in/ai-upper.jpg [1,720,688,3] {"checksum":151155104} +2021-11-26 11:58:26 STATE: test-node-wasm.js event: image +2021-11-26 11:58:26 STATE: test-node-wasm.js event: image +2021-11-26 11:58:26 STATE: test-node-wasm.js event: image +2021-11-26 11:58:32 STATE: test-node-wasm.js passed: detect: samples/in/ai-upper.jpg default +2021-11-26 11:58:32 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} +2021-11-26 11:58:32 DATA:  test-node-wasm.js result: performance: load: null total: 8645 +2021-11-26 11:58:32 STATE: test-node-wasm.js passed: detect: samples/in/ai-upper.jpg default +2021-11-26 11:58:32 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} +2021-11-26 11:58:32 DATA:  test-node-wasm.js result: performance: load: null total: 8645 +2021-11-26 11:58:33 STATE: test-node-wasm.js passed: detect: samples/in/ai-face.jpg default +2021-11-26 11:58:33 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 2 object: 1 person: 1 {"score":0.91} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":17} +2021-11-26 11:58:33 DATA:  test-node-wasm.js result: performance: load: null total: 9582 +2021-11-26 11:58:33 STATE: test-node-wasm.js passed: detect: samples/in/ai-face.jpg default +2021-11-26 11:58:33 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 2 object: 1 person: 1 {"score":0.91} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":17} +2021-11-26 11:58:33 DATA:  test-node-wasm.js result: performance: load: null total: 9582 +2021-11-26 11:58:33 STATE: test-node-wasm.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:58:33 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 1 person: 1 {"score":0.93} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:58:33 DATA:  test-node-wasm.js result: performance: load: null total: 9582 +2021-11-26 11:58:33 STATE: test-node-wasm.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:58:33 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 1 person: 1 {"score":0.93} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:58:33 DATA:  test-node-wasm.js result: performance: load: null total: 9582 +2021-11-26 11:58:33 STATE: test-node-wasm.js event: detect +2021-11-26 11:58:33 STATE: test-node-wasm.js passed: detect: samples/in/ai-upper.jpg default +2021-11-26 11:58:33 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 0 gesture: 0 object: 1 person: 1 {"score":0.96} {"score":0.71,"class":"person"} {"score":0.75,"keypoints":16} +2021-11-26 11:58:33 DATA:  test-node-wasm.js result: performance: load: null total: 7971 +2021-11-26 11:58:33 STATE: test-node-wasm.js event: detect +2021-11-26 11:58:33 STATE: test-node-wasm.js event: detect +2021-11-26 11:58:33 STATE: test-node-wasm.js passed: detect: samples/in/ai-face.jpg default +2021-11-26 11:58:33 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 2 object: 1 person: 1 {"score":0.91} {"score":0.82,"class":"person"} {"score":0.47,"keypoints":17} +2021-11-26 11:58:33 DATA:  test-node-wasm.js result: performance: load: null total: 7972 +2021-11-26 11:58:33 STATE: test-node-wasm.js passed: detect: samples/in/ai-body.jpg default +2021-11-26 11:58:33 DATA:  test-node-wasm.js result: face: 1 body: 1 hand: 1 gesture: 0 object: 1 person: 1 {"score":0.93} {"score":0.72,"class":"person"} {"score":0.92,"keypoints":17} +2021-11-26 11:58:33 DATA:  test-node-wasm.js result: performance: load: null total: 7972 +2021-11-26 11:58:33 INFO:  test-node-wasm.js test: monkey-patch +2021-11-26 11:58:33 STATE: test-node-wasm.js event: image +2021-11-26 11:58:34 STATE: test-node-wasm.js event: detect +2021-11-26 11:58:34 STATE: test-node-wasm.js passed: monkey patch +2021-11-26 11:58:34 STATE: test-node-wasm.js passed: segmentation [65536] +2021-11-26 11:58:34 STATE: test-node-wasm.js passeed: equal usage +2021-11-26 11:58:34 INFO:  test-node-wasm.js test: input compare +2021-11-26 11:58:34 STATE: test-node-wasm.js passed: load image: samples/in/ai-face.jpg [1,256,256,3] {"checksum":34697856} +2021-11-26 11:58:35 STATE: test-node-wasm.js passed: load image: samples/in/ai-body.jpg [1,1200,1200,3] {"checksum":1038921856} +2021-11-26 11:58:36 STATE: test-node-wasm.js passed: image compare 0 23.280073018790848 +2021-11-26 11:58:36 INFO:  test-node-wasm.js events: {"image":21,"detect":21,"warmup":2} +2021-11-26 11:58:36 INFO:  test-node-wasm.js tensors 1927 +2021-11-26 11:58:36 INFO:  test-node-wasm.js test complete: 55563 ms +2021-11-26 11:58:36 INFO:  all tests complete +2021-11-26 11:58:36 INFO:  failed: {"count":0,"messages":[]} +2021-11-26 11:58:36 INFO:  status: {"test":"test-node.js","passed":101,"failed":0} +2021-11-26 11:58:36 INFO:  status: {"test":"test-node-gpu.js","passed":101,"failed":0} +2021-11-26 11:58:36 INFO:  status: {"test":"test-node-wasm.js","passed":102,"failed":0} diff --git a/wiki b/wiki index 7b35db4d..c8ca9cc9 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit 7b35db4dca9ba3a41b62ec11257a474b2d12c132 +Subproject commit c8ca9cc9ec250e8e7f618f562b52dbc740d60580