@needle-tools/engine 4.10.4-next.f6dc9f2 → 4.10.5-next.11705bc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/components.needle.json +1 -1
  3. package/dist/{gltf-progressive-DUR9TuAH.js → gltf-progressive-B63NpN_i.js} +1 -1
  4. package/dist/{gltf-progressive-Iy7aSAPk.umd.cjs → gltf-progressive-CHeORqEv.umd.cjs} +2 -2
  5. package/dist/{gltf-progressive-CoZbSfPR.min.js → gltf-progressive-D4Z_Khp3.min.js} +1 -1
  6. package/dist/{needle-engine.bundle-BLWB7qT-.js → needle-engine.bundle-BLW60mqN.js} +2204 -2198
  7. package/dist/{needle-engine.bundle-qakLfSFW.min.js → needle-engine.bundle-BY5d8vBy.min.js} +114 -114
  8. package/dist/{needle-engine.bundle-VwU3FjT0.umd.cjs → needle-engine.bundle-CB9LSUuz.umd.cjs} +117 -117
  9. package/dist/needle-engine.d.ts +15 -15
  10. package/dist/needle-engine.js +3 -3
  11. package/dist/needle-engine.min.js +1 -1
  12. package/dist/needle-engine.umd.cjs +1 -1
  13. package/lib/engine/debug/debug_overlay.js +1 -1
  14. package/lib/engine/engine_context.js +1 -0
  15. package/lib/engine/engine_context.js.map +1 -1
  16. package/lib/engine-components/Renderer.js +33 -32
  17. package/lib/engine-components/Renderer.js.map +1 -1
  18. package/lib/engine-components/RendererLightmap.d.ts +6 -5
  19. package/lib/engine-components/RendererLightmap.js +35 -21
  20. package/lib/engine-components/RendererLightmap.js.map +1 -1
  21. package/lib/engine-components/web/CursorFollow.d.ts +16 -2
  22. package/lib/engine-components/web/CursorFollow.js +41 -7
  23. package/lib/engine-components/web/CursorFollow.js.map +1 -1
  24. package/package.json +2 -2
  25. package/src/engine/debug/debug_overlay.ts +1 -1
  26. package/src/engine/engine_context.ts +1 -0
  27. package/src/engine-components/Renderer.ts +38 -37
  28. package/src/engine-components/RendererLightmap.ts +42 -24
  29. package/src/engine-components/web/CursorFollow.ts +46 -9
package/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ All notable changes to this package will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [4.10.4] - 2025-10-08
8
+ - Update: three-animation-pointer dependency to 1.0.4 to support KHR_node_visibility extension
9
+ - Documentation improvements
10
+
7
11
  ## [4.10.3] - 2025-10-06
8
12
  ### Needle Engine
