@react-three/drei 10.7.6 → 10.8.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
package/core/SpriteAnimator.js
DELETED
|
@@ -1,413 +0,0 @@
|
|
|
1
|
-
import _extends from '@babel/runtime/helpers/esm/extends';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { useFrame } from '@react-three/fiber';
|
|
4
|
-
import * as THREE from 'three';
|
|
5
|
-
import { Instances, Instance } from './Instances.js';
|
|
6
|
-
import { Billboard } from './Billboard.js';
|
|
7
|
-
import { useSpriteLoader, getFirstFrame } from './useSpriteLoader.js';
|
|
8
|
-
|
|
9
|
-
// Frame-related types
|
|
10
|
-
|
|
11
|
-
const context = /*#__PURE__*/React.createContext(null);
|
|
12
|
-
function useSpriteAnimator() {
|
|
13
|
-
return React.useContext(context);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// Type guard for SpriteData
|
|
17
|
-
function isSpriteData(data) {
|
|
18
|
-
return data !== null && 'meta' in data && 'frames' in data;
|
|
19
|
-
}
|
|
20
|
-
const geometry = /* @__PURE__ */new THREE.PlaneGeometry(1, 1);
|
|
21
|
-
const SpriteAnimator = /* @__PURE__ */React.forwardRef(({
|
|
22
|
-
startFrame = 0,
|
|
23
|
-
endFrame,
|
|
24
|
-
fps = 30,
|
|
25
|
-
frameName = '',
|
|
26
|
-
textureDataURL,
|
|
27
|
-
textureImageURL,
|
|
28
|
-
loop = false,
|
|
29
|
-
numberOfFrames = 1,
|
|
30
|
-
autoPlay = true,
|
|
31
|
-
animationNames,
|
|
32
|
-
onStart,
|
|
33
|
-
onEnd,
|
|
34
|
-
onLoopEnd,
|
|
35
|
-
onFrame,
|
|
36
|
-
play,
|
|
37
|
-
pause = false,
|
|
38
|
-
flipX = false,
|
|
39
|
-
alphaTest = 0.0,
|
|
40
|
-
children,
|
|
41
|
-
asSprite = false,
|
|
42
|
-
offset,
|
|
43
|
-
playBackwards = false,
|
|
44
|
-
resetOnEnd = false,
|
|
45
|
-
maxItems = 1,
|
|
46
|
-
instanceItems = [[0, 0, 0]],
|
|
47
|
-
spriteDataset,
|
|
48
|
-
canvasRenderingContext2DSettings,
|
|
49
|
-
roundFramePosition = false,
|
|
50
|
-
meshProps = {},
|
|
51
|
-
...props
|
|
52
|
-
}, fref) => {
|
|
53
|
-
const ref = React.useRef(new THREE.Group());
|
|
54
|
-
const spriteData = React.useRef(null);
|
|
55
|
-
const matRef = React.useRef(null);
|
|
56
|
-
const spriteRef = React.useRef(null);
|
|
57
|
-
const timerOffset = React.useRef(window.performance.now());
|
|
58
|
-
const currentFrame = React.useRef(startFrame);
|
|
59
|
-
const currentFrameName = React.useRef(frameName);
|
|
60
|
-
const fpsInterval = fps > 0 ? 1000 / fps : 0;
|
|
61
|
-
const [spriteTexture, setSpriteTexture] = React.useState(new THREE.Texture());
|
|
62
|
-
const totalFrames = React.useRef(0);
|
|
63
|
-
const [aspect, setAspect] = React.useState(new THREE.Vector3(1, 1, 1));
|
|
64
|
-
const flipOffset = flipX ? -1 : 1;
|
|
65
|
-
const pauseRef = React.useRef(pause);
|
|
66
|
-
const pos = React.useRef(offset);
|
|
67
|
-
const softEnd = React.useRef(false);
|
|
68
|
-
const {
|
|
69
|
-
spriteObj,
|
|
70
|
-
loadJsonAndTexture
|
|
71
|
-
} = useSpriteLoader(null, null, animationNames, numberOfFrames, undefined, canvasRenderingContext2DSettings);
|
|
72
|
-
const frameNameRef = React.useRef(frameName);
|
|
73
|
-
|
|
74
|
-
// lite version for pre-loaded assets
|
|
75
|
-
const parseSpriteDataLite = React.useCallback((textureData, data) => {
|
|
76
|
-
if (data === null) {
|
|
77
|
-
if (numberOfFrames) {
|
|
78
|
-
//get size from texture
|
|
79
|
-
|
|
80
|
-
totalFrames.current = numberOfFrames;
|
|
81
|
-
if (playBackwards) {
|
|
82
|
-
currentFrame.current = numberOfFrames - 1;
|
|
83
|
-
}
|
|
84
|
-
spriteData.current = data;
|
|
85
|
-
}
|
|
86
|
-
} else {
|
|
87
|
-
var _spriteData$current$f, _spriteData$current;
|
|
88
|
-
spriteData.current = data;
|
|
89
|
-
if (spriteData.current && Array.isArray(spriteData.current.frames)) {
|
|
90
|
-
totalFrames.current = spriteData.current.frames.length;
|
|
91
|
-
} else if (spriteData.current && typeof spriteData.current === 'object' && frameNameRef.current) {
|
|
92
|
-
totalFrames.current = spriteData.current.frames[frameNameRef.current].length;
|
|
93
|
-
} else {
|
|
94
|
-
totalFrames.current = 0;
|
|
95
|
-
}
|
|
96
|
-
if (playBackwards) {
|
|
97
|
-
currentFrame.current = totalFrames.current - 1;
|
|
98
|
-
}
|
|
99
|
-
const {
|
|
100
|
-
w,
|
|
101
|
-
h
|
|
102
|
-
} = getFirstFrame((_spriteData$current$f = (_spriteData$current = spriteData.current) == null ? void 0 : _spriteData$current.frames) !== null && _spriteData$current$f !== void 0 ? _spriteData$current$f : [], frameNameRef.current).sourceSize;
|
|
103
|
-
const aspect = calculateAspectRatio(w, h);
|
|
104
|
-
setAspect(aspect);
|
|
105
|
-
if (matRef.current) {
|
|
106
|
-
matRef.current.map = textureData;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
setSpriteTexture(textureData);
|
|
110
|
-
}, [numberOfFrames, playBackwards]);
|
|
111
|
-
|
|
112
|
-
// modify the sprite material after json is parsed and state updated
|
|
113
|
-
const modifySpritePosition = React.useCallback(() => {
|
|
114
|
-
if (!spriteData.current) return;
|
|
115
|
-
const {
|
|
116
|
-
meta: {
|
|
117
|
-
size: metaInfo
|
|
118
|
-
},
|
|
119
|
-
frames
|
|
120
|
-
} = spriteData.current;
|
|
121
|
-
const {
|
|
122
|
-
w: frameW,
|
|
123
|
-
h: frameH
|
|
124
|
-
} = Array.isArray(frames) ? frames[0].sourceSize : frameName ? frames[frameName] ? frames[frameName][0].sourceSize : {
|
|
125
|
-
w: 0,
|
|
126
|
-
h: 0
|
|
127
|
-
} : {
|
|
128
|
-
w: 0,
|
|
129
|
-
h: 0
|
|
130
|
-
};
|
|
131
|
-
if (matRef.current && matRef.current.map) {
|
|
132
|
-
matRef.current.map.wrapS = matRef.current.map.wrapT = THREE.RepeatWrapping;
|
|
133
|
-
matRef.current.map.center.set(0, 0);
|
|
134
|
-
matRef.current.map.repeat.set(1 * flipOffset / (metaInfo.w / frameW), 1 / (metaInfo.h / frameH));
|
|
135
|
-
}
|
|
136
|
-
//const framesH = (metaInfo.w - 1) / frameW
|
|
137
|
-
const framesV = (metaInfo.h - 1) / frameH;
|
|
138
|
-
const frameOffsetY = 1 / framesV;
|
|
139
|
-
if (matRef.current && matRef.current.map) {
|
|
140
|
-
matRef.current.map.offset.x = 0.0; //-matRef.current.map.repeat.x
|
|
141
|
-
matRef.current.map.offset.y = 1 - frameOffsetY;
|
|
142
|
-
}
|
|
143
|
-
if (onStart) {
|
|
144
|
-
onStart({
|
|
145
|
-
currentFrameName: frameName !== null && frameName !== void 0 ? frameName : '',
|
|
146
|
-
currentFrame: currentFrame.current
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
}, [flipOffset, frameName, onStart]);
|
|
150
|
-
const state = React.useMemo(() => ({
|
|
151
|
-
current: pos.current,
|
|
152
|
-
offset: pos.current,
|
|
153
|
-
imageUrl: textureImageURL,
|
|
154
|
-
hasEnded: false,
|
|
155
|
-
ref: fref
|
|
156
|
-
}), [textureImageURL, fref]);
|
|
157
|
-
React.useImperativeHandle(fref, () => ref.current, []);
|
|
158
|
-
React.useLayoutEffect(() => {
|
|
159
|
-
pos.current = offset;
|
|
160
|
-
}, [offset]);
|
|
161
|
-
const calculateAspectRatio = (width, height) => {
|
|
162
|
-
var _spriteRef$current;
|
|
163
|
-
const ret = new THREE.Vector3();
|
|
164
|
-
const aspectRatio = height / width;
|
|
165
|
-
ret.set(1, aspectRatio, 1);
|
|
166
|
-
(_spriteRef$current = spriteRef.current) == null || _spriteRef$current.scale.copy(ret);
|
|
167
|
-
return ret;
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
// initial loads
|
|
171
|
-
React.useEffect(() => {
|
|
172
|
-
if (spriteDataset) {
|
|
173
|
-
var _spriteDataset$sprite;
|
|
174
|
-
parseSpriteDataLite(spriteDataset == null || (_spriteDataset$sprite = spriteDataset.spriteTexture) == null ? void 0 : _spriteDataset$sprite.clone(), spriteDataset.spriteData);
|
|
175
|
-
} else {
|
|
176
|
-
if (textureImageURL && textureDataURL) {
|
|
177
|
-
loadJsonAndTexture(textureImageURL, textureDataURL);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}, [loadJsonAndTexture, spriteDataset, textureDataURL, textureImageURL, parseSpriteDataLite]);
|
|
181
|
-
React.useEffect(() => {
|
|
182
|
-
if (spriteObj) {
|
|
183
|
-
var _spriteObj$spriteText;
|
|
184
|
-
parseSpriteDataLite(spriteObj == null || (_spriteObj$spriteText = spriteObj.spriteTexture) == null ? void 0 : _spriteObj$spriteText.clone(), spriteObj == null ? void 0 : spriteObj.spriteData);
|
|
185
|
-
}
|
|
186
|
-
}, [spriteObj, parseSpriteDataLite]);
|
|
187
|
-
|
|
188
|
-
// support backwards play
|
|
189
|
-
React.useEffect(() => {
|
|
190
|
-
state.hasEnded = false;
|
|
191
|
-
if (spriteData.current && playBackwards === true) {
|
|
192
|
-
var _ref;
|
|
193
|
-
currentFrame.current = ((_ref = spriteData.current.frames.length) !== null && _ref !== void 0 ? _ref : 0) - 1;
|
|
194
|
-
} else {
|
|
195
|
-
currentFrame.current = 0;
|
|
196
|
-
}
|
|
197
|
-
}, [playBackwards, state]);
|
|
198
|
-
React.useLayoutEffect(() => {
|
|
199
|
-
modifySpritePosition();
|
|
200
|
-
}, [spriteTexture, flipX, modifySpritePosition]);
|
|
201
|
-
React.useEffect(() => {
|
|
202
|
-
if (autoPlay) {
|
|
203
|
-
pauseRef.current = false;
|
|
204
|
-
}
|
|
205
|
-
}, [autoPlay]);
|
|
206
|
-
React.useLayoutEffect(() => {
|
|
207
|
-
if (currentFrameName.current !== frameName && frameName) {
|
|
208
|
-
currentFrame.current = 0;
|
|
209
|
-
currentFrameName.current = frameName;
|
|
210
|
-
state.hasEnded = false;
|
|
211
|
-
if (fpsInterval <= 0) {
|
|
212
|
-
currentFrame.current = endFrame || startFrame || 0;
|
|
213
|
-
}
|
|
214
|
-
// modifySpritePosition()
|
|
215
|
-
if (spriteData.current) {
|
|
216
|
-
const {
|
|
217
|
-
w,
|
|
218
|
-
h
|
|
219
|
-
} = getFirstFrame(spriteData.current.frames, frameName).sourceSize;
|
|
220
|
-
const _aspect = calculateAspectRatio(w, h);
|
|
221
|
-
setAspect(_aspect);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
}, [frameName, fpsInterval, state, endFrame, startFrame]);
|
|
225
|
-
|
|
226
|
-
// run the animation on each frame
|
|
227
|
-
const runAnimation = () => {
|
|
228
|
-
if (!isSpriteData(spriteData.current)) return;
|
|
229
|
-
const {
|
|
230
|
-
meta: {
|
|
231
|
-
size: metaInfo
|
|
232
|
-
},
|
|
233
|
-
frames
|
|
234
|
-
} = spriteData.current;
|
|
235
|
-
const {
|
|
236
|
-
w: frameW,
|
|
237
|
-
h: frameH
|
|
238
|
-
} = getFirstFrame(frames, frameName).sourceSize;
|
|
239
|
-
const spriteFrames = Array.isArray(frames) ? frames : frameName ? frames[frameName] : [];
|
|
240
|
-
const _endFrame = endFrame || spriteFrames.length - 1;
|
|
241
|
-
var _offset = offset === undefined ? state.current : offset;
|
|
242
|
-
if (fpsInterval <= 0) {
|
|
243
|
-
currentFrame.current = endFrame || startFrame || 0;
|
|
244
|
-
calculateFinalPosition(frameW, frameH, metaInfo, spriteFrames);
|
|
245
|
-
return;
|
|
246
|
-
}
|
|
247
|
-
const now = window.performance.now();
|
|
248
|
-
const diff = now - timerOffset.current;
|
|
249
|
-
if (diff <= fpsInterval) return;
|
|
250
|
-
|
|
251
|
-
// conditionals to support backwards play
|
|
252
|
-
var endCondition = playBackwards ? currentFrame.current < 0 : currentFrame.current > _endFrame;
|
|
253
|
-
var onStartCondition = playBackwards ? currentFrame.current === _endFrame : currentFrame.current === 0;
|
|
254
|
-
var manualProgressEndCondition = playBackwards ? currentFrame.current < 0 : currentFrame.current >= _endFrame;
|
|
255
|
-
if (endCondition) {
|
|
256
|
-
currentFrame.current = loop ? startFrame !== null && startFrame !== void 0 ? startFrame : 0 : 0;
|
|
257
|
-
if (playBackwards) {
|
|
258
|
-
currentFrame.current = _endFrame;
|
|
259
|
-
}
|
|
260
|
-
if (loop) {
|
|
261
|
-
onLoopEnd == null || onLoopEnd({
|
|
262
|
-
currentFrameName: frameName !== null && frameName !== void 0 ? frameName : '',
|
|
263
|
-
currentFrame: currentFrame.current
|
|
264
|
-
});
|
|
265
|
-
} else {
|
|
266
|
-
onEnd == null || onEnd({
|
|
267
|
-
currentFrameName: frameName !== null && frameName !== void 0 ? frameName : '',
|
|
268
|
-
currentFrame: currentFrame.current
|
|
269
|
-
});
|
|
270
|
-
state.hasEnded = !resetOnEnd;
|
|
271
|
-
if (resetOnEnd) {
|
|
272
|
-
pauseRef.current = true;
|
|
273
|
-
//calculateFinalPosition(frameW, frameH, metaInfo, spriteFrames)
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
if (!loop) return;
|
|
277
|
-
} else if (onStartCondition) {
|
|
278
|
-
onStart == null || onStart({
|
|
279
|
-
currentFrameName: frameName !== null && frameName !== void 0 ? frameName : '',
|
|
280
|
-
currentFrame: currentFrame.current
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
// for manual update
|
|
285
|
-
if (_offset !== undefined && manualProgressEndCondition) {
|
|
286
|
-
if (softEnd.current === false) {
|
|
287
|
-
onEnd == null || onEnd({
|
|
288
|
-
currentFrameName: frameName !== null && frameName !== void 0 ? frameName : '',
|
|
289
|
-
currentFrame: currentFrame.current
|
|
290
|
-
});
|
|
291
|
-
softEnd.current = true;
|
|
292
|
-
}
|
|
293
|
-
} else {
|
|
294
|
-
// same for start?
|
|
295
|
-
softEnd.current = false;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
// clock to limit fps
|
|
299
|
-
if (diff <= fpsInterval) return;
|
|
300
|
-
timerOffset.current = now - diff % fpsInterval;
|
|
301
|
-
calculateFinalPosition(frameW, frameH, metaInfo, spriteFrames);
|
|
302
|
-
};
|
|
303
|
-
const calculateFinalPosition = (frameW, frameH, metaInfo, spriteFrames) => {
|
|
304
|
-
// get the manual update offset to find the next frame
|
|
305
|
-
var _offset = offset === undefined ? state.current : offset;
|
|
306
|
-
const targetFrame = currentFrame.current;
|
|
307
|
-
let finalValX = 0;
|
|
308
|
-
let finalValY = 0;
|
|
309
|
-
calculateAspectRatio(frameW, frameH);
|
|
310
|
-
const framesH = roundFramePosition ? Math.round((metaInfo.w - 1) / frameW) : (metaInfo.w - 1) / frameW;
|
|
311
|
-
const framesV = roundFramePosition ? Math.round((metaInfo.h - 1) / frameH) : (metaInfo.h - 1) / frameH;
|
|
312
|
-
if (!spriteFrames[targetFrame]) {
|
|
313
|
-
return;
|
|
314
|
-
}
|
|
315
|
-
const {
|
|
316
|
-
frame: {
|
|
317
|
-
x: frameX,
|
|
318
|
-
y: frameY
|
|
319
|
-
},
|
|
320
|
-
sourceSize: {
|
|
321
|
-
w: originalSizeX,
|
|
322
|
-
h: originalSizeY
|
|
323
|
-
}
|
|
324
|
-
} = spriteFrames[targetFrame];
|
|
325
|
-
const frameOffsetX = 1 / framesH;
|
|
326
|
-
const frameOffsetY = 1 / framesV;
|
|
327
|
-
if (matRef.current && matRef.current.map) {
|
|
328
|
-
finalValX = flipOffset > 0 ? frameOffsetX * (frameX / originalSizeX) : frameOffsetX * (frameX / originalSizeX) - matRef.current.map.repeat.x;
|
|
329
|
-
finalValY = Math.abs(1 - frameOffsetY) - frameOffsetY * (frameY / originalSizeY);
|
|
330
|
-
matRef.current.map.offset.x = finalValX;
|
|
331
|
-
matRef.current.map.offset.y = finalValY;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
// if manual update is active
|
|
335
|
-
if (_offset !== undefined && _offset !== null) {
|
|
336
|
-
// Calculate the frame index, based on offset given from the provider
|
|
337
|
-
let frameIndex = Math.floor(_offset * spriteFrames.length);
|
|
338
|
-
|
|
339
|
-
// Ensure the frame index is within the valid range
|
|
340
|
-
frameIndex = Math.max(0, Math.min(frameIndex, spriteFrames.length - 1));
|
|
341
|
-
if (isNaN(frameIndex)) {
|
|
342
|
-
frameIndex = 0; //fallback
|
|
343
|
-
}
|
|
344
|
-
currentFrame.current = frameIndex;
|
|
345
|
-
} else {
|
|
346
|
-
// auto update
|
|
347
|
-
if (playBackwards) {
|
|
348
|
-
currentFrame.current -= 1;
|
|
349
|
-
} else {
|
|
350
|
-
currentFrame.current += 1;
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
};
|
|
354
|
-
|
|
355
|
-
// *** Warning! It runs on every frame! ***
|
|
356
|
-
useFrame((_state, _delta) => {
|
|
357
|
-
var _spriteData$current2, _matRef$current;
|
|
358
|
-
if (!((_spriteData$current2 = spriteData.current) != null && _spriteData$current2.frames) || !((_matRef$current = matRef.current) != null && _matRef$current.map)) {
|
|
359
|
-
return;
|
|
360
|
-
}
|
|
361
|
-
if (pauseRef.current) {
|
|
362
|
-
return;
|
|
363
|
-
}
|
|
364
|
-
if (!state.hasEnded && (autoPlay || play)) {
|
|
365
|
-
runAnimation();
|
|
366
|
-
onFrame == null || onFrame({
|
|
367
|
-
currentFrameName: currentFrameName.current,
|
|
368
|
-
currentFrame: currentFrame.current
|
|
369
|
-
});
|
|
370
|
-
}
|
|
371
|
-
});
|
|
372
|
-
function multiplyScale(initialScale = new THREE.Vector3(1, 1, 1), newScale = 1) {
|
|
373
|
-
if (typeof newScale === 'number') return initialScale.multiplyScalar(newScale);
|
|
374
|
-
if (Array.isArray(newScale)) return initialScale.multiply(new THREE.Vector3(...newScale));
|
|
375
|
-
if (newScale instanceof THREE.Vector3) return initialScale.multiply(newScale);
|
|
376
|
-
}
|
|
377
|
-
return /*#__PURE__*/React.createElement("group", _extends({}, props, {
|
|
378
|
-
ref: ref,
|
|
379
|
-
scale: multiplyScale(aspect, props.scale)
|
|
380
|
-
}), /*#__PURE__*/React.createElement(context.Provider, {
|
|
381
|
-
value: state
|
|
382
|
-
}, asSprite && /*#__PURE__*/React.createElement(Billboard, null, /*#__PURE__*/React.createElement("mesh", _extends({
|
|
383
|
-
ref: spriteRef,
|
|
384
|
-
scale: 1.0,
|
|
385
|
-
geometry: geometry
|
|
386
|
-
}, meshProps), /*#__PURE__*/React.createElement("meshBasicMaterial", {
|
|
387
|
-
premultipliedAlpha: false,
|
|
388
|
-
toneMapped: false,
|
|
389
|
-
side: THREE.DoubleSide,
|
|
390
|
-
ref: matRef,
|
|
391
|
-
map: spriteTexture,
|
|
392
|
-
transparent: true,
|
|
393
|
-
alphaTest: alphaTest !== null && alphaTest !== void 0 ? alphaTest : 0.0
|
|
394
|
-
}))), !asSprite && /*#__PURE__*/React.createElement(Instances, _extends({
|
|
395
|
-
geometry: geometry,
|
|
396
|
-
limit: maxItems !== null && maxItems !== void 0 ? maxItems : 1
|
|
397
|
-
}, meshProps), /*#__PURE__*/React.createElement("meshBasicMaterial", {
|
|
398
|
-
premultipliedAlpha: false,
|
|
399
|
-
toneMapped: false,
|
|
400
|
-
side: THREE.DoubleSide,
|
|
401
|
-
ref: matRef,
|
|
402
|
-
map: spriteTexture,
|
|
403
|
-
transparent: true,
|
|
404
|
-
alphaTest: alphaTest !== null && alphaTest !== void 0 ? alphaTest : 0.0
|
|
405
|
-
}), (instanceItems !== null && instanceItems !== void 0 ? instanceItems : [0]).map((item, index) => /*#__PURE__*/React.createElement(Instance, _extends({
|
|
406
|
-
key: index,
|
|
407
|
-
ref: (instanceItems == null ? void 0 : instanceItems.length) === 1 ? spriteRef : null,
|
|
408
|
-
position: item,
|
|
409
|
-
scale: 1.0
|
|
410
|
-
}, meshProps)))), children));
|
|
411
|
-
});
|
|
412
|
-
|
|
413
|
-
export { SpriteAnimator, useSpriteAnimator };
|
package/core/Stage.cjs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/extends"),t=require("react"),i=require("./Environment.cjs.js"),n=require("./ContactShadows.cjs.js"),r=require("./Center.cjs.js"),a=require("./AccumulativeShadows.cjs.js"),s=require("./Bounds.cjs.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function u(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(i){if("default"!==i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}})),t.default=e,Object.freeze(t)}require("@react-three/fiber"),require("three"),require("three-stdlib"),require("./useEnvironment.cjs.js"),require("@monogrid/gainmap-js"),require("../helpers/environment-assets.cjs.js"),require("./shaderMaterial.cjs.js"),require("../materials/DiscardMaterial.cjs.js"),require("../helpers/constants.cjs.js");var o=l(e),c=u(t);const d={rembrandt:{main:[1,2,1],fill:[-2,-.5,-2]},portrait:{main:[-1,2,.5],fill:[-1,.5,-1.5]},upfront:{main:[0,2,1],fill:[-1,.5,-1.5]},soft:{main:[-2,4,4],fill:[-1,.5,-1.5]}};function m({radius:e,adjustCamera:t}){const i=s.useBounds();return c.useEffect((()=>{t&&i.refresh().clip().fit()}),[e,t]),null}exports.Stage=function({children:e,center:t,adjustCamera:l=!0,intensity:u=.5,shadows:f="contact",environment:p="city",preset:h="rembrandt",...j}){var v,b,g,y,E,q,w,C;const S="string"==typeof h?d[h]:h,[{radius:O,height:z},B]=c.useState({radius:0,width:0,height:0,depth:0}),M=null!==(v=null==f?void 0:f.bias)&&void 0!==v?v:-1e-4,L=null!==(b=null==f?void 0:f.normalBias)&&void 0!==b?b:0,_=null!==(g=null==f?void 0:f.size)&&void 0!==g?g:1024,x=null!==(y=null==f?void 0:f.offset)&&void 0!==y?y:0,P="contact"===f||"contact"===(null==f?void 0:f.type),k="accumulative"===f||"accumulative"===(null==f?void 0:f.type),A={..."object"==typeof f?f:{}},D=p?"string"==typeof p?{preset:p}:p:null,F=c.useCallback((e=>{const{width:i,height:n,depth:r,boundingSphere:a}=e;B({radius:a.radius,width:i,height:n,depth:r}),null!=t&&t.onCentered&&t.onCentered(e)}),[]);return c.createElement(c.Fragment,null,c.createElement("ambientLight",{intensity:u/3}),c.createElement("spotLight",{penumbra:1,position:[S.main[0]*O,S.main[1]*O,S.main[2]*O],intensity:2*u,castShadow:!!f,"shadow-bias":M,"shadow-normalBias":L,"shadow-mapSize":_}),c.createElement("pointLight",{position:[S.fill[0]*O,S.fill[1]*O,S.fill[2]*O],intensity:u}),c.createElement(s.Bounds,o.default({fit:!!l,clip:!!l,margin:Number(l),observe:!0},j),c.createElement(m,{radius:O,adjustCamera:l}),c.createElement(r.Center,o.default({},t,{position:[0,x/2,0],onCentered:F}),e)),c.createElement("group",{position:[0,-z/2-x/2,0]},P&&c.createElement(n.ContactShadows,o.default({scale:4*O,far:O,blur:2},A)),k&&c.createElement(a.AccumulativeShadows,o.default({temporal:!0,frames:100,alphaTest:.9,toneMapped:!0,scale:4*O},A),c.createElement(a.RandomizedLight,{amount:null!==(E=A.amount)&&void 0!==E?E:8,radius:null!==(q=A.radius)&&void 0!==q?q:O,ambient:null!==(w=A.ambient)&&void 0!==w?w:.5,intensity:null!==(C=A.intensity)&&void 0!==C?C:1,position:[S.main[0]*O,S.main[1]*O,S.main[2]*O],size:4*O,bias:-M,mapSize:_}))),p&&c.createElement(i.Environment,D))};
|
package/core/Stage.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { EnvironmentProps } from './Environment';
|
|
3
|
-
import { ContactShadowsProps } from './ContactShadows';
|
|
4
|
-
import { CenterProps } from './Center';
|
|
5
|
-
import { AccumulativeShadowsProps, RandomizedLightProps } from './AccumulativeShadows';
|
|
6
|
-
import { PresetsType } from '../helpers/environment-assets';
|
|
7
|
-
import { ThreeElements } from '@react-three/fiber';
|
|
8
|
-
type StageShadows = Partial<AccumulativeShadowsProps> & Partial<RandomizedLightProps> & Partial<ContactShadowsProps> & {
|
|
9
|
-
type: 'contact' | 'accumulative';
|
|
10
|
-
offset?: number;
|
|
11
|
-
bias?: number;
|
|
12
|
-
normalBias?: number;
|
|
13
|
-
size?: number;
|
|
14
|
-
};
|
|
15
|
-
export type StageProps = Omit<ThreeElements['group'], 'ref'> & {
|
|
16
|
-
preset?: 'rembrandt' | 'portrait' | 'upfront' | 'soft' | {
|
|
17
|
-
main: [x: number, y: number, z: number];
|
|
18
|
-
fill: [x: number, y: number, z: number];
|
|
19
|
-
};
|
|
20
|
-
shadows?: boolean | 'contact' | 'accumulative' | StageShadows;
|
|
21
|
-
adjustCamera?: boolean | number;
|
|
22
|
-
environment?: PresetsType | Partial<EnvironmentProps> | null;
|
|
23
|
-
intensity?: number;
|
|
24
|
-
center?: Partial<CenterProps>;
|
|
25
|
-
};
|
|
26
|
-
export declare function Stage({ children, center, adjustCamera, intensity, shadows, environment, preset, ...props }: StageProps): React.JSX.Element;
|
|
27
|
-
export {};
|
package/core/Stage.js
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import _extends from '@babel/runtime/helpers/esm/extends';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { Environment } from './Environment.js';
|
|
4
|
-
import { ContactShadows } from './ContactShadows.js';
|
|
5
|
-
import { Center } from './Center.js';
|
|
6
|
-
import { AccumulativeShadows, RandomizedLight } from './AccumulativeShadows.js';
|
|
7
|
-
import { Bounds, useBounds } from './Bounds.js';
|
|
8
|
-
|
|
9
|
-
const presets = {
|
|
10
|
-
rembrandt: {
|
|
11
|
-
main: [1, 2, 1],
|
|
12
|
-
fill: [-2, -0.5, -2]
|
|
13
|
-
},
|
|
14
|
-
portrait: {
|
|
15
|
-
main: [-1, 2, 0.5],
|
|
16
|
-
fill: [-1, 0.5, -1.5]
|
|
17
|
-
},
|
|
18
|
-
upfront: {
|
|
19
|
-
main: [0, 2, 1],
|
|
20
|
-
fill: [-1, 0.5, -1.5]
|
|
21
|
-
},
|
|
22
|
-
soft: {
|
|
23
|
-
main: [-2, 4, 4],
|
|
24
|
-
fill: [-1, 0.5, -1.5]
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
function Refit({
|
|
28
|
-
radius,
|
|
29
|
-
adjustCamera
|
|
30
|
-
}) {
|
|
31
|
-
const api = useBounds();
|
|
32
|
-
React.useEffect(() => {
|
|
33
|
-
if (adjustCamera) api.refresh().clip().fit();
|
|
34
|
-
}, [radius, adjustCamera]);
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
37
|
-
function Stage({
|
|
38
|
-
children,
|
|
39
|
-
center,
|
|
40
|
-
adjustCamera = true,
|
|
41
|
-
intensity = 0.5,
|
|
42
|
-
shadows = 'contact',
|
|
43
|
-
environment = 'city',
|
|
44
|
-
preset = 'rembrandt',
|
|
45
|
-
...props
|
|
46
|
-
}) {
|
|
47
|
-
var _bias, _normalBias, _size, _offset, _amount, _radius, _ambient, _intensity;
|
|
48
|
-
const config = typeof preset === 'string' ? presets[preset] : preset;
|
|
49
|
-
const [{
|
|
50
|
-
radius,
|
|
51
|
-
height
|
|
52
|
-
}, set] = React.useState({
|
|
53
|
-
radius: 0,
|
|
54
|
-
width: 0,
|
|
55
|
-
height: 0,
|
|
56
|
-
depth: 0
|
|
57
|
-
});
|
|
58
|
-
const shadowBias = (_bias = shadows == null ? void 0 : shadows.bias) !== null && _bias !== void 0 ? _bias : -0.0001;
|
|
59
|
-
const normalBias = (_normalBias = shadows == null ? void 0 : shadows.normalBias) !== null && _normalBias !== void 0 ? _normalBias : 0;
|
|
60
|
-
const shadowSize = (_size = shadows == null ? void 0 : shadows.size) !== null && _size !== void 0 ? _size : 1024;
|
|
61
|
-
const shadowOffset = (_offset = shadows == null ? void 0 : shadows.offset) !== null && _offset !== void 0 ? _offset : 0;
|
|
62
|
-
const contactShadow = shadows === 'contact' || (shadows == null ? void 0 : shadows.type) === 'contact';
|
|
63
|
-
const accumulativeShadow = shadows === 'accumulative' || (shadows == null ? void 0 : shadows.type) === 'accumulative';
|
|
64
|
-
const shadowSpread = {
|
|
65
|
-
...(typeof shadows === 'object' ? shadows : {})
|
|
66
|
-
};
|
|
67
|
-
const environmentProps = !environment ? null : typeof environment === 'string' ? {
|
|
68
|
-
preset: environment
|
|
69
|
-
} : environment;
|
|
70
|
-
const onCentered = React.useCallback(props => {
|
|
71
|
-
const {
|
|
72
|
-
width,
|
|
73
|
-
height,
|
|
74
|
-
depth,
|
|
75
|
-
boundingSphere
|
|
76
|
-
} = props;
|
|
77
|
-
set({
|
|
78
|
-
radius: boundingSphere.radius,
|
|
79
|
-
width,
|
|
80
|
-
height,
|
|
81
|
-
depth
|
|
82
|
-
});
|
|
83
|
-
if (center != null && center.onCentered) center.onCentered(props);
|
|
84
|
-
}, []);
|
|
85
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("ambientLight", {
|
|
86
|
-
intensity: intensity / 3
|
|
87
|
-
}), /*#__PURE__*/React.createElement("spotLight", {
|
|
88
|
-
penumbra: 1,
|
|
89
|
-
position: [config.main[0] * radius, config.main[1] * radius, config.main[2] * radius],
|
|
90
|
-
intensity: intensity * 2,
|
|
91
|
-
castShadow: !!shadows,
|
|
92
|
-
"shadow-bias": shadowBias,
|
|
93
|
-
"shadow-normalBias": normalBias,
|
|
94
|
-
"shadow-mapSize": shadowSize
|
|
95
|
-
}), /*#__PURE__*/React.createElement("pointLight", {
|
|
96
|
-
position: [config.fill[0] * radius, config.fill[1] * radius, config.fill[2] * radius],
|
|
97
|
-
intensity: intensity
|
|
98
|
-
}), /*#__PURE__*/React.createElement(Bounds, _extends({
|
|
99
|
-
fit: !!adjustCamera,
|
|
100
|
-
clip: !!adjustCamera,
|
|
101
|
-
margin: Number(adjustCamera),
|
|
102
|
-
observe: true
|
|
103
|
-
}, props), /*#__PURE__*/React.createElement(Refit, {
|
|
104
|
-
radius: radius,
|
|
105
|
-
adjustCamera: adjustCamera
|
|
106
|
-
}), /*#__PURE__*/React.createElement(Center, _extends({}, center, {
|
|
107
|
-
position: [0, shadowOffset / 2, 0],
|
|
108
|
-
onCentered: onCentered
|
|
109
|
-
}), children)), /*#__PURE__*/React.createElement("group", {
|
|
110
|
-
position: [0, -height / 2 - shadowOffset / 2, 0]
|
|
111
|
-
}, contactShadow && /*#__PURE__*/React.createElement(ContactShadows, _extends({
|
|
112
|
-
scale: radius * 4,
|
|
113
|
-
far: radius,
|
|
114
|
-
blur: 2
|
|
115
|
-
}, shadowSpread)), accumulativeShadow && /*#__PURE__*/React.createElement(AccumulativeShadows, _extends({
|
|
116
|
-
temporal: true,
|
|
117
|
-
frames: 100,
|
|
118
|
-
alphaTest: 0.9,
|
|
119
|
-
toneMapped: true,
|
|
120
|
-
scale: radius * 4
|
|
121
|
-
}, shadowSpread), /*#__PURE__*/React.createElement(RandomizedLight, {
|
|
122
|
-
amount: (_amount = shadowSpread.amount) !== null && _amount !== void 0 ? _amount : 8,
|
|
123
|
-
radius: (_radius = shadowSpread.radius) !== null && _radius !== void 0 ? _radius : radius,
|
|
124
|
-
ambient: (_ambient = shadowSpread.ambient) !== null && _ambient !== void 0 ? _ambient : 0.5,
|
|
125
|
-
intensity: (_intensity = shadowSpread.intensity) !== null && _intensity !== void 0 ? _intensity : 1,
|
|
126
|
-
position: [config.main[0] * radius, config.main[1] * radius, config.main[2] * radius],
|
|
127
|
-
size: radius * 4,
|
|
128
|
-
bias: -shadowBias,
|
|
129
|
-
mapSize: shadowSize
|
|
130
|
-
}))), environment && /*#__PURE__*/React.createElement(Environment, environmentProps));
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export { Stage };
|
package/core/Stars.cjs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@react-three/fiber"),r=require("three"),n=require("../helpers/constants.cjs.js");function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var o=a(e);class i extends r.ShaderMaterial{constructor(){super({uniforms:{time:{value:0},fade:{value:1}},vertexShader:"\n uniform float time;\n attribute float size;\n varying vec3 vColor;\n void main() {\n vColor = color;\n vec4 mvPosition = modelViewMatrix * vec4(position, 0.5);\n gl_PointSize = size * (30.0 / -mvPosition.z) * (3.0 + sin(time + 100.0));\n gl_Position = projectionMatrix * mvPosition;\n }",fragmentShader:`\n uniform sampler2D pointTexture;\n uniform float fade;\n varying vec3 vColor;\n void main() {\n float opacity = 1.0;\n if (fade == 1.0) {\n float d = distance(gl_PointCoord, vec2(0.5, 0.5));\n opacity = 1.0 / (1.0 + exp(16.0 * (d - 0.25)));\n }\n gl_FragColor = vec4(vColor, opacity);\n\n #include <tonemapping_fragment>\n\t #include <${n.version>=154?"colorspace_fragment":"encodings_fragment"}>\n }`})}}const c=e=>(new r.Vector3).setFromSpherical(new r.Spherical(e,Math.acos(1-2*Math.random()),2*Math.random()*Math.PI)),s=o.forwardRef((({radius:e=100,depth:n=50,count:a=5e3,saturation:s=0,factor:l=4,fade:u=!1,speed:f=1},m)=>{const d=o.useRef(null),[p,v,h]=o.useMemo((()=>{const t=[],o=[],i=Array.from({length:a},(()=>(.5+.5*Math.random())*l)),u=new r.Color;let f=e+n;const m=n/a;for(let e=0;e<a;e++)f-=m*Math.random(),t.push(...c(f).toArray()),u.setHSL(e/a,s,.9),o.push(u.r,u.g,u.b);return[new Float32Array(t),new Float32Array(o),new Float32Array(i)]}),[a,n,l,e,s]);t.useFrame((e=>d.current&&(d.current.uniforms.time.value=e.clock.elapsedTime*f)));const[g]=o.useState((()=>new i));return o.createElement("points",{ref:m},o.createElement("bufferGeometry",null,o.createElement("bufferAttribute",{attach:"attributes-position",args:[p,3]}),o.createElement("bufferAttribute",{attach:"attributes-color",args:[v,3]}),o.createElement("bufferAttribute",{attach:"attributes-size",args:[h,1]})),o.createElement("primitive",{ref:d,object:g,attach:"material",blending:r.AdditiveBlending,"uniforms-fade-value":u,depthWrite:!1,transparent:!0,vertexColors:!0}))}));exports.Stars=s;
|
package/core/Stars.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ThreeElement } from '@react-three/fiber';
|
|
2
|
-
import { Points, ShaderMaterial } from 'three';
|
|
3
|
-
import { ForwardRefComponent } from '../helpers/ts-utils';
|
|
4
|
-
export type StarsProps = {
|
|
5
|
-
radius?: number;
|
|
6
|
-
depth?: number;
|
|
7
|
-
count?: number;
|
|
8
|
-
factor?: number;
|
|
9
|
-
saturation?: number;
|
|
10
|
-
fade?: boolean;
|
|
11
|
-
speed?: number;
|
|
12
|
-
};
|
|
13
|
-
declare class StarfieldMaterial extends ShaderMaterial {
|
|
14
|
-
constructor();
|
|
15
|
-
}
|
|
16
|
-
declare module '@react-three/fiber' {
|
|
17
|
-
interface ThreeElements {
|
|
18
|
-
starfieldMaterial: ThreeElement<typeof StarfieldMaterial>;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
export declare const Stars: ForwardRefComponent<StarsProps, Points>;
|
|
22
|
-
export {};
|