@react-three/drei 10.7.7 → 11.0.0-alpha.1
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.
- package/README.md +49 -758
- package/_chunks/hls.mjs +3 -0
- package/_chunks/libs/@mediapipe/tasks-vision.mjs +4781 -0
- package/_chunks/libs/@monogrid/gainmap-js.mjs +1137 -0
- package/_chunks/libs/@use-gesture/core.mjs +1650 -0
- package/_chunks/libs/@use-gesture/react.mjs +207 -0
- package/_chunks/libs/camera-controls.mjs +2207 -0
- package/_chunks/libs/detect-gpu.mjs +515 -0
- package/_chunks/libs/hls.js.mjs +21925 -0
- package/_chunks/libs/maath.mjs +5200 -0
- package/_chunks/libs/stats-gl.mjs +301 -0
- package/_chunks/libs/stats.js.mjs +90 -0
- package/_chunks/libs/suspend-react.mjs +60 -0
- package/_chunks/libs/three.mjs +23169 -0
- package/_chunks/libs/tunnel-rat.mjs +458 -0
- package/_chunks/libs/zustand.mjs +104 -0
- package/_chunks/rolldown-runtime.mjs +47 -0
- package/_chunks/vision_bundle.mjs +3 -0
- package/core/_chunks/hls.mjs +3 -0
- package/core/_chunks/libs/@monogrid/gainmap-js.mjs +1137 -0
- package/core/_chunks/libs/@use-gesture/core.mjs +1650 -0
- package/core/_chunks/libs/@use-gesture/react.mjs +207 -0
- package/core/_chunks/libs/detect-gpu.mjs +515 -0
- package/core/_chunks/libs/hls.js.mjs +21925 -0
- package/core/_chunks/libs/maath.mjs +5200 -0
- package/core/_chunks/libs/stats-gl.mjs +301 -0
- package/core/_chunks/libs/stats.js.mjs +90 -0
- package/core/_chunks/libs/suspend-react.mjs +60 -0
- package/core/_chunks/libs/three.mjs +22457 -0
- package/core/_chunks/libs/tunnel-rat.mjs +458 -0
- package/core/_chunks/libs/zustand.mjs +104 -0
- package/core/_chunks/rolldown-runtime.mjs +47 -0
- package/core/core/index.d.mts +2232 -0
- package/core/core/index.mjs +11082 -0
- package/experimental/_chunks/libs/three.mjs +15386 -0
- package/experimental/experimental/index.d.mts +253 -0
- package/experimental/experimental/index.mjs +434 -0
- package/external/_chunks/hls.mjs +3 -0
- package/external/_chunks/libs/@mediapipe/tasks-vision.mjs +4781 -0
- package/external/_chunks/libs/camera-controls.mjs +2207 -0
- package/external/_chunks/libs/hls.js.mjs +21925 -0
- package/external/_chunks/libs/maath.mjs +5200 -0
- package/external/_chunks/libs/suspend-react.mjs +58 -0
- package/external/_chunks/libs/three.mjs +15387 -0
- package/external/_chunks/rolldown-runtime.mjs +32 -0
- package/external/_chunks/vision_bundle.mjs +3 -0
- package/external/external/index.d.mts +499 -0
- package/external/external/index.mjs +9422 -0
- package/index.d.mts +2567 -0
- package/index.mjs +20571 -0
- package/legacy/_chunks/hls.mjs +3 -0
- package/legacy/_chunks/libs/@monogrid/gainmap-js.mjs +1137 -0
- package/legacy/_chunks/libs/@use-gesture/core.mjs +1650 -0
- package/legacy/_chunks/libs/@use-gesture/react.mjs +207 -0
- package/legacy/_chunks/libs/bidi-js.mjs +675 -0
- package/legacy/_chunks/libs/detect-gpu.mjs +515 -0
- package/legacy/_chunks/libs/hls.js.mjs +21925 -0
- package/legacy/_chunks/libs/maath.mjs +5200 -0
- package/legacy/_chunks/libs/stats-gl.mjs +301 -0
- package/legacy/_chunks/libs/stats.js.mjs +90 -0
- package/legacy/_chunks/libs/suspend-react.mjs +60 -0
- package/legacy/_chunks/libs/three.mjs +26062 -0
- package/legacy/_chunks/libs/troika-three-text.mjs +6494 -0
- package/legacy/_chunks/libs/tunnel-rat.mjs +458 -0
- package/legacy/_chunks/libs/zustand.mjs +104 -0
- package/legacy/_chunks/rolldown-runtime.mjs +47 -0
- package/legacy/legacy/index.d.mts +2788 -0
- package/legacy/legacy/index.mjs +14984 -0
- package/native/_chunks/hls.mjs +3 -0
- package/native/_chunks/libs/@monogrid/gainmap-js.mjs +1137 -0
- package/native/_chunks/libs/@use-gesture/core.mjs +1650 -0
- package/native/_chunks/libs/@use-gesture/react.mjs +207 -0
- package/native/_chunks/libs/detect-gpu.mjs +515 -0
- package/native/_chunks/libs/hls.js.mjs +21925 -0
- package/native/_chunks/libs/maath.mjs +5200 -0
- package/native/_chunks/libs/stats-gl.mjs +301 -0
- package/native/_chunks/libs/stats.js.mjs +90 -0
- package/native/_chunks/libs/suspend-react.mjs +60 -0
- package/native/_chunks/libs/three.mjs +22592 -0
- package/native/_chunks/libs/tunnel-rat.mjs +458 -0
- package/native/_chunks/libs/zustand.mjs +104 -0
- package/native/_chunks/rolldown-runtime.mjs +47 -0
- package/native/native/index.d.mts +3168 -0
- package/native/native/index.mjs +14863 -0
- package/package.json +41 -10
- package/webgpu/_chunks/hls.mjs +3 -0
- package/webgpu/_chunks/libs/@monogrid/gainmap-js.mjs +1137 -0
- package/webgpu/_chunks/libs/@use-gesture/core.mjs +1650 -0
- package/webgpu/_chunks/libs/@use-gesture/react.mjs +207 -0
- package/webgpu/_chunks/libs/detect-gpu.mjs +515 -0
- package/webgpu/_chunks/libs/hls.js.mjs +21925 -0
- package/webgpu/_chunks/libs/maath.mjs +5200 -0
- package/webgpu/_chunks/libs/stats-gl.mjs +301 -0
- package/webgpu/_chunks/libs/stats.js.mjs +90 -0
- package/webgpu/_chunks/libs/suspend-react.mjs +60 -0
- package/webgpu/_chunks/libs/three.mjs +22592 -0
- package/webgpu/_chunks/libs/tunnel-rat.mjs +458 -0
- package/webgpu/_chunks/libs/zustand.mjs +104 -0
- package/webgpu/_chunks/rolldown-runtime.mjs +47 -0
- package/webgpu/webgpu/index.d.mts +3166 -0
- package/webgpu/webgpu/index.mjs +15015 -0
- package/core/AccumulativeShadows.cjs.js +0 -1
- package/core/AccumulativeShadows.d.ts +0 -59
- package/core/AccumulativeShadows.js +0 -310
- package/core/AdaptiveDpr.cjs.js +0 -1
- package/core/AdaptiveDpr.d.ts +0 -3
- package/core/AdaptiveDpr.js +0 -28
- package/core/AdaptiveEvents.cjs.js +0 -1
- package/core/AdaptiveEvents.d.ts +0 -1
- package/core/AdaptiveEvents.js +0 -20
- package/core/ArcballControls.cjs.js +0 -1
- package/core/ArcballControls.d.ts +0 -15
- package/core/ArcballControls.js +0 -67
- package/core/AsciiRenderer.cjs.js +0 -1
- package/core/AsciiRenderer.d.ts +0 -11
- package/core/AsciiRenderer.js +0 -66
- package/core/BBAnchor.cjs.js +0 -1
- package/core/BBAnchor.d.ts +0 -7
- package/core/BBAnchor.js +0 -37
- package/core/Backdrop.cjs.js +0 -1
- package/core/Backdrop.d.ts +0 -15
- package/core/Backdrop.js +0 -33
- package/core/BakeShadows.cjs.js +0 -1
- package/core/BakeShadows.d.ts +0 -1
- package/core/BakeShadows.js +0 -16
- package/core/Billboard.cjs.js +0 -1
- package/core/Billboard.d.ts +0 -10
- package/core/Billboard.js +0 -53
- package/core/Bounds.cjs.js +0 -1
- package/core/Bounds.d.ts +0 -36
- package/core/Bounds.js +0 -254
- package/core/Bvh.cjs.js +0 -1
- package/core/Bvh.d.ts +0 -19
- package/core/Bvh.js +0 -92
- package/core/CameraControls.cjs.js +0 -1
- package/core/CameraControls.d.ts +0 -48
- package/core/CameraControls.js +0 -151
- package/core/CameraShake.cjs.js +0 -1
- package/core/CameraShake.d.ts +0 -17
- package/core/CameraShake.js +0 -57
- package/core/CatmullRomLine.cjs.js +0 -1
- package/core/CatmullRomLine.d.ts +0 -10
- package/core/CatmullRomLine.js +0 -42
- package/core/Caustics.cjs.js +0 -1
- package/core/Caustics.d.ts +0 -32
- package/core/Caustics.js +0 -388
- package/core/Center.cjs.js +0 -1
- package/core/Center.d.ts +0 -33
- package/core/Center.js +0 -67
- package/core/Clone.cjs.js +0 -1
- package/core/Clone.d.ts +0 -15
- package/core/Clone.js +0 -100
- package/core/Cloud.cjs.js +0 -1
- package/core/Cloud.d.ts +0 -97
- package/core/Cloud.js +0 -231
- package/core/ComputedAttribute.cjs.js +0 -1
- package/core/ComputedAttribute.d.ts +0 -8
- package/core/ComputedAttribute.js +0 -33
- package/core/ContactShadows.cjs.js +0 -1
- package/core/ContactShadows.d.ts +0 -18
- package/core/ContactShadows.js +0 -114
- package/core/CubeCamera.cjs.js +0 -1
- package/core/CubeCamera.d.ts +0 -21
- package/core/CubeCamera.js +0 -86
- package/core/CubeTexture.cjs.js +0 -1
- package/core/CubeTexture.d.ts +0 -14
- package/core/CubeTexture.js +0 -25
- package/core/CubicBezierLine.cjs.js +0 -1
- package/core/CubicBezierLine.d.ts +0 -12
- package/core/CubicBezierLine.js +0 -28
- package/core/CurveModifier.cjs.js +0 -1
- package/core/CurveModifier.d.ts +0 -11
- package/core/CurveModifier.js +0 -27
- package/core/Decal.cjs.js +0 -1
- package/core/Decal.d.ts +0 -16
- package/core/Decal.js +0 -128
- package/core/Detailed.cjs.js +0 -1
- package/core/Detailed.d.ts +0 -10
- package/core/Detailed.js +0 -33
- package/core/DetectGPU.cjs.js +0 -1
- package/core/DetectGPU.d.ts +0 -7
- package/core/DetectGPU.js +0 -14
- package/core/DeviceOrientationControls.cjs.js +0 -1
- package/core/DeviceOrientationControls.d.ts +0 -10
- package/core/DeviceOrientationControls.js +0 -51
- package/core/Edges.cjs.js +0 -1
- package/core/Edges.d.ts +0 -13
- package/core/Edges.js +0 -38
- package/core/Effects.cjs.js +0 -1
- package/core/Effects.d.ts +0 -25
- package/core/Effects.js +0 -91
- package/core/Environment.cjs.js +0 -1
- package/core/Environment.d.ts +0 -37
- package/core/Environment.js +0 -189
- package/core/Example.cjs.js +0 -1
- package/core/Example.d.ts +0 -13
- package/core/Example.js +0 -46
- package/core/Fbo.cjs.js +0 -1
- package/core/Fbo.d.ts +0 -22
- package/core/Fbo.js +0 -63
- package/core/Fbx.cjs.js +0 -1
- package/core/Fbx.d.ts +0 -11
- package/core/Fbx.js +0 -23
- package/core/FirstPersonControls.cjs.js +0 -1
- package/core/FirstPersonControls.d.ts +0 -8
- package/core/FirstPersonControls.js +0 -38
- package/core/Fisheye.cjs.js +0 -1
- package/core/Fisheye.d.ts +0 -10
- package/core/Fisheye.js +0 -95
- package/core/Float.cjs.js +0 -1
- package/core/Float.d.ts +0 -14
- package/core/Float.js +0 -37
- package/core/FlyControls.cjs.js +0 -1
- package/core/FlyControls.d.ts +0 -10
- package/core/FlyControls.js +0 -55
- package/core/GizmoHelper.cjs.js +0 -1
- package/core/GizmoHelper.d.ts +0 -16
- package/core/GizmoHelper.js +0 -116
- package/core/GizmoViewcube.cjs.js +0 -1
- package/core/GizmoViewcube.d.ts +0 -14
- package/core/GizmoViewcube.js +0 -133
- package/core/GizmoViewport.cjs.js +0 -1
- package/core/GizmoViewport.d.ts +0 -16
- package/core/GizmoViewport.js +0 -140
- package/core/Gltf.cjs.js +0 -1
- package/core/Gltf.d.ts +0 -27
- package/core/Gltf.js +0 -52
- package/core/GradientTexture.cjs.js +0 -1
- package/core/GradientTexture.d.ts +0 -18
- package/core/GradientTexture.js +0 -54
- package/core/Grid.cjs.js +0 -1
- package/core/Grid.d.ts +0 -26
- package/core/Grid.js +0 -142
- package/core/Helper.cjs.js +0 -1
- package/core/Helper.d.ts +0 -16
- package/core/Helper.js +0 -47
- package/core/Hud.cjs.js +0 -1
- package/core/Hud.d.ts +0 -6
- package/core/Hud.js +0 -55
- package/core/Image.cjs.js +0 -1
- package/core/Image.d.ts +0 -38
- package/core/Image.js +0 -160
- package/core/Instances.cjs.js +0 -1
- package/core/Instances.d.ts +0 -64
- package/core/Instances.js +0 -313
- package/core/Ktx2.cjs.js +0 -1
- package/core/Ktx2.d.ts +0 -14
- package/core/Ktx2.js +0 -48
- package/core/Lightformer.cjs.js +0 -1
- package/core/Lightformer.d.ts +0 -15
- package/core/Lightformer.js +0 -63
- package/core/Line.cjs.js +0 -1
- package/core/Line.d.ts +0 -13
- package/core/Line.js +0 -73
- package/core/MapControls.cjs.js +0 -1
- package/core/MapControls.d.ts +0 -14
- package/core/MapControls.js +0 -63
- package/core/MarchingCubes.cjs.js +0 -1
- package/core/MarchingCubes.d.ts +0 -24
- package/core/MarchingCubes.js +0 -78
- package/core/Mask.cjs.js +0 -1
- package/core/Mask.d.ts +0 -17
- package/core/Mask.js +0 -42
- package/core/MatcapTexture.cjs.js +0 -1
- package/core/MatcapTexture.d.ts +0 -9
- package/core/MatcapTexture.js +0 -51
- package/core/MeshDiscardMaterial.cjs.js +0 -1
- package/core/MeshDiscardMaterial.d.ts +0 -10
- package/core/MeshDiscardMaterial.js +0 -15
- package/core/MeshDistortMaterial.cjs.js +0 -1
- package/core/MeshDistortMaterial.d.ts +0 -39
- package/core/MeshDistortMaterial.js +0 -72
- package/core/MeshPortalMaterial.cjs.js +0 -1
- package/core/MeshPortalMaterial.d.ts +0 -25
- package/core/MeshPortalMaterial.js +0 -467
- package/core/MeshReflectorMaterial.cjs.js +0 -1
- package/core/MeshReflectorMaterial.d.ts +0 -14
- package/core/MeshReflectorMaterial.js +0 -180
- package/core/MeshRefractionMaterial.cjs.js +0 -1
- package/core/MeshRefractionMaterial.d.ts +0 -19
- package/core/MeshRefractionMaterial.js +0 -73
- package/core/MeshTransmissionMaterial.cjs.js +0 -1
- package/core/MeshTransmissionMaterial.d.ts +0 -34
- package/core/MeshTransmissionMaterial.js +0 -402
- package/core/MeshWobbleMaterial.cjs.js +0 -1
- package/core/MeshWobbleMaterial.d.ts +0 -36
- package/core/MeshWobbleMaterial.js +0 -60
- package/core/MotionPathControls.cjs.js +0 -1
- package/core/MotionPathControls.d.ts +0 -33
- package/core/MotionPathControls.js +0 -121
- package/core/MultiMaterial.cjs.js +0 -1
- package/core/MultiMaterial.d.ts +0 -4
- package/core/MultiMaterial.js +0 -29
- package/core/NormalTexture.cjs.js +0 -1
- package/core/NormalTexture.d.ts +0 -14
- package/core/NormalTexture.js +0 -42
- package/core/OrbitControls.cjs.js +0 -1
- package/core/OrbitControls.d.ts +0 -22
- package/core/OrbitControls.js +0 -79
- package/core/OrthographicCamera.cjs.js +0 -1
- package/core/OrthographicCamera.d.ts +0 -14
- package/core/OrthographicCamera.js +0 -76
- package/core/Outlines.cjs.js +0 -1
- package/core/Outlines.d.ts +0 -17
- package/core/Outlines.js +0 -166
- package/core/PerformanceMonitor.cjs.js +0 -1
- package/core/PerformanceMonitor.d.ts +0 -36
- package/core/PerformanceMonitor.js +0 -116
- package/core/PerspectiveCamera.cjs.js +0 -1
- package/core/PerspectiveCamera.d.ts +0 -14
- package/core/PerspectiveCamera.js +0 -72
- package/core/PointMaterial.cjs.js +0 -1
- package/core/PointMaterial.d.ts +0 -8
- package/core/PointMaterial.js +0 -36
- package/core/PointerLockControls.cjs.js +0 -1
- package/core/PointerLockControls.d.ts +0 -15
- package/core/PointerLockControls.js +0 -89
- package/core/Points.cjs.js +0 -1
- package/core/Points.d.ts +0 -31
- package/core/Points.js +0 -202
- package/core/PositionalAudio.cjs.js +0 -1
- package/core/PositionalAudio.d.ts +0 -9
- package/core/PositionalAudio.js +0 -46
- package/core/Preload.cjs.js +0 -1
- package/core/Preload.d.ts +0 -7
- package/core/Preload.js +0 -44
- package/core/Progress.cjs.js +0 -1
- package/core/Progress.d.ts +0 -14
- package/core/Progress.js +0 -55
- package/core/QuadraticBezierLine.cjs.js +0 -1
- package/core/QuadraticBezierLine.d.ts +0 -14
- package/core/QuadraticBezierLine.js +0 -42
- package/core/RenderCubeTexture.cjs.js +0 -1
- package/core/RenderCubeTexture.d.ts +0 -30
- package/core/RenderCubeTexture.js +0 -96
- package/core/RenderTexture.cjs.js +0 -1
- package/core/RenderTexture.d.ts +0 -18
- package/core/RenderTexture.js +0 -105
- package/core/Resize.cjs.js +0 -1
- package/core/Resize.d.ts +0 -17
- package/core/Resize.js +0 -39
- package/core/RoundedBox.cjs.js +0 -1
- package/core/RoundedBox.d.ts +0 -14
- package/core/RoundedBox.js +0 -70
- package/core/Sampler.cjs.js +0 -1
- package/core/Sampler.d.ts +0 -28
- package/core/Sampler.js +0 -75
- package/core/ScreenQuad.cjs.js +0 -1
- package/core/ScreenQuad.d.ts +0 -5
- package/core/ScreenQuad.js +0 -25
- package/core/ScreenSizer.cjs.js +0 -1
- package/core/ScreenSizer.d.ts +0 -7
- package/core/ScreenSizer.js +0 -39
- package/core/ScreenSpace.cjs.js +0 -1
- package/core/ScreenSpace.d.ts +0 -7
- package/core/ScreenSpace.js +0 -25
- package/core/Segments.cjs.js +0 -1
- package/core/Segments.d.ts +0 -29
- package/core/Segments.js +0 -96
- package/core/Shadow.cjs.js +0 -1
- package/core/Shadow.d.ts +0 -12
- package/core/Shadow.js +0 -42
- package/core/ShadowAlpha.cjs.js +0 -1
- package/core/ShadowAlpha.d.ts +0 -7
- package/core/ShadowAlpha.js +0 -108
- package/core/Sky.cjs.js +0 -1
- package/core/Sky.d.ts +0 -16
- package/core/Sky.js +0 -39
- package/core/Sparkles.cjs.js +0 -1
- package/core/Sparkles.d.ts +0 -26
- package/core/Sparkles.js +0 -161
- package/core/Splat.cjs.js +0 -1
- package/core/Splat.d.ts +0 -56
- package/core/Splat.js +0 -506
- package/core/SpotLight.cjs.js +0 -1
- package/core/SpotLight.d.ts +0 -27
- package/core/SpotLight.js +0 -223
- package/core/SpriteAnimator.cjs.js +0 -1
- package/core/SpriteAnimator.d.ts +0 -88
- package/core/SpriteAnimator.js +0 -413
- package/core/Stage.cjs.js +0 -1
- package/core/Stage.d.ts +0 -27
- package/core/Stage.js +0 -133
- package/core/Stars.cjs.js +0 -1
- package/core/Stars.d.ts +0 -22
- package/core/Stars.js +0 -100
- package/core/Stats.cjs.js +0 -1
- package/core/Stats.d.ts +0 -7
- package/core/Stats.js +0 -32
- package/core/StatsGl.cjs.js +0 -1
- package/core/StatsGl.d.ts +0 -14
- package/core/StatsGl.js +0 -44
- package/core/Svg.cjs.js +0 -1
- package/core/Svg.d.ts +0 -13
- package/core/Svg.js +0 -62
- package/core/Text.cjs.js +0 -1
- package/core/Text.d.ts +0 -38
- package/core/Text.js +0 -57
- package/core/Text3D.cjs.js +0 -1
- package/core/Text3D.d.ts +0 -20
- package/core/Text3D.js +0 -74
- package/core/Texture.cjs.js +0 -1
- package/core/Texture.d.ts +0 -20
- package/core/Texture.js +0 -60
- package/core/TrackballControls.cjs.js +0 -1
- package/core/TrackballControls.d.ts +0 -15
- package/core/TrackballControls.js +0 -72
- package/core/Trail.cjs.js +0 -1
- package/core/Trail.d.ts +0 -21
- package/core/Trail.js +0 -150
- package/core/TrailTexture.cjs.js +0 -1
- package/core/TrailTexture.d.ts +0 -19
- package/core/TrailTexture.js +0 -159
- package/core/TransformControls.cjs.js +0 -1
- package/core/TransformControls.d.ts +0 -28
- package/core/TransformControls.js +0 -114
- package/core/VideoTexture.cjs.js +0 -1
- package/core/VideoTexture.d.ts +0 -26
- package/core/VideoTexture.js +0 -111
- package/core/Wireframe.cjs.js +0 -1
- package/core/Wireframe.d.ts +0 -15
- package/core/Wireframe.js +0 -157
- package/core/calculateScaleFactor.cjs.js +0 -1
- package/core/calculateScaleFactor.d.ts +0 -3
- package/core/calculateScaleFactor.js +0 -31
- package/core/index.cjs.js +0 -1
- package/core/index.d.ts +0 -122
- package/core/index.js +0 -150
- package/core/meshBounds.cjs.js +0 -1
- package/core/meshBounds.d.ts +0 -2
- package/core/meshBounds.js +0 -28
- package/core/shaderMaterial.cjs.js +0 -1
- package/core/shaderMaterial.d.ts +0 -9
- package/core/shaderMaterial.js +0 -29
- package/core/shapes.cjs.js +0 -1
- package/core/shapes.d.ts +0 -26
- package/core/shapes.js +0 -65
- package/core/softShadows.cjs.js +0 -1
- package/core/softShadows.d.ts +0 -6
- package/core/softShadows.js +0 -158
- package/core/useAnimations.cjs.js +0 -1
- package/core/useAnimations.d.ts +0 -13
- package/core/useAnimations.js +0 -52
- package/core/useAspect.cjs.js +0 -1
- package/core/useAspect.d.ts +0 -1
- package/core/useAspect.js +0 -10
- package/core/useBoxProjectedEnv.cjs.js +0 -1
- package/core/useBoxProjectedEnv.d.ts +0 -19
- package/core/useBoxProjectedEnv.js +0 -95
- package/core/useCamera.cjs.js +0 -1
- package/core/useCamera.d.ts +0 -3
- package/core/useCamera.js +0 -19
- package/core/useContextBridge.cjs.js +0 -1
- package/core/useContextBridge.d.ts +0 -4
- package/core/useContextBridge.js +0 -20
- package/core/useDepthBuffer.cjs.js +0 -1
- package/core/useDepthBuffer.d.ts +0 -6
- package/core/useDepthBuffer.js +0 -38
- package/core/useEnvironment.cjs.js +0 -1
- package/core/useEnvironment.d.ts +0 -17
- package/core/useEnvironment.js +0 -150
- package/core/useFont.cjs.js +0 -1
- package/core/useFont.d.ts +0 -24
- package/core/useFont.js +0 -24
- package/core/useIntersect.cjs.js +0 -1
- package/core/useIntersect.d.ts +0 -3
- package/core/useIntersect.js +0 -36
- package/core/useSpriteLoader.cjs.js +0 -1
- package/core/useSpriteLoader.d.ts +0 -57
- package/core/useSpriteLoader.js +0 -402
- package/helpers/constants.cjs.js +0 -1
- package/helpers/constants.d.ts +0 -1
- package/helpers/constants.js +0 -6
- package/helpers/deprecated.cjs.js +0 -1
- package/helpers/deprecated.d.ts +0 -5
- package/helpers/deprecated.js +0 -8
- package/helpers/environment-assets.cjs.js +0 -1
- package/helpers/environment-assets.d.ts +0 -13
- package/helpers/environment-assets.js +0 -14
- package/helpers/glsl/DefaultSpotlightShadowShadows.glsl.js +0 -3
- package/helpers/glsl/distort.vert.glsl.js +0 -3
- package/helpers/ts-utils.cjs.js +0 -1
- package/helpers/ts-utils.d.ts +0 -7
- package/helpers/ts-utils.js +0 -1
- package/helpers/useEffectfulState.cjs.js +0 -1
- package/helpers/useEffectfulState.d.ts +0 -4
- package/helpers/useEffectfulState.js +0 -17
- package/index.cjs.js +0 -1
- package/index.d.ts +0 -1
- package/index.js +0 -139
- package/materials/BlurPass.cjs.js +0 -1
- package/materials/BlurPass.d.ts +0 -23
- package/materials/BlurPass.js +0 -72
- package/materials/ConvolutionMaterial.cjs.js +0 -1
- package/materials/ConvolutionMaterial.d.ts +0 -7
- package/materials/ConvolutionMaterial.js +0 -97
- package/materials/DiscardMaterial.cjs.js +0 -1
- package/materials/DiscardMaterial.d.ts +0 -3
- package/materials/DiscardMaterial.js +0 -5
- package/materials/MeshReflectorMaterial.cjs.js +0 -1
- package/materials/MeshReflectorMaterial.d.ts +0 -50
- package/materials/MeshReflectorMaterial.js +0 -256
- package/materials/MeshRefractionMaterial.cjs.js +0 -1
- package/materials/MeshRefractionMaterial.d.ts +0 -18
- package/materials/MeshRefractionMaterial.js +0 -163
- package/materials/SpotLightMaterial.cjs.js +0 -1
- package/materials/SpotLightMaterial.d.ts +0 -4
- package/materials/SpotLightMaterial.js +0 -115
- package/materials/WireframeMaterial.cjs.js +0 -1
- package/materials/WireframeMaterial.d.ts +0 -64
- package/materials/WireframeMaterial.js +0 -217
- package/native/index.cjs.js +0 -1
- package/native/index.d.ts +0 -1
- package/native/index.js +0 -150
- package/web/CycleRaycast.cjs.js +0 -1
- package/web/CycleRaycast.d.ts +0 -10
- package/web/CycleRaycast.js +0 -93
- package/web/DragControls.cjs.js +0 -1
- package/web/DragControls.d.ts +0 -17
- package/web/DragControls.js +0 -127
- package/web/FaceControls.cjs.js +0 -1
- package/web/FaceControls.d.ts +0 -29
- package/web/FaceControls.js +0 -236
- package/web/FaceLandmarker.cjs.js +0 -1
- package/web/FaceLandmarker.d.ts +0 -14
- package/web/FaceLandmarker.js +0 -49
- package/web/Facemesh.cjs.js +0 -1
- package/web/Facemesh.d.ts +0 -118
- package/web/Facemesh.js +0 -4538
- package/web/Html.cjs.js +0 -1
- package/web/Html.d.ts +0 -34
- package/web/Html.js +0 -375
- package/web/KeyboardControls.cjs.js +0 -1
- package/web/KeyboardControls.d.ts +0 -37
- package/web/KeyboardControls.js +0 -104
- package/web/Loader.cjs.js +0 -1
- package/web/Loader.d.ts +0 -12
- package/web/Loader.js +0 -101
- package/web/PresentationControls.cjs.js +0 -1
- package/web/PresentationControls.d.ts +0 -16
- package/web/PresentationControls.js +0 -79
- package/web/ScreenVideoTexture.cjs.js +0 -1
- package/web/ScreenVideoTexture.d.ts +0 -17
- package/web/ScreenVideoTexture.js +0 -30
- package/web/ScrollControls.cjs.js +0 -1
- package/web/ScrollControls.d.ts +0 -45
- package/web/ScrollControls.js +0 -237
- package/web/Select.cjs.js +0 -1
- package/web/Select.d.ts +0 -14
- package/web/Select.js +0 -171
- package/web/View.cjs.js +0 -1
- package/web/View.d.ts +0 -34
- package/web/View.js +0 -259
- package/web/WebcamVideoTexture.cjs.js +0 -1
- package/web/WebcamVideoTexture.d.ts +0 -17
- package/web/WebcamVideoTexture.js +0 -33
- package/web/index.cjs.js +0 -1
- package/web/index.d.ts +0 -17
- package/web/index.js +0 -176
- package/web/pivotControls/AxisArrow.cjs.js +0 -1
- package/web/pivotControls/AxisArrow.d.ts +0 -7
- package/web/pivotControls/AxisArrow.js +0 -193
- package/web/pivotControls/AxisRotator.cjs.js +0 -1
- package/web/pivotControls/AxisRotator.d.ts +0 -7
- package/web/pivotControls/AxisRotator.js +0 -220
- package/web/pivotControls/PlaneSlider.cjs.js +0 -1
- package/web/pivotControls/PlaneSlider.d.ts +0 -7
- package/web/pivotControls/PlaneSlider.js +0 -202
- package/web/pivotControls/ScalingSphere.cjs.js +0 -1
- package/web/pivotControls/ScalingSphere.d.ts +0 -7
- package/web/pivotControls/ScalingSphere.js +0 -192
- package/web/pivotControls/context.cjs.js +0 -1
- package/web/pivotControls/context.d.ts +0 -33
- package/web/pivotControls/context.js +0 -5
- package/web/pivotControls/index.cjs.js +0 -1
- package/web/pivotControls/index.d.ts +0 -39
- package/web/pivotControls/index.js +0 -213
- package/web/useCursor.cjs.js +0 -1
- package/web/useCursor.d.ts +0 -1
- package/web/useCursor.js +0 -12
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
import { t as __commonJSMin } from "../rolldown-runtime.mjs";
|
|
2
|
+
|
|
3
|
+
//#region node_modules/detect-gpu/dist/detect-gpu.umd.js
|
|
4
|
+
var require_detect_gpu_umd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5
|
+
(function(e, r) {
|
|
6
|
+
"object" == typeof exports && "undefined" != typeof module ? r(exports) : "function" == typeof define && define.amd ? define(["exports"], r) : r((e = "undefined" != typeof globalThis ? globalThis : e || self).DetectGPU = {});
|
|
7
|
+
})(exports, (function(e) {
|
|
8
|
+
"use strict";
|
|
9
|
+
var r = function(e$1, n$1) {
|
|
10
|
+
return (r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e$2, r$1) {
|
|
11
|
+
e$2.__proto__ = r$1;
|
|
12
|
+
} || function(e$2, r$1) {
|
|
13
|
+
for (var n$2 in r$1) Object.prototype.hasOwnProperty.call(r$1, n$2) && (e$2[n$2] = r$1[n$2]);
|
|
14
|
+
})(e$1, n$1);
|
|
15
|
+
};
|
|
16
|
+
function n(e$1, r$1, n$1, t$1) {
|
|
17
|
+
return new (n$1 || (n$1 = Promise))((function(o$1, a$1) {
|
|
18
|
+
function i$1(e$2) {
|
|
19
|
+
try {
|
|
20
|
+
u$1(t$1.next(e$2));
|
|
21
|
+
} catch (e$3) {
|
|
22
|
+
a$1(e$3);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function c$1(e$2) {
|
|
26
|
+
try {
|
|
27
|
+
u$1(t$1.throw(e$2));
|
|
28
|
+
} catch (e$3) {
|
|
29
|
+
a$1(e$3);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function u$1(e$2) {
|
|
33
|
+
var r$2;
|
|
34
|
+
e$2.done ? o$1(e$2.value) : (r$2 = e$2.value, r$2 instanceof n$1 ? r$2 : new n$1((function(e$3) {
|
|
35
|
+
e$3(r$2);
|
|
36
|
+
}))).then(i$1, c$1);
|
|
37
|
+
}
|
|
38
|
+
u$1((t$1 = t$1.apply(e$1, r$1 || [])).next());
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
function t(e$1, r$1) {
|
|
42
|
+
var n$1, t$1, o$1, a$1, i$1 = {
|
|
43
|
+
label: 0,
|
|
44
|
+
sent: function() {
|
|
45
|
+
if (1 & o$1[0]) throw o$1[1];
|
|
46
|
+
return o$1[1];
|
|
47
|
+
},
|
|
48
|
+
trys: [],
|
|
49
|
+
ops: []
|
|
50
|
+
};
|
|
51
|
+
return a$1 = {
|
|
52
|
+
next: c$1(0),
|
|
53
|
+
throw: c$1(1),
|
|
54
|
+
return: c$1(2)
|
|
55
|
+
}, "function" == typeof Symbol && (a$1[Symbol.iterator] = function() {
|
|
56
|
+
return this;
|
|
57
|
+
}), a$1;
|
|
58
|
+
function c$1(c$2) {
|
|
59
|
+
return function(u$1) {
|
|
60
|
+
return function(c$3) {
|
|
61
|
+
if (n$1) throw new TypeError("Generator is already executing.");
|
|
62
|
+
for (; a$1 && (a$1 = 0, c$3[0] && (i$1 = 0)), i$1;) try {
|
|
63
|
+
if (n$1 = 1, t$1 && (o$1 = 2 & c$3[0] ? t$1.return : c$3[0] ? t$1.throw || ((o$1 = t$1.return) && o$1.call(t$1), 0) : t$1.next) && !(o$1 = o$1.call(t$1, c$3[1])).done) return o$1;
|
|
64
|
+
switch (t$1 = 0, o$1 && (c$3 = [2 & c$3[0], o$1.value]), c$3[0]) {
|
|
65
|
+
case 0:
|
|
66
|
+
case 1:
|
|
67
|
+
o$1 = c$3;
|
|
68
|
+
break;
|
|
69
|
+
case 4: return i$1.label++, {
|
|
70
|
+
value: c$3[1],
|
|
71
|
+
done: !1
|
|
72
|
+
};
|
|
73
|
+
case 5:
|
|
74
|
+
i$1.label++, t$1 = c$3[1], c$3 = [0];
|
|
75
|
+
continue;
|
|
76
|
+
case 7:
|
|
77
|
+
c$3 = i$1.ops.pop(), i$1.trys.pop();
|
|
78
|
+
continue;
|
|
79
|
+
default:
|
|
80
|
+
if (!(o$1 = i$1.trys, (o$1 = o$1.length > 0 && o$1[o$1.length - 1]) || 6 !== c$3[0] && 2 !== c$3[0])) {
|
|
81
|
+
i$1 = 0;
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
if (3 === c$3[0] && (!o$1 || c$3[1] > o$1[0] && c$3[1] < o$1[3])) {
|
|
85
|
+
i$1.label = c$3[1];
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
if (6 === c$3[0] && i$1.label < o$1[1]) {
|
|
89
|
+
i$1.label = o$1[1], o$1 = c$3;
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
if (o$1 && i$1.label < o$1[2]) {
|
|
93
|
+
i$1.label = o$1[2], i$1.ops.push(c$3);
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
o$1[2] && i$1.ops.pop(), i$1.trys.pop();
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
c$3 = r$1.call(e$1, i$1);
|
|
100
|
+
} catch (e$2) {
|
|
101
|
+
c$3 = [6, e$2], t$1 = 0;
|
|
102
|
+
} finally {
|
|
103
|
+
n$1 = o$1 = 0;
|
|
104
|
+
}
|
|
105
|
+
if (5 & c$3[0]) throw c$3[1];
|
|
106
|
+
return {
|
|
107
|
+
value: c$3[0] ? c$3[1] : void 0,
|
|
108
|
+
done: !0
|
|
109
|
+
};
|
|
110
|
+
}([c$2, u$1]);
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
var o = [
|
|
115
|
+
"geforce 320m",
|
|
116
|
+
"geforce 8600",
|
|
117
|
+
"geforce 8600m gt",
|
|
118
|
+
"geforce 8800 gs",
|
|
119
|
+
"geforce 8800 gt",
|
|
120
|
+
"geforce 9400",
|
|
121
|
+
"geforce 9400m g",
|
|
122
|
+
"geforce 9400m",
|
|
123
|
+
"geforce 9600m gt",
|
|
124
|
+
"geforce 9600m",
|
|
125
|
+
"geforce fx go5200",
|
|
126
|
+
"geforce gt 120",
|
|
127
|
+
"geforce gt 130",
|
|
128
|
+
"geforce gt 330m",
|
|
129
|
+
"geforce gtx 285",
|
|
130
|
+
"google swiftshader",
|
|
131
|
+
"intel g41",
|
|
132
|
+
"intel g45",
|
|
133
|
+
"intel gma 4500mhd",
|
|
134
|
+
"intel gma x3100",
|
|
135
|
+
"intel hd 3000",
|
|
136
|
+
"intel q45",
|
|
137
|
+
"legacy",
|
|
138
|
+
"mali-2",
|
|
139
|
+
"mali-3",
|
|
140
|
+
"mali-4",
|
|
141
|
+
"quadro fx 1500",
|
|
142
|
+
"quadro fx 4",
|
|
143
|
+
"quadro fx 5",
|
|
144
|
+
"radeon hd 2400",
|
|
145
|
+
"radeon hd 2600",
|
|
146
|
+
"radeon hd 4670",
|
|
147
|
+
"radeon hd 4850",
|
|
148
|
+
"radeon hd 4870",
|
|
149
|
+
"radeon hd 5670",
|
|
150
|
+
"radeon hd 5750",
|
|
151
|
+
"radeon hd 6290",
|
|
152
|
+
"radeon hd 6300",
|
|
153
|
+
"radeon hd 6310",
|
|
154
|
+
"radeon hd 6320",
|
|
155
|
+
"radeon hd 6490m",
|
|
156
|
+
"radeon hd 6630m",
|
|
157
|
+
"radeon hd 6750m",
|
|
158
|
+
"radeon hd 6770m",
|
|
159
|
+
"radeon hd 6970m",
|
|
160
|
+
"sgx 543",
|
|
161
|
+
"sgx543"
|
|
162
|
+
];
|
|
163
|
+
function a(e$1) {
|
|
164
|
+
return e$1 = e$1.toLowerCase().replace(/.*angle ?\((.+)\)(?: on vulkan [0-9.]+)?$/i, "$1").replace(/\s(\d{1,2}gb|direct3d.+$)|\(r\)| \([^)]+\)$/g, "").replace(/(?:vulkan|opengl) \d+\.\d+(?:\.\d+)?(?: \((.*)\))?/, "$1");
|
|
165
|
+
}
|
|
166
|
+
const i = 34962;
|
|
167
|
+
var c = "undefined" == typeof window, u = function() {
|
|
168
|
+
if (!c) {
|
|
169
|
+
var e$1 = window.navigator, r$1 = e$1.userAgent, n$1 = e$1.platform, t$1 = e$1.maxTouchPoints, o$1 = /(iphone|ipod|ipad)/i.test(r$1), a$1 = "iPad" === n$1 || "MacIntel" === n$1 && t$1 > 0 && !window.MSStream;
|
|
170
|
+
return {
|
|
171
|
+
isIpad: a$1,
|
|
172
|
+
isMobile: /android/i.test(r$1) || o$1 || a$1,
|
|
173
|
+
isSafari12: /Version\/12.+Safari/.test(r$1),
|
|
174
|
+
isFirefox: /Firefox/.test(r$1)
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
}();
|
|
178
|
+
function l(e$1, r$1, n$1) {
|
|
179
|
+
if (!n$1) return [r$1];
|
|
180
|
+
var t$1, o$1 = function(e$2) {
|
|
181
|
+
var r$2 = "\n precision highp float;\n attribute vec3 aPosition;\n varying float vvv;\n void main() {\n vvv = 0.31622776601683794;\n gl_Position = vec4(aPosition, 1.0);\n }\n ", n$2 = "\n precision highp float;\n varying float vvv;\n void main() {\n vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * vvv;\n enc = fract(enc);\n enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n gl_FragColor = enc;\n }\n ", t$2 = e$2.createShader(35633), o$2 = e$2.createShader(35632), a$2 = e$2.createProgram();
|
|
182
|
+
if (!(o$2 && t$2 && a$2)) return;
|
|
183
|
+
e$2.shaderSource(t$2, r$2), e$2.shaderSource(o$2, n$2), e$2.compileShader(t$2), e$2.compileShader(o$2), e$2.attachShader(a$2, t$2), e$2.attachShader(a$2, o$2), e$2.linkProgram(a$2), e$2.detachShader(a$2, t$2), e$2.detachShader(a$2, o$2), e$2.deleteShader(t$2), e$2.deleteShader(o$2), e$2.useProgram(a$2);
|
|
184
|
+
var c$2 = e$2.createBuffer();
|
|
185
|
+
e$2.bindBuffer(i, c$2), e$2.bufferData(i, new Float32Array([
|
|
186
|
+
-1,
|
|
187
|
+
-1,
|
|
188
|
+
0,
|
|
189
|
+
3,
|
|
190
|
+
-1,
|
|
191
|
+
0,
|
|
192
|
+
-1,
|
|
193
|
+
3,
|
|
194
|
+
0
|
|
195
|
+
]), 35044);
|
|
196
|
+
var u$1 = e$2.getAttribLocation(a$2, "aPosition");
|
|
197
|
+
e$2.vertexAttribPointer(u$1, 3, 5126, !1, 0, 0), e$2.enableVertexAttribArray(u$1), e$2.clearColor(1, 1, 1, 1), e$2.clear(16384), e$2.viewport(0, 0, 1, 1), e$2.drawArrays(4, 0, 3);
|
|
198
|
+
var l$2 = new Uint8Array(4);
|
|
199
|
+
return e$2.readPixels(0, 0, 1, 1, 6408, 5121, l$2), e$2.deleteProgram(a$2), e$2.deleteBuffer(c$2), l$2.join("");
|
|
200
|
+
}(e$1), a$1 = "801621810", c$1 = "8016218135", l$1 = "80162181161", f$1 = (null == u ? void 0 : u.isIpad) ? [
|
|
201
|
+
[
|
|
202
|
+
"a7",
|
|
203
|
+
l$1,
|
|
204
|
+
12
|
|
205
|
+
],
|
|
206
|
+
[
|
|
207
|
+
"a8",
|
|
208
|
+
c$1,
|
|
209
|
+
15
|
|
210
|
+
],
|
|
211
|
+
[
|
|
212
|
+
"a8x",
|
|
213
|
+
c$1,
|
|
214
|
+
15
|
|
215
|
+
],
|
|
216
|
+
[
|
|
217
|
+
"a9",
|
|
218
|
+
c$1,
|
|
219
|
+
15
|
|
220
|
+
],
|
|
221
|
+
[
|
|
222
|
+
"a9x",
|
|
223
|
+
c$1,
|
|
224
|
+
15
|
|
225
|
+
],
|
|
226
|
+
[
|
|
227
|
+
"a10",
|
|
228
|
+
c$1,
|
|
229
|
+
15
|
|
230
|
+
],
|
|
231
|
+
[
|
|
232
|
+
"a10x",
|
|
233
|
+
c$1,
|
|
234
|
+
15
|
|
235
|
+
],
|
|
236
|
+
[
|
|
237
|
+
"a12",
|
|
238
|
+
a$1,
|
|
239
|
+
15
|
|
240
|
+
],
|
|
241
|
+
[
|
|
242
|
+
"a12x",
|
|
243
|
+
a$1,
|
|
244
|
+
15
|
|
245
|
+
],
|
|
246
|
+
[
|
|
247
|
+
"a12z",
|
|
248
|
+
a$1,
|
|
249
|
+
15
|
|
250
|
+
],
|
|
251
|
+
[
|
|
252
|
+
"a14",
|
|
253
|
+
a$1,
|
|
254
|
+
15
|
|
255
|
+
],
|
|
256
|
+
[
|
|
257
|
+
"a15",
|
|
258
|
+
a$1,
|
|
259
|
+
15
|
|
260
|
+
],
|
|
261
|
+
[
|
|
262
|
+
"m1",
|
|
263
|
+
a$1,
|
|
264
|
+
15
|
|
265
|
+
],
|
|
266
|
+
[
|
|
267
|
+
"m2",
|
|
268
|
+
a$1,
|
|
269
|
+
15
|
|
270
|
+
]
|
|
271
|
+
] : [
|
|
272
|
+
[
|
|
273
|
+
"a7",
|
|
274
|
+
l$1,
|
|
275
|
+
12
|
|
276
|
+
],
|
|
277
|
+
[
|
|
278
|
+
"a8",
|
|
279
|
+
c$1,
|
|
280
|
+
12
|
|
281
|
+
],
|
|
282
|
+
[
|
|
283
|
+
"a9",
|
|
284
|
+
c$1,
|
|
285
|
+
15
|
|
286
|
+
],
|
|
287
|
+
[
|
|
288
|
+
"a10",
|
|
289
|
+
c$1,
|
|
290
|
+
15
|
|
291
|
+
],
|
|
292
|
+
[
|
|
293
|
+
"a11",
|
|
294
|
+
a$1,
|
|
295
|
+
15
|
|
296
|
+
],
|
|
297
|
+
[
|
|
298
|
+
"a12",
|
|
299
|
+
a$1,
|
|
300
|
+
15
|
|
301
|
+
],
|
|
302
|
+
[
|
|
303
|
+
"a13",
|
|
304
|
+
a$1,
|
|
305
|
+
15
|
|
306
|
+
],
|
|
307
|
+
[
|
|
308
|
+
"a14",
|
|
309
|
+
a$1,
|
|
310
|
+
15
|
|
311
|
+
],
|
|
312
|
+
[
|
|
313
|
+
"a15",
|
|
314
|
+
a$1,
|
|
315
|
+
15
|
|
316
|
+
],
|
|
317
|
+
[
|
|
318
|
+
"a16",
|
|
319
|
+
a$1,
|
|
320
|
+
15
|
|
321
|
+
],
|
|
322
|
+
[
|
|
323
|
+
"a17",
|
|
324
|
+
a$1,
|
|
325
|
+
15
|
|
326
|
+
]
|
|
327
|
+
];
|
|
328
|
+
return "80162181255" === o$1 ? t$1 = f$1.filter((function(e$2) {
|
|
329
|
+
return e$2[2] >= 14;
|
|
330
|
+
})) : (t$1 = f$1.filter((function(e$2) {
|
|
331
|
+
return e$2[1] === o$1;
|
|
332
|
+
}))).length || (t$1 = f$1), t$1.map((function(e$2) {
|
|
333
|
+
var r$2 = e$2[0];
|
|
334
|
+
return "apple ".concat(r$2, " gpu");
|
|
335
|
+
}));
|
|
336
|
+
}
|
|
337
|
+
var f = function(e$1) {
|
|
338
|
+
function n$1(r$1) {
|
|
339
|
+
var n$2 = this.constructor, t$1 = e$1.call(this, r$1) || this;
|
|
340
|
+
return Object.setPrototypeOf(t$1, n$2.prototype), t$1;
|
|
341
|
+
}
|
|
342
|
+
return function(e$2, n$2) {
|
|
343
|
+
if ("function" != typeof n$2 && null !== n$2) throw new TypeError("Class extends value " + String(n$2) + " is not a constructor or null");
|
|
344
|
+
function t$1() {
|
|
345
|
+
this.constructor = e$2;
|
|
346
|
+
}
|
|
347
|
+
r(e$2, n$2), e$2.prototype = null === n$2 ? Object.create(n$2) : (t$1.prototype = n$2.prototype, new t$1());
|
|
348
|
+
}(n$1, e$1), n$1;
|
|
349
|
+
}(Error);
|
|
350
|
+
var d = [], s = [];
|
|
351
|
+
function h(e$1, r$1) {
|
|
352
|
+
if (e$1 === r$1) return 0;
|
|
353
|
+
var n$1 = e$1;
|
|
354
|
+
e$1.length > r$1.length && (e$1 = r$1, r$1 = n$1);
|
|
355
|
+
for (var t$1 = e$1.length, o$1 = r$1.length; t$1 > 0 && e$1.charCodeAt(~-t$1) === r$1.charCodeAt(~-o$1);) t$1--, o$1--;
|
|
356
|
+
for (var a$1, i$1 = 0; i$1 < t$1 && e$1.charCodeAt(i$1) === r$1.charCodeAt(i$1);) i$1++;
|
|
357
|
+
if (o$1 -= i$1, 0 === (t$1 -= i$1)) return o$1;
|
|
358
|
+
for (var c$1, u$1, l$1 = 0, f$1 = 0, h$1 = 0; f$1 < t$1;) s[f$1] = e$1.charCodeAt(i$1 + f$1), d[f$1] = ++f$1;
|
|
359
|
+
for (; h$1 < o$1;) for (a$1 = r$1.charCodeAt(i$1 + h$1), c$1 = h$1++, l$1 = h$1, f$1 = 0; f$1 < t$1; f$1++) u$1 = a$1 === s[f$1] ? c$1 : c$1 + 1, c$1 = d[f$1], l$1 = d[f$1] = c$1 > l$1 ? u$1 > l$1 ? l$1 + 1 : u$1 : u$1 > c$1 ? c$1 + 1 : u$1;
|
|
360
|
+
return l$1;
|
|
361
|
+
}
|
|
362
|
+
function v(e$1) {
|
|
363
|
+
return null != e$1;
|
|
364
|
+
}
|
|
365
|
+
e.getGPUTier = function(e$1) {
|
|
366
|
+
var r$1 = void 0 === e$1 ? {} : e$1, i$1 = r$1.mobileTiers, d$1 = void 0 === i$1 ? [
|
|
367
|
+
0,
|
|
368
|
+
15,
|
|
369
|
+
30,
|
|
370
|
+
60
|
|
371
|
+
] : i$1, s$1 = r$1.desktopTiers, p = void 0 === s$1 ? [
|
|
372
|
+
0,
|
|
373
|
+
15,
|
|
374
|
+
30,
|
|
375
|
+
60
|
|
376
|
+
] : s$1, g = r$1.override, m = void 0 === g ? {} : g, b = r$1.glContext, w = r$1.failIfMajorPerformanceCaveat, y = void 0 !== w && w, x = r$1.benchmarksURL, P = void 0 === x ? "https://unpkg.com/detect-gpu@".concat("5.0.56", "/dist/benchmarks") : x;
|
|
377
|
+
return n(void 0, void 0, void 0, (function() {
|
|
378
|
+
function e$2(e$3) {
|
|
379
|
+
var o$1;
|
|
380
|
+
return n(this, void 0, void 0, (function() {
|
|
381
|
+
var n$1, a$1, i$3, c$1, u$1, l$1, d$2, v$1, p$1, g$2, m$1, b$1, y$1, x$2, P$1, A$1, C$1, L$1, M$1, k$1, j$1, B$1, R$1, T$1, U$1, I$1;
|
|
382
|
+
return t(this, (function(t$1) {
|
|
383
|
+
switch (t$1.label) {
|
|
384
|
+
case 0:
|
|
385
|
+
if (!(n$1 = _(e$3))) return [2];
|
|
386
|
+
a$1 = "".concat(w$1 ? "m" : "d", "-").concat(n$1).concat(s$2 ? "-ipad" : "", ".json"), i$3 = r$2[a$1] = null !== (o$1 = r$2[a$1]) && void 0 !== o$1 ? o$1 : E(a$1), t$1.label = 1;
|
|
387
|
+
case 1: return t$1.trys.push([
|
|
388
|
+
1,
|
|
389
|
+
3,
|
|
390
|
+
,
|
|
391
|
+
4
|
|
392
|
+
]), [4, i$3];
|
|
393
|
+
case 2: return c$1 = t$1.sent(), [3, 4];
|
|
394
|
+
case 3:
|
|
395
|
+
if ((u$1 = t$1.sent()) instanceof f) throw u$1;
|
|
396
|
+
return [2];
|
|
397
|
+
case 4:
|
|
398
|
+
if (l$1 = function(e$4) {
|
|
399
|
+
var r$3, n$2 = (e$4 = e$4.replace(/\([^)]+\)/, "")).match(/\d+/) || e$4.match(/(\W|^)([A-Za-z]{1,3})(\W|$)/g);
|
|
400
|
+
return null !== (r$3 = null == n$2 ? void 0 : n$2.join("").replace(/\W|amd/g, "")) && void 0 !== r$3 ? r$3 : "";
|
|
401
|
+
}(e$3), (d$2 = c$1.filter((function(e$4) {
|
|
402
|
+
return e$4[1] === l$1;
|
|
403
|
+
}))).length || (d$2 = c$1.filter((function(r$3) {
|
|
404
|
+
return r$3[0].includes(e$3);
|
|
405
|
+
}))), 0 === (v$1 = d$2.length)) return [2];
|
|
406
|
+
for (p$1 = e$3.split(/[.,()\[\]/\s]/g).sort().filter((function(e$4, r$3, n$2) {
|
|
407
|
+
return 0 === r$3 || e$4 !== n$2[r$3 - 1];
|
|
408
|
+
})).join(" "), g$2 = v$1 > 1 ? d$2.map((function(e$4) {
|
|
409
|
+
return [e$4, h(p$1, e$4[2])];
|
|
410
|
+
})).sort((function(e$4, r$3) {
|
|
411
|
+
return e$4[1] - r$3[1];
|
|
412
|
+
}))[0][0] : d$2[0], m$1 = g$2[0], b$1 = g$2[4], y$1 = Number.MAX_VALUE, P$1 = window.devicePixelRatio, A$1 = S.width * P$1 * S.height * P$1, C$1 = 0, L$1 = b$1; C$1 < L$1.length; C$1++) M$1 = L$1[C$1], k$1 = M$1[0], j$1 = M$1[1], B$1 = k$1 * j$1, (R$1 = Math.abs(A$1 - B$1)) < y$1 && (y$1 = R$1, x$2 = M$1);
|
|
413
|
+
return x$2 ? (U$1 = (T$1 = x$2)[2], I$1 = T$1[3], [2, [
|
|
414
|
+
y$1,
|
|
415
|
+
U$1,
|
|
416
|
+
m$1,
|
|
417
|
+
I$1
|
|
418
|
+
]]) : [2];
|
|
419
|
+
}
|
|
420
|
+
}));
|
|
421
|
+
}));
|
|
422
|
+
}
|
|
423
|
+
var r$2, i$2, s$2, g$1, w$1, x$1, S, A, E, C, _, L, M, k, j, B, R, T, U, I, O, D, N, F, G;
|
|
424
|
+
return t(this, (function(h$1) {
|
|
425
|
+
switch (h$1.label) {
|
|
426
|
+
case 0:
|
|
427
|
+
if (r$2 = {}, c) return [2, {
|
|
428
|
+
tier: 0,
|
|
429
|
+
type: "SSR"
|
|
430
|
+
}];
|
|
431
|
+
if (i$2 = m.isIpad, s$2 = void 0 === i$2 ? !!(null == u ? void 0 : u.isIpad) : i$2, g$1 = m.isMobile, w$1 = void 0 === g$1 ? !!(null == u ? void 0 : u.isMobile) : g$1, x$1 = m.screenSize, S = void 0 === x$1 ? window.screen : x$1, A = m.loadBenchmarks, E = void 0 === A ? function(e$3) {
|
|
432
|
+
return n(void 0, void 0, void 0, (function() {
|
|
433
|
+
var r$3;
|
|
434
|
+
return t(this, (function(n$1) {
|
|
435
|
+
switch (n$1.label) {
|
|
436
|
+
case 0: return [4, fetch("".concat(P, "/").concat(e$3)).then((function(e$4) {
|
|
437
|
+
return e$4.json();
|
|
438
|
+
}))];
|
|
439
|
+
case 1:
|
|
440
|
+
if (r$3 = n$1.sent(), parseInt(r$3.shift().split(".")[0], 10) < 4) throw new f("Detect GPU benchmark data is out of date. Please update to version 4x");
|
|
441
|
+
return [2, r$3];
|
|
442
|
+
}
|
|
443
|
+
}));
|
|
444
|
+
}));
|
|
445
|
+
} : A, C = m.renderer, _ = function(e$3) {
|
|
446
|
+
for (var r$3 = 0, n$1 = w$1 ? [
|
|
447
|
+
"adreno",
|
|
448
|
+
"apple",
|
|
449
|
+
"mali-t",
|
|
450
|
+
"mali",
|
|
451
|
+
"nvidia",
|
|
452
|
+
"powervr",
|
|
453
|
+
"samsung"
|
|
454
|
+
] : [
|
|
455
|
+
"intel",
|
|
456
|
+
"apple",
|
|
457
|
+
"amd",
|
|
458
|
+
"radeon",
|
|
459
|
+
"nvidia",
|
|
460
|
+
"geforce",
|
|
461
|
+
"adreno"
|
|
462
|
+
]; r$3 < n$1.length; r$3++) {
|
|
463
|
+
var t$1 = n$1[r$3];
|
|
464
|
+
if (e$3.includes(t$1)) return t$1;
|
|
465
|
+
}
|
|
466
|
+
}, L = function(e$3, r$3, n$1, t$1, o$1) {
|
|
467
|
+
return {
|
|
468
|
+
device: o$1,
|
|
469
|
+
fps: t$1,
|
|
470
|
+
gpu: n$1,
|
|
471
|
+
isMobile: w$1,
|
|
472
|
+
tier: e$3,
|
|
473
|
+
type: r$3
|
|
474
|
+
};
|
|
475
|
+
}, k = "", C) C = a(C), M = [C];
|
|
476
|
+
else {
|
|
477
|
+
if (!(j = b || function(e$3, r$3) {
|
|
478
|
+
void 0 === r$3 && (r$3 = !1);
|
|
479
|
+
var n$1 = {
|
|
480
|
+
alpha: !1,
|
|
481
|
+
antialias: !1,
|
|
482
|
+
depth: !1,
|
|
483
|
+
failIfMajorPerformanceCaveat: r$3,
|
|
484
|
+
powerPreference: "high-performance",
|
|
485
|
+
stencil: !1
|
|
486
|
+
};
|
|
487
|
+
e$3 && delete n$1.powerPreference;
|
|
488
|
+
var t$1 = window.document.createElement("canvas"), o$1 = t$1.getContext("webgl", n$1) || t$1.getContext("experimental-webgl", n$1);
|
|
489
|
+
return null != o$1 ? o$1 : void 0;
|
|
490
|
+
}(null == u ? void 0 : u.isSafari12, y))) return [2, L(0, "WEBGL_UNSUPPORTED")];
|
|
491
|
+
if (B = (null == u ? void 0 : u.isFirefox) ? null : j.getExtension("WEBGL_debug_renderer_info"), !(C = B ? j.getParameter(B.UNMASKED_RENDERER_WEBGL) : j.getParameter(j.RENDERER))) return [2, L(1, "FALLBACK")];
|
|
492
|
+
k = C, C = a(C), M = function(e$3, r$3, n$1) {
|
|
493
|
+
return "apple gpu" === r$3 ? l(e$3, r$3, n$1) : [r$3];
|
|
494
|
+
}(j, C, w$1);
|
|
495
|
+
}
|
|
496
|
+
return [4, Promise.all(M.map(e$2))];
|
|
497
|
+
case 1:
|
|
498
|
+
if (!(R = h$1.sent().filter(v).sort((function(e$3, r$3) {
|
|
499
|
+
var n$1 = e$3[0], t$1 = void 0 === n$1 ? Number.MAX_VALUE : n$1, o$1 = e$3[1], a$1 = r$3[0], i$3 = void 0 === a$1 ? Number.MAX_VALUE : a$1, c$1 = r$3[1];
|
|
500
|
+
return t$1 === i$3 ? o$1 - c$1 : t$1 - i$3;
|
|
501
|
+
}))).length) return [2, (T = o.find((function(e$3) {
|
|
502
|
+
return C.includes(e$3);
|
|
503
|
+
}))) ? L(0, "BLOCKLISTED", T) : L(1, "FALLBACK", "".concat(C, " (").concat(k, ")"))];
|
|
504
|
+
if (U = R[0], I = U[1], O = U[2], D = U[3], -1 === I) return [2, L(0, "BLOCKLISTED", O, I, D)];
|
|
505
|
+
for (N = w$1 ? d$1 : p, F = 0, G = 0; G < N.length; G++) I >= N[G] && (F = G);
|
|
506
|
+
return [2, L(F, "BENCHMARK", O, I, D)];
|
|
507
|
+
}
|
|
508
|
+
}));
|
|
509
|
+
}));
|
|
510
|
+
};
|
|
511
|
+
}));
|
|
512
|
+
}));
|
|
513
|
+
|
|
514
|
+
//#endregion
|
|
515
|
+
export { require_detect_gpu_umd as t };
|