9
13
  - Add: [`ScrollFollow`](<https://engine.needle.tools/docs/api/ScrollFollow>) timeline markers can now be defined in HTML only and don't require markers to be present in the Timeline anymore. This means any timeline animation can now be mapped to HTML content by annotating the HTML elements.
@@ -1 +1 @@
1
- {"components":[{"file":"/src/engine-components/AlignmentConstraint.ts","type":"AlignmentConstraint","extends":["Behaviour"],"properties":{"from":{"type":"GameObject | undefined"},"to":{"type":"GameObject | undefined"}}},{"file":"/src/engine-components/Animation.ts","type":"Animation","extends":["Behaviour"],"properties":{"playAutomatically":{"type":"boolean"},"randomStartTime":{"type":"boolean"},"minMaxSpeed":{"type":"Vec2"},"minMaxOffsetNormalized":{"type":"Vec2"},"loop":{"type":"boolean"},"clampWhenFinished":{"type":"boolean"},"clips":{"type":"AnimationClip[]"}}},{"file":"/src/engine-components/AnimationCurve.ts","type":"Keyframe","extends":[],"properties":{"time":{"type":"number"},"value":{"type":"number"},"inTangent":{"type":"number"},"inWeight":{"type":"number"},"outTangent":{"type":"number"},"outWeight":{"type":"number"},"weightedMode":{"type":"number"}}},{"file":"/src/engine-components/AnimationCurve.ts","type":"AnimationCurve","extends":[],"properties":{"keys":{"type":"Array<Keyframe>"}}},{"file":"/src/engine-components/Animator.ts","type":"Animator","extends":["Behaviour"],"properties":{"applyRootMotion":{"type":"boolean"},"hasRootMotion":{"type":"boolean"},"keepAnimatorControllerStateOnDisable":{"type":"boolean"},"runtimeAnimatorController":{"type":"AnimatorControllerModel | AnimatorController | undefined | null"}}},{"file":"/src/engine-components/AudioSource.ts","type":"AudioSource","extends":["Behaviour"],"properties":{"clip":{"type":"string | MediaStream"},"playOnAwake":{"type":"boolean"},"preload":{"type":"boolean"},"playInBackground":{"type":"boolean"},"pitch":{"type":"number"},"rollOffMode":{"type":"AudioRolloffMode"}}},{"file":"/src/engine-components/AxesHelper.ts","type":"AxesHelper","extends":["Behaviour"],"properties":{"length":{"type":"number"},"depthTest":{"type":"boolean"},"isGizmo":{"type":"boolean"}}},{"file":"/src/engine-components/Camera.ts","type":"Camera","extends":["Behaviour"],"properties":{"aspect":{"type":"number"},"fieldOfView":{"type":"number | undefined"},"nearClipPlane":{"type":"any"},"farClipPlane":{"type":"any"},"orthographic":{"type":"boolean"},"orthographicSize":{"type":"number"},"ARBackgroundAlpha":{"type":"number"},"cullingMask":{"type":"number"},"backgroundBlurriness":{"type":"number | undefined"},"backgroundIntensity":{"type":"number | undefined"},"backgroundRotation":{"type":"Euler | undefined"},"environmentIntensity":{"type":"number | undefined"},"targetTexture":{"type":"RenderTexture | null"}}},{"file":"/src/engine-components/CharacterController.ts","type":"CharacterController","extends":["Behaviour"],"properties":{"center":{"type":"Vector3"},"radius":{"type":"number"},"height":{"type":"number"}}},{"file":"/src/engine-components/CharacterController.ts","type":"CharacterControllerInput","extends":["Behaviour"],"properties":{"controller":{"type":"CharacterController"},"movementSpeed":{"type":"number"},"rotationSpeed":{"type":"number"},"jumpForce":{"type":"number"},"doubleJumpForce":{"type":"number"},"animator":{"type":"Animator"}}},{"file":"/src/engine-components/Collider.ts","type":"Collider","extends":["Behaviour"],"properties":{"attachedRigidbody":{"type":"Rigidbody | null"},"isTrigger":{"type":"boolean"},"sharedMaterial":{"type":"PhysicsMaterial"},"membership":{"type":"number[]"},"filter":{"type":"number[]"}}},{"file":"/src/engine-components/Collider.ts","type":"SphereCollider","extends":["Collider"],"properties":{"radius":{"type":"number"},"center":{"type":"Vector3"}}},{"file":"/src/engine-components/Collider.ts","type":"BoxCollider","extends":["Collider"],"properties":{"size":{"type":"Vector3"},"center":{"type":"Vector3"}}},{"file":"/src/engine-components/Collider.ts","type":"MeshCollider","extends":["Collider"],"properties":{"sharedMesh":{"type":"Mesh"},"convex":{"type":"boolean"}}},{"file":"/src/engine-components/Collider.ts","type":"CapsuleCollider","extends":["Collider"],"properties":{"center":{"type":"Vector3"},"radius":{"type":"number"},"height":{"type":"number"}}},{"file":"/src/engine-components/ContactShadows.ts","type":"ContactShadows","extends":["Behaviour"],"properties":{"autoFit":{"type":"boolean"},"darkness":{"type":"number"},"opacity":{"type":"number"},"blur":{"type":"number"},"occludeBelowGround":{"type":"boolean"},"backfaceShadows":{"type":"boolean"}}},{"file":"/src/engine-components/DeviceFlag.ts","type":"DeviceFlag","extends":["Behaviour"],"properties":{"visibleOn":{"type":"DeviceType"}}},{"file":"/src/engine-components/DragControls.ts","type":"DragControls","extends":["Behaviour"],"properties":{"dragMode":{"type":"DragMode"},"snapGridResolution":{"type":"number"},"keepRotation":{"type":"boolean"},"xrDragMode":{"type":"DragMode"},"xrKeepRotation":{"type":"boolean"},"xrDistanceDragFactor":{"type":"number"},"showGizmo":{"type":"boolean"}}},{"file":"/src/engine-components/DropListener.ts","type":"DropListener","extends":["Behaviour"],"properties":{"dropArea":{"type":"Object3D"},"fitIntoVolume":{"type":"boolean"},"fitVolumeSize":{"type":"any"},"placeAtHitPosition":{"type":"boolean"},"useNetworking":{"type":"boolean"},"onDropped":{"type":"EventList<DropListenerOnDropArguments>"}}},{"file":"/src/engine-components/Duplicatable.ts","type":"Duplicatable","extends":["Behaviour"],"properties":{"parent":{"type":"GameObject | null"},"object":{"type":"GameObject | null"},"limitCount":{"type":"any"}}},{"file":"/src/engine-components/EventTrigger.ts","type":"TriggerEvent","extends":[],"properties":{"eventID":{"type":"EventType"},"callback":{"type":"EventList<any>"}}},{"file":"/src/engine-components/EventTrigger.ts","type":"EventTrigger","extends":["Behaviour"],"properties":{"triggers":{"type":"Array<TriggerEvent>"}}},{"file":"/src/engine-components/Fog.ts","type":"Fog","extends":["Behaviour"],"properties":{"near":{"type":"number"},"far":{"type":"number"},"color":{"type":"Color"}}},{"file":"/src/engine-components/Gizmos.ts","type":"BoxGizmo","extends":["Behaviour"],"properties":{"objectBounds":{"type":"boolean"},"color":{"type":"Color"},"isGizmo":{"type":"boolean"}}},{"file":"/src/engine-components/GridHelper.ts","type":"GridHelper","extends":["Behaviour"],"properties":{"isGizmo":{"type":"boolean"},"color0":{"type":"Color | ColorRepresentation"},"color1":{"type":"Color | ColorRepresentation"}}},{"file":"/src/engine-components/GroundProjection.ts","type":"GroundProjectedEnv","extends":["Behaviour"],"properties":{"applyOnAwake":{"type":"boolean"},"autoFit":{"type":"boolean"},"radius":{"type":"number"},"height":{"type":"number"},"arBlending":{"type":"number"}}},{"file":"/src/engine-components/Joints.ts","type":"Joint","extends":["Behaviour"],"properties":{"connectedBody":{"type":"Rigidbody"}}},{"file":"/src/engine-components/Joints.ts","type":"HingeJoint","extends":["Joint"],"properties":{"anchor":{"type":"Vector3"},"axis":{"type":"Vector3"}}},{"file":"/src/engine-components/LODGroup.ts","type":"LODModel","extends":[],"properties":{"screenRelativeTransitionHeight":{"type":"number"},"distance":{"type":"number"},"renderers":{"type":"Renderer[]"}}},{"file":"/src/engine-components/LODGroup.ts","type":"LODGroup","extends":["Behaviour"],"properties":{"localReferencePoint":{"type":"Vector3 | undefined"},"lodModels":{"type":"LODModel[]"}}},{"file":"/src/engine-components/Light.ts","type":"Light","extends":["Behaviour"],"properties":{"type":{"type":"LightType"},"color":{"type":"Color"},"shadowNearPlane":{"type":"number"},"shadowBias":{"type":"number"},"shadowNormalBias":{"type":"number"},"shadows":{"type":"LightShadows"},"lightmapBakeType":{"type":"LightmapBakeType"},"intensity":{"type":"number"}}},{"file":"/src/engine-components/LookAtConstraint.ts","type":"LookAtConstraint","extends":["Behaviour"],"properties":{"constraintActive":{"type":"boolean"},"locked":{"type":"boolean"},"sources":{"type":"Object3D[]"}}},{"file":"/src/engine-components/NeedleMenu.ts","type":"NeedleMenu","extends":["Behaviour"],"properties":{"position":{"type":"\"top\" | \"bottom\""},"showNeedleLogo":{"type":"boolean"},"showSpatialMenu":{"type":"boolean"},"createFullscreenButton":{"type":"boolean"},"createMuteButton":{"type":"boolean"},"createQRCodeButton":{"type":"boolean"}}},{"file":"/src/engine-components/NestedGltf.ts","type":"NestedGltf","extends":["Behaviour"],"properties":{"filePath":{"type":"AssetReference"},"loaded":{"type":"EventList<{ component: NestedGltf, instance: any, asset: AssetReference }>"}}},{"file":"/src/engine-components/Networking.ts","type":"Networking","extends":["Behaviour"],"properties":{"url":{"type":"string | null"},"urlParameterName":{"type":"string | null"},"localhost":{"type":"string | null"}}},{"file":"/src/engine-components/OffsetConstraint.ts","type":"OffsetConstraint","extends":["Behaviour"],"properties":{"referenceSpace":{"type":"GameObject | undefined"},"from":{"type":"GameObject | undefined"},"positionOffset":{"type":"Vector3"},"rotationOffset":{"type":"Vector3"}}},{"file":"/src/engine-components/OrbitControls.ts","type":"OrbitControls","extends":["Behaviour"],"properties":{"autoTarget":{"type":"boolean"},"autoFit":{"type":"boolean"},"enableRotate":{"type":"boolean"},"autoRotate":{"type":"boolean"},"autoRotateSpeed":{"type":"number"},"minAzimuthAngle":{"type":"number"},"maxAzimuthAngle":{"type":"number"},"minPolarAngle":{"type":"number"},"maxPolarAngle":{"type":"number"},"enableKeys":{"type":"boolean"},"enableDamping":{"type":"boolean"},"dampingFactor":{"type":"number"},"enableZoom":{"type":"boolean"},"minZoom":{"type":"number"},"maxZoom":{"type":"number"},"zoomSpeed":{"type":"number"},"enablePan":{"type":"boolean"},"lookAtConstraint":{"type":"LookAtConstraint | null"},"lookAtConstraint01":{"type":"number"},"allowInterrupt":{"type":"boolean"},"middleClickToFocus":{"type":"boolean"},"doubleClickToFocus":{"type":"boolean"},"clickBackgroundToFitScene":{"type":"number"},"targetLerpDuration":{"type":"any"}}},{"file":"/src/engine-components/ReflectionProbe.ts","type":"ReflectionProbe","extends":["Behaviour"],"properties":{"center":{"type":"Vector3"},"size":{"type":"Vector3"}}},{"file":"/src/engine-components/Renderer.ts","type":"Renderer","extends":["Behaviour"],"properties":{"receiveShadows":{"type":"boolean"},"shadowCastingMode":{"type":"ShadowCastingMode"},"lightmapIndex":{"type":"number"},"lightmapScaleOffset":{"type":"Vector4"},"enableInstancing":{"type":"boolean | boolean[] | undefined"},"renderOrder":{"type":"number[] | undefined"},"allowOcclusionWhenDynamic":{"type":"boolean"},"probeAnchor":{"type":"Object3D"},"reflectionProbeUsage":{"type":"ReflectionProbeUsage"}}},{"file":"/src/engine-components/RigidBody.ts","type":"Rigidbody","extends":["Behaviour"],"properties":{"mass":{"type":"number"},"useGravity":{"type":"boolean"},"centerOfMass":{"type":"Vector3"},"constraints":{"type":"RigidbodyConstraints"},"isKinematic":{"type":"boolean"},"drag":{"type":"number"},"angularDrag":{"type":"number"},"detectCollisions":{"type":"boolean"},"sleepThreshold":{"type":"number"},"collisionDetectionMode":{"type":"CollisionDetectionMode"}}},{"file":"/src/engine-components/SceneSwitcher.ts","type":"SceneSwitcher","extends":["Behaviour"],"properties":{"autoLoadFirstScene":{"type":"boolean"},"scenes":{"type":"AssetReference[]"},"loadingScene":{"type":"AssetReference"},"queryParameterName":{"type":"string"},"useSceneName":{"type":"boolean"},"clamp":{"type":"boolean"},"useHistory":{"type":"boolean"},"useKeyboard":{"type":"boolean"},"useSwipe":{"type":"boolean"},"useSceneLighting":{"type":"boolean"},"useSceneBackground":{"type":"boolean"},"preloadNext":{"type":"number"},"preloadPrevious":{"type":"number"},"preloadConcurrent":{"type":"number"},"createMenuButtons":{"type":"boolean"},"sceneLoadingStart":{"type":"EventList<LoadSceneEvent>"},"sceneLoadingProgress":{"type":"EventList<ProgressEvent>"},"sceneLoaded":{"type":"EventList<SceneSwitcher>"}}},{"file":"/src/engine-components/ScreenCapture.ts","type":"ScreenCapture","extends":["Behaviour"],"properties":{"allowStartOnClick":{"type":"boolean"},"autoConnect":{"type":"boolean"},"videoPlayer":{"type":"VideoPlayer | undefined"},"device":{"type":"ScreenCaptureDeviceTypes"},"deviceName":{"type":"string"}}},{"file":"/src/engine-components/ShadowCatcher.ts","type":"ShadowCatcher","extends":["Behaviour"],"properties":{"mode":{"type":"ShadowMode"},"shadowColor":{"type":"RGBAColor"}}},{"file":"/src/engine-components/Skybox.ts","type":"RemoteSkybox","extends":["Behaviour"],"properties":{"url":{"type":"string"},"allowDrop":{"type":"boolean"},"background":{"type":"boolean"},"environment":{"type":"boolean"},"allowNetworking":{"type":"boolean"}}},{"file":"/src/engine-components/SmoothFollow.ts","type":"SmoothFollow","extends":["Behaviour"],"properties":{"target":{"type":"Object3D | null"},"followFactor":{"type":"any"},"rotateFactor":{"type":"any"},"positionAxes":{"type":"Axes"}}},{"file":"/src/engine-components/SpatialTrigger.ts","type":"SpatialTriggerReceiver","extends":["Behaviour"],"properties":{"triggerMask":{"type":"number"},"onEnter":{"type":"EventList<any>"},"onStay":{"type":"EventList<any>"},"onExit":{"type":"EventList<any>"}}},{"file":"/src/engine-components/SpatialTrigger.ts","type":"SpatialTrigger","extends":["Behaviour"],"properties":{"triggerMask":{"type":"number"}}},{"file":"/src/engine-components/SpectatorCamera.ts","type":"SpectatorCamera","extends":["Behaviour"],"properties":{"useKeys":{"type":"boolean"}}},{"file":"/src/engine-components/SpriteRenderer.ts","type":"Sprite","extends":[],"properties":{"guid":{"type":"string"},"texture":{"type":"Texture"}}},{"file":"/src/engine-components/SpriteRenderer.ts","type":"SpriteSheet","extends":[],"properties":{"sprites":{"type":"Sprite[]"}}},{"file":"/src/engine-components/SpriteRenderer.ts","type":"SpriteData","extends":[],"properties":{"spriteSheet":{"type":"SpriteSheet"},"index":{"type":"number"}}},{"file":"/src/engine-components/SpriteRenderer.ts","type":"SpriteRenderer","extends":["Behaviour"],"properties":{"drawMode":{"type":"SpriteDrawMode"},"size":{"type":"Vec2"},"color":{"type":"RGBAColor"},"sharedMaterial":{"type":"Material"},"transparent":{"type":"boolean"},"cutoutThreshold":{"type":"number"},"castShadows":{"type":"boolean"},"renderOrder":{"type":"number"},"toneMapped":{"type":"boolean"}}},{"file":"/src/engine-components/SyncedCamera.ts","type":"SyncedCamera","extends":["Behaviour"],"properties":{"cameraPrefab":{"type":"Object3D | null | AssetReference"}}},{"file":"/src/engine-components/SyncedRoom.ts","type":"SyncedRoom","extends":["Behaviour"],"properties":{"roomName":{"type":"string"},"urlParameterName":{"type":"string"},"joinRandomRoom":{"type":"boolean"},"requireRoomParameter":{"type":"boolean"},"autoRejoin":{"type":"boolean"},"createJoinButton":{"type":"boolean"},"createViewOnlyButton":{"type":"boolean"},"roomPrefix":{"type":"string"}}},{"file":"/src/engine-components/TransformGizmo.ts","type":"TransformGizmo","extends":["Behaviour"],"properties":{"isGizmo":{"type":"boolean"},"translationSnap":{"type":"number"},"rotationSnapAngle":{"type":"number"},"scaleSnap":{"type":"number"}}},{"file":"/src/engine-components/VideoPlayer.ts","type":"VideoPlayer","extends":["Behaviour"],"properties":{"playOnAwake":{"type":"boolean"},"aspectMode":{"type":"AspectMode"},"clip":{"type":"string | MediaStream | null"},"source":{"type":"VideoSource"},"renderMode":{"type":"VideoRenderMode"},"targetMaterialProperty":{"type":"string"},"targetMaterialRenderer":{"type":"Renderer"},"targetTexture":{"type":"Texture"},"time":{"type":"number"},"isLooping":{"type":"boolean"},"audioOutputMode":{"type":"VideoAudioOutputMode"}}},{"file":"/src/engine-components/Voip.ts","type":"Voip","extends":["Behaviour"],"properties":{"autoConnect":{"type":"boolean"},"runInBackground":{"type":"boolean"},"createMenuButton":{"type":"boolean"}}},{"file":"/src/engine-components/avatar/AvatarBlink_Simple.ts","type":"AvatarBlink_Simple","extends":["Behaviour"],"properties":{"eyes":{"type":"Object3D[]"},"lastBlinkTime":{"type":"number"},"blinkLength":{"type":"number"},"eyesOpen":{"type":"boolean"}}},{"file":"/src/engine-components/avatar/AvatarEyeLook_Rotation.ts","type":"AvatarEyeLook_Rotation","extends":["Behaviour"],"properties":{"head":{"type":"GameObject | null"},"eyes":{"type":"GameObject[] | null"},"target":{"type":"Object3D | null"}}},{"file":"/src/engine-components/avatar/Avatar_MouthShapes.ts","type":"Avatar_MouthShapes","extends":["Behaviour"],"properties":{"idle":{"type":"Object3D[]"},"talking":{"type":"Object3D[]"}}},{"file":"/src/engine-components/export/gltf/GltfExport.ts","type":"GltfExport","extends":["Behaviour"],"properties":{"binary":{"type":"boolean"},"objects":{"type":"Object3D[]"}}},{"file":"/src/engine-components/export/usdz/USDZExporter.ts","type":"CustomBranding","extends":[],"properties":{"callToAction":{"type":"string"},"checkoutTitle":{"type":"string"},"checkoutSubtitle":{"type":"string"},"callToActionURL":{"type":"string"}}},{"file":"/src/engine-components/export/usdz/USDZExporter.ts","type":"USDZExporter","extends":["Behaviour"],"properties":{"objectToExport":{"type":"Object3D | null | undefined"},"autoExportAnimations":{"type":"boolean"},"autoExportAudioSources":{"type":"boolean"},"exportFileName":{"type":"string | null | undefined"},"customUsdzFile":{"type":"string | null | undefined"},"customBranding":{"type":"CustomBranding"},"anchoringType":{"type":"\"plane\" | \"image\" | \"face\" | \"none\""},"maxTextureSize":{"type":"256 | 512 | 1024 | 2048 | 4096 | 8192"},"planeAnchoringAlignment":{"type":"\"horizontal\" | \"vertical\" | \"any\""},"interactive":{"type":"boolean"},"physics":{"type":"boolean"},"allowCreateQuicklookButton":{"type":"boolean"},"quickLookCompatible":{"type":"boolean"}}},{"file":"/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts","type":"ChangeTransformOnClick","extends":["Behaviour"],"properties":{"object":{"type":"Object3D"},"target":{"type":"Object3D"},"duration":{"type":"number"},"relativeMotion":{"type":"boolean"}}},{"file":"/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts","type":"ChangeMaterialOnClick","extends":["Behaviour"],"properties":{"materialToSwitch":{"type":"Material"},"variantMaterial":{"type":"Material"},"fadeDuration":{"type":"number"}}},{"file":"/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts","type":"SetActiveOnClick","extends":["Behaviour"],"properties":{"target":{"type":"Object3D"},"toggleOnClick":{"type":"boolean"},"targetState":{"type":"boolean"},"hideSelf":{"type":"boolean"}}},{"file":"/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts","type":"EmphasizeOnClick","extends":["Behaviour"],"properties":{"target":{"type":"Object3D"},"duration":{"type":"number"},"motionType":{"type":"EmphasizeActionMotionType"}}},{"file":"/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts","type":"PlayAudioOnClick","extends":["Behaviour"],"properties":{"target":{"type":"AudioSource"},"clip":{"type":"string"},"toggleOnClick":{"type":"boolean"}}},{"file":"/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts","type":"PlayAnimationOnClick","extends":["Behaviour"],"properties":{"animator":{"type":"Animator"},"stateName":{"type":"string"}}},{"file":"/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts","type":"PreliminaryAction","extends":["Behaviour"],"properties":{"target":{"type":"Object3D"}}},{"file":"/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts","type":"PreliminaryTrigger","extends":["Behaviour"],"properties":{"target":{"type":"PreliminaryAction"}}},{"file":"/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts","type":"VisibilityAction","extends":["PreliminaryAction"],"properties":{"type":{"type":"VisibilityActionType"},"duration":{"type":"number"}}},{"file":"/src/engine-components/particlesystem/ParticleSystem.ts","type":"ParticleSystemRenderer","extends":["Behaviour"],"properties":{"renderMode":{"type":"ParticleSystemRenderMode"},"particleMaterial":{"type":"SpriteMaterial | MeshBasicMaterial"},"trailMaterial":{"type":"SpriteMaterial | MeshBasicMaterial"},"maxParticleSize":{"type":"number"},"minParticleSize":{"type":"number"},"velocityScale":{"type":"number"},"cameraVelocityScale":{"type":"number"},"lengthScale":{"type":"number"}}},{"file":"/src/engine-components/particlesystem/ParticleSystem.ts","type":"ParticleSystem","extends":["Behaviour"],"properties":{"colorOverLifetime":{"type":"ColorOverLifetimeModule"},"main":{"type":"MainModule"},"emission":{"type":"EmissionModule"},"sizeOverLifetime":{"type":"SizeOverLifetimeModule"},"shape":{"type":"ShapeModule"},"noise":{"type":"NoiseModule"},"trails":{"type":"TrailModule"},"velocityOverLifetime":{"type":"VelocityOverLifetimeModule"},"limitVelocityOverLifetime":{"type":"LimitVelocityOverLifetimeModule"},"inheritVelocity":{"type":"InheritVelocityModule"},"colorBySpeed":{"type":"ColorBySpeedModule"},"textureSheetAnimation":{"type":"TextureSheetAnimationModule"},"rotationOverLifetime":{"type":"RotationOverLifetimeModule"},"rotationBySpeed":{"type":"RotationBySpeedModule"},"sizeBySpeed":{"type":"SizeBySpeedModule"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"Gradient","extends":[],"properties":{"alphaKeys":{"type":"Array<AlphaKey>"},"colorKeys":{"type":"Array<ColorKey>"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"MinMaxCurve","extends":[],"properties":{"mode":{"type":"ParticleSystemCurveMode | ParticleSystemCurveModeKeys"},"constant":{"type":"number"},"constantMin":{"type":"number"},"constantMax":{"type":"number"},"curve":{"type":"AnimationCurve"},"curveMin":{"type":"AnimationCurve"},"curveMax":{"type":"AnimationCurve"},"curveMultiplier":{"type":"number"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"MinMaxGradient","extends":[],"properties":{"mode":{"type":"ParticleSystemGradientMode | ParticleSystemGradientModeKeys"},"color":{"type":"RGBAColor | Color"},"colorMin":{"type":"RGBAColor | Color"},"colorMax":{"type":"RGBAColor | Color"},"gradient":{"type":"Gradient"},"gradientMin":{"type":"Gradient"},"gradientMax":{"type":"Gradient"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"MainModule","extends":[],"properties":{"gravityModifier":{"type":"MinMaxCurve"},"startColor":{"type":"MinMaxGradient"},"startDelay":{"type":"MinMaxCurve"},"startLifetime":{"type":"MinMaxCurve"},"startRotation":{"type":"MinMaxCurve"},"startRotationX":{"type":"MinMaxCurve"},"startRotationY":{"type":"MinMaxCurve"},"startRotationZ":{"type":"MinMaxCurve"},"startSize":{"type":"MinMaxCurve"},"startSizeX":{"type":"MinMaxCurve"},"startSizeY":{"type":"MinMaxCurve"},"startSizeZ":{"type":"MinMaxCurve"},"startSpeed":{"type":"MinMaxCurve"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"EmissionModule","extends":[],"properties":{"enabled":{"type":"boolean"},"bursts":{"type":"ParticleBurst[]"},"rateOverTime":{"type":"MinMaxCurve"},"rateOverTimeMultiplier":{"type":"number"},"rateOverDistance":{"type":"MinMaxCurve"},"rateOverDistanceMultiplier":{"type":"number"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"ColorOverLifetimeModule","extends":[],"properties":{"color":{"type":"MinMaxGradient"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"SizeOverLifetimeModule","extends":[],"properties":{"size":{"type":"MinMaxCurve"},"x":{"type":"MinMaxCurve"},"y":{"type":"MinMaxCurve"},"z":{"type":"MinMaxCurve"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"ShapeModule","extends":[],"properties":{"shapeType":{"type":"ParticleSystemShapeType"},"enabled":{"type":"boolean"},"alignToDirection":{"type":"boolean"},"angle":{"type":"number"},"arc":{"type":"number"},"arcSpread":{"type":"number"},"arcSpeedMultiplier":{"type":"number"},"arcMode":{"type":"ParticleSystemShapeMultiModeValue"},"boxThickness":{"type":"Vector3"},"position":{"type":"Vector3"},"rotation":{"type":"Vector3"},"scale":{"type":"Vector3"},"radius":{"type":"number"},"radiusThickness":{"type":"number"},"sphericalDirectionAmount":{"type":"number"},"randomDirectionAmount":{"type":"number"},"randomPositionAmount":{"type":"number"},"meshShapeType":{"type":"ParticleSystemMeshShapeType"},"meshRenderer":{"type":"MeshRenderer"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"NoiseModule","extends":[],"properties":{"damping":{"type":"boolean"},"enabled":{"type":"boolean"},"frequency":{"type":"number"},"octaveCount":{"type":"number"},"octaveMultiplier":{"type":"number"},"octaveScale":{"type":"number"},"positionAmount":{"type":"MinMaxCurve"},"quality":{"type":"number"},"remap":{"type":"MinMaxCurve"},"remapEnabled":{"type":"boolean"},"remapMultiplier":{"type":"number"},"remapX":{"type":"MinMaxCurve"},"remapXMultiplier":{"type":"number"},"remapY":{"type":"MinMaxCurve"},"remapYMultiplier":{"type":"number"},"remapZ":{"type":"MinMaxCurve"},"remapZMultiplier":{"type":"number"},"scrollSpeedMultiplier":{"type":"number"},"separateAxes":{"type":"boolean"},"strengthMultiplier":{"type":"number"},"strengthX":{"type":"MinMaxCurve"},"strengthXMultiplier":{"type":"number"},"strengthY":{"type":"MinMaxCurve"},"strengthYMultiplier":{"type":"number"},"strengthZ":{"type":"MinMaxCurve"},"strengthZMultiplier":{"type":"number"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"TrailModule","extends":[],"properties":{"enabled":{"type":"boolean"},"attachRibbonToTransform":{"type":"any"},"colorOverLifetime":{"type":"MinMaxGradient"},"colorOverTrail":{"type":"MinMaxGradient"},"dieWithParticles":{"type":"boolean"},"inheritParticleColor":{"type":"boolean"},"lifetime":{"type":"MinMaxCurve"},"lifetimeMultiplier":{"type":"number"},"minVertexDistance":{"type":"number"},"mode":{"type":"ParticleSystemTrailMode"},"ratio":{"type":"number"},"ribbonCount":{"type":"number"},"shadowBias":{"type":"number"},"sizeAffectsLifetime":{"type":"boolean"},"sizeAffectsWidth":{"type":"boolean"},"splitSubEmitterRibbons":{"type":"boolean"},"textureMode":{"type":"ParticleSystemTrailTextureMode"},"widthOverTrail":{"type":"MinMaxCurve"},"widthOverTrailMultiplier":{"type":"number"},"worldSpace":{"type":"boolean"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"VelocityOverLifetimeModule","extends":[],"properties":{"enabled":{"type":"boolean"},"space":{"type":"ParticleSystemSimulationSpace"},"orbitalX":{"type":"MinMaxCurve"},"orbitalY":{"type":"MinMaxCurve"},"orbitalZ":{"type":"MinMaxCurve"},"orbitalXMultiplier":{"type":"number"},"orbitalYMultiplier":{"type":"number"},"orbitalZMultiplier":{"type":"number"},"orbitalOffsetX":{"type":"number"},"orbitalOffsetY":{"type":"number"},"orbitalOffsetZ":{"type":"number"},"speedModifier":{"type":"MinMaxCurve"},"speedModifierMultiplier":{"type":"number"},"x":{"type":"MinMaxCurve"},"xMultiplier":{"type":"number"},"y":{"type":"MinMaxCurve"},"yMultiplier":{"type":"number"},"z":{"type":"MinMaxCurve"},"zMultiplier":{"type":"number"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"TextureSheetAnimationModule","extends":[],"properties":{"animation":{"type":"ParticleSystemAnimationType"},"enabled":{"type":"boolean"},"cycleCount":{"type":"number"},"frameOverTime":{"type":"MinMaxCurve"},"frameOverTimeMultiplier":{"type":"number"},"numTilesX":{"type":"number"},"numTilesY":{"type":"number"},"startFrame":{"type":"MinMaxCurve"},"startFrameMultiplier":{"type":"number"},"rowMode":{"type":"ParticleSystemAnimationRowMode"},"rowIndex":{"type":"number"},"spriteCount":{"type":"number"},"timeMode":{"type":"ParticleSystemAnimationTimeMode"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"RotationOverLifetimeModule","extends":[],"properties":{"enabled":{"type":"boolean"},"separateAxes":{"type":"boolean"},"x":{"type":"MinMaxCurve"},"xMultiplier":{"type":"number"},"y":{"type":"MinMaxCurve"},"yMultiplier":{"type":"number"},"z":{"type":"MinMaxCurve"},"zMultiplier":{"type":"number"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"RotationBySpeedModule","extends":[],"properties":{"enabled":{"type":"boolean"},"range":{"type":"Vec2"},"separateAxes":{"type":"boolean"},"x":{"type":"MinMaxCurve"},"xMultiplier":{"type":"number"},"y":{"type":"MinMaxCurve"},"yMultiplier":{"type":"number"},"z":{"type":"MinMaxCurve"},"zMultiplier":{"type":"number"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"LimitVelocityOverLifetimeModule","extends":[],"properties":{"enabled":{"type":"boolean"},"dampen":{"type":"number"},"drag":{"type":"MinMaxCurve"},"dragMultiplier":{"type":"number"},"limit":{"type":"MinMaxCurve"},"limitMultiplier":{"type":"number"},"separateAxes":{"type":"boolean"},"limitX":{"type":"MinMaxCurve"},"limitXMultiplier":{"type":"number"},"limitY":{"type":"MinMaxCurve"},"limitYMultiplier":{"type":"number"},"limitZ":{"type":"MinMaxCurve"},"limitZMultiplier":{"type":"number"},"multiplyDragByParticleSize":{"type":"boolean"},"multiplyDragByParticleVelocity":{"type":"boolean"},"space":{"type":"ParticleSystemSimulationSpace"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"InheritVelocityModule","extends":[],"properties":{"enabled":{"type":"boolean"},"curve":{"type":"MinMaxCurve"},"curveMultiplier":{"type":"number"},"mode":{"type":"ParticleSystemInheritVelocityMode"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"SizeBySpeedModule","extends":[],"properties":{"enabled":{"type":"boolean"},"range":{"type":"Vector2"},"separateAxes":{"type":"boolean"},"size":{"type":"MinMaxCurve"},"sizeMultiplier":{"type":"number"},"x":{"type":"MinMaxCurve"},"xMultiplier":{"type":"number"},"y":{"type":"MinMaxCurve"},"yMultiplier":{"type":"number"},"z":{"type":"MinMaxCurve"},"zMultiplier":{"type":"number"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"ColorBySpeedModule","extends":[],"properties":{"enabled":{"type":"boolean"},"range":{"type":"Vector2"},"color":{"type":"MinMaxGradient"}}},{"file":"/src/engine-components/physics/Attractor.ts","type":"Attractor","extends":["Behaviour"],"properties":{"strength":{"type":"number"},"radius":{"type":"number"},"targets":{"type":"Rigidbody[]"}}},{"file":"/src/engine-components/postprocessing/Effects/Antialiasing.ts","type":"Antialiasing","extends":["PostProcessingEffect"],"properties":{"preset":{"type":"VolumeParameter"}}},{"file":"/src/engine-components/postprocessing/Effects/BloomEffect.ts","type":"BloomEffect","extends":["PostProcessingEffect"],"properties":{"threshold":{"type":"VolumeParameter"},"intensity":{"type":"VolumeParameter"},"scatter":{"type":"VolumeParameter"}}},{"file":"/src/engine-components/postprocessing/Effects/ChromaticAberration.ts","type":"ChromaticAberration","extends":["PostProcessingEffect"],"properties":{"intensity":{"type":"VolumeParameter"}}},{"file":"/src/engine-components/postprocessing/Effects/ColorAdjustments.ts","type":"ColorAdjustments","extends":["PostProcessingEffect"],"properties":{"postExposure":{"type":"VolumeParameter"},"contrast":{"type":"VolumeParameter"},"hueShift":{"type":"VolumeParameter"},"saturation":{"type":"VolumeParameter"}}},{"file":"/src/engine-components/postprocessing/Effects/DepthOfField.ts","type":"DepthOfField","extends":["PostProcessingEffect"],"properties":{"mode":{"type":"DepthOfFieldMode"},"focusDistance":{"type":"VolumeParameter"},"focalLength":{"type":"VolumeParameter"},"aperture":{"type":"VolumeParameter"},"gaussianMaxRadius":{"type":"VolumeParameter"},"resolutionScale":{"type":"VolumeParameter"},"bokehScale":{"type":"VolumeParameter"}}},{"file":"/src/engine-components/postprocessing/Effects/Pixelation.ts","type":"PixelationEffect","extends":["PostProcessingEffect"],"properties":{"granularity":{"type":"VolumeParameter"}}},{"file":"/src/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusion.ts","type":"ScreenSpaceAmbientOcclusion","extends":["PostProcessingEffect"],"properties":{"intensity":{"type":"VolumeParameter"},"falloff":{"type":"VolumeParameter"},"samples":{"type":"VolumeParameter"},"color":{"type":"VolumeParameter"},"luminanceInfluence":{"type":"VolumeParameter"}}},{"file":"/src/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusionN8.ts","type":"ScreenSpaceAmbientOcclusionN8","extends":["PostProcessingEffect"],"properties":{"gammaCorrection":{"type":"boolean"},"aoRadius":{"type":"VolumeParameter"},"falloff":{"type":"VolumeParameter"},"intensity":{"type":"VolumeParameter"},"color":{"type":"VolumeParameter"},"screenspaceRadius":{"type":"boolean"},"quality":{"type":"ScreenSpaceAmbientOcclusionN8QualityMode"}}},{"file":"/src/engine-components/postprocessing/Effects/Sharpening.ts","type":"SharpeningEffect","extends":["PostProcessingEffect"],"properties":{"amount":{"type":"number"},"radius":{"type":"number"}}},{"file":"/src/engine-components/postprocessing/Effects/TiltShiftEffect.ts","type":"TiltShiftEffect","extends":["PostProcessingEffect"],"properties":{"offset":{"type":"VolumeParameter"},"rotation":{"type":"VolumeParameter"},"focusArea":{"type":"VolumeParameter"},"feather":{"type":"VolumeParameter"},"kernelSize":{"type":"VolumeParameter"},"resolutionScale":{"type":"VolumeParameter"}}},{"file":"/src/engine-components/postprocessing/Effects/Tonemapping.ts","type":"ToneMappingEffect","extends":["PostProcessingEffect"],"properties":{"mode":{"type":"VolumeParameter"},"exposure":{"type":"VolumeParameter"}}},{"file":"/src/engine-components/postprocessing/Effects/Vignette.ts","type":"Vignette","extends":["PostProcessingEffect"],"properties":{"color":{"type":"VolumeParameter"},"intensity":{"type":"VolumeParameter"},"center":{"type":"VolumeParameter"}}},{"file":"/src/engine-components/postprocessing/PostProcessingEffect.ts","type":"PostProcessingEffect","extends":["Component"],"properties":{"active":{"type":"boolean"}}},{"file":"/src/engine-components/timeline/PlayableDirector.ts","type":"PlayableDirector","extends":["Behaviour"],"properties":{"playOnAwake":{"type":"boolean"},"extrapolationMode":{"type":"DirectorWrapMode"}}},{"file":"/src/engine-components/timeline/SignalAsset.ts","type":"SignalAsset","extends":[],"properties":{"guid":{"type":"string"}}},{"file":"/src/engine-components/timeline/SignalAsset.ts","type":"SignalReceiverEvent","extends":[],"properties":{"signal":{"type":"SignalAsset"},"reaction":{"type":"EventList<void>"}}},{"file":"/src/engine-components/timeline/SignalAsset.ts","type":"SignalReceiver","extends":["Behaviour"],"properties":{"events":{"type":"SignalReceiverEvent[]"}}},{"file":"/src/engine-components/ui/Button.ts","type":"ButtonColors","extends":[],"properties":{"colorMultiplier":{"type":"1"},"disabledColor":{"type":"RGBAColor"},"fadeDuration":{"type":"number"},"highlightedColor":{"type":"RGBAColor"},"normalColor":{"type":"RGBAColor"},"pressedColor":{"type":"RGBAColor"},"selectedColor":{"type":"RGBAColor"}}},{"file":"/src/engine-components/ui/Button.ts","type":"Button","extends":["Behaviour"],"properties":{"onClick":{"type":"EventList<void>"},"colors":{"type":"ButtonColors"},"transition":{"type":"Transition"},"animationTriggers":{"type":"AnimationTriggers"},"animator":{"type":"Animator"},"interactable":{"type":"any"}}},{"file":"/src/engine-components/ui/Canvas.ts","type":"Canvas","extends":["UIRootComponent"],"properties":{"renderOnTop":{"type":"boolean"},"depthWrite":{"type":"boolean"},"doubleSided":{"type":"boolean"},"castShadows":{"type":"boolean"},"receiveShadows":{"type":"boolean"},"rootCanvas":{"type":"Canvas"},"worldCamera":{"type":"Camera"},"planeDistance":{"type":"number"}}},{"file":"/src/engine-components/ui/CanvasGroup.ts","type":"CanvasGroup","extends":["Behaviour"],"properties":{"interactable":{"type":"boolean"},"blocksRaycasts":{"type":"boolean"}}},{"file":"/src/engine-components/ui/Graphic.ts","type":"Graphic","extends":["BaseUIComponent"],"properties":{"raycastTarget":{"type":"boolean"}}},{"file":"/src/engine-components/ui/Image.ts","type":"Sprite","extends":[],"properties":{"texture":{"type":"Texture | null"}}},{"file":"/src/engine-components/ui/Image.ts","type":"Image","extends":["MaskableGraphic"],"properties":{"pixelsPerUnitMultiplier":{"type":"number"}}},{"file":"/src/engine-components/ui/InputField.ts","type":"InputField","extends":["Behaviour"],"properties":{"textComponent":{"type":"Text"},"placeholder":{"type":"Text"},"onValueChanged":{"type":"EventList<any>"},"onEndEdit":{"type":"EventList<any>"}}},{"file":"/src/engine-components/ui/Layout.ts","type":"Padding","extends":[],"properties":{"left":{"type":"number"},"right":{"type":"number"},"top":{"type":"number"},"bottom":{"type":"number"}}},{"file":"/src/engine-components/ui/Layout.ts","type":"LayoutGroup","extends":["Behaviour"],"properties":{"childAlignment":{"type":"TextAnchor"},"reverseArrangement":{"type":"boolean"},"spacing":{"type":"number"},"padding":{"type":"Padding"},"minWidth":{"type":"number"},"minHeight":{"type":"number"},"flexibleHeight":{"type":"number"},"flexibleWidth":{"type":"number"},"preferredHeight":{"type":"number"},"preferredWidth":{"type":"number"}}},{"file":"/src/engine-components/ui/Layout.ts","type":"HorizontalOrVerticalLayoutGroup","extends":["LayoutGroup"],"properties":{"childControlHeight":{"type":"boolean"},"childControlWidth":{"type":"boolean"},"childForceExpandHeight":{"type":"boolean"},"childForceExpandWidth":{"type":"boolean"},"childScaleHeight":{"type":"boolean"},"childScaleWidth":{"type":"boolean"}}},{"file":"/src/engine-components/ui/Outline.ts","type":"Outline","extends":["Behaviour"],"properties":{"effectColor":{"type":"RGBAColor"},"effectDistance":{"type":"Vector2"}}},{"file":"/src/engine-components/ui/Raycaster.ts","type":"ObjectRaycaster","extends":["Raycaster"],"properties":{"ignoreSkinnedMeshes":{"type":"any"}}},{"file":"/src/engine-components/ui/RectTransform.ts","type":"RectTransform","extends":["BaseUIComponent"],"properties":{"sizeDelta":{"type":"Vector2"},"pivot":{"type":"Vector2"},"anchorMin":{"type":"Vector2"},"anchorMax":{"type":"Vector2"}}},{"file":"/src/engine-components/ui/SpatialHtml.ts","type":"SpatialHtml","extends":["Behaviour"],"properties":{"id":{"type":"string | null"},"keepAspect":{"type":"boolean"}}},{"file":"/src/engine-components/ui/Text.ts","type":"Text","extends":["Graphic"],"properties":{"alignment":{"type":"TextAnchor"},"verticalOverflow":{"type":"VerticalWrapMode"},"horizontalOverflow":{"type":"HorizontalWrapMode"},"lineSpacing":{"type":"number"},"supportRichText":{"type":"boolean"},"font":{"type":"string"},"fontStyle":{"type":"FontStyle"}}},{"file":"/src/engine-components/utils/LookAt.ts","type":"LookAt","extends":["Behaviour"],"properties":{"target":{"type":"Object3D"},"invertForward":{"type":"boolean"},"keepUpDirection":{"type":"boolean"},"copyTargetRotation":{"type":"boolean"}}},{"file":"/src/engine-components/utils/OpenURL.ts","type":"OpenURL","extends":["Behaviour"],"properties":{"url":{"type":"string"},"mode":{"type":"OpenURLMode"},"clickable":{"type":"boolean"}}},{"file":"/src/engine-components/web/CursorFollow.ts","type":"CursorFollow","extends":["Behaviour"],"properties":{"damping":{"type":"number"},"keepDistance":{"type":"boolean"}}},{"file":"/src/engine-components/web/HoverAnimation.ts","type":"HoverAnimation","extends":["Behaviour"],"properties":{"type":{"type":"ScaleClipType"},"duration":{"type":"number"},"scaleFactor":{"type":"number"},"hovered":{"type":"AnimationClip | null"},"idle":{"type":"AnimationClip | null"}}},{"file":"/src/engine-components/web/ScrollFollow.ts","type":"ScrollFollow","extends":["Behaviour"],"properties":{"target":{"type":"object[] | object | null"},"damping":{"type":"number"},"invert":{"type":"boolean"},"htmlSelector":{"type":"string | null"},"mode":{"type":"\"window\""},"changed":{"type":"EventList<ScrollFollowEvent>"}}},{"file":"/src/engine-components/web/ViewBox.ts","type":"ViewBox","extends":["Behaviour"],"properties":{"referenceFieldOfView":{"type":"number"},"debug":{"type":"boolean"}}},{"file":"/src/engine-components/webxr/Avatar.ts","type":"Avatar","extends":["Behaviour"],"properties":{"head":{"type":"AssetReference"},"leftHand":{"type":"AssetReference"},"rightHand":{"type":"AssetReference"}}},{"file":"/src/engine-components/webxr/WebARCameraBackground.ts","type":"WebARCameraBackground","extends":["Behaviour"],"properties":{"backgroundTint":{"type":"RGBAColor"}}},{"file":"/src/engine-components/webxr/WebXR.ts","type":"WebXR","extends":["Behaviour"],"properties":{"createVRButton":{"type":"boolean"},"createARButton":{"type":"boolean"},"createSendToQuestButton":{"type":"boolean"},"createQRCode":{"type":"boolean"},"useDefaultControls":{"type":"boolean"},"showControllerModels":{"type":"boolean"},"showHandModels":{"type":"boolean"},"usePlacementReticle":{"type":"boolean"},"customARPlacementReticle":{"type":"AssetReference"},"usePlacementAdjustment":{"type":"boolean"},"arScale":{"type":"number"},"useXRAnchor":{"type":"boolean"},"autoPlace":{"type":"boolean"},"autoCenter":{"type":"boolean"},"useQuicklookExport":{"type":"boolean"},"useDepthSensing":{"type":"boolean"},"useSpatialGrab":{"type":"boolean"},"defaultAvatar":{"type":"AssetReference | boolean"}}},{"file":"/src/engine-components/webxr/WebXRImageTracking.ts","type":"WebXRImageTrackingModel","extends":[],"properties":{"image":{"type":"string"},"widthInMeters":{"type":"number"},"object":{"type":"AssetReference"},"createObjectInstance":{"type":"boolean"},"imageDoesNotMove":{"type":"boolean"},"hideWhenTrackingIsLost":{"type":"boolean"}}},{"file":"/src/engine-components/webxr/WebXRImageTracking.ts","type":"WebXRImageTracking","extends":["Behaviour"],"properties":{"trackedImages":{"type":"WebXRImageTrackingModel[]"},"smooth":{"type":"boolean"}}},{"file":"/src/engine-components/webxr/WebXRPlaneTracking.ts","type":"WebXRPlaneTracking","extends":["Behaviour"],"properties":{"dataTemplate":{"type":"AssetReference"},"occluder":{"type":"any"},"initiateRoomCaptureIfNoData":{"type":"any"},"usePlaneData":{"type":"boolean"},"useMeshData":{"type":"boolean"},"runInVR":{"type":"any"}}},{"file":"/src/engine-components/webxr/WebXRRig.ts","type":"XRRig","extends":["Behaviour"],"properties":{"priority":{"type":"number"}}},{"file":"/src/engine-components/webxr/XRFlag.ts","type":"XRFlag","extends":["Behaviour"],"properties":{"visibleIn":{"type":"number"}}},{"file":"/src/engine-components/webxr/controllers/XRControllerFollow.ts","type":"XRControllerFollow","extends":["Behaviour"],"properties":{"side":{"type":"XRHandedness | number"},"controller":{"type":"boolean"},"hands":{"type":"boolean"},"controlVisibility":{"type":"boolean"},"useGripSpace":{"type":"any"},"resetTransformAfterXRSession":{"type":"boolean"}}},{"file":"/src/engine-components/webxr/controllers/XRControllerModel.ts","type":"XRControllerModel","extends":["Behaviour"],"properties":{"createControllerModel":{"type":"boolean"},"createHandModel":{"type":"boolean"},"customLeftHand":{"type":"AssetReference"},"customRightHand":{"type":"AssetReference"}}},{"file":"/src/engine-components/webxr/controllers/XRControllerMovement.ts","type":"XRControllerMovement","extends":["Behaviour"],"properties":{"movementSpeed":{"type":"any"},"rotationStep":{"type":"any"},"useTeleport":{"type":"boolean"},"usePinchToTeleport":{"type":"boolean"},"useTeleportTarget":{"type":"any"},"useTeleportFade":{"type":"any"},"showRays":{"type":"boolean"},"showHits":{"type":"boolean"}}}]}
1
+ {"components":[{"file":"/src/engine-components/AlignmentConstraint.ts","type":"AlignmentConstraint","extends":["Behaviour"],"properties":{"from":{"type":"GameObject | undefined"},"to":{"type":"GameObject | undefined"}}},{"file":"/src/engine-components/Animation.ts","type":"Animation","extends":["Behaviour"],"properties":{"playAutomatically":{"type":"boolean"},"randomStartTime":{"type":"boolean"},"minMaxSpeed":{"type":"Vec2"},"minMaxOffsetNormalized":{"type":"Vec2"},"loop":{"type":"boolean"},"clampWhenFinished":{"type":"boolean"},"clips":{"type":"AnimationClip[]"}}},{"file":"/src/engine-components/AnimationCurve.ts","type":"Keyframe","extends":[],"properties":{"time":{"type":"number"},"value":{"type":"number"},"inTangent":{"type":"number"},"inWeight":{"type":"number"},"outTangent":{"type":"number"},"outWeight":{"type":"number"},"weightedMode":{"type":"number"}}},{"file":"/src/engine-components/AnimationCurve.ts","type":"AnimationCurve","extends":[],"properties":{"keys":{"type":"Array<Keyframe>"}}},{"file":"/src/engine-components/Animator.ts","type":"Animator","extends":["Behaviour"],"properties":{"applyRootMotion":{"type":"boolean"},"hasRootMotion":{"type":"boolean"},"keepAnimatorControllerStateOnDisable":{"type":"boolean"},"runtimeAnimatorController":{"type":"AnimatorControllerModel | AnimatorController | undefined | null"}}},{"file":"/src/engine-components/AudioSource.ts","type":"AudioSource","extends":["Behaviour"],"properties":{"clip":{"type":"string | MediaStream"},"playOnAwake":{"type":"boolean"},"preload":{"type":"boolean"},"playInBackground":{"type":"boolean"},"pitch":{"type":"number"},"rollOffMode":{"type":"AudioRolloffMode"}}},{"file":"/src/engine-components/AxesHelper.ts","type":"AxesHelper","extends":["Behaviour"],"properties":{"length":{"type":"number"},"depthTest":{"type":"boolean"},"isGizmo":{"type":"boolean"}}},{"file":"/src/engine-components/Camera.ts","type":"Camera","extends":["Behaviour"],"properties":{"aspect":{"type":"number"},"fieldOfView":{"type":"number | undefined"},"nearClipPlane":{"type":"any"},"farClipPlane":{"type":"any"},"orthographic":{"type":"boolean"},"orthographicSize":{"type":"number"},"ARBackgroundAlpha":{"type":"number"},"cullingMask":{"type":"number"},"backgroundBlurriness":{"type":"number | undefined"},"backgroundIntensity":{"type":"number | undefined"},"backgroundRotation":{"type":"Euler | undefined"},"environmentIntensity":{"type":"number | undefined"},"targetTexture":{"type":"RenderTexture | null"}}},{"file":"/src/engine-components/CharacterController.ts","type":"CharacterController","extends":["Behaviour"],"properties":{"center":{"type":"Vector3"},"radius":{"type":"number"},"height":{"type":"number"}}},{"file":"/src/engine-components/CharacterController.ts","type":"CharacterControllerInput","extends":["Behaviour"],"properties":{"controller":{"type":"CharacterController"},"movementSpeed":{"type":"number"},"rotationSpeed":{"type":"number"},"jumpForce":{"type":"number"},"doubleJumpForce":{"type":"number"},"animator":{"type":"Animator"}}},{"file":"/src/engine-components/Collider.ts","type":"Collider","extends":["Behaviour"],"properties":{"attachedRigidbody":{"type":"Rigidbody | null"},"isTrigger":{"type":"boolean"},"sharedMaterial":{"type":"PhysicsMaterial"},"membership":{"type":"number[]"},"filter":{"type":"number[]"}}},{"file":"/src/engine-components/Collider.ts","type":"SphereCollider","extends":["Collider"],"properties":{"radius":{"type":"number"},"center":{"type":"Vector3"}}},{"file":"/src/engine-components/Collider.ts","type":"BoxCollider","extends":["Collider"],"properties":{"size":{"type":"Vector3"},"center":{"type":"Vector3"}}},{"file":"/src/engine-components/Collider.ts","type":"MeshCollider","extends":["Collider"],"properties":{"sharedMesh":{"type":"Mesh"},"convex":{"type":"boolean"}}},{"file":"/src/engine-components/Collider.ts","type":"CapsuleCollider","extends":["Collider"],"properties":{"center":{"type":"Vector3"},"radius":{"type":"number"},"height":{"type":"number"}}},{"file":"/src/engine-components/ContactShadows.ts","type":"ContactShadows","extends":["Behaviour"],"properties":{"autoFit":{"type":"boolean"},"darkness":{"type":"number"},"opacity":{"type":"number"},"blur":{"type":"number"},"occludeBelowGround":{"type":"boolean"},"backfaceShadows":{"type":"boolean"}}},{"file":"/src/engine-components/DeviceFlag.ts","type":"DeviceFlag","extends":["Behaviour"],"properties":{"visibleOn":{"type":"DeviceType"}}},{"file":"/src/engine-components/DragControls.ts","type":"DragControls","extends":["Behaviour"],"properties":{"dragMode":{"type":"DragMode"},"snapGridResolution":{"type":"number"},"keepRotation":{"type":"boolean"},"xrDragMode":{"type":"DragMode"},"xrKeepRotation":{"type":"boolean"},"xrDistanceDragFactor":{"type":"number"},"showGizmo":{"type":"boolean"}}},{"file":"/src/engine-components/DropListener.ts","type":"DropListener","extends":["Behaviour"],"properties":{"dropArea":{"type":"Object3D"},"fitIntoVolume":{"type":"boolean"},"fitVolumeSize":{"type":"any"},"placeAtHitPosition":{"type":"boolean"},"useNetworking":{"type":"boolean"},"onDropped":{"type":"EventList<DropListenerOnDropArguments>"}}},{"file":"/src/engine-components/Duplicatable.ts","type":"Duplicatable","extends":["Behaviour"],"properties":{"parent":{"type":"GameObject | null"},"object":{"type":"GameObject | null"},"limitCount":{"type":"any"}}},{"file":"/src/engine-components/EventTrigger.ts","type":"TriggerEvent","extends":[],"properties":{"eventID":{"type":"EventType"},"callback":{"type":"EventList<any>"}}},{"file":"/src/engine-components/EventTrigger.ts","type":"EventTrigger","extends":["Behaviour"],"properties":{"triggers":{"type":"Array<TriggerEvent>"}}},{"file":"/src/engine-components/Fog.ts","type":"Fog","extends":["Behaviour"],"properties":{"near":{"type":"number"},"far":{"type":"number"},"color":{"type":"Color"}}},{"file":"/src/engine-components/Gizmos.ts","type":"BoxGizmo","extends":["Behaviour"],"properties":{"objectBounds":{"type":"boolean"},"color":{"type":"Color"},"isGizmo":{"type":"boolean"}}},{"file":"/src/engine-components/GridHelper.ts","type":"GridHelper","extends":["Behaviour"],"properties":{"isGizmo":{"type":"boolean"},"color0":{"type":"Color | ColorRepresentation"},"color1":{"type":"Color | ColorRepresentation"}}},{"file":"/src/engine-components/GroundProjection.ts","type":"GroundProjectedEnv","extends":["Behaviour"],"properties":{"applyOnAwake":{"type":"boolean"},"autoFit":{"type":"boolean"},"radius":{"type":"number"},"height":{"type":"number"},"arBlending":{"type":"number"}}},{"file":"/src/engine-components/Joints.ts","type":"Joint","extends":["Behaviour"],"properties":{"connectedBody":{"type":"Rigidbody"}}},{"file":"/src/engine-components/Joints.ts","type":"HingeJoint","extends":["Joint"],"properties":{"anchor":{"type":"Vector3"},"axis":{"type":"Vector3"}}},{"file":"/src/engine-components/LODGroup.ts","type":"LODModel","extends":[],"properties":{"screenRelativeTransitionHeight":{"type":"number"},"distance":{"type":"number"},"renderers":{"type":"Renderer[]"}}},{"file":"/src/engine-components/LODGroup.ts","type":"LODGroup","extends":["Behaviour"],"properties":{"localReferencePoint":{"type":"Vector3 | undefined"},"lodModels":{"type":"LODModel[]"}}},{"file":"/src/engine-components/Light.ts","type":"Light","extends":["Behaviour"],"properties":{"type":{"type":"LightType"},"color":{"type":"Color"},"shadowNearPlane":{"type":"number"},"shadowBias":{"type":"number"},"shadowNormalBias":{"type":"number"},"shadows":{"type":"LightShadows"},"lightmapBakeType":{"type":"LightmapBakeType"},"intensity":{"type":"number"}}},{"file":"/src/engine-components/LookAtConstraint.ts","type":"LookAtConstraint","extends":["Behaviour"],"properties":{"constraintActive":{"type":"boolean"},"locked":{"type":"boolean"},"sources":{"type":"Object3D[]"}}},{"file":"/src/engine-components/NeedleMenu.ts","type":"NeedleMenu","extends":["Behaviour"],"properties":{"position":{"type":"\"top\" | \"bottom\""},"showNeedleLogo":{"type":"boolean"},"showSpatialMenu":{"type":"boolean"},"createFullscreenButton":{"type":"boolean"},"createMuteButton":{"type":"boolean"},"createQRCodeButton":{"type":"boolean"}}},{"file":"/src/engine-components/NestedGltf.ts","type":"NestedGltf","extends":["Behaviour"],"properties":{"filePath":{"type":"AssetReference"},"loaded":{"type":"EventList<{ component: NestedGltf, instance: any, asset: AssetReference }>"}}},{"file":"/src/engine-components/Networking.ts","type":"Networking","extends":["Behaviour"],"properties":{"url":{"type":"string | null"},"urlParameterName":{"type":"string | null"},"localhost":{"type":"string | null"}}},{"file":"/src/engine-components/OffsetConstraint.ts","type":"OffsetConstraint","extends":["Behaviour"],"properties":{"referenceSpace":{"type":"GameObject | undefined"},"from":{"type":"GameObject | undefined"},"positionOffset":{"type":"Vector3"},"rotationOffset":{"type":"Vector3"}}},{"file":"/src/engine-components/OrbitControls.ts","type":"OrbitControls","extends":["Behaviour"],"properties":{"autoTarget":{"type":"boolean"},"autoFit":{"type":"boolean"},"enableRotate":{"type":"boolean"},"autoRotate":{"type":"boolean"},"autoRotateSpeed":{"type":"number"},"minAzimuthAngle":{"type":"number"},"maxAzimuthAngle":{"type":"number"},"minPolarAngle":{"type":"number"},"maxPolarAngle":{"type":"number"},"enableKeys":{"type":"boolean"},"enableDamping":{"type":"boolean"},"dampingFactor":{"type":"number"},"enableZoom":{"type":"boolean"},"minZoom":{"type":"number"},"maxZoom":{"type":"number"},"zoomSpeed":{"type":"number"},"enablePan":{"type":"boolean"},"lookAtConstraint":{"type":"LookAtConstraint | null"},"lookAtConstraint01":{"type":"number"},"allowInterrupt":{"type":"boolean"},"middleClickToFocus":{"type":"boolean"},"doubleClickToFocus":{"type":"boolean"},"clickBackgroundToFitScene":{"type":"number"},"targetLerpDuration":{"type":"any"}}},{"file":"/src/engine-components/ReflectionProbe.ts","type":"ReflectionProbe","extends":["Behaviour"],"properties":{"center":{"type":"Vector3"},"size":{"type":"Vector3"}}},{"file":"/src/engine-components/Renderer.ts","type":"Renderer","extends":["Behaviour"],"properties":{"receiveShadows":{"type":"boolean"},"shadowCastingMode":{"type":"ShadowCastingMode"},"lightmapIndex":{"type":"number"},"lightmapScaleOffset":{"type":"Vector4"},"enableInstancing":{"type":"boolean | boolean[] | undefined"},"renderOrder":{"type":"number[] | undefined"},"allowOcclusionWhenDynamic":{"type":"boolean"},"probeAnchor":{"type":"Object3D"},"reflectionProbeUsage":{"type":"ReflectionProbeUsage"}}},{"file":"/src/engine-components/RigidBody.ts","type":"Rigidbody","extends":["Behaviour"],"properties":{"mass":{"type":"number"},"useGravity":{"type":"boolean"},"centerOfMass":{"type":"Vector3"},"constraints":{"type":"RigidbodyConstraints"},"isKinematic":{"type":"boolean"},"drag":{"type":"number"},"angularDrag":{"type":"number"},"detectCollisions":{"type":"boolean"},"sleepThreshold":{"type":"number"},"collisionDetectionMode":{"type":"CollisionDetectionMode"}}},{"file":"/src/engine-components/SceneSwitcher.ts","type":"SceneSwitcher","extends":["Behaviour"],"properties":{"autoLoadFirstScene":{"type":"boolean"},"scenes":{"type":"AssetReference[]"},"loadingScene":{"type":"AssetReference"},"queryParameterName":{"type":"string"},"useSceneName":{"type":"boolean"},"clamp":{"type":"boolean"},"useHistory":{"type":"boolean"},"useKeyboard":{"type":"boolean"},"useSwipe":{"type":"boolean"},"useSceneLighting":{"type":"boolean"},"useSceneBackground":{"type":"boolean"},"preloadNext":{"type":"number"},"preloadPrevious":{"type":"number"},"preloadConcurrent":{"type":"number"},"createMenuButtons":{"type":"boolean"},"sceneLoadingStart":{"type":"EventList<LoadSceneEvent>"},"sceneLoadingProgress":{"type":"EventList<ProgressEvent>"},"sceneLoaded":{"type":"EventList<SceneSwitcher>"}}},{"file":"/src/engine-components/ScreenCapture.ts","type":"ScreenCapture","extends":["Behaviour"],"properties":{"allowStartOnClick":{"type":"boolean"},"autoConnect":{"type":"boolean"},"videoPlayer":{"type":"VideoPlayer | undefined"},"device":{"type":"ScreenCaptureDeviceTypes"},"deviceName":{"type":"string"}}},{"file":"/src/engine-components/ShadowCatcher.ts","type":"ShadowCatcher","extends":["Behaviour"],"properties":{"mode":{"type":"ShadowMode"},"shadowColor":{"type":"RGBAColor"}}},{"file":"/src/engine-components/Skybox.ts","type":"RemoteSkybox","extends":["Behaviour"],"properties":{"url":{"type":"string"},"allowDrop":{"type":"boolean"},"background":{"type":"boolean"},"environment":{"type":"boolean"},"allowNetworking":{"type":"boolean"}}},{"file":"/src/engine-components/SmoothFollow.ts","type":"SmoothFollow","extends":["Behaviour"],"properties":{"target":{"type":"Object3D | null"},"followFactor":{"type":"any"},"rotateFactor":{"type":"any"},"positionAxes":{"type":"Axes"}}},{"file":"/src/engine-components/SpatialTrigger.ts","type":"SpatialTriggerReceiver","extends":["Behaviour"],"properties":{"triggerMask":{"type":"number"},"onEnter":{"type":"EventList<any>"},"onStay":{"type":"EventList<any>"},"onExit":{"type":"EventList<any>"}}},{"file":"/src/engine-components/SpatialTrigger.ts","type":"SpatialTrigger","extends":["Behaviour"],"properties":{"triggerMask":{"type":"number"}}},{"file":"/src/engine-components/SpectatorCamera.ts","type":"SpectatorCamera","extends":["Behaviour"],"properties":{"useKeys":{"type":"boolean"}}},{"file":"/src/engine-components/SpriteRenderer.ts","type":"Sprite","extends":[],"properties":{"guid":{"type":"string"},"texture":{"type":"Texture"}}},{"file":"/src/engine-components/SpriteRenderer.ts","type":"SpriteSheet","extends":[],"properties":{"sprites":{"type":"Sprite[]"}}},{"file":"/src/engine-components/SpriteRenderer.ts","type":"SpriteData","extends":[],"properties":{"spriteSheet":{"type":"SpriteSheet"},"index":{"type":"number"}}},{"file":"/src/engine-components/SpriteRenderer.ts","type":"SpriteRenderer","extends":["Behaviour"],"properties":{"drawMode":{"type":"SpriteDrawMode"},"size":{"type":"Vec2"},"color":{"type":"RGBAColor"},"sharedMaterial":{"type":"Material"},"transparent":{"type":"boolean"},"cutoutThreshold":{"type":"number"},"castShadows":{"type":"boolean"},"renderOrder":{"type":"number"},"toneMapped":{"type":"boolean"}}},{"file":"/src/engine-components/SyncedCamera.ts","type":"SyncedCamera","extends":["Behaviour"],"properties":{"cameraPrefab":{"type":"Object3D | null | AssetReference"}}},{"file":"/src/engine-components/SyncedRoom.ts","type":"SyncedRoom","extends":["Behaviour"],"properties":{"roomName":{"type":"string"},"urlParameterName":{"type":"string"},"joinRandomRoom":{"type":"boolean"},"requireRoomParameter":{"type":"boolean"},"autoRejoin":{"type":"boolean"},"createJoinButton":{"type":"boolean"},"createViewOnlyButton":{"type":"boolean"},"roomPrefix":{"type":"string"}}},{"file":"/src/engine-components/TransformGizmo.ts","type":"TransformGizmo","extends":["Behaviour"],"properties":{"isGizmo":{"type":"boolean"},"translationSnap":{"type":"number"},"rotationSnapAngle":{"type":"number"},"scaleSnap":{"type":"number"}}},{"file":"/src/engine-components/VideoPlayer.ts","type":"VideoPlayer","extends":["Behaviour"],"properties":{"playOnAwake":{"type":"boolean"},"aspectMode":{"type":"AspectMode"},"clip":{"type":"string | MediaStream | null"},"source":{"type":"VideoSource"},"renderMode":{"type":"VideoRenderMode"},"targetMaterialProperty":{"type":"string"},"targetMaterialRenderer":{"type":"Renderer"},"targetTexture":{"type":"Texture"},"time":{"type":"number"},"isLooping":{"type":"boolean"},"audioOutputMode":{"type":"VideoAudioOutputMode"}}},{"file":"/src/engine-components/Voip.ts","type":"Voip","extends":["Behaviour"],"properties":{"autoConnect":{"type":"boolean"},"runInBackground":{"type":"boolean"},"createMenuButton":{"type":"boolean"}}},{"file":"/src/engine-components/avatar/AvatarBlink_Simple.ts","type":"AvatarBlink_Simple","extends":["Behaviour"],"properties":{"eyes":{"type":"Object3D[]"},"lastBlinkTime":{"type":"number"},"blinkLength":{"type":"number"},"eyesOpen":{"type":"boolean"}}},{"file":"/src/engine-components/avatar/AvatarEyeLook_Rotation.ts","type":"AvatarEyeLook_Rotation","extends":["Behaviour"],"properties":{"head":{"type":"GameObject | null"},"eyes":{"type":"GameObject[] | null"},"target":{"type":"Object3D | null"}}},{"file":"/src/engine-components/avatar/Avatar_MouthShapes.ts","type":"Avatar_MouthShapes","extends":["Behaviour"],"properties":{"idle":{"type":"Object3D[]"},"talking":{"type":"Object3D[]"}}},{"file":"/src/engine-components/export/gltf/GltfExport.ts","type":"GltfExport","extends":["Behaviour"],"properties":{"binary":{"type":"boolean"},"objects":{"type":"Object3D[]"}}},{"file":"/src/engine-components/export/usdz/USDZExporter.ts","type":"CustomBranding","extends":[],"properties":{"callToAction":{"type":"string"},"checkoutTitle":{"type":"string"},"checkoutSubtitle":{"type":"string"},"callToActionURL":{"type":"string"}}},{"file":"/src/engine-components/export/usdz/USDZExporter.ts","type":"USDZExporter","extends":["Behaviour"],"properties":{"objectToExport":{"type":"Object3D | null | undefined"},"autoExportAnimations":{"type":"boolean"},"autoExportAudioSources":{"type":"boolean"},"exportFileName":{"type":"string | null | undefined"},"customUsdzFile":{"type":"string | null | undefined"},"customBranding":{"type":"CustomBranding"},"anchoringType":{"type":"\"plane\" | \"image\" | \"face\" | \"none\""},"maxTextureSize":{"type":"256 | 512 | 1024 | 2048 | 4096 | 8192"},"planeAnchoringAlignment":{"type":"\"horizontal\" | \"vertical\" | \"any\""},"interactive":{"type":"boolean"},"physics":{"type":"boolean"},"allowCreateQuicklookButton":{"type":"boolean"},"quickLookCompatible":{"type":"boolean"}}},{"file":"/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts","type":"ChangeTransformOnClick","extends":["Behaviour"],"properties":{"object":{"type":"Object3D"},"target":{"type":"Object3D"},"duration":{"type":"number"},"relativeMotion":{"type":"boolean"}}},{"file":"/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts","type":"ChangeMaterialOnClick","extends":["Behaviour"],"properties":{"materialToSwitch":{"type":"Material"},"variantMaterial":{"type":"Material"},"fadeDuration":{"type":"number"}}},{"file":"/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts","type":"SetActiveOnClick","extends":["Behaviour"],"properties":{"target":{"type":"Object3D"},"toggleOnClick":{"type":"boolean"},"targetState":{"type":"boolean"},"hideSelf":{"type":"boolean"}}},{"file":"/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts","type":"EmphasizeOnClick","extends":["Behaviour"],"properties":{"target":{"type":"Object3D"},"duration":{"type":"number"},"motionType":{"type":"EmphasizeActionMotionType"}}},{"file":"/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts","type":"PlayAudioOnClick","extends":["Behaviour"],"properties":{"target":{"type":"AudioSource"},"clip":{"type":"string"},"toggleOnClick":{"type":"boolean"}}},{"file":"/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts","type":"PlayAnimationOnClick","extends":["Behaviour"],"properties":{"animator":{"type":"Animator"},"stateName":{"type":"string"}}},{"file":"/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts","type":"PreliminaryAction","extends":["Behaviour"],"properties":{"target":{"type":"Object3D"}}},{"file":"/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts","type":"PreliminaryTrigger","extends":["Behaviour"],"properties":{"target":{"type":"PreliminaryAction"}}},{"file":"/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts","type":"VisibilityAction","extends":["PreliminaryAction"],"properties":{"type":{"type":"VisibilityActionType"},"duration":{"type":"number"}}},{"file":"/src/engine-components/particlesystem/ParticleSystem.ts","type":"ParticleSystemRenderer","extends":["Behaviour"],"properties":{"renderMode":{"type":"ParticleSystemRenderMode"},"particleMaterial":{"type":"SpriteMaterial | MeshBasicMaterial"},"trailMaterial":{"type":"SpriteMaterial | MeshBasicMaterial"},"maxParticleSize":{"type":"number"},"minParticleSize":{"type":"number"},"velocityScale":{"type":"number"},"cameraVelocityScale":{"type":"number"},"lengthScale":{"type":"number"}}},{"file":"/src/engine-components/particlesystem/ParticleSystem.ts","type":"ParticleSystem","extends":["Behaviour"],"properties":{"colorOverLifetime":{"type":"ColorOverLifetimeModule"},"main":{"type":"MainModule"},"emission":{"type":"EmissionModule"},"sizeOverLifetime":{"type":"SizeOverLifetimeModule"},"shape":{"type":"ShapeModule"},"noise":{"type":"NoiseModule"},"trails":{"type":"TrailModule"},"velocityOverLifetime":{"type":"VelocityOverLifetimeModule"},"limitVelocityOverLifetime":{"type":"LimitVelocityOverLifetimeModule"},"inheritVelocity":{"type":"InheritVelocityModule"},"colorBySpeed":{"type":"ColorBySpeedModule"},"textureSheetAnimation":{"type":"TextureSheetAnimationModule"},"rotationOverLifetime":{"type":"RotationOverLifetimeModule"},"rotationBySpeed":{"type":"RotationBySpeedModule"},"sizeBySpeed":{"type":"SizeBySpeedModule"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"Gradient","extends":[],"properties":{"alphaKeys":{"type":"Array<AlphaKey>"},"colorKeys":{"type":"Array<ColorKey>"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"MinMaxCurve","extends":[],"properties":{"mode":{"type":"ParticleSystemCurveMode | ParticleSystemCurveModeKeys"},"constant":{"type":"number"},"constantMin":{"type":"number"},"constantMax":{"type":"number"},"curve":{"type":"AnimationCurve"},"curveMin":{"type":"AnimationCurve"},"curveMax":{"type":"AnimationCurve"},"curveMultiplier":{"type":"number"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"MinMaxGradient","extends":[],"properties":{"mode":{"type":"ParticleSystemGradientMode | ParticleSystemGradientModeKeys"},"color":{"type":"RGBAColor | Color"},"colorMin":{"type":"RGBAColor | Color"},"colorMax":{"type":"RGBAColor | Color"},"gradient":{"type":"Gradient"},"gradientMin":{"type":"Gradient"},"gradientMax":{"type":"Gradient"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"MainModule","extends":[],"properties":{"gravityModifier":{"type":"MinMaxCurve"},"startColor":{"type":"MinMaxGradient"},"startDelay":{"type":"MinMaxCurve"},"startLifetime":{"type":"MinMaxCurve"},"startRotation":{"type":"MinMaxCurve"},"startRotationX":{"type":"MinMaxCurve"},"startRotationY":{"type":"MinMaxCurve"},"startRotationZ":{"type":"MinMaxCurve"},"startSize":{"type":"MinMaxCurve"},"startSizeX":{"type":"MinMaxCurve"},"startSizeY":{"type":"MinMaxCurve"},"startSizeZ":{"type":"MinMaxCurve"},"startSpeed":{"type":"MinMaxCurve"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"EmissionModule","extends":[],"properties":{"enabled":{"type":"boolean"},"bursts":{"type":"ParticleBurst[]"},"rateOverTime":{"type":"MinMaxCurve"},"rateOverTimeMultiplier":{"type":"number"},"rateOverDistance":{"type":"MinMaxCurve"},"rateOverDistanceMultiplier":{"type":"number"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"ColorOverLifetimeModule","extends":[],"properties":{"color":{"type":"MinMaxGradient"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"SizeOverLifetimeModule","extends":[],"properties":{"size":{"type":"MinMaxCurve"},"x":{"type":"MinMaxCurve"},"y":{"type":"MinMaxCurve"},"z":{"type":"MinMaxCurve"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"ShapeModule","extends":[],"properties":{"shapeType":{"type":"ParticleSystemShapeType"},"enabled":{"type":"boolean"},"alignToDirection":{"type":"boolean"},"angle":{"type":"number"},"arc":{"type":"number"},"arcSpread":{"type":"number"},"arcSpeedMultiplier":{"type":"number"},"arcMode":{"type":"ParticleSystemShapeMultiModeValue"},"boxThickness":{"type":"Vector3"},"position":{"type":"Vector3"},"rotation":{"type":"Vector3"},"scale":{"type":"Vector3"},"radius":{"type":"number"},"radiusThickness":{"type":"number"},"sphericalDirectionAmount":{"type":"number"},"randomDirectionAmount":{"type":"number"},"randomPositionAmount":{"type":"number"},"meshShapeType":{"type":"ParticleSystemMeshShapeType"},"meshRenderer":{"type":"MeshRenderer"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"NoiseModule","extends":[],"properties":{"damping":{"type":"boolean"},"enabled":{"type":"boolean"},"frequency":{"type":"number"},"octaveCount":{"type":"number"},"octaveMultiplier":{"type":"number"},"octaveScale":{"type":"number"},"positionAmount":{"type":"MinMaxCurve"},"quality":{"type":"number"},"remap":{"type":"MinMaxCurve"},"remapEnabled":{"type":"boolean"},"remapMultiplier":{"type":"number"},"remapX":{"type":"MinMaxCurve"},"remapXMultiplier":{"type":"number"},"remapY":{"type":"MinMaxCurve"},"remapYMultiplier":{"type":"number"},"remapZ":{"type":"MinMaxCurve"},"remapZMultiplier":{"type":"number"},"scrollSpeedMultiplier":{"type":"number"},"separateAxes":{"type":"boolean"},"strengthMultiplier":{"type":"number"},"strengthX":{"type":"MinMaxCurve"},"strengthXMultiplier":{"type":"number"},"strengthY":{"type":"MinMaxCurve"},"strengthYMultiplier":{"type":"number"},"strengthZ":{"type":"MinMaxCurve"},"strengthZMultiplier":{"type":"number"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"TrailModule","extends":[],"properties":{"enabled":{"type":"boolean"},"attachRibbonToTransform":{"type":"any"},"colorOverLifetime":{"type":"MinMaxGradient"},"colorOverTrail":{"type":"MinMaxGradient"},"dieWithParticles":{"type":"boolean"},"inheritParticleColor":{"type":"boolean"},"lifetime":{"type":"MinMaxCurve"},"lifetimeMultiplier":{"type":"number"},"minVertexDistance":{"type":"number"},"mode":{"type":"ParticleSystemTrailMode"},"ratio":{"type":"number"},"ribbonCount":{"type":"number"},"shadowBias":{"type":"number"},"sizeAffectsLifetime":{"type":"boolean"},"sizeAffectsWidth":{"type":"boolean"},"splitSubEmitterRibbons":{"type":"boolean"},"textureMode":{"type":"ParticleSystemTrailTextureMode"},"widthOverTrail":{"type":"MinMaxCurve"},"widthOverTrailMultiplier":{"type":"number"},"worldSpace":{"type":"boolean"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"VelocityOverLifetimeModule","extends":[],"properties":{"enabled":{"type":"boolean"},"space":{"type":"ParticleSystemSimulationSpace"},"orbitalX":{"type":"MinMaxCurve"},"orbitalY":{"type":"MinMaxCurve"},"orbitalZ":{"type":"MinMaxCurve"},"orbitalXMultiplier":{"type":"number"},"orbitalYMultiplier":{"type":"number"},"orbitalZMultiplier":{"type":"number"},"orbitalOffsetX":{"type":"number"},"orbitalOffsetY":{"type":"number"},"orbitalOffsetZ":{"type":"number"},"speedModifier":{"type":"MinMaxCurve"},"speedModifierMultiplier":{"type":"number"},"x":{"type":"MinMaxCurve"},"xMultiplier":{"type":"number"},"y":{"type":"MinMaxCurve"},"yMultiplier":{"type":"number"},"z":{"type":"MinMaxCurve"},"zMultiplier":{"type":"number"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"TextureSheetAnimationModule","extends":[],"properties":{"animation":{"type":"ParticleSystemAnimationType"},"enabled":{"type":"boolean"},"cycleCount":{"type":"number"},"frameOverTime":{"type":"MinMaxCurve"},"frameOverTimeMultiplier":{"type":"number"},"numTilesX":{"type":"number"},"numTilesY":{"type":"number"},"startFrame":{"type":"MinMaxCurve"},"startFrameMultiplier":{"type":"number"},"rowMode":{"type":"ParticleSystemAnimationRowMode"},"rowIndex":{"type":"number"},"spriteCount":{"type":"number"},"timeMode":{"type":"ParticleSystemAnimationTimeMode"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"RotationOverLifetimeModule","extends":[],"properties":{"enabled":{"type":"boolean"},"separateAxes":{"type":"boolean"},"x":{"type":"MinMaxCurve"},"xMultiplier":{"type":"number"},"y":{"type":"MinMaxCurve"},"yMultiplier":{"type":"number"},"z":{"type":"MinMaxCurve"},"zMultiplier":{"type":"number"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"RotationBySpeedModule","extends":[],"properties":{"enabled":{"type":"boolean"},"range":{"type":"Vec2"},"separateAxes":{"type":"boolean"},"x":{"type":"MinMaxCurve"},"xMultiplier":{"type":"number"},"y":{"type":"MinMaxCurve"},"yMultiplier":{"type":"number"},"z":{"type":"MinMaxCurve"},"zMultiplier":{"type":"number"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"LimitVelocityOverLifetimeModule","extends":[],"properties":{"enabled":{"type":"boolean"},"dampen":{"type":"number"},"drag":{"type":"MinMaxCurve"},"dragMultiplier":{"type":"number"},"limit":{"type":"MinMaxCurve"},"limitMultiplier":{"type":"number"},"separateAxes":{"type":"boolean"},"limitX":{"type":"MinMaxCurve"},"limitXMultiplier":{"type":"number"},"limitY":{"type":"MinMaxCurve"},"limitYMultiplier":{"type":"number"},"limitZ":{"type":"MinMaxCurve"},"limitZMultiplier":{"type":"number"},"multiplyDragByParticleSize":{"type":"boolean"},"multiplyDragByParticleVelocity":{"type":"boolean"},"space":{"type":"ParticleSystemSimulationSpace"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"InheritVelocityModule","extends":[],"properties":{"enabled":{"type":"boolean"},"curve":{"type":"MinMaxCurve"},"curveMultiplier":{"type":"number"},"mode":{"type":"ParticleSystemInheritVelocityMode"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"SizeBySpeedModule","extends":[],"properties":{"enabled":{"type":"boolean"},"range":{"type":"Vector2"},"separateAxes":{"type":"boolean"},"size":{"type":"MinMaxCurve"},"sizeMultiplier":{"type":"number"},"x":{"type":"MinMaxCurve"},"xMultiplier":{"type":"number"},"y":{"type":"MinMaxCurve"},"yMultiplier":{"type":"number"},"z":{"type":"MinMaxCurve"},"zMultiplier":{"type":"number"}}},{"file":"/src/engine-components/particlesystem/ParticleSystemModules.ts","type":"ColorBySpeedModule","extends":[],"properties":{"enabled":{"type":"boolean"},"range":{"type":"Vector2"},"color":{"type":"MinMaxGradient"}}},{"file":"/src/engine-components/physics/Attractor.ts","type":"Attractor","extends":["Behaviour"],"properties":{"strength":{"type":"number"},"radius":{"type":"number"},"targets":{"type":"Rigidbody[]"}}},{"file":"/src/engine-components/postprocessing/Effects/Antialiasing.ts","type":"Antialiasing","extends":["PostProcessingEffect"],"properties":{"preset":{"type":"VolumeParameter"}}},{"file":"/src/engine-components/postprocessing/Effects/BloomEffect.ts","type":"BloomEffect","extends":["PostProcessingEffect"],"properties":{"threshold":{"type":"VolumeParameter"},"intensity":{"type":"VolumeParameter"},"scatter":{"type":"VolumeParameter"}}},{"file":"/src/engine-components/postprocessing/Effects/ChromaticAberration.ts","type":"ChromaticAberration","extends":["PostProcessingEffect"],"properties":{"intensity":{"type":"VolumeParameter"}}},{"file":"/src/engine-components/postprocessing/Effects/ColorAdjustments.ts","type":"ColorAdjustments","extends":["PostProcessingEffect"],"properties":{"postExposure":{"type":"VolumeParameter"},"contrast":{"type":"VolumeParameter"},"hueShift":{"type":"VolumeParameter"},"saturation":{"type":"VolumeParameter"}}},{"file":"/src/engine-components/postprocessing/Effects/DepthOfField.ts","type":"DepthOfField","extends":["PostProcessingEffect"],"properties":{"mode":{"type":"DepthOfFieldMode"},"focusDistance":{"type":"VolumeParameter"},"focalLength":{"type":"VolumeParameter"},"aperture":{"type":"VolumeParameter"},"gaussianMaxRadius":{"type":"VolumeParameter"},"resolutionScale":{"type":"VolumeParameter"},"bokehScale":{"type":"VolumeParameter"}}},{"file":"/src/engine-components/postprocessing/Effects/Pixelation.ts","type":"PixelationEffect","extends":["PostProcessingEffect"],"properties":{"granularity":{"type":"VolumeParameter"}}},{"file":"/src/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusion.ts","type":"ScreenSpaceAmbientOcclusion","extends":["PostProcessingEffect"],"properties":{"intensity":{"type":"VolumeParameter"},"falloff":{"type":"VolumeParameter"},"samples":{"type":"VolumeParameter"},"color":{"type":"VolumeParameter"},"luminanceInfluence":{"type":"VolumeParameter"}}},{"file":"/src/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusionN8.ts","type":"ScreenSpaceAmbientOcclusionN8","extends":["PostProcessingEffect"],"properties":{"gammaCorrection":{"type":"boolean"},"aoRadius":{"type":"VolumeParameter"},"falloff":{"type":"VolumeParameter"},"intensity":{"type":"VolumeParameter"},"color":{"type":"VolumeParameter"},"screenspaceRadius":{"type":"boolean"},"quality":{"type":"ScreenSpaceAmbientOcclusionN8QualityMode"}}},{"file":"/src/engine-components/postprocessing/Effects/Sharpening.ts","type":"SharpeningEffect","extends":["PostProcessingEffect"],"properties":{"amount":{"type":"number"},"radius":{"type":"number"}}},{"file":"/src/engine-components/postprocessing/Effects/TiltShiftEffect.ts","type":"TiltShiftEffect","extends":["PostProcessingEffect"],"properties":{"offset":{"type":"VolumeParameter"},"rotation":{"type":"VolumeParameter"},"focusArea":{"type":"VolumeParameter"},"feather":{"type":"VolumeParameter"},"kernelSize":{"type":"VolumeParameter"},"resolutionScale":{"type":"VolumeParameter"}}},{"file":"/src/engine-components/postprocessing/Effects/Tonemapping.ts","type":"ToneMappingEffect","extends":["PostProcessingEffect"],"properties":{"mode":{"type":"VolumeParameter"},"exposure":{"type":"VolumeParameter"}}},{"file":"/src/engine-components/postprocessing/Effects/Vignette.ts","type":"Vignette","extends":["PostProcessingEffect"],"properties":{"color":{"type":"VolumeParameter"},"intensity":{"type":"VolumeParameter"},"center":{"type":"VolumeParameter"}}},{"file":"/src/engine-components/postprocessing/PostProcessingEffect.ts","type":"PostProcessingEffect","extends":["Component"],"properties":{"active":{"type":"boolean"}}},{"file":"/src/engine-components/timeline/PlayableDirector.ts","type":"PlayableDirector","extends":["Behaviour"],"properties":{"playOnAwake":{"type":"boolean"},"extrapolationMode":{"type":"DirectorWrapMode"}}},{"file":"/src/engine-components/timeline/SignalAsset.ts","type":"SignalAsset","extends":[],"properties":{"guid":{"type":"string"}}},{"file":"/src/engine-components/timeline/SignalAsset.ts","type":"SignalReceiverEvent","extends":[],"properties":{"signal":{"type":"SignalAsset"},"reaction":{"type":"EventList<void>"}}},{"file":"/src/engine-components/timeline/SignalAsset.ts","type":"SignalReceiver","extends":["Behaviour"],"properties":{"events":{"type":"SignalReceiverEvent[]"}}},{"file":"/src/engine-components/ui/Button.ts","type":"ButtonColors","extends":[],"properties":{"colorMultiplier":{"type":"1"},"disabledColor":{"type":"RGBAColor"},"fadeDuration":{"type":"number"},"highlightedColor":{"type":"RGBAColor"},"normalColor":{"type":"RGBAColor"},"pressedColor":{"type":"RGBAColor"},"selectedColor":{"type":"RGBAColor"}}},{"file":"/src/engine-components/ui/Button.ts","type":"Button","extends":["Behaviour"],"properties":{"onClick":{"type":"EventList<void>"},"colors":{"type":"ButtonColors"},"transition":{"type":"Transition"},"animationTriggers":{"type":"AnimationTriggers"},"animator":{"type":"Animator"},"interactable":{"type":"any"}}},{"file":"/src/engine-components/ui/Canvas.ts","type":"Canvas","extends":["UIRootComponent"],"properties":{"renderOnTop":{"type":"boolean"},"depthWrite":{"type":"boolean"},"doubleSided":{"type":"boolean"},"castShadows":{"type":"boolean"},"receiveShadows":{"type":"boolean"},"rootCanvas":{"type":"Canvas"},"worldCamera":{"type":"Camera"},"planeDistance":{"type":"number"}}},{"file":"/src/engine-components/ui/CanvasGroup.ts","type":"CanvasGroup","extends":["Behaviour"],"properties":{"interactable":{"type":"boolean"},"blocksRaycasts":{"type":"boolean"}}},{"file":"/src/engine-components/ui/Graphic.ts","type":"Graphic","extends":["BaseUIComponent"],"properties":{"raycastTarget":{"type":"boolean"}}},{"file":"/src/engine-components/ui/Image.ts","type":"Sprite","extends":[],"properties":{"texture":{"type":"Texture | null"}}},{"file":"/src/engine-components/ui/Image.ts","type":"Image","extends":["MaskableGraphic"],"properties":{"pixelsPerUnitMultiplier":{"type":"number"}}},{"file":"/src/engine-components/ui/InputField.ts","type":"InputField","extends":["Behaviour"],"properties":{"textComponent":{"type":"Text"},"placeholder":{"type":"Text"},"onValueChanged":{"type":"EventList<any>"},"onEndEdit":{"type":"EventList<any>"}}},{"file":"/src/engine-components/ui/Layout.ts","type":"Padding","extends":[],"properties":{"left":{"type":"number"},"right":{"type":"number"},"top":{"type":"number"},"bottom":{"type":"number"}}},{"file":"/src/engine-components/ui/Layout.ts","type":"LayoutGroup","extends":["Behaviour"],"properties":{"childAlignment":{"type":"TextAnchor"},"reverseArrangement":{"type":"boolean"},"spacing":{"type":"number"},"padding":{"type":"Padding"},"minWidth":{"type":"number"},"minHeight":{"type":"number"},"flexibleHeight":{"type":"number"},"flexibleWidth":{"type":"number"},"preferredHeight":{"type":"number"},"preferredWidth":{"type":"number"}}},{"file":"/src/engine-components/ui/Layout.ts","type":"HorizontalOrVerticalLayoutGroup","extends":["LayoutGroup"],"properties":{"childControlHeight":{"type":"boolean"},"childControlWidth":{"type":"boolean"},"childForceExpandHeight":{"type":"boolean"},"childForceExpandWidth":{"type":"boolean"},"childScaleHeight":{"type":"boolean"},"childScaleWidth":{"type":"boolean"}}},{"file":"/src/engine-components/ui/Outline.ts","type":"Outline","extends":["Behaviour"],"properties":{"effectColor":{"type":"RGBAColor"},"effectDistance":{"type":"Vector2"}}},{"file":"/src/engine-components/ui/Raycaster.ts","type":"ObjectRaycaster","extends":["Raycaster"],"properties":{"ignoreSkinnedMeshes":{"type":"any"}}},{"file":"/src/engine-components/ui/RectTransform.ts","type":"RectTransform","extends":["BaseUIComponent"],"properties":{"sizeDelta":{"type":"Vector2"},"pivot":{"type":"Vector2"},"anchorMin":{"type":"Vector2"},"anchorMax":{"type":"Vector2"}}},{"file":"/src/engine-components/ui/SpatialHtml.ts","type":"SpatialHtml","extends":["Behaviour"],"properties":{"id":{"type":"string | null"},"keepAspect":{"type":"boolean"}}},{"file":"/src/engine-components/ui/Text.ts","type":"Text","extends":["Graphic"],"properties":{"alignment":{"type":"TextAnchor"},"verticalOverflow":{"type":"VerticalWrapMode"},"horizontalOverflow":{"type":"HorizontalWrapMode"},"lineSpacing":{"type":"number"},"supportRichText":{"type":"boolean"},"font":{"type":"string"},"fontStyle":{"type":"FontStyle"}}},{"file":"/src/engine-components/utils/LookAt.ts","type":"LookAt","extends":["Behaviour"],"properties":{"target":{"type":"Object3D"},"invertForward":{"type":"boolean"},"keepUpDirection":{"type":"boolean"},"copyTargetRotation":{"type":"boolean"}}},{"file":"/src/engine-components/utils/OpenURL.ts","type":"OpenURL","extends":["Behaviour"],"properties":{"url":{"type":"string"},"mode":{"type":"OpenURLMode"},"clickable":{"type":"boolean"}}},{"file":"/src/engine-components/web/CursorFollow.ts","type":"CursorFollow","extends":["Behaviour"],"properties":{"damping":{"type":"number"},"useFullPage":{"type":"boolean"},"keepDistance":{"type":"boolean"}}},{"file":"/src/engine-components/web/HoverAnimation.ts","type":"HoverAnimation","extends":["Behaviour"],"properties":{"type":{"type":"ScaleClipType"},"duration":{"type":"number"},"scaleFactor":{"type":"number"},"hovered":{"type":"AnimationClip | null"},"idle":{"type":"AnimationClip | null"}}},{"file":"/src/engine-components/web/ScrollFollow.ts","type":"ScrollFollow","extends":["Behaviour"],"properties":{"target":{"type":"object[] | object | null"},"damping":{"type":"number"},"invert":{"type":"boolean"},"htmlSelector":{"type":"string | null"},"mode":{"type":"\"window\""},"changed":{"type":"EventList<ScrollFollowEvent>"}}},{"file":"/src/engine-components/web/ViewBox.ts","type":"ViewBox","extends":["Behaviour"],"properties":{"referenceFieldOfView":{"type":"number"},"debug":{"type":"boolean"}}},{"file":"/src/engine-components/webxr/Avatar.ts","type":"Avatar","extends":["Behaviour"],"properties":{"head":{"type":"AssetReference"},"leftHand":{"type":"AssetReference"},"rightHand":{"type":"AssetReference"}}},{"file":"/src/engine-components/webxr/WebARCameraBackground.ts","type":"WebARCameraBackground","extends":["Behaviour"],"properties":{"backgroundTint":{"type":"RGBAColor"}}},{"file":"/src/engine-components/webxr/WebXR.ts","type":"WebXR","extends":["Behaviour"],"properties":{"createVRButton":{"type":"boolean"},"createARButton":{"type":"boolean"},"createSendToQuestButton":{"type":"boolean"},"createQRCode":{"type":"boolean"},"useDefaultControls":{"type":"boolean"},"showControllerModels":{"type":"boolean"},"showHandModels":{"type":"boolean"},"usePlacementReticle":{"type":"boolean"},"customARPlacementReticle":{"type":"AssetReference"},"usePlacementAdjustment":{"type":"boolean"},"arScale":{"type":"number"},"useXRAnchor":{"type":"boolean"},"autoPlace":{"type":"boolean"},"autoCenter":{"type":"boolean"},"useQuicklookExport":{"type":"boolean"},"useDepthSensing":{"type":"boolean"},"useSpatialGrab":{"type":"boolean"},"defaultAvatar":{"type":"AssetReference | boolean"}}},{"file":"/src/engine-components/webxr/WebXRImageTracking.ts","type":"WebXRImageTrackingModel","extends":[],"properties":{"image":{"type":"string"},"widthInMeters":{"type":"number"},"object":{"type":"AssetReference"},"createObjectInstance":{"type":"boolean"},"imageDoesNotMove":{"type":"boolean"},"hideWhenTrackingIsLost":{"type":"boolean"}}},{"file":"/src/engine-components/webxr/WebXRImageTracking.ts","type":"WebXRImageTracking","extends":["Behaviour"],"properties":{"trackedImages":{"type":"WebXRImageTrackingModel[]"},"smooth":{"type":"boolean"}}},{"file":"/src/engine-components/webxr/WebXRPlaneTracking.ts","type":"WebXRPlaneTracking","extends":["Behaviour"],"properties":{"dataTemplate":{"type":"AssetReference"},"occluder":{"type":"any"},"initiateRoomCaptureIfNoData":{"type":"any"},"usePlaneData":{"type":"boolean"},"useMeshData":{"type":"boolean"},"runInVR":{"type":"any"}}},{"file":"/src/engine-components/webxr/WebXRRig.ts","type":"XRRig","extends":["Behaviour"],"properties":{"priority":{"type":"number"}}},{"file":"/src/engine-components/webxr/XRFlag.ts","type":"XRFlag","extends":["Behaviour"],"properties":{"visibleIn":{"type":"number"}}},{"file":"/src/engine-components/webxr/controllers/XRControllerFollow.ts","type":"XRControllerFollow","extends":["Behaviour"],"properties":{"side":{"type":"XRHandedness | number"},"controller":{"type":"boolean"},"hands":{"type":"boolean"},"controlVisibility":{"type":"boolean"},"useGripSpace":{"type":"any"},"resetTransformAfterXRSession":{"type":"boolean"}}},{"file":"/src/engine-components/webxr/controllers/XRControllerModel.ts","type":"XRControllerModel","extends":["Behaviour"],"properties":{"createControllerModel":{"type":"boolean"},"createHandModel":{"type":"boolean"},"customLeftHand":{"type":"AssetReference"},"customRightHand":{"type":"AssetReference"}}},{"file":"/src/engine-components/webxr/controllers/XRControllerMovement.ts","type":"XRControllerMovement","extends":["Behaviour"],"properties":{"movementSpeed":{"type":"any"},"rotationStep":{"type":"any"},"useTeleport":{"type":"boolean"},"usePinchToTeleport":{"type":"boolean"},"useTeleportTarget":{"type":"any"},"useTeleportFade":{"type":"any"},"showRays":{"type":"boolean"},"showHits":{"type":"boolean"}}}]}
@@ -1183,7 +1183,7 @@ let oe = class D {
1183
1183
  }
1184
1184
  if (a ? r.mesh_lod = l : r.mesh_lod = s.lastLodLevel_Mesh, k && r.mesh_lod != s.lastLodLevel_Mesh) {
1185
1185
  const x = u?.[r.mesh_lod];
1186
- x && console.debug(`Mesh LOD changed: ${s.lastLodLevel_Mesh} → ${r.mesh_lod} (density: ${x.densities?.[d].toFixed(0)}) | ${e.name}`);
1186
+ x && console.log(`Mesh LOD changed: ${s.lastLodLevel_Mesh} → ${r.mesh_lod} (density: ${x.densities?.[d].toFixed(0)}) | ${e.name}`);
1187
1187
  }
1188
1188
  if (_) {
1189
1189
  const c = "saveData" in globalThis.navigator && globalThis.navigator.saveData === !0;
@@ -1,8 +1,8 @@
1
- "use strict";const d=require("./three-B-jwTHao.umd.cjs"),q=require("./three-examples-Deqc1bNw.umd.cjs");var ae=typeof document<"u"?document.currentScript:null;const Re="";globalThis.GLTF_PROGRESSIVE_VERSION=Re;console.debug("[gltf-progressive] version -");let k="https://www.gstatic.com/draco/versioned/decoders/1.5.7/",V="https://cdn.needle.tools/static/three/0.179.1/basis2/";const Be=k,$e=V,De=new URL(k+"draco_decoder.js");De.searchParams.append("range","true");fetch(De,{method:"GET",headers:{Range:"bytes=0-1"}}).catch(i=>{console.debug(`Failed to fetch remote Draco decoder from ${k} (offline: ${typeof navigator<"u"?navigator.onLine:"unknown"})`),k===Be&&be("./include/draco/"),V===$e&&Oe("./include/ktx2/")}).finally(()=>{Se()});const Ge=()=>({dracoDecoderPath:k,ktx2TranscoderPath:V});function be(i){k=i,A&&A[ge]!=k?(console.debug("Updating Draco decoder path to "+i),A[ge]=k,A.setDecoderPath(k),A.preload()):console.debug("Setting Draco decoder path to "+i)}function Oe(i){V=i,R&&R.transcoderPath!=V?(console.debug("Updating KTX2 transcoder path to "+i),R.setTranscoderPath(V),R.init()):console.debug("Setting KTX2 transcoder path to "+i)}function ne(i){return Se(),i?R.detectSupport(i):i!==null&&console.warn("No renderer provided to detect ktx2 support - loading KTX2 textures might fail"),{dracoLoader:A,ktx2Loader:R,meshoptDecoder:se}}function ye(i){i.dracoLoader||i.setDRACOLoader(A),i.ktx2Loader||i.setKTX2Loader(R),i.meshoptDecoder||i.setMeshoptDecoder(se)}const ge=Symbol("dracoDecoderPath");let A,se,R;function Se(){A||(A=new q.DRACOLoader,A[ge]=k,A.setDecoderPath(k),A.setDecoderConfig({type:"js"}),A.preload()),R||(R=new q.KTX2Loader,R.setTranscoderPath(V),R.init()),se||(se=q.MeshoptDecoder)}const pe=new WeakMap;function xe(i,t){let e=pe.get(i);e?e=Object.assign(e,t):e=t,pe.set(i,e)}const Fe=q.GLTFLoader.prototype.load;function Ue(...i){const t=pe.get(this);let e=i[0];const r=new URL(e,window.location.href);if(r.hostname.endsWith("needle.tools")){const s=t?.progressive!==void 0?t.progressive:!0,o=t?.usecase?t.usecase:"default";s?this.requestHeader.Accept=`*/*;progressive=allowed;usecase=${o}`:this.requestHeader.Accept=`*/*;usecase=${o}`,e=r.toString()}return i[0]=e,Fe?.call(this,...i)}q.GLTFLoader.prototype.load=Ue;N("debugprogressive");function N(i){if(typeof window>"u")return!1;const e=new URL(window.location.href).searchParams.get(i);return e==null||e==="0"||e==="false"?!1:e===""?!0:e}function We(i,t){if(t===void 0||i===void 0||t.startsWith("./")||t.startsWith("http")||t.startsWith("data:")||t.startsWith("blob:"))return t;const e=i.lastIndexOf("/");if(e>=0){const r=i.substring(0,e+1);for(;r.endsWith("/")&&t.startsWith("/");)t=t.substring(1);return r+t}return t}function Te(){return j!==void 0||(j=/iPhone|iPad|iPod|Android|IEMobile/i.test(navigator.userAgent),N("debugprogressive")&&console.log("[glTF Progressive]: isMobileDevice",j)),j}let j;function Le(){if(typeof window>"u")return!1;const i=new URL(window.location.href),t=i.hostname==="localhost"||/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(i.hostname);return i.hostname==="127.0.0.1"||t}class ze{constructor(t=100,e={}){this.maxConcurrent=t,this.debug=e.debug??!1,window.requestAnimationFrame(this.tick)}_running=new Map;_queue=[];debug=!1;tick=()=>{this.internalUpdate(),setTimeout(this.tick,10)};slot(t){return this.debug&&console.debug(`[PromiseQueue]: Requesting slot for key ${t}, running: ${this._running.size}, waiting: ${this._queue.length}`),new Promise(e=>{this._queue.push({key:t,resolve:e})})}add(t,e){this._running.has(t)||(this._running.set(t,e),e.finally(()=>{this._running.delete(t),this.debug&&console.debug(`[PromiseQueue]: Promise finished now running: ${this._running.size}, waiting: ${this._queue.length}. (finished ${t})`)}),this.debug&&console.debug(`[PromiseQueue]: Added new promise, now running: ${this._running.size}, waiting: ${this._queue.length}. (added ${t})`))}internalUpdate(){const t=this.maxConcurrent-this._running.size;for(let e=0;e<t&&this._queue.length>0;e++){this.debug&&console.debug(`[PromiseQueue]: Running ${this._running.size} promises, waiting for ${this._queue.length} more.`);const{key:r,resolve:n}=this._queue.shift();n({use:s=>this.add(r,s)})}}}const Ee=typeof window>"u"&&typeof document>"u",me=Symbol("needle:raycast-mesh");function X(i){return i?.[me]instanceof d.BufferGeometry?i[me]:null}function Ve(i,t){if((i.type==="Mesh"||i.type==="SkinnedMesh")&&!X(i)){const r=qe(t);r.userData={isRaycastMesh:!0},i[me]=r}}function Ne(i=!0){if(i){if(Y)return;const t=Y=d.Mesh.prototype.raycast;d.Mesh.prototype.raycast=function(e,r){const n=this,s=X(n);let o;s&&n.isMesh&&(o=n.geometry,n.geometry=s),t.call(this,e,r),o&&(n.geometry=o)}}else{if(!Y)return;d.Mesh.prototype.raycast=Y,Y=null}}let Y=null;function qe(i){const t=new d.BufferGeometry;for(const e in i.attributes)t.setAttribute(e,i.getAttribute(e));return t.setIndex(i.getIndex()),t}const W=new Array,p=N("debugprogressive");let Q,E=-1;if(p){let i=function(){E+=1,E>=t&&(E=-1),console.log(`Toggle LOD level [${E}]`)},t=6;window.addEventListener("keyup",e=>{e.key==="p"&&i(),e.key==="w"&&(Q=!Q,console.log(`Toggle wireframe [${Q}]`));const r=parseInt(e.key);!isNaN(r)&&r>=0&&(E=r,console.log(`Set LOD level to [${E}]`))})}function Pe(i){if(p&&Q!==void 0)if(Array.isArray(i))for(const t of i)Pe(t);else i&&"wireframe"in i&&(i.wireframe=Q===!0)}const H=new Array;let Xe=0;const Ke=Te()?2:10;function je(i){if(H.length<Ke){const r=H.length;p&&console.warn(`[Worker] Creating new worker #${r}`);const n=we.createWorker(i||{});return H.push(n),n}const t=Xe++%H.length;return H[t]}class we{constructor(t,e){this.worker=t,this._debug=e.debug??!1,t.onmessage=r=>{const n=r.data;switch(this._debug&&console.log("[Worker] EVENT",n),n.type){case"loaded-gltf":for(const s of this._running)if(s.url===n.result.url){Ye(n.result),s.resolve(n.result);const o=s.url;o.startsWith("blob:")&&URL.revokeObjectURL(o)}}},t.onerror=r=>{console.error("[Worker] Error in gltf-progressive worker:",r)},t.postMessage({type:"init"})}static async createWorker(t){const e=new Worker(new URL("/loader.worker-CiTwpNPW.js",typeof document>"u"?require("url").pathToFileURL(__filename).href:ae&&ae.tagName.toUpperCase()==="SCRIPT"&&ae.src||new URL("gltf-progressive-Iy7aSAPk.umd.cjs",document.baseURI).href),{type:"module"});return new we(e,t)}_running=[];_webglRenderer=null;async load(t,e){const r=Ge();let n=e?.renderer;n||(this._webglRenderer??=(async()=>{const{WebGLRenderer:u}=await Promise.resolve().then(()=>require("./three-B-jwTHao.umd.cjs")).then(c=>c.THREE);return new u})(),n=await this._webglRenderer);const l=ne(n).ktx2Loader.workerConfig;t instanceof URL?t=t.toString():t.startsWith("file:")?t=URL.createObjectURL(new Blob([t])):!t.startsWith("blob:")&&!t.startsWith("http:")&&!t.startsWith("https:")&&(t=new URL(t,window.location.href).toString());const a={type:"load",url:t,dracoDecoderPath:r.dracoDecoderPath,ktx2TranscoderPath:r.ktx2TranscoderPath,ktx2LoaderConfig:l};return this._debug&&console.debug("[Worker] Sending load request",a),this.worker.postMessage(a),new Promise(u=>{this._running.push({url:t.toString(),resolve:u})})}_debug=!1}function Ye(i){for(const t of i.geometries){const e=t.geometry,r=new d.BufferGeometry;if(r.name=e.name||"",e.index){const n=e.index;r.setIndex(le(n))}for(const n in e.attributes){const s=e.attributes[n],o=le(s);r.setAttribute(n,o)}if(e.morphAttributes)for(const n in e.morphAttributes){const o=e.morphAttributes[n].map(l=>le(l));r.morphAttributes[n]=o}if(r.morphTargetsRelative=e.morphTargetsRelative??!1,r.boundingBox=new d.Box3,r.boundingBox.min=new d.Vector3(e.boundingBox?.min.x,e.boundingBox?.min.y,e.boundingBox?.min.z),r.boundingBox.max=new d.Vector3(e.boundingBox?.max.x,e.boundingBox?.max.y,e.boundingBox?.max.z),r.boundingSphere=new d.Sphere(new d.Vector3(e.boundingSphere?.center.x,e.boundingSphere?.center.y,e.boundingSphere?.center.z),e.boundingSphere?.radius),e.groups)for(const n of e.groups)r.addGroup(n.start,n.count,n.materialIndex);e.userData&&(r.userData=e.userData),t.geometry=r}for(const t of i.textures){const e=t.texture;let r=null;if(e.isCompressedTexture){const n=e.mipmaps,s=e.image?.width||e.source?.data?.width||-1,o=e.image?.height||e.source?.data?.height||-1;r=new d.CompressedTexture(n,s,o,e.format,e.type,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.anisotropy,e.colorSpace)}else r=new d.Texture(e.image,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.colorSpace),r.mipmaps=e.mipmaps,r.channel=e.channel,r.source.data=e.source.data,r.flipY=e.flipY,r.premultiplyAlpha=e.premultiplyAlpha,r.unpackAlignment=e.unpackAlignment,r.matrix=new d.Matrix3(...e.matrix.elements);if(!r){console.error("[Worker] Failed to create new texture from received data. Texture is not a CompressedTexture or Texture.");continue}t.texture=r}return i}function le(i){let t=i;if("isInterleavedBufferAttribute"in i&&i.isInterleavedBufferAttribute){const e=i.data,r=e.array,n=new d.InterleavedBuffer(r,e.stride);t=new d.InterleavedBufferAttribute(n,i.itemSize,r.byteOffset,i.normalized),t.offset=i.offset}else"isBufferAttribute"in i&&i.isBufferAttribute&&(t=new d.BufferAttribute(i.array,i.itemSize,i.normalized),t.usage=i.usage,t.gpuType=i.gpuType,t.updateRanges=i.updateRanges);return t}const He=N("gltf-progressive-worker"),Qe=N("gltf-progressive-reduce-mipmaps"),ue=Symbol("needle-progressive-texture"),F="NEEDLE_progressive";class m{get name(){return F}static getMeshLODExtension(t){const e=this.getAssignedLODInformation(t);return e?.key?this.lodInfos.get(e.key):null}static getPrimitiveIndex(t){const e=this.getAssignedLODInformation(t)?.index;return e??-1}static getMaterialMinMaxLODsCount(t,e){const r=this,n="LODS:minmax",s=t[n];if(s!=null)return s;if(e||(e={min_count:1/0,max_count:0,lods:[]}),Array.isArray(t)){for(const l of t)this.getMaterialMinMaxLODsCount(l,e);return t[n]=e,e}if(p==="verbose"&&console.log("getMaterialMinMaxLODsCount",t),t.type==="ShaderMaterial"||t.type==="RawShaderMaterial"){const l=t;for(const a of Object.keys(l.uniforms)){const u=l.uniforms[a].value;u?.isTexture===!0&&o(u,e)}}else if(t.isMaterial)for(const l of Object.keys(t)){const a=t[l];a?.isTexture===!0&&o(a,e)}else p&&console.warn(`[getMaterialMinMaxLODsCount] Unsupported material type: ${t.type}`);return t[n]=e,e;function o(l,a){const u=r.getAssignedLODInformation(l);if(u){const c=r.lodInfos.get(u.key);if(c&&c.lods){a.min_count=Math.min(a.min_count,c.lods.length),a.max_count=Math.max(a.max_count,c.lods.length);for(let y=0;y<c.lods.length;y++){const _=c.lods[y];_.width&&(a.lods[y]=a.lods[y]||{min_height:1/0,max_height:0},a.lods[y].min_height=Math.min(a.lods[y].min_height,_.height),a.lods[y].max_height=Math.max(a.lods[y].max_height,_.height))}}}}}static hasLODLevelAvailable(t,e){if(Array.isArray(t)){for(const s of t)if(this.hasLODLevelAvailable(s,e))return!0;return!1}if(t.isMaterial===!0){for(const s of Object.keys(t)){const o=t[s];if(o&&o.isTexture&&this.hasLODLevelAvailable(o,e))return!0}return!1}else if(t.isGroup===!0){for(const s of t.children)if(s.isMesh===!0&&this.hasLODLevelAvailable(s,e))return!0}let r,n;if(t.isMesh?r=t.geometry:(t.isBufferGeometry||t.isTexture)&&(r=t),r&&r?.userData?.LODS){const s=r.userData.LODS;if(n=this.lodInfos.get(s.key),e===void 0)return n!=null;if(n)return Array.isArray(n.lods)?e<n.lods.length:e===0}return!1}static assignMeshLOD(t,e){if(!t)return Promise.resolve(null);if(t instanceof d.Mesh||t.isMesh===!0){const r=t.geometry,n=this.getAssignedLODInformation(r);if(!n)return Promise.resolve(null);for(const s of W)s.onBeforeGetLODMesh?.(t,e);return t["LOD:requested level"]=e,m.getOrLoadLOD(r,e).then(s=>{if(Array.isArray(s)){const o=n.index||0;s=s[o]}return t["LOD:requested level"]===e&&(delete t["LOD:requested level"],s&&r!=s&&(s?.isBufferGeometry?t.geometry=s:p&&console.error("Invalid LOD geometry",s))),s}).catch(s=>(console.error("Error loading mesh LOD",t,s),null))}else p&&console.error("Invalid call to assignMeshLOD: Request mesh LOD but the object is not a mesh",t);return Promise.resolve(null)}static assignTextureLOD(t,e=0){if(!t)return Promise.resolve(null);if(t.isMesh===!0){const r=t;if(Array.isArray(r.material)){const n=new Array;for(const s of r.material){const o=this.assignTextureLOD(s,e);n.push(o)}return Promise.all(n).then(s=>{const o=new Array;for(const l of s)Array.isArray(l)&&o.push(...l);return o})}else return this.assignTextureLOD(r.material,e)}if(t.isMaterial===!0){const r=t,n=[],s=new Array;if(r.uniforms&&(r.isRawShaderMaterial||r.isShaderMaterial===!0)){const o=r;for(const l of Object.keys(o.uniforms)){const a=o.uniforms[l].value;if(a?.isTexture===!0){const u=this.assignTextureLODForSlot(a,e,r,l).then(c=>(c&&o.uniforms[l].value!=c&&(o.uniforms[l].value=c,o.uniformsNeedUpdate=!0),c));n.push(u),s.push(l)}}}else for(const o of Object.keys(r)){const l=r[o];if(l?.isTexture===!0){const a=this.assignTextureLODForSlot(l,e,r,o);n.push(a),s.push(o)}}return Promise.all(n).then(o=>{const l=new Array;for(let a=0;a<o.length;a++){const u=o[a],c=s[a];u&&u.isTexture===!0?l.push({material:r,slot:c,texture:u,level:e}):l.push({material:r,slot:c,texture:null,level:e})}return l})}if(t instanceof d.Texture||t.isTexture===!0){const r=t;return this.assignTextureLODForSlot(r,e,null,null)}return Promise.resolve(null)}static assignTextureLODForSlot(t,e,r,n){return t?.isTexture!==!0?Promise.resolve(null):n==="glyphMap"?Promise.resolve(t):m.getOrLoadLOD(t,e).then(s=>{if(Array.isArray(s))return console.warn("Progressive: Got an array of textures for a texture slot, this should not happen..."),null;if(s?.isTexture===!0){if(s!=t&&r&&n){const o=r[n];if(o&&!p){const l=this.getAssignedLODInformation(o);if(l&&l?.level<e)return p==="verbose"&&console.warn("Assigned texture level is already higher: ",l.level,e,r,o,s),null}if(Qe&&s.mipmaps){const l=s.mipmaps.length;s.mipmaps.length=Math.min(s.mipmaps.length,3),l!==s.mipmaps.length&&p&&console.debug(`Reduced mipmap count from ${l} to ${s.mipmaps.length} for ${s.uuid}: ${s.image?.width}x${s.image?.height}.`)}r[n]=s}return s}else p=="verbose"&&console.warn("No LOD found for",t,e);return null}).catch(s=>(console.error("Error loading LOD",t,s),null))}parser;url;constructor(t){const e=t.options.path;p&&console.log("Progressive extension registered for",e),this.parser=t,this.url=e}_isLoadingMesh;loadMesh=t=>{if(this._isLoadingMesh)return null;const e=this.parser.json.meshes[t]?.extensions?.[F];return e?(this._isLoadingMesh=!0,this.parser.getDependency("mesh",t).then(r=>(this._isLoadingMesh=!1,r&&m.registerMesh(this.url,e.guid,r,e.lods?.length,0,e),r))):null};afterRoot(t){return p&&console.log("AFTER",this.url,t),this.parser.json.textures?.forEach((e,r)=>{if(e?.extensions){const n=e?.extensions[F];if(n){if(!n.lods){p&&console.warn("Texture has no LODs",n);return}let s=!1;for(const o of this.parser.associations.keys())o.isTexture===!0&&this.parser.associations.get(o)?.textures===r&&(s=!0,m.registerTexture(this.url,o,n.lods?.length,r,n));s||this.parser.getDependency("texture",r).then(o=>{o&&m.registerTexture(this.url,o,n.lods?.length,r,n)})}}}),this.parser.json.meshes?.forEach((e,r)=>{if(e?.extensions){const n=e?.extensions[F];if(n&&n.lods){for(const s of this.parser.associations.keys())if(s.isMesh){const o=this.parser.associations.get(s);o?.meshes===r&&m.registerMesh(this.url,n.guid,s,n.lods.length,o.primitives,n)}}}}),null}static registerTexture=(t,e,r,n,s)=>{if(!e){p&&console.error("!! gltf-progressive: Called register texture without texture");return}if(p){const l=e.image?.width||e.source?.data?.width||0,a=e.image?.height||e.source?.data?.height||0;console.log(`> gltf-progressive: register texture[${n}] "${e.name||e.uuid}", Current: ${l}x${a}, Max: ${s.lods[0]?.width}x${s.lods[0]?.height}, uuid: ${e.uuid}`,s,e)}e.source&&(e.source[ue]=s);const o=s.guid;m.assignLODInformation(t,e,o,r,n),m.lodInfos.set(o,s),m.lowresCache.set(o,e)};static registerMesh=(t,e,r,n,s,o)=>{const l=r.geometry;if(!l){p&&console.warn("gltf-progressive: Register mesh without geometry");return}l.userData||(l.userData={}),p&&console.log("> Progressive: register mesh "+r.name,{index:s,uuid:r.uuid},o,r),m.assignLODInformation(t,l,e,n,s),m.lodInfos.set(e,o);let a=m.lowresCache.get(e);a?a.push(r.geometry):a=[r.geometry],m.lowresCache.set(e,a),n>0&&!X(r)&&Ve(r,l);for(const u of W)u.onRegisteredNewMesh?.(r,o)};static lodInfos=new Map;static previouslyLoaded=new Map;static lowresCache=new Map;static workers=[];static _workersIndex=0;static async getOrLoadLOD(t,e){const r=p=="verbose",n=this.getAssignedLODInformation(t);if(!n)return p&&console.warn(`[gltf-progressive] No LOD information found: ${t.name}, uuid: ${t.uuid}, type: ${t.type}`,t),null;const s=n?.key;let o;if(t.isTexture===!0){const a=t;a.source&&a.source[ue]&&(o=a.source[ue])}if(o||(o=m.lodInfos.get(s)),!o)p&&console.warn(`Can not load LOD ${e}: no LOD info found for "${s}" ${t.name}`,t.type,m.lodInfos);else{if(e>0){let c=!1;const y=Array.isArray(o.lods);if(y&&e>=o.lods.length?c=!0:y||(c=!0),c)return this.lowresCache.get(s)}const a=Array.isArray(o.lods)?o.lods[e]?.path:o.lods;if(!a)return p&&!o["missing:uri"]&&(o["missing:uri"]=!0,console.warn("Missing uri for progressive asset for LOD "+e,o)),null;const u=We(n.url,a);if(u.endsWith(".glb")||u.endsWith(".gltf")){if(!o.guid)return console.warn("missing pointer for glb/gltf texture",o),null;const c=u+"_"+o.guid,y=await this.queue.slot(u),_=this.previouslyLoaded.get(c);if(_!==void 0){r&&console.log(`LOD ${e} was already loading/loaded: ${c}`);let f=await _.catch(S=>(console.error(`Error loading LOD ${e} from ${u}
1
+ "use strict";const d=require("./three-B-jwTHao.umd.cjs"),q=require("./three-examples-Deqc1bNw.umd.cjs");var ae=typeof document<"u"?document.currentScript:null;const Re="";globalThis.GLTF_PROGRESSIVE_VERSION=Re;console.debug("[gltf-progressive] version -");let k="https://www.gstatic.com/draco/versioned/decoders/1.5.7/",V="https://cdn.needle.tools/static/three/0.179.1/basis2/";const Be=k,$e=V,De=new URL(k+"draco_decoder.js");De.searchParams.append("range","true");fetch(De,{method:"GET",headers:{Range:"bytes=0-1"}}).catch(i=>{console.debug(`Failed to fetch remote Draco decoder from ${k} (offline: ${typeof navigator<"u"?navigator.onLine:"unknown"})`),k===Be&&be("./include/draco/"),V===$e&&Oe("./include/ktx2/")}).finally(()=>{Se()});const Ge=()=>({dracoDecoderPath:k,ktx2TranscoderPath:V});function be(i){k=i,A&&A[ge]!=k?(console.debug("Updating Draco decoder path to "+i),A[ge]=k,A.setDecoderPath(k),A.preload()):console.debug("Setting Draco decoder path to "+i)}function Oe(i){V=i,R&&R.transcoderPath!=V?(console.debug("Updating KTX2 transcoder path to "+i),R.setTranscoderPath(V),R.init()):console.debug("Setting KTX2 transcoder path to "+i)}function ne(i){return Se(),i?R.detectSupport(i):i!==null&&console.warn("No renderer provided to detect ktx2 support - loading KTX2 textures might fail"),{dracoLoader:A,ktx2Loader:R,meshoptDecoder:se}}function ye(i){i.dracoLoader||i.setDRACOLoader(A),i.ktx2Loader||i.setKTX2Loader(R),i.meshoptDecoder||i.setMeshoptDecoder(se)}const ge=Symbol("dracoDecoderPath");let A,se,R;function Se(){A||(A=new q.DRACOLoader,A[ge]=k,A.setDecoderPath(k),A.setDecoderConfig({type:"js"}),A.preload()),R||(R=new q.KTX2Loader,R.setTranscoderPath(V),R.init()),se||(se=q.MeshoptDecoder)}const pe=new WeakMap;function xe(i,t){let e=pe.get(i);e?e=Object.assign(e,t):e=t,pe.set(i,e)}const Fe=q.GLTFLoader.prototype.load;function Ue(...i){const t=pe.get(this);let e=i[0];const r=new URL(e,window.location.href);if(r.hostname.endsWith("needle.tools")){const s=t?.progressive!==void 0?t.progressive:!0,o=t?.usecase?t.usecase:"default";s?this.requestHeader.Accept=`*/*;progressive=allowed;usecase=${o}`:this.requestHeader.Accept=`*/*;usecase=${o}`,e=r.toString()}return i[0]=e,Fe?.call(this,...i)}q.GLTFLoader.prototype.load=Ue;N("debugprogressive");function N(i){if(typeof window>"u")return!1;const e=new URL(window.location.href).searchParams.get(i);return e==null||e==="0"||e==="false"?!1:e===""?!0:e}function We(i,t){if(t===void 0||i===void 0||t.startsWith("./")||t.startsWith("http")||t.startsWith("data:")||t.startsWith("blob:"))return t;const e=i.lastIndexOf("/");if(e>=0){const r=i.substring(0,e+1);for(;r.endsWith("/")&&t.startsWith("/");)t=t.substring(1);return r+t}return t}function Te(){return j!==void 0||(j=/iPhone|iPad|iPod|Android|IEMobile/i.test(navigator.userAgent),N("debugprogressive")&&console.log("[glTF Progressive]: isMobileDevice",j)),j}let j;function Le(){if(typeof window>"u")return!1;const i=new URL(window.location.href),t=i.hostname==="localhost"||/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(i.hostname);return i.hostname==="127.0.0.1"||t}class ze{constructor(t=100,e={}){this.maxConcurrent=t,this.debug=e.debug??!1,window.requestAnimationFrame(this.tick)}_running=new Map;_queue=[];debug=!1;tick=()=>{this.internalUpdate(),setTimeout(this.tick,10)};slot(t){return this.debug&&console.debug(`[PromiseQueue]: Requesting slot for key ${t}, running: ${this._running.size}, waiting: ${this._queue.length}`),new Promise(e=>{this._queue.push({key:t,resolve:e})})}add(t,e){this._running.has(t)||(this._running.set(t,e),e.finally(()=>{this._running.delete(t),this.debug&&console.debug(`[PromiseQueue]: Promise finished now running: ${this._running.size}, waiting: ${this._queue.length}. (finished ${t})`)}),this.debug&&console.debug(`[PromiseQueue]: Added new promise, now running: ${this._running.size}, waiting: ${this._queue.length}. (added ${t})`))}internalUpdate(){const t=this.maxConcurrent-this._running.size;for(let e=0;e<t&&this._queue.length>0;e++){this.debug&&console.debug(`[PromiseQueue]: Running ${this._running.size} promises, waiting for ${this._queue.length} more.`);const{key:r,resolve:n}=this._queue.shift();n({use:s=>this.add(r,s)})}}}const Ee=typeof window>"u"&&typeof document>"u",me=Symbol("needle:raycast-mesh");function X(i){return i?.[me]instanceof d.BufferGeometry?i[me]:null}function Ve(i,t){if((i.type==="Mesh"||i.type==="SkinnedMesh")&&!X(i)){const r=qe(t);r.userData={isRaycastMesh:!0},i[me]=r}}function Ne(i=!0){if(i){if(Y)return;const t=Y=d.Mesh.prototype.raycast;d.Mesh.prototype.raycast=function(e,r){const n=this,s=X(n);let o;s&&n.isMesh&&(o=n.geometry,n.geometry=s),t.call(this,e,r),o&&(n.geometry=o)}}else{if(!Y)return;d.Mesh.prototype.raycast=Y,Y=null}}let Y=null;function qe(i){const t=new d.BufferGeometry;for(const e in i.attributes)t.setAttribute(e,i.getAttribute(e));return t.setIndex(i.getIndex()),t}const W=new Array,p=N("debugprogressive");let Q,E=-1;if(p){let i=function(){E+=1,E>=t&&(E=-1),console.log(`Toggle LOD level [${E}]`)},t=6;window.addEventListener("keyup",e=>{e.key==="p"&&i(),e.key==="w"&&(Q=!Q,console.log(`Toggle wireframe [${Q}]`));const r=parseInt(e.key);!isNaN(r)&&r>=0&&(E=r,console.log(`Set LOD level to [${E}]`))})}function Pe(i){if(p&&Q!==void 0)if(Array.isArray(i))for(const t of i)Pe(t);else i&&"wireframe"in i&&(i.wireframe=Q===!0)}const H=new Array;let Xe=0;const Ke=Te()?2:10;function je(i){if(H.length<Ke){const r=H.length;p&&console.warn(`[Worker] Creating new worker #${r}`);const n=we.createWorker(i||{});return H.push(n),n}const t=Xe++%H.length;return H[t]}class we{constructor(t,e){this.worker=t,this._debug=e.debug??!1,t.onmessage=r=>{const n=r.data;switch(this._debug&&console.log("[Worker] EVENT",n),n.type){case"loaded-gltf":for(const s of this._running)if(s.url===n.result.url){Ye(n.result),s.resolve(n.result);const o=s.url;o.startsWith("blob:")&&URL.revokeObjectURL(o)}}},t.onerror=r=>{console.error("[Worker] Error in gltf-progressive worker:",r)},t.postMessage({type:"init"})}static async createWorker(t){const e=new Worker(new URL("/loader.worker-CiTwpNPW.js",typeof document>"u"?require("url").pathToFileURL(__filename).href:ae&&ae.tagName.toUpperCase()==="SCRIPT"&&ae.src||new URL("gltf-progressive-CHeORqEv.umd.cjs",document.baseURI).href),{type:"module"});return new we(e,t)}_running=[];_webglRenderer=null;async load(t,e){const r=Ge();let n=e?.renderer;n||(this._webglRenderer??=(async()=>{const{WebGLRenderer:u}=await Promise.resolve().then(()=>require("./three-B-jwTHao.umd.cjs")).then(c=>c.THREE);return new u})(),n=await this._webglRenderer);const l=ne(n).ktx2Loader.workerConfig;t instanceof URL?t=t.toString():t.startsWith("file:")?t=URL.createObjectURL(new Blob([t])):!t.startsWith("blob:")&&!t.startsWith("http:")&&!t.startsWith("https:")&&(t=new URL(t,window.location.href).toString());const a={type:"load",url:t,dracoDecoderPath:r.dracoDecoderPath,ktx2TranscoderPath:r.ktx2TranscoderPath,ktx2LoaderConfig:l};return this._debug&&console.debug("[Worker] Sending load request",a),this.worker.postMessage(a),new Promise(u=>{this._running.push({url:t.toString(),resolve:u})})}_debug=!1}function Ye(i){for(const t of i.geometries){const e=t.geometry,r=new d.BufferGeometry;if(r.name=e.name||"",e.index){const n=e.index;r.setIndex(le(n))}for(const n in e.attributes){const s=e.attributes[n],o=le(s);r.setAttribute(n,o)}if(e.morphAttributes)for(const n in e.morphAttributes){const o=e.morphAttributes[n].map(l=>le(l));r.morphAttributes[n]=o}if(r.morphTargetsRelative=e.morphTargetsRelative??!1,r.boundingBox=new d.Box3,r.boundingBox.min=new d.Vector3(e.boundingBox?.min.x,e.boundingBox?.min.y,e.boundingBox?.min.z),r.boundingBox.max=new d.Vector3(e.boundingBox?.max.x,e.boundingBox?.max.y,e.boundingBox?.max.z),r.boundingSphere=new d.Sphere(new d.Vector3(e.boundingSphere?.center.x,e.boundingSphere?.center.y,e.boundingSphere?.center.z),e.boundingSphere?.radius),e.groups)for(const n of e.groups)r.addGroup(n.start,n.count,n.materialIndex);e.userData&&(r.userData=e.userData),t.geometry=r}for(const t of i.textures){const e=t.texture;let r=null;if(e.isCompressedTexture){const n=e.mipmaps,s=e.image?.width||e.source?.data?.width||-1,o=e.image?.height||e.source?.data?.height||-1;r=new d.CompressedTexture(n,s,o,e.format,e.type,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.anisotropy,e.colorSpace)}else r=new d.Texture(e.image,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.colorSpace),r.mipmaps=e.mipmaps,r.channel=e.channel,r.source.data=e.source.data,r.flipY=e.flipY,r.premultiplyAlpha=e.premultiplyAlpha,r.unpackAlignment=e.unpackAlignment,r.matrix=new d.Matrix3(...e.matrix.elements);if(!r){console.error("[Worker] Failed to create new texture from received data. Texture is not a CompressedTexture or Texture.");continue}t.texture=r}return i}function le(i){let t=i;if("isInterleavedBufferAttribute"in i&&i.isInterleavedBufferAttribute){const e=i.data,r=e.array,n=new d.InterleavedBuffer(r,e.stride);t=new d.InterleavedBufferAttribute(n,i.itemSize,r.byteOffset,i.normalized),t.offset=i.offset}else"isBufferAttribute"in i&&i.isBufferAttribute&&(t=new d.BufferAttribute(i.array,i.itemSize,i.normalized),t.usage=i.usage,t.gpuType=i.gpuType,t.updateRanges=i.updateRanges);return t}const He=N("gltf-progressive-worker"),Qe=N("gltf-progressive-reduce-mipmaps"),ue=Symbol("needle-progressive-texture"),F="NEEDLE_progressive";class m{get name(){return F}static getMeshLODExtension(t){const e=this.getAssignedLODInformation(t);return e?.key?this.lodInfos.get(e.key):null}static getPrimitiveIndex(t){const e=this.getAssignedLODInformation(t)?.index;return e??-1}static getMaterialMinMaxLODsCount(t,e){const r=this,n="LODS:minmax",s=t[n];if(s!=null)return s;if(e||(e={min_count:1/0,max_count:0,lods:[]}),Array.isArray(t)){for(const l of t)this.getMaterialMinMaxLODsCount(l,e);return t[n]=e,e}if(p==="verbose"&&console.log("getMaterialMinMaxLODsCount",t),t.type==="ShaderMaterial"||t.type==="RawShaderMaterial"){const l=t;for(const a of Object.keys(l.uniforms)){const u=l.uniforms[a].value;u?.isTexture===!0&&o(u,e)}}else if(t.isMaterial)for(const l of Object.keys(t)){const a=t[l];a?.isTexture===!0&&o(a,e)}else p&&console.warn(`[getMaterialMinMaxLODsCount] Unsupported material type: ${t.type}`);return t[n]=e,e;function o(l,a){const u=r.getAssignedLODInformation(l);if(u){const c=r.lodInfos.get(u.key);if(c&&c.lods){a.min_count=Math.min(a.min_count,c.lods.length),a.max_count=Math.max(a.max_count,c.lods.length);for(let y=0;y<c.lods.length;y++){const _=c.lods[y];_.width&&(a.lods[y]=a.lods[y]||{min_height:1/0,max_height:0},a.lods[y].min_height=Math.min(a.lods[y].min_height,_.height),a.lods[y].max_height=Math.max(a.lods[y].max_height,_.height))}}}}}static hasLODLevelAvailable(t,e){if(Array.isArray(t)){for(const s of t)if(this.hasLODLevelAvailable(s,e))return!0;return!1}if(t.isMaterial===!0){for(const s of Object.keys(t)){const o=t[s];if(o&&o.isTexture&&this.hasLODLevelAvailable(o,e))return!0}return!1}else if(t.isGroup===!0){for(const s of t.children)if(s.isMesh===!0&&this.hasLODLevelAvailable(s,e))return!0}let r,n;if(t.isMesh?r=t.geometry:(t.isBufferGeometry||t.isTexture)&&(r=t),r&&r?.userData?.LODS){const s=r.userData.LODS;if(n=this.lodInfos.get(s.key),e===void 0)return n!=null;if(n)return Array.isArray(n.lods)?e<n.lods.length:e===0}return!1}static assignMeshLOD(t,e){if(!t)return Promise.resolve(null);if(t instanceof d.Mesh||t.isMesh===!0){const r=t.geometry,n=this.getAssignedLODInformation(r);if(!n)return Promise.resolve(null);for(const s of W)s.onBeforeGetLODMesh?.(t,e);return t["LOD:requested level"]=e,m.getOrLoadLOD(r,e).then(s=>{if(Array.isArray(s)){const o=n.index||0;s=s[o]}return t["LOD:requested level"]===e&&(delete t["LOD:requested level"],s&&r!=s&&(s?.isBufferGeometry?t.geometry=s:p&&console.error("Invalid LOD geometry",s))),s}).catch(s=>(console.error("Error loading mesh LOD",t,s),null))}else p&&console.error("Invalid call to assignMeshLOD: Request mesh LOD but the object is not a mesh",t);return Promise.resolve(null)}static assignTextureLOD(t,e=0){if(!t)return Promise.resolve(null);if(t.isMesh===!0){const r=t;if(Array.isArray(r.material)){const n=new Array;for(const s of r.material){const o=this.assignTextureLOD(s,e);n.push(o)}return Promise.all(n).then(s=>{const o=new Array;for(const l of s)Array.isArray(l)&&o.push(...l);return o})}else return this.assignTextureLOD(r.material,e)}if(t.isMaterial===!0){const r=t,n=[],s=new Array;if(r.uniforms&&(r.isRawShaderMaterial||r.isShaderMaterial===!0)){const o=r;for(const l of Object.keys(o.uniforms)){const a=o.uniforms[l].value;if(a?.isTexture===!0){const u=this.assignTextureLODForSlot(a,e,r,l).then(c=>(c&&o.uniforms[l].value!=c&&(o.uniforms[l].value=c,o.uniformsNeedUpdate=!0),c));n.push(u),s.push(l)}}}else for(const o of Object.keys(r)){const l=r[o];if(l?.isTexture===!0){const a=this.assignTextureLODForSlot(l,e,r,o);n.push(a),s.push(o)}}return Promise.all(n).then(o=>{const l=new Array;for(let a=0;a<o.length;a++){const u=o[a],c=s[a];u&&u.isTexture===!0?l.push({material:r,slot:c,texture:u,level:e}):l.push({material:r,slot:c,texture:null,level:e})}return l})}if(t instanceof d.Texture||t.isTexture===!0){const r=t;return this.assignTextureLODForSlot(r,e,null,null)}return Promise.resolve(null)}static assignTextureLODForSlot(t,e,r,n){return t?.isTexture!==!0?Promise.resolve(null):n==="glyphMap"?Promise.resolve(t):m.getOrLoadLOD(t,e).then(s=>{if(Array.isArray(s))return console.warn("Progressive: Got an array of textures for a texture slot, this should not happen..."),null;if(s?.isTexture===!0){if(s!=t&&r&&n){const o=r[n];if(o&&!p){const l=this.getAssignedLODInformation(o);if(l&&l?.level<e)return p==="verbose"&&console.warn("Assigned texture level is already higher: ",l.level,e,r,o,s),null}if(Qe&&s.mipmaps){const l=s.mipmaps.length;s.mipmaps.length=Math.min(s.mipmaps.length,3),l!==s.mipmaps.length&&p&&console.debug(`Reduced mipmap count from ${l} to ${s.mipmaps.length} for ${s.uuid}: ${s.image?.width}x${s.image?.height}.`)}r[n]=s}return s}else p=="verbose"&&console.warn("No LOD found for",t,e);return null}).catch(s=>(console.error("Error loading LOD",t,s),null))}parser;url;constructor(t){const e=t.options.path;p&&console.log("Progressive extension registered for",e),this.parser=t,this.url=e}_isLoadingMesh;loadMesh=t=>{if(this._isLoadingMesh)return null;const e=this.parser.json.meshes[t]?.extensions?.[F];return e?(this._isLoadingMesh=!0,this.parser.getDependency("mesh",t).then(r=>(this._isLoadingMesh=!1,r&&m.registerMesh(this.url,e.guid,r,e.lods?.length,0,e),r))):null};afterRoot(t){return p&&console.log("AFTER",this.url,t),this.parser.json.textures?.forEach((e,r)=>{if(e?.extensions){const n=e?.extensions[F];if(n){if(!n.lods){p&&console.warn("Texture has no LODs",n);return}let s=!1;for(const o of this.parser.associations.keys())o.isTexture===!0&&this.parser.associations.get(o)?.textures===r&&(s=!0,m.registerTexture(this.url,o,n.lods?.length,r,n));s||this.parser.getDependency("texture",r).then(o=>{o&&m.registerTexture(this.url,o,n.lods?.length,r,n)})}}}),this.parser.json.meshes?.forEach((e,r)=>{if(e?.extensions){const n=e?.extensions[F];if(n&&n.lods){for(const s of this.parser.associations.keys())if(s.isMesh){const o=this.parser.associations.get(s);o?.meshes===r&&m.registerMesh(this.url,n.guid,s,n.lods.length,o.primitives,n)}}}}),null}static registerTexture=(t,e,r,n,s)=>{if(!e){p&&console.error("!! gltf-progressive: Called register texture without texture");return}if(p){const l=e.image?.width||e.source?.data?.width||0,a=e.image?.height||e.source?.data?.height||0;console.log(`> gltf-progressive: register texture[${n}] "${e.name||e.uuid}", Current: ${l}x${a}, Max: ${s.lods[0]?.width}x${s.lods[0]?.height}, uuid: ${e.uuid}`,s,e)}e.source&&(e.source[ue]=s);const o=s.guid;m.assignLODInformation(t,e,o,r,n),m.lodInfos.set(o,s),m.lowresCache.set(o,e)};static registerMesh=(t,e,r,n,s,o)=>{const l=r.geometry;if(!l){p&&console.warn("gltf-progressive: Register mesh without geometry");return}l.userData||(l.userData={}),p&&console.log("> Progressive: register mesh "+r.name,{index:s,uuid:r.uuid},o,r),m.assignLODInformation(t,l,e,n,s),m.lodInfos.set(e,o);let a=m.lowresCache.get(e);a?a.push(r.geometry):a=[r.geometry],m.lowresCache.set(e,a),n>0&&!X(r)&&Ve(r,l);for(const u of W)u.onRegisteredNewMesh?.(r,o)};static lodInfos=new Map;static previouslyLoaded=new Map;static lowresCache=new Map;static workers=[];static _workersIndex=0;static async getOrLoadLOD(t,e){const r=p=="verbose",n=this.getAssignedLODInformation(t);if(!n)return p&&console.warn(`[gltf-progressive] No LOD information found: ${t.name}, uuid: ${t.uuid}, type: ${t.type}`,t),null;const s=n?.key;let o;if(t.isTexture===!0){const a=t;a.source&&a.source[ue]&&(o=a.source[ue])}if(o||(o=m.lodInfos.get(s)),!o)p&&console.warn(`Can not load LOD ${e}: no LOD info found for "${s}" ${t.name}`,t.type,m.lodInfos);else{if(e>0){let c=!1;const y=Array.isArray(o.lods);if(y&&e>=o.lods.length?c=!0:y||(c=!0),c)return this.lowresCache.get(s)}const a=Array.isArray(o.lods)?o.lods[e]?.path:o.lods;if(!a)return p&&!o["missing:uri"]&&(o["missing:uri"]=!0,console.warn("Missing uri for progressive asset for LOD "+e,o)),null;const u=We(n.url,a);if(u.endsWith(".glb")||u.endsWith(".gltf")){if(!o.guid)return console.warn("missing pointer for glb/gltf texture",o),null;const c=u+"_"+o.guid,y=await this.queue.slot(u),_=this.previouslyLoaded.get(c);if(_!==void 0){r&&console.log(`LOD ${e} was already loading/loaded: ${c}`);let f=await _.catch(S=>(console.error(`Error loading LOD ${e} from ${u}
2
2
  `,S),null)),w=!1;if(f==null||(f instanceof d.Texture&&t instanceof d.Texture?f.image?.data||f.source?.data?f=this.copySettings(t,f):(w=!0,this.previouslyLoaded.delete(c)):f instanceof d.BufferGeometry&&t instanceof d.BufferGeometry&&(f.attributes.position?.array||(w=!0,this.previouslyLoaded.delete(c)))),!w)return f}if(!y.use)return p&&console.log(`LOD ${e} was aborted: ${u}`),null;const M=o,I=new Promise(async(f,w)=>{if(He){const x=await(await je({})).load(u);if(x.textures.length>0)for(const h of x.textures){let g=h.texture;return m.assignLODInformation(n.url,g,s,e,void 0),t instanceof d.Texture&&(g=this.copySettings(t,g)),g&&(g.guid=M.guid),f(g)}if(x.geometries.length>0){const h=new Array;for(const g of x.geometries){const D=g.geometry;m.assignLODInformation(n.url,D,s,e,g.primitiveIndex),h.push(D)}return f(h)}return f(null)}const S=new q.GLTFLoader;ye(S),p&&(await new Promise(L=>setTimeout(L,1e3)),r&&console.warn("Start loading (delayed) "+u,M.guid));let B=u;if(M&&Array.isArray(M.lods)){const L=M.lods[e];L.hash&&(B+="?v="+L.hash)}const v=await S.loadAsync(B).catch(L=>(console.error(`Error loading LOD ${e} from ${u}
3
3
  `,L),f(null)));if(!v)return f(null);const z=v.parser;r&&console.log("Loading finished "+u,M.guid);let T=0;if(v.parser.json.textures){let L=!1;for(const x of v.parser.json.textures){if(x?.extensions){const h=x?.extensions[F];if(h?.guid&&h.guid===M.guid){L=!0;break}}T++}if(L){let x=await z.getDependency("texture",T);return x&&m.assignLODInformation(n.url,x,s,e,void 0),r&&console.log('change "'+t.name+'" → "'+x.name+'"',u,T,x,c),t instanceof d.Texture&&(x=this.copySettings(t,x)),x&&(x.guid=M.guid),f(x)}else p&&console.warn("Could not find texture with guid",M.guid,v.parser.json)}if(T=0,v.parser.json.meshes){let L=!1;for(const x of v.parser.json.meshes){if(x?.extensions){const h=x?.extensions[F];if(h?.guid&&h.guid===M.guid){L=!0;break}}T++}if(L){const x=await z.getDependency("mesh",T);if(r&&console.log(`Loaded Mesh "${x.name}"`,u,T,x,c),x.isMesh===!0){const h=x.geometry;return m.assignLODInformation(n.url,h,s,e,0),f(h)}else{const h=new Array;for(let g=0;g<x.children.length;g++){const D=x.children[g];if(D.isMesh===!0){const O=D.geometry;m.assignLODInformation(n.url,O,s,e,g),h.push(O)}}return f(h)}}else p&&console.warn("Could not find mesh with guid",M.guid,v.parser.json)}return f(null)});return this.previouslyLoaded.set(c,I),y.use(I),await I}else if(t instanceof d.Texture){r&&console.log("Load texture from uri: "+u);const y=await new d.TextureLoader().loadAsync(u);return y?(y.guid=o.guid,y.flipY=!1,y.needsUpdate=!0,y.colorSpace=t.colorSpace,r&&console.log(o,y)):p&&console.warn("failed loading",u),y}}return null}static maxConcurrent=50;static queue=new ze(m.maxConcurrent,{debug:p!=!1});static assignLODInformation(t,e,r,n,s){if(!e)return;e.userData||(e.userData={});const o=new Je(t,r,n,s);e.userData.LODS=o,"source"in e&&typeof e.source=="object"&&(e.source.LODS=o)}static getAssignedLODInformation(t){return t?t.userData?.LODS?t.userData.LODS:"source"in t&&t.source?.LODS?t.source.LODS:null:null}static copySettings(t,e){return e?(p==="verbose"&&console.debug(`Copy texture settings
4
4
  `,t.uuid,`
5
- `,e.uuid),e=e.clone(),e.offset=t.offset,e.repeat=t.repeat,e.colorSpace=t.colorSpace,e.magFilter=t.magFilter,e.minFilter=t.minFilter,e.wrapS=t.wrapS,e.wrapT=t.wrapT,e.flipY=t.flipY,e.anisotropy=t.anisotropy,e.mipmaps||(e.generateMipmaps=t.generateMipmaps),e):t}}class Je{url;key;level;index;constructor(t,e,r,n){this.url=t,this.key=e,this.level=r,n!=null&&(this.index=n)}}class de{static addPromise=(t,e,r,n)=>{n.forEach(s=>{s.add(t,e,r)})};ready;get awaitedCount(){return this._addedCount}get resolvedCount(){return this._resolvedCount}get currentlyAwaiting(){return this._awaiting.length}_resolve;_signal;_frame_start;_frames_to_capture;_resolved=!1;_addedCount=0;_resolvedCount=0;_awaiting=[];_maxPromisesPerObject=1;constructor(t,e){const n=Math.max(e.frames??2,2);this._frame_start=e.waitForFirstCapture?void 0:t,this._frames_to_capture=n,this.ready=new Promise(s=>{this._resolve=s}),this.ready.finally(()=>{this._resolved=!0,this._awaiting.length=0}),this._signal=e.signal,this._signal?.addEventListener("abort",()=>{this.resolveNow()}),this._maxPromisesPerObject=Math.max(1,e.maxPromisesPerObject??1)}_currentFrame=0;update(t){this._currentFrame=t,this._frame_start===void 0&&this._addedCount>0&&(this._frame_start=t),(this._signal?.aborted||this._awaiting.length===0&&this._frame_start!==void 0&&t>this._frame_start+this._frames_to_capture)&&this.resolveNow()}_seen=new WeakMap;add(t,e,r){if(this._resolved){p&&console.warn("PromiseGroup: Trying to add a promise to a resolved group, ignoring.");return}if(!(this._frame_start!==void 0&&this._currentFrame>this._frame_start+this._frames_to_capture)){if(this._maxPromisesPerObject>=1)if(this._seen.has(e)){let n=this._seen.get(e);if(n>=this._maxPromisesPerObject){p&&console.warn("PromiseGroup: Already awaiting object ignoring new promise for it.");return}this._seen.set(e,n+1)}else this._seen.set(e,1);this._awaiting.push(r),this._addedCount++,r.finally(()=>{this._resolvedCount++,this._awaiting.splice(this._awaiting.indexOf(r),1)})}}resolveNow(){this._resolved||this._resolve?.({awaited_count:this._addedCount,resolved_count:this._resolvedCount,cancelled:this._signal?.aborted??!1})}}const C=N("debugprogressive"),Ze=N("noprogressive"),ce=Symbol("Needle:LODSManager"),fe=Symbol("Needle:LODState"),U=Symbol("Needle:CurrentLOD"),P={mesh_lod:-1,texture_lod:-1};let J=class b{static debugDrawLine;static getObjectLODState(t){return t[fe]}static addPlugin(t){W.push(t)}static removePlugin(t){const e=W.indexOf(t);e>=0&&W.splice(e,1)}static get(t,e){if(t[ce])return console.debug("[gltf-progressive] LODsManager already exists for this renderer"),t[ce];const r=new b(t,{engine:"unknown",...e});return t[ce]=r,r}renderer;context;projectionScreenMatrix=new d.Matrix4;get plugins(){return W}overrideLodLevel=void 0;targetTriangleDensity=2e5;skinnedMeshAutoUpdateBoundsInterval=30;updateInterval="auto";#e=1;pause=!1;manual=!1;_newPromiseGroups=[];_promiseGroupIds=0;awaitLoading(t){const e=this._promiseGroupIds++,r=new de(this.#s,{...t});this._newPromiseGroups.push(r);const n=performance.now();return r.ready.finally(()=>{const s=this._newPromiseGroups.indexOf(r);s>=0&&(this._newPromiseGroups.splice(s,1),Le()&&performance.measure("LODsManager:awaitLoading",{start:n,detail:{id:e,name:t?.name,awaited:r.awaitedCount,resolved:r.resolvedCount}}))}),r.ready}_postprocessPromiseGroups(){if(this._newPromiseGroups.length!==0)for(let t=this._newPromiseGroups.length-1;t>=0;t--)this._newPromiseGroups[t].update(this.#s)}_lodchangedlisteners=[];addEventListener(t,e){t==="changed"&&this._lodchangedlisteners.push(e)}removeEventListener(t,e){if(t==="changed"){const r=this._lodchangedlisteners.indexOf(e);r>=0&&this._lodchangedlisteners.splice(r,1)}}constructor(t,e){this.renderer=t,this.context={...e}}#t;#o=new d.Clock;#s=0;#n=0;#i=0;#r=0;_fpsBuffer=[60,60,60,60,60];enable(){if(this.#t)return;console.debug("[gltf-progressive] Enabling LODsManager for renderer");let t=0;this.#t=this.renderer.render;const e=this;ne(this.renderer),this.renderer.render=function(r,n){const s=e.renderer.getRenderTarget();(s==null||"isXRRenderTarget"in s&&s.isXRRenderTarget)&&(t=0,e.#s+=1,e.#n=e.#o.getDelta(),e.#i+=e.#n,e._fpsBuffer.shift(),e._fpsBuffer.push(1/e.#n),e.#r=e._fpsBuffer.reduce((l,a)=>l+a)/e._fpsBuffer.length,C&&e.#s%200===0&&console.log("FPS",Math.round(e.#r),"Interval:",e.#e));const o=t++;e.#t.call(this,r,n),e.onAfterRender(r,n,o)}}disable(){this.#t&&(console.debug("[gltf-progressive] Disabling LODsManager for renderer"),this.renderer.render=this.#t,this.#t=void 0)}update(t,e){this.internalUpdate(t,e)}onAfterRender(t,e,r){if(this.pause)return;const s=this.renderer.renderLists.get(t,0).opaque;let o=!0;if(s.length===1){const l=s[0].material;(l.name==="EffectMaterial"||l.name==="CopyShader")&&(o=!1)}if((e.parent&&e.parent.type==="CubeCamera"||r>=1&&e.type==="OrthographicCamera")&&(o=!1),o){if(Ze||(this.updateInterval==="auto"?this.#r<40&&this.#e<10?(this.#e+=1,C&&console.warn("↓ Reducing LOD updates",this.#e,this.#r.toFixed(0))):this.#r>=60&&this.#e>1&&(this.#e-=1,C&&console.warn("↑ Increasing LOD updates",this.#e,this.#r.toFixed(0))):this.#e=this.updateInterval,this.#e>0&&this.#s%this.#e!=0))return;this.internalUpdate(t,e),this._postprocessPromiseGroups()}}internalUpdate(t,e){const r=this.renderer.renderLists.get(t,0),n=r.opaque;this.projectionScreenMatrix.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse);const s=this.targetTriangleDensity;for(const a of n){if(a.material&&(a.geometry?.type==="BoxGeometry"||a.geometry?.type==="BufferGeometry")&&(a.material.name==="SphericalGaussianBlur"||a.material.name=="BackgroundCubeMaterial"||a.material.name==="CubemapFromEquirect"||a.material.name==="EquirectangularToCubeUV")){C&&(a.material["NEEDLE_PROGRESSIVE:IGNORE-WARNING"]||(a.material["NEEDLE_PROGRESSIVE:IGNORE-WARNING"]=!0,console.warn("Ignoring skybox or BLIT object",a,a.material.name,a.material.type)));continue}switch(a.material.type){case"LineBasicMaterial":case"LineDashedMaterial":case"PointsMaterial":case"ShadowMaterial":case"MeshDistanceMaterial":case"MeshDepthMaterial":continue}if(C==="color"&&a.material&&!a.object.progressive_debug_color){a.object.progressive_debug_color=!0;const c=Math.random()*16777215,y=new d.MeshStandardMaterial({color:c});a.object.material=y}const u=a.object;(u instanceof d.Mesh||u.isMesh)&&this.updateLODs(t,e,u,s)}const o=r.transparent;for(const a of o){const u=a.object;(u instanceof d.Mesh||u.isMesh)&&this.updateLODs(t,e,u,s)}const l=r.transmissive;for(const a of l){const u=a.object;(u instanceof d.Mesh||u.isMesh)&&this.updateLODs(t,e,u,s)}}updateLODs(t,e,r,n){r.userData||(r.userData={});let s=r[fe];if(s||(s=new et,r[fe]=s),s.frames++<2)return;for(const l of W)l.onBeforeUpdateLOD?.(this.renderer,t,e,r);const o=this.overrideLodLevel!==void 0?this.overrideLodLevel:E;o>=0?(P.mesh_lod=o,P.texture_lod=o):(this.calculateLodLevel(e,r,s,n,P),P.mesh_lod=Math.round(P.mesh_lod),P.texture_lod=Math.round(P.texture_lod)),P.mesh_lod>=0&&this.loadProgressiveMeshes(r,P.mesh_lod),r.material&&P.texture_lod>=0&&this.loadProgressiveTextures(r.material,P.texture_lod,o),p&&r.material&&!r.isGizmo&&Pe(r.material);for(const l of W)l.onAfterUpdatedLOD?.(this.renderer,t,e,r,P);s.lastLodLevel_Mesh=P.mesh_lod,s.lastLodLevel_Texture=P.texture_lod}loadProgressiveTextures(t,e,r){if(!t)return;if(Array.isArray(t)){for(const s of t)this.loadProgressiveTextures(s,e);return}let n=!1;if((t[U]===void 0||e<t[U])&&(n=!0),r!==void 0&&r>=0&&(n=t[U]!=r,e=r),n){t[U]=e;const s=m.assignTextureLOD(t,e).then(o=>{this._lodchangedlisteners.forEach(l=>l({type:"texture",level:e,object:t}))});de.addPromise("texture",t,s,this._newPromiseGroups)}}loadProgressiveMeshes(t,e){if(!t)return Promise.resolve(null);let r=t[U]!==e;const n=t["DEBUG:LOD"];if(n!=null&&(r=t[U]!=n,e=n),r){t[U]=e;const s=t.geometry,o=m.assignMeshLOD(t,e).then(l=>(l&&t[U]==e&&s!=t.geometry&&this._lodchangedlisteners.forEach(a=>a({type:"mesh",level:e,object:t})),l));return de.addPromise("mesh",t,o,this._newPromiseGroups),o}return Promise.resolve(null)}_sphere=new d.Sphere;_tempBox=new d.Box3;_tempBox2=new d.Box3;tempMatrix=new d.Matrix4;_tempWorldPosition=new d.Vector3;_tempBoxSize=new d.Vector3;_tempBox2Size=new d.Vector3;static corner0=new d.Vector3;static corner1=new d.Vector3;static corner2=new d.Vector3;static corner3=new d.Vector3;static _tempPtInside=new d.Vector3;static isInside(t,e){const r=t.min,n=t.max,s=(r.x+n.x)*.5,o=(r.y+n.y)*.5;return this._tempPtInside.set(s,o,r.z).applyMatrix4(e).z<0}static skinnedMeshBoundsFrameOffsetCounter=0;static $skinnedMeshBoundsOffset=Symbol("gltf-progressive-skinnedMeshBoundsOffset");calculateLodLevel(t,e,r,n,s){if(!e){s.mesh_lod=-1,s.texture_lod=-1;return}if(!t){s.mesh_lod=-1,s.texture_lod=-1;return}let l=10+1,a=!1;if(C&&e["DEBUG:LOD"]!=null)return e["DEBUG:LOD"];const u=m.getMeshLODExtension(e.geometry)?.lods,c=m.getPrimitiveIndex(e.geometry),y=u&&u.length>0,_=m.getMaterialMinMaxLODsCount(e.material),M=_.min_count!==1/0&&_.min_count>=0&&_.max_count>=0;if(!y&&!M){s.mesh_lod=0,s.texture_lod=0;return}y||(a=!0,l=0);const I=this.renderer.domElement.clientHeight||this.renderer.domElement.height;let G=e.geometry.boundingBox;if(e.type==="SkinnedMesh"){const f=e;if(!f.boundingBox)f.computeBoundingBox();else if(this.skinnedMeshAutoUpdateBoundsInterval>0){if(!f[b.$skinnedMeshBoundsOffset]){const S=b.skinnedMeshBoundsFrameOffsetCounter++;f[b.$skinnedMeshBoundsOffset]=S}const w=f[b.$skinnedMeshBoundsOffset];if((r.frames+w)%this.skinnedMeshAutoUpdateBoundsInterval===0){const S=X(f),B=f.geometry;S&&(f.geometry=S),f.computeBoundingBox(),f.geometry=B}}G=f.boundingBox}if(G){const f=t;if(e.geometry.attributes.color&&e.geometry.attributes.color.count<100&&e.geometry.boundingSphere){this._sphere.copy(e.geometry.boundingSphere),this._sphere.applyMatrix4(e.matrixWorld);const h=t.getWorldPosition(this._tempWorldPosition);if(this._sphere.containsPoint(h)){s.mesh_lod=0,s.texture_lod=0;return}}if(this._tempBox.copy(G),this._tempBox.applyMatrix4(e.matrixWorld),f.isPerspectiveCamera&&b.isInside(this._tempBox,this.projectionScreenMatrix)){s.mesh_lod=0,s.texture_lod=0;return}if(this._tempBox.applyMatrix4(this.projectionScreenMatrix),this.renderer.xr.enabled&&f.isPerspectiveCamera&&f.fov>70){const h=this._tempBox.min,g=this._tempBox.max;let D=h.x,O=h.y,$=g.x,K=g.y;const Z=2,oe=1.5,ee=(h.x+g.x)*.5,te=(h.y+g.y)*.5;D=(D-ee)*Z+ee,O=(O-te)*Z+te,$=($-ee)*Z+ee,K=(K-te)*Z+te;const Ce=D<0&&$>0?0:Math.min(Math.abs(h.x),Math.abs(g.x)),ke=O<0&&K>0?0:Math.min(Math.abs(h.y),Math.abs(g.y)),ie=Math.max(Ce,ke);r.lastCentrality=(oe-ie)*(oe-ie)*(oe-ie)}else r.lastCentrality=1;const w=this._tempBox.getSize(this._tempBoxSize);w.multiplyScalar(.5),screen.availHeight>0&&I>0&&w.multiplyScalar(I/screen.availHeight),t.isPerspectiveCamera?w.x*=t.aspect:t.isOrthographicCamera;const S=t.matrixWorldInverse,B=this._tempBox2;B.copy(G),B.applyMatrix4(e.matrixWorld),B.applyMatrix4(S);const v=B.getSize(this._tempBox2Size),z=Math.max(v.x,v.y);if(Math.max(w.x,w.y)!=0&&z!=0&&(w.z=v.z/Math.max(v.x,v.y)*Math.max(w.x,w.y)),r.lastScreenCoverage=Math.max(w.x,w.y,w.z),r.lastScreenspaceVolume.copy(w),r.lastScreenCoverage*=r.lastCentrality,C&&b.debugDrawLine){const h=this.tempMatrix.copy(this.projectionScreenMatrix);h.invert();const g=b.corner0,D=b.corner1,O=b.corner2,$=b.corner3;g.copy(this._tempBox.min),D.copy(this._tempBox.max),D.x=g.x,O.copy(this._tempBox.max),O.y=g.y,$.copy(this._tempBox.max);const K=(g.z+$.z)*.5;g.z=D.z=O.z=$.z=K,g.applyMatrix4(h),D.applyMatrix4(h),O.applyMatrix4(h),$.applyMatrix4(h),b.debugDrawLine(g,D,255),b.debugDrawLine(g,O,255),b.debugDrawLine(D,$,255),b.debugDrawLine(O,$,255)}let L=999;if(u&&r.lastScreenCoverage>0)for(let h=0;h<u.length;h++){const g=u[h],O=(g.densities?.[c]||g.density||1e-5)/r.lastScreenCoverage;if(c>0&&Le()&&!g.densities&&!globalThis["NEEDLE:MISSING_LOD_PRIMITIVE_DENSITIES"]&&(window["NEEDLE:MISSING_LOD_PRIMITIVE_DENSITIES"]=!0,console.warn("[Needle Progressive] Detected usage of mesh without primitive densities. This might cause incorrect LOD level selection: Consider re-optimizing your model by updating your Needle Integration, Needle glTF Pipeline or running optimization again on Needle Cloud.")),O<n){L=h;break}}L<l&&(l=L,a=!0)}if(a?s.mesh_lod=l:s.mesh_lod=r.lastLodLevel_Mesh,C&&s.mesh_lod!=r.lastLodLevel_Mesh){const w=u?.[s.mesh_lod];w&&console.debug(`Mesh LOD changed: ${r.lastLodLevel_Mesh} → ${s.mesh_lod} (density: ${w.densities?.[c].toFixed(0)}) | ${e.name}`)}if(M){const f="saveData"in globalThis.navigator&&globalThis.navigator.saveData===!0;if(r.lastLodLevel_Texture<0){if(s.texture_lod=_.max_count-1,C){const w=_.lods[_.max_count-1];C&&console.log(`First Texture LOD ${s.texture_lod} (${w.max_height}px) - ${e.name}`)}}else{const w=r.lastScreenspaceVolume.x+r.lastScreenspaceVolume.y+r.lastScreenspaceVolume.z;let S=r.lastScreenCoverage*4;this.context?.engine==="model-viewer"&&(S*=1.5);const v=I/window.devicePixelRatio*S;let z=!1;for(let T=_.lods.length-1;T>=0;T--){const L=_.lods[T];if(!(f&&L.max_height>=2048)&&!(Te()&&L.max_height>4096)&&(L.max_height>v||!z&&T===0)){if(z=!0,s.texture_lod=T,C&&s.texture_lod<r.lastLodLevel_Texture){const x=L.max_height;console.log(`Texture LOD changed: ${r.lastLodLevel_Texture} → ${s.texture_lod} = ${x}px
5
+ `,e.uuid),e=e.clone(),e.offset=t.offset,e.repeat=t.repeat,e.colorSpace=t.colorSpace,e.magFilter=t.magFilter,e.minFilter=t.minFilter,e.wrapS=t.wrapS,e.wrapT=t.wrapT,e.flipY=t.flipY,e.anisotropy=t.anisotropy,e.mipmaps||(e.generateMipmaps=t.generateMipmaps),e):t}}class Je{url;key;level;index;constructor(t,e,r,n){this.url=t,this.key=e,this.level=r,n!=null&&(this.index=n)}}class de{static addPromise=(t,e,r,n)=>{n.forEach(s=>{s.add(t,e,r)})};ready;get awaitedCount(){return this._addedCount}get resolvedCount(){return this._resolvedCount}get currentlyAwaiting(){return this._awaiting.length}_resolve;_signal;_frame_start;_frames_to_capture;_resolved=!1;_addedCount=0;_resolvedCount=0;_awaiting=[];_maxPromisesPerObject=1;constructor(t,e){const n=Math.max(e.frames??2,2);this._frame_start=e.waitForFirstCapture?void 0:t,this._frames_to_capture=n,this.ready=new Promise(s=>{this._resolve=s}),this.ready.finally(()=>{this._resolved=!0,this._awaiting.length=0}),this._signal=e.signal,this._signal?.addEventListener("abort",()=>{this.resolveNow()}),this._maxPromisesPerObject=Math.max(1,e.maxPromisesPerObject??1)}_currentFrame=0;update(t){this._currentFrame=t,this._frame_start===void 0&&this._addedCount>0&&(this._frame_start=t),(this._signal?.aborted||this._awaiting.length===0&&this._frame_start!==void 0&&t>this._frame_start+this._frames_to_capture)&&this.resolveNow()}_seen=new WeakMap;add(t,e,r){if(this._resolved){p&&console.warn("PromiseGroup: Trying to add a promise to a resolved group, ignoring.");return}if(!(this._frame_start!==void 0&&this._currentFrame>this._frame_start+this._frames_to_capture)){if(this._maxPromisesPerObject>=1)if(this._seen.has(e)){let n=this._seen.get(e);if(n>=this._maxPromisesPerObject){p&&console.warn("PromiseGroup: Already awaiting object ignoring new promise for it.");return}this._seen.set(e,n+1)}else this._seen.set(e,1);this._awaiting.push(r),this._addedCount++,r.finally(()=>{this._resolvedCount++,this._awaiting.splice(this._awaiting.indexOf(r),1)})}}resolveNow(){this._resolved||this._resolve?.({awaited_count:this._addedCount,resolved_count:this._resolvedCount,cancelled:this._signal?.aborted??!1})}}const C=N("debugprogressive"),Ze=N("noprogressive"),ce=Symbol("Needle:LODSManager"),fe=Symbol("Needle:LODState"),U=Symbol("Needle:CurrentLOD"),P={mesh_lod:-1,texture_lod:-1};let J=class b{static debugDrawLine;static getObjectLODState(t){return t[fe]}static addPlugin(t){W.push(t)}static removePlugin(t){const e=W.indexOf(t);e>=0&&W.splice(e,1)}static get(t,e){if(t[ce])return console.debug("[gltf-progressive] LODsManager already exists for this renderer"),t[ce];const r=new b(t,{engine:"unknown",...e});return t[ce]=r,r}renderer;context;projectionScreenMatrix=new d.Matrix4;get plugins(){return W}overrideLodLevel=void 0;targetTriangleDensity=2e5;skinnedMeshAutoUpdateBoundsInterval=30;updateInterval="auto";#e=1;pause=!1;manual=!1;_newPromiseGroups=[];_promiseGroupIds=0;awaitLoading(t){const e=this._promiseGroupIds++,r=new de(this.#s,{...t});this._newPromiseGroups.push(r);const n=performance.now();return r.ready.finally(()=>{const s=this._newPromiseGroups.indexOf(r);s>=0&&(this._newPromiseGroups.splice(s,1),Le()&&performance.measure("LODsManager:awaitLoading",{start:n,detail:{id:e,name:t?.name,awaited:r.awaitedCount,resolved:r.resolvedCount}}))}),r.ready}_postprocessPromiseGroups(){if(this._newPromiseGroups.length!==0)for(let t=this._newPromiseGroups.length-1;t>=0;t--)this._newPromiseGroups[t].update(this.#s)}_lodchangedlisteners=[];addEventListener(t,e){t==="changed"&&this._lodchangedlisteners.push(e)}removeEventListener(t,e){if(t==="changed"){const r=this._lodchangedlisteners.indexOf(e);r>=0&&this._lodchangedlisteners.splice(r,1)}}constructor(t,e){this.renderer=t,this.context={...e}}#t;#o=new d.Clock;#s=0;#n=0;#i=0;#r=0;_fpsBuffer=[60,60,60,60,60];enable(){if(this.#t)return;console.debug("[gltf-progressive] Enabling LODsManager for renderer");let t=0;this.#t=this.renderer.render;const e=this;ne(this.renderer),this.renderer.render=function(r,n){const s=e.renderer.getRenderTarget();(s==null||"isXRRenderTarget"in s&&s.isXRRenderTarget)&&(t=0,e.#s+=1,e.#n=e.#o.getDelta(),e.#i+=e.#n,e._fpsBuffer.shift(),e._fpsBuffer.push(1/e.#n),e.#r=e._fpsBuffer.reduce((l,a)=>l+a)/e._fpsBuffer.length,C&&e.#s%200===0&&console.log("FPS",Math.round(e.#r),"Interval:",e.#e));const o=t++;e.#t.call(this,r,n),e.onAfterRender(r,n,o)}}disable(){this.#t&&(console.debug("[gltf-progressive] Disabling LODsManager for renderer"),this.renderer.render=this.#t,this.#t=void 0)}update(t,e){this.internalUpdate(t,e)}onAfterRender(t,e,r){if(this.pause)return;const s=this.renderer.renderLists.get(t,0).opaque;let o=!0;if(s.length===1){const l=s[0].material;(l.name==="EffectMaterial"||l.name==="CopyShader")&&(o=!1)}if((e.parent&&e.parent.type==="CubeCamera"||r>=1&&e.type==="OrthographicCamera")&&(o=!1),o){if(Ze||(this.updateInterval==="auto"?this.#r<40&&this.#e<10?(this.#e+=1,C&&console.warn("↓ Reducing LOD updates",this.#e,this.#r.toFixed(0))):this.#r>=60&&this.#e>1&&(this.#e-=1,C&&console.warn("↑ Increasing LOD updates",this.#e,this.#r.toFixed(0))):this.#e=this.updateInterval,this.#e>0&&this.#s%this.#e!=0))return;this.internalUpdate(t,e),this._postprocessPromiseGroups()}}internalUpdate(t,e){const r=this.renderer.renderLists.get(t,0),n=r.opaque;this.projectionScreenMatrix.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse);const s=this.targetTriangleDensity;for(const a of n){if(a.material&&(a.geometry?.type==="BoxGeometry"||a.geometry?.type==="BufferGeometry")&&(a.material.name==="SphericalGaussianBlur"||a.material.name=="BackgroundCubeMaterial"||a.material.name==="CubemapFromEquirect"||a.material.name==="EquirectangularToCubeUV")){C&&(a.material["NEEDLE_PROGRESSIVE:IGNORE-WARNING"]||(a.material["NEEDLE_PROGRESSIVE:IGNORE-WARNING"]=!0,console.warn("Ignoring skybox or BLIT object",a,a.material.name,a.material.type)));continue}switch(a.material.type){case"LineBasicMaterial":case"LineDashedMaterial":case"PointsMaterial":case"ShadowMaterial":case"MeshDistanceMaterial":case"MeshDepthMaterial":continue}if(C==="color"&&a.material&&!a.object.progressive_debug_color){a.object.progressive_debug_color=!0;const c=Math.random()*16777215,y=new d.MeshStandardMaterial({color:c});a.object.material=y}const u=a.object;(u instanceof d.Mesh||u.isMesh)&&this.updateLODs(t,e,u,s)}const o=r.transparent;for(const a of o){const u=a.object;(u instanceof d.Mesh||u.isMesh)&&this.updateLODs(t,e,u,s)}const l=r.transmissive;for(const a of l){const u=a.object;(u instanceof d.Mesh||u.isMesh)&&this.updateLODs(t,e,u,s)}}updateLODs(t,e,r,n){r.userData||(r.userData={});let s=r[fe];if(s||(s=new et,r[fe]=s),s.frames++<2)return;for(const l of W)l.onBeforeUpdateLOD?.(this.renderer,t,e,r);const o=this.overrideLodLevel!==void 0?this.overrideLodLevel:E;o>=0?(P.mesh_lod=o,P.texture_lod=o):(this.calculateLodLevel(e,r,s,n,P),P.mesh_lod=Math.round(P.mesh_lod),P.texture_lod=Math.round(P.texture_lod)),P.mesh_lod>=0&&this.loadProgressiveMeshes(r,P.mesh_lod),r.material&&P.texture_lod>=0&&this.loadProgressiveTextures(r.material,P.texture_lod,o),p&&r.material&&!r.isGizmo&&Pe(r.material);for(const l of W)l.onAfterUpdatedLOD?.(this.renderer,t,e,r,P);s.lastLodLevel_Mesh=P.mesh_lod,s.lastLodLevel_Texture=P.texture_lod}loadProgressiveTextures(t,e,r){if(!t)return;if(Array.isArray(t)){for(const s of t)this.loadProgressiveTextures(s,e);return}let n=!1;if((t[U]===void 0||e<t[U])&&(n=!0),r!==void 0&&r>=0&&(n=t[U]!=r,e=r),n){t[U]=e;const s=m.assignTextureLOD(t,e).then(o=>{this._lodchangedlisteners.forEach(l=>l({type:"texture",level:e,object:t}))});de.addPromise("texture",t,s,this._newPromiseGroups)}}loadProgressiveMeshes(t,e){if(!t)return Promise.resolve(null);let r=t[U]!==e;const n=t["DEBUG:LOD"];if(n!=null&&(r=t[U]!=n,e=n),r){t[U]=e;const s=t.geometry,o=m.assignMeshLOD(t,e).then(l=>(l&&t[U]==e&&s!=t.geometry&&this._lodchangedlisteners.forEach(a=>a({type:"mesh",level:e,object:t})),l));return de.addPromise("mesh",t,o,this._newPromiseGroups),o}return Promise.resolve(null)}_sphere=new d.Sphere;_tempBox=new d.Box3;_tempBox2=new d.Box3;tempMatrix=new d.Matrix4;_tempWorldPosition=new d.Vector3;_tempBoxSize=new d.Vector3;_tempBox2Size=new d.Vector3;static corner0=new d.Vector3;static corner1=new d.Vector3;static corner2=new d.Vector3;static corner3=new d.Vector3;static _tempPtInside=new d.Vector3;static isInside(t,e){const r=t.min,n=t.max,s=(r.x+n.x)*.5,o=(r.y+n.y)*.5;return this._tempPtInside.set(s,o,r.z).applyMatrix4(e).z<0}static skinnedMeshBoundsFrameOffsetCounter=0;static $skinnedMeshBoundsOffset=Symbol("gltf-progressive-skinnedMeshBoundsOffset");calculateLodLevel(t,e,r,n,s){if(!e){s.mesh_lod=-1,s.texture_lod=-1;return}if(!t){s.mesh_lod=-1,s.texture_lod=-1;return}let l=10+1,a=!1;if(C&&e["DEBUG:LOD"]!=null)return e["DEBUG:LOD"];const u=m.getMeshLODExtension(e.geometry)?.lods,c=m.getPrimitiveIndex(e.geometry),y=u&&u.length>0,_=m.getMaterialMinMaxLODsCount(e.material),M=_.min_count!==1/0&&_.min_count>=0&&_.max_count>=0;if(!y&&!M){s.mesh_lod=0,s.texture_lod=0;return}y||(a=!0,l=0);const I=this.renderer.domElement.clientHeight||this.renderer.domElement.height;let G=e.geometry.boundingBox;if(e.type==="SkinnedMesh"){const f=e;if(!f.boundingBox)f.computeBoundingBox();else if(this.skinnedMeshAutoUpdateBoundsInterval>0){if(!f[b.$skinnedMeshBoundsOffset]){const S=b.skinnedMeshBoundsFrameOffsetCounter++;f[b.$skinnedMeshBoundsOffset]=S}const w=f[b.$skinnedMeshBoundsOffset];if((r.frames+w)%this.skinnedMeshAutoUpdateBoundsInterval===0){const S=X(f),B=f.geometry;S&&(f.geometry=S),f.computeBoundingBox(),f.geometry=B}}G=f.boundingBox}if(G){const f=t;if(e.geometry.attributes.color&&e.geometry.attributes.color.count<100&&e.geometry.boundingSphere){this._sphere.copy(e.geometry.boundingSphere),this._sphere.applyMatrix4(e.matrixWorld);const h=t.getWorldPosition(this._tempWorldPosition);if(this._sphere.containsPoint(h)){s.mesh_lod=0,s.texture_lod=0;return}}if(this._tempBox.copy(G),this._tempBox.applyMatrix4(e.matrixWorld),f.isPerspectiveCamera&&b.isInside(this._tempBox,this.projectionScreenMatrix)){s.mesh_lod=0,s.texture_lod=0;return}if(this._tempBox.applyMatrix4(this.projectionScreenMatrix),this.renderer.xr.enabled&&f.isPerspectiveCamera&&f.fov>70){const h=this._tempBox.min,g=this._tempBox.max;let D=h.x,O=h.y,$=g.x,K=g.y;const Z=2,oe=1.5,ee=(h.x+g.x)*.5,te=(h.y+g.y)*.5;D=(D-ee)*Z+ee,O=(O-te)*Z+te,$=($-ee)*Z+ee,K=(K-te)*Z+te;const Ce=D<0&&$>0?0:Math.min(Math.abs(h.x),Math.abs(g.x)),ke=O<0&&K>0?0:Math.min(Math.abs(h.y),Math.abs(g.y)),ie=Math.max(Ce,ke);r.lastCentrality=(oe-ie)*(oe-ie)*(oe-ie)}else r.lastCentrality=1;const w=this._tempBox.getSize(this._tempBoxSize);w.multiplyScalar(.5),screen.availHeight>0&&I>0&&w.multiplyScalar(I/screen.availHeight),t.isPerspectiveCamera?w.x*=t.aspect:t.isOrthographicCamera;const S=t.matrixWorldInverse,B=this._tempBox2;B.copy(G),B.applyMatrix4(e.matrixWorld),B.applyMatrix4(S);const v=B.getSize(this._tempBox2Size),z=Math.max(v.x,v.y);if(Math.max(w.x,w.y)!=0&&z!=0&&(w.z=v.z/Math.max(v.x,v.y)*Math.max(w.x,w.y)),r.lastScreenCoverage=Math.max(w.x,w.y,w.z),r.lastScreenspaceVolume.copy(w),r.lastScreenCoverage*=r.lastCentrality,C&&b.debugDrawLine){const h=this.tempMatrix.copy(this.projectionScreenMatrix);h.invert();const g=b.corner0,D=b.corner1,O=b.corner2,$=b.corner3;g.copy(this._tempBox.min),D.copy(this._tempBox.max),D.x=g.x,O.copy(this._tempBox.max),O.y=g.y,$.copy(this._tempBox.max);const K=(g.z+$.z)*.5;g.z=D.z=O.z=$.z=K,g.applyMatrix4(h),D.applyMatrix4(h),O.applyMatrix4(h),$.applyMatrix4(h),b.debugDrawLine(g,D,255),b.debugDrawLine(g,O,255),b.debugDrawLine(D,$,255),b.debugDrawLine(O,$,255)}let L=999;if(u&&r.lastScreenCoverage>0)for(let h=0;h<u.length;h++){const g=u[h],O=(g.densities?.[c]||g.density||1e-5)/r.lastScreenCoverage;if(c>0&&Le()&&!g.densities&&!globalThis["NEEDLE:MISSING_LOD_PRIMITIVE_DENSITIES"]&&(window["NEEDLE:MISSING_LOD_PRIMITIVE_DENSITIES"]=!0,console.warn("[Needle Progressive] Detected usage of mesh without primitive densities. This might cause incorrect LOD level selection: Consider re-optimizing your model by updating your Needle Integration, Needle glTF Pipeline or running optimization again on Needle Cloud.")),O<n){L=h;break}}L<l&&(l=L,a=!0)}if(a?s.mesh_lod=l:s.mesh_lod=r.lastLodLevel_Mesh,C&&s.mesh_lod!=r.lastLodLevel_Mesh){const w=u?.[s.mesh_lod];w&&console.log(`Mesh LOD changed: ${r.lastLodLevel_Mesh} → ${s.mesh_lod} (density: ${w.densities?.[c].toFixed(0)}) | ${e.name}`)}if(M){const f="saveData"in globalThis.navigator&&globalThis.navigator.saveData===!0;if(r.lastLodLevel_Texture<0){if(s.texture_lod=_.max_count-1,C){const w=_.lods[_.max_count-1];C&&console.log(`First Texture LOD ${s.texture_lod} (${w.max_height}px) - ${e.name}`)}}else{const w=r.lastScreenspaceVolume.x+r.lastScreenspaceVolume.y+r.lastScreenspaceVolume.z;let S=r.lastScreenCoverage*4;this.context?.engine==="model-viewer"&&(S*=1.5);const v=I/window.devicePixelRatio*S;let z=!1;for(let T=_.lods.length-1;T>=0;T--){const L=_.lods[T];if(!(f&&L.max_height>=2048)&&!(Te()&&L.max_height>4096)&&(L.max_height>v||!z&&T===0)){if(z=!0,s.texture_lod=T,C&&s.texture_lod<r.lastLodLevel_Texture){const x=L.max_height;console.log(`Texture LOD changed: ${r.lastLodLevel_Texture} → ${s.texture_lod} = ${x}px
6
6
  Screensize: ${v.toFixed(0)}px, Coverage: ${(100*r.lastScreenCoverage).toFixed(2)}%, Volume ${w.toFixed(1)}
7
7
  ${e.name}`)}break}}}}else s.texture_lod=0}};class et{frames=0;lastLodLevel_Mesh=-1;lastLodLevel_Texture=-1;lastScreenCoverage=0;lastScreenspaceVolume=new d.Vector3;lastCentrality=0}const _e=Symbol("NEEDLE_mesh_lod"),re=Symbol("NEEDLE_texture_lod");let he=null;function Ae(){const i=tt();i&&(i.mapURLs(function(t){return Me(),t}),Me(),he?.disconnect(),he=new MutationObserver(t=>{t.forEach(e=>{e.addedNodes.forEach(r=>{r instanceof HTMLElement&&r.tagName.toLowerCase()==="model-viewer"&&Ie(r)})})}),he.observe(document,{childList:!0,subtree:!0}))}function tt(){if(typeof customElements>"u")return null;const i=customElements.get("model-viewer");return i||(customElements.whenDefined("model-viewer").then(()=>{console.debug("[gltf-progressive] model-viewer defined"),Ae()}),null)}function Me(){if(typeof document>"u")return;document.querySelectorAll("model-viewer").forEach(t=>{Ie(t)})}const ve=new WeakSet;let rt=0;function Ie(i){if(!i||ve.has(i))return null;ve.add(i),console.debug("[gltf-progressive] found new model-viewer..."+ ++rt+`
8
8
  `,i.getAttribute("src"));let t=null,e=null,r=null;for(let n=i;n!=null;n=Object.getPrototypeOf(n)){const s=Object.getOwnPropertySymbols(n),o=s.find(u=>u.toString()=="Symbol(renderer)"),l=s.find(u=>u.toString()=="Symbol(scene)"),a=s.find(u=>u.toString()=="Symbol(needsRender)");!t&&o!=null&&(t=i[o].threeRenderer),!e&&l!=null&&(e=i[l]),!r&&a!=null&&(r=i[a])}if(t&&e){let n=function(){if(r){let o=0,l=setInterval(()=>{if(o++>5){clearInterval(l);return}r?.call(i)},300)}};console.debug("[gltf-progressive] setup model-viewer");const s=J.get(t,{engine:"model-viewer"});return J.addPlugin(new st),s.enable(),s.addEventListener("changed",()=>{r?.call(i)}),i.addEventListener("model-visibility",o=>{o.detail.visible&&r?.call(i)}),i.addEventListener("load",()=>{n()}),()=>{s.disable()}}return null}class st{_didWarnAboutMissingUrl=!1;onBeforeUpdateLOD(t,e,r,n){this.tryParseMeshLOD(e,n),this.tryParseTextureLOD(e,n)}getUrl(t){if(!t)return null;let e=t.getAttribute("src");return e||(e=t.src),e||(this._didWarnAboutMissingUrl||console.warn("No url found in modelviewer",t),this._didWarnAboutMissingUrl=!0),e}tryGetCurrentGLTF(t){return t._currentGLTF}tryGetCurrentModelViewer(t){return t.element}tryParseTextureLOD(t,e){if(e[re]==!0)return;e[re]=!0;const r=this.tryGetCurrentGLTF(t),n=this.tryGetCurrentModelViewer(t),s=this.getUrl(n);if(s&&r&&e.material){let o=function(a){if(a[re]==!0)return;a[re]=!0,a.userData&&(a.userData.LOD=-1);const u=Object.keys(a);for(let c=0;c<u.length;c++){const y=u[c],_=a[y];if(_?.isTexture===!0){const M=_.userData?.associations?.textures;if(M==null)continue;const I=r.parser.json.textures[M];if(!I){console.warn("Texture data not found for texture index "+M);continue}if(I?.extensions?.[F]){const G=I.extensions[F];G&&s&&m.registerTexture(s,_,G.lods.length,M,G)}}}};const l=e.material;if(Array.isArray(l))for(const a of l)o(a);else o(l)}}tryParseMeshLOD(t,e){if(e[_e]==!0)return;e[_e]=!0;const r=this.tryGetCurrentModelViewer(t),n=this.getUrl(r);if(!n)return;const s=e.userData?.gltfExtensions?.[F];if(s&&n){const o=e.uuid;m.registerMesh(n,o,e,0,s.lods.length,s)}}}function nt(...i){let t,e,r,n;switch(i.length){case 2:[r,e]=i,n={};break;case 3:[r,e,n]=i;break;case 4:[t,e,r,n]=i;break;default:throw new Error("Invalid arguments")}ne(e),ye(r),xe(r,{progressive:!0,...n?.hints}),r.register(o=>new m(o));const s=J.get(e);return n?.enableLODsManager!==!1&&s.enable(),s}Ae();if(!Ee){const i={gltfProgressive:{useNeedleProgressive:nt,LODsManager:J,configureLoader:xe,getRaycastMesh:X,useRaycastMeshes:Ne}};if(!globalThis.Needle)globalThis.Needle=i;else for(const t in i)globalThis.Needle[t]=i[t]}exports.LODsManager=J;exports.NEEDLE_progressive=m;exports.addDracoAndKTX2Loaders=ye;exports.configureLoader=xe;exports.createLoaders=ne;exports.getRaycastMesh=X;exports.setDracoDecoderLocation=be;exports.setKTX2TranscoderLocation=Oe;