@react-three/drei 10.7.7 → 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/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './web';
|
package/index.js
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
export { Html } from './web/Html.js';
|
|
2
|
-
export { CycleRaycast } from './web/CycleRaycast.js';
|
|
3
|
-
export { useCursor } from './web/useCursor.js';
|
|
4
|
-
export { Loader } from './web/Loader.js';
|
|
5
|
-
export { DragControls } from './web/DragControls.js';
|
|
6
|
-
export { Scroll, ScrollControls, useScroll } from './web/ScrollControls.js';
|
|
7
|
-
export { PresentationControls } from './web/PresentationControls.js';
|
|
8
|
-
export { KeyboardControls, useKeyboardControls } from './web/KeyboardControls.js';
|
|
9
|
-
export { Select, useSelect } from './web/Select.js';
|
|
10
|
-
export { Billboard } from './core/Billboard.js';
|
|
11
|
-
export { ScreenSpace } from './core/ScreenSpace.js';
|
|
12
|
-
export { ScreenSizer } from './core/ScreenSizer.js';
|
|
13
|
-
export { QuadraticBezierLine } from './core/QuadraticBezierLine.js';
|
|
14
|
-
export { CubicBezierLine } from './core/CubicBezierLine.js';
|
|
15
|
-
export { CatmullRomLine } from './core/CatmullRomLine.js';
|
|
16
|
-
export { Line } from './core/Line.js';
|
|
17
|
-
export { PositionalAudio } from './core/PositionalAudio.js';
|
|
18
|
-
export { Text } from './core/Text.js';
|
|
19
|
-
export { Text3D } from './core/Text3D.js';
|
|
20
|
-
export { Effects, isWebGL2Available } from './core/Effects.js';
|
|
21
|
-
export { GradientTexture, GradientType } from './core/GradientTexture.js';
|
|
22
|
-
export { Image } from './core/Image.js';
|
|
23
|
-
export { Edges } from './core/Edges.js';
|
|
24
|
-
export { Outlines } from './core/Outlines.js';
|
|
25
|
-
export { Trail, useTrail } from './core/Trail.js';
|
|
26
|
-
export { Sampler, useSurfaceSampler } from './core/Sampler.js';
|
|
27
|
-
export { ComputedAttribute } from './core/ComputedAttribute.js';
|
|
28
|
-
export { Clone } from './core/Clone.js';
|
|
29
|
-
export { MarchingCube, MarchingCubes, MarchingPlane } from './core/MarchingCubes.js';
|
|
30
|
-
export { Decal } from './core/Decal.js';
|
|
31
|
-
export { Svg } from './core/Svg.js';
|
|
32
|
-
export { Gltf, useGLTF } from './core/Gltf.js';
|
|
33
|
-
export { AsciiRenderer } from './core/AsciiRenderer.js';
|
|
34
|
-
export { Splat } from './core/Splat.js';
|
|
35
|
-
export { OrthographicCamera } from './core/OrthographicCamera.js';
|
|
36
|
-
export { PerspectiveCamera } from './core/PerspectiveCamera.js';
|
|
37
|
-
export { CubeCamera, useCubeCamera } from './core/CubeCamera.js';
|
|
38
|
-
export { DeviceOrientationControls } from './core/DeviceOrientationControls.js';
|
|
39
|
-
export { FlyControls } from './core/FlyControls.js';
|
|
40
|
-
export { MapControls } from './core/MapControls.js';
|
|
41
|
-
export { OrbitControls } from './core/OrbitControls.js';
|
|
42
|
-
export { TrackballControls } from './core/TrackballControls.js';
|
|
43
|
-
export { ArcballControls } from './core/ArcballControls.js';
|
|
44
|
-
export { TransformControls } from './core/TransformControls.js';
|
|
45
|
-
export { PointerLockControls } from './core/PointerLockControls.js';
|
|
46
|
-
export { FirstPersonControls } from './core/FirstPersonControls.js';
|
|
47
|
-
export { CameraControls } from './core/CameraControls.js';
|
|
48
|
-
export { default as CameraControlsImpl } from 'camera-controls';
|
|
49
|
-
export { MotionPathControls, useMotion } from './core/MotionPathControls.js';
|
|
50
|
-
export { GizmoHelper, useGizmoContext } from './core/GizmoHelper.js';
|
|
51
|
-
export { GizmoViewcube } from './core/GizmoViewcube.js';
|
|
52
|
-
export { GizmoViewport } from './core/GizmoViewport.js';
|
|
53
|
-
export { Grid } from './core/Grid.js';
|
|
54
|
-
export { CubeTexture, useCubeTexture } from './core/CubeTexture.js';
|
|
55
|
-
export { Fbx, useFBX } from './core/Fbx.js';
|
|
56
|
-
export { Ktx2, useKTX2 } from './core/Ktx2.js';
|
|
57
|
-
export { Progress, useProgress } from './core/Progress.js';
|
|
58
|
-
export { IsObject, Texture, useTexture } from './core/Texture.js';
|
|
59
|
-
export { VideoTexture, useVideoTexture } from './core/VideoTexture.js';
|
|
60
|
-
export { useFont } from './core/useFont.js';
|
|
61
|
-
export { checkIfFrameIsEmpty, getFirstFrame, useSpriteLoader } from './core/useSpriteLoader.js';
|
|
62
|
-
export { Helper, useHelper } from './core/Helper.js';
|
|
63
|
-
export { Stats } from './core/Stats.js';
|
|
64
|
-
export { StatsGl } from './core/StatsGl.js';
|
|
65
|
-
export { useDepthBuffer } from './core/useDepthBuffer.js';
|
|
66
|
-
export { useAspect } from './core/useAspect.js';
|
|
67
|
-
export { useCamera } from './core/useCamera.js';
|
|
68
|
-
export { DetectGPU, useDetectGPU } from './core/DetectGPU.js';
|
|
69
|
-
export { Bvh, useBVH } from './core/Bvh.js';
|
|
70
|
-
export { useContextBridge } from './core/useContextBridge.js';
|
|
71
|
-
export { useAnimations } from './core/useAnimations.js';
|
|
72
|
-
export { Fbo, useFBO } from './core/Fbo.js';
|
|
73
|
-
export { useIntersect } from './core/useIntersect.js';
|
|
74
|
-
export { useBoxProjectedEnv } from './core/useBoxProjectedEnv.js';
|
|
75
|
-
export { BBAnchor } from './core/BBAnchor.js';
|
|
76
|
-
export { TrailTexture, useTrailTexture } from './core/TrailTexture.js';
|
|
77
|
-
export { Example } from './core/Example.js';
|
|
78
|
-
export { SpriteAnimator, useSpriteAnimator } from './core/SpriteAnimator.js';
|
|
79
|
-
export { CurveModifier } from './core/CurveModifier.js';
|
|
80
|
-
export { MeshDistortMaterial } from './core/MeshDistortMaterial.js';
|
|
81
|
-
export { MeshWobbleMaterial } from './core/MeshWobbleMaterial.js';
|
|
82
|
-
export { MeshReflectorMaterial } from './core/MeshReflectorMaterial.js';
|
|
83
|
-
export { MeshRefractionMaterial } from './core/MeshRefractionMaterial.js';
|
|
84
|
-
export { MeshTransmissionMaterial } from './core/MeshTransmissionMaterial.js';
|
|
85
|
-
export { MeshDiscardMaterial } from './core/MeshDiscardMaterial.js';
|
|
86
|
-
export { MultiMaterial } from './core/MultiMaterial.js';
|
|
87
|
-
export { PointMaterial, PointMaterialImpl } from './core/PointMaterial.js';
|
|
88
|
-
export { shaderMaterial } from './core/shaderMaterial.js';
|
|
89
|
-
export { SoftShadows } from './core/softShadows.js';
|
|
90
|
-
export { Box, Capsule, Circle, Cone, Cylinder, Dodecahedron, Extrude, Icosahedron, Lathe, Octahedron, Plane, Polyhedron, Ring, Shape, Sphere, Tetrahedron, Torus, TorusKnot, Tube } from './core/shapes.js';
|
|
91
|
-
export { RoundedBox, RoundedBoxGeometry } from './core/RoundedBox.js';
|
|
92
|
-
export { ScreenQuad } from './core/ScreenQuad.js';
|
|
93
|
-
export { Center } from './core/Center.js';
|
|
94
|
-
export { Resize } from './core/Resize.js';
|
|
95
|
-
export { Bounds, useBounds } from './core/Bounds.js';
|
|
96
|
-
export { CameraShake } from './core/CameraShake.js';
|
|
97
|
-
export { Float } from './core/Float.js';
|
|
98
|
-
export { Stage } from './core/Stage.js';
|
|
99
|
-
export { Backdrop } from './core/Backdrop.js';
|
|
100
|
-
export { Shadow } from './core/Shadow.js';
|
|
101
|
-
export { Caustics } from './core/Caustics.js';
|
|
102
|
-
export { ContactShadows } from './core/ContactShadows.js';
|
|
103
|
-
export { AccumulativeShadows, RandomizedLight, accumulativeContext } from './core/AccumulativeShadows.js';
|
|
104
|
-
export { SpotLight, SpotLightShadow } from './core/SpotLight.js';
|
|
105
|
-
export { Environment, EnvironmentCube, EnvironmentMap, EnvironmentPortal } from './core/Environment.js';
|
|
106
|
-
export { Lightformer } from './core/Lightformer.js';
|
|
107
|
-
export { Sky, calcPosFromAngles } from './core/Sky.js';
|
|
108
|
-
export { Stars } from './core/Stars.js';
|
|
109
|
-
export { Cloud, CloudInstance, Clouds } from './core/Cloud.js';
|
|
110
|
-
export { Sparkles } from './core/Sparkles.js';
|
|
111
|
-
export { useEnvironment } from './core/useEnvironment.js';
|
|
112
|
-
export { MatcapTexture, useMatcapTexture } from './core/MatcapTexture.js';
|
|
113
|
-
export { NormalTexture, useNormalTexture } from './core/NormalTexture.js';
|
|
114
|
-
export { Wireframe } from './core/Wireframe.js';
|
|
115
|
-
export { ShadowAlpha } from './core/ShadowAlpha.js';
|
|
116
|
-
export { Point, Points, PointsBuffer, PositionPoint } from './core/Points.js';
|
|
117
|
-
export { Instance, InstancedAttribute, Instances, Merged, PositionMesh, createInstances } from './core/Instances.js';
|
|
118
|
-
export { Segment, SegmentObject, Segments } from './core/Segments.js';
|
|
119
|
-
export { Detailed } from './core/Detailed.js';
|
|
120
|
-
export { Preload } from './core/Preload.js';
|
|
121
|
-
export { BakeShadows } from './core/BakeShadows.js';
|
|
122
|
-
export { meshBounds } from './core/meshBounds.js';
|
|
123
|
-
export { AdaptiveDpr } from './core/AdaptiveDpr.js';
|
|
124
|
-
export { AdaptiveEvents } from './core/AdaptiveEvents.js';
|
|
125
|
-
export { PerformanceMonitor, usePerformanceMonitor } from './core/PerformanceMonitor.js';
|
|
126
|
-
export { RenderTexture } from './core/RenderTexture.js';
|
|
127
|
-
export { RenderCubeTexture } from './core/RenderCubeTexture.js';
|
|
128
|
-
export { Mask, useMask } from './core/Mask.js';
|
|
129
|
-
export { Hud } from './core/Hud.js';
|
|
130
|
-
export { Fisheye } from './core/Fisheye.js';
|
|
131
|
-
export { MeshPortalMaterial } from './core/MeshPortalMaterial.js';
|
|
132
|
-
export { calculateScaleFactor } from './core/calculateScaleFactor.js';
|
|
133
|
-
export { View } from './web/View.js';
|
|
134
|
-
export { PivotControls } from './web/pivotControls/index.js';
|
|
135
|
-
export { ScreenVideoTexture } from './web/ScreenVideoTexture.js';
|
|
136
|
-
export { WebcamVideoTexture } from './web/WebcamVideoTexture.js';
|
|
137
|
-
export { FaceControls, useFaceControls } from './web/FaceControls.js';
|
|
138
|
-
export { FaceLandmarker, FaceLandmarkerDefaults, useFaceLandmarker } from './web/FaceLandmarker.js';
|
|
139
|
-
export { Facemesh, FacemeshDatas, FacemeshEye, FacemeshEyeDefaults } from './web/Facemesh.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("three"),t=require("./ConvolutionMaterial.cjs.js");require("../helpers/constants.cjs.js");exports.BlurPass=class{constructor({gl:r,resolution:i,width:n=500,height:s=500,minDepthThreshold:o=0,maxDepthThreshold:a=1,depthScale:l=0,depthToBlurRatioBias:u=.25}){this.renderToScreen=!1,this.renderTargetA=new e.WebGLRenderTarget(i,i,{minFilter:e.LinearFilter,magFilter:e.LinearFilter,stencilBuffer:!1,depthBuffer:!1,type:e.HalfFloatType}),this.renderTargetB=this.renderTargetA.clone(),this.convolutionMaterial=new t.ConvolutionMaterial,this.convolutionMaterial.setTexelSize(1/n,1/s),this.convolutionMaterial.setResolution(new e.Vector2(n,s)),this.scene=new e.Scene,this.camera=new e.Camera,this.convolutionMaterial.uniforms.minDepthThreshold.value=o,this.convolutionMaterial.uniforms.maxDepthThreshold.value=a,this.convolutionMaterial.uniforms.depthScale.value=l,this.convolutionMaterial.uniforms.depthToBlurRatioBias.value=u,this.convolutionMaterial.defines.USE_DEPTH=l>0;const h=new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),c=new Float32Array([0,0,2,0,0,2]),d=new e.BufferGeometry;d.setAttribute("position",new e.BufferAttribute(h,3)),d.setAttribute("uv",new e.BufferAttribute(c,2)),this.screen=new e.Mesh(d,this.convolutionMaterial),this.screen.frustumCulled=!1,this.scene.add(this.screen)}render(e,t,r){const i=this.scene,n=this.camera,s=this.renderTargetA,o=this.renderTargetB;let a=this.convolutionMaterial,l=a.uniforms;l.depthBuffer.value=t.depthTexture;const u=a.kernel;let h,c,d,f=t;for(c=0,d=u.length-1;c<d;++c)h=1&c?o:s,l.kernel.value=u[c],l.inputBuffer.value=f.texture,e.setRenderTarget(h),e.render(i,n),f=h;l.kernel.value=u[c],l.inputBuffer.value=f.texture,e.setRenderTarget(this.renderToScreen?null:r),e.render(i,n)}};
|
package/materials/BlurPass.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Mesh, Scene, WebGLRenderTarget, WebGLRenderer, Camera } from 'three';
|
|
2
|
-
import { ConvolutionMaterial } from './ConvolutionMaterial';
|
|
3
|
-
export interface BlurPassProps {
|
|
4
|
-
gl: WebGLRenderer;
|
|
5
|
-
resolution: number;
|
|
6
|
-
width?: number;
|
|
7
|
-
height?: number;
|
|
8
|
-
minDepthThreshold?: number;
|
|
9
|
-
maxDepthThreshold?: number;
|
|
10
|
-
depthScale?: number;
|
|
11
|
-
depthToBlurRatioBias?: number;
|
|
12
|
-
}
|
|
13
|
-
export declare class BlurPass {
|
|
14
|
-
readonly renderTargetA: WebGLRenderTarget;
|
|
15
|
-
readonly renderTargetB: WebGLRenderTarget;
|
|
16
|
-
readonly convolutionMaterial: ConvolutionMaterial;
|
|
17
|
-
readonly scene: Scene;
|
|
18
|
-
readonly camera: Camera;
|
|
19
|
-
readonly screen: Mesh;
|
|
20
|
-
renderToScreen: boolean;
|
|
21
|
-
constructor({ gl, resolution, width, height, minDepthThreshold, maxDepthThreshold, depthScale, depthToBlurRatioBias, }: BlurPassProps);
|
|
22
|
-
render(renderer: any, inputBuffer: any, outputBuffer: any): void;
|
|
23
|
-
}
|
package/materials/BlurPass.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { WebGLRenderTarget, LinearFilter, HalfFloatType, Vector2, Scene, Camera, BufferGeometry, BufferAttribute, Mesh } from 'three';
|
|
2
|
-
import { ConvolutionMaterial } from './ConvolutionMaterial.js';
|
|
3
|
-
|
|
4
|
-
class BlurPass {
|
|
5
|
-
constructor({
|
|
6
|
-
gl,
|
|
7
|
-
resolution,
|
|
8
|
-
width = 500,
|
|
9
|
-
height = 500,
|
|
10
|
-
minDepthThreshold = 0,
|
|
11
|
-
maxDepthThreshold = 1,
|
|
12
|
-
depthScale = 0,
|
|
13
|
-
depthToBlurRatioBias = 0.25
|
|
14
|
-
}) {
|
|
15
|
-
this.renderToScreen = false;
|
|
16
|
-
this.renderTargetA = new WebGLRenderTarget(resolution, resolution, {
|
|
17
|
-
minFilter: LinearFilter,
|
|
18
|
-
magFilter: LinearFilter,
|
|
19
|
-
stencilBuffer: false,
|
|
20
|
-
depthBuffer: false,
|
|
21
|
-
type: HalfFloatType
|
|
22
|
-
});
|
|
23
|
-
this.renderTargetB = this.renderTargetA.clone();
|
|
24
|
-
this.convolutionMaterial = new ConvolutionMaterial();
|
|
25
|
-
this.convolutionMaterial.setTexelSize(1.0 / width, 1.0 / height);
|
|
26
|
-
this.convolutionMaterial.setResolution(new Vector2(width, height));
|
|
27
|
-
this.scene = new Scene();
|
|
28
|
-
this.camera = new Camera();
|
|
29
|
-
this.convolutionMaterial.uniforms.minDepthThreshold.value = minDepthThreshold;
|
|
30
|
-
this.convolutionMaterial.uniforms.maxDepthThreshold.value = maxDepthThreshold;
|
|
31
|
-
this.convolutionMaterial.uniforms.depthScale.value = depthScale;
|
|
32
|
-
this.convolutionMaterial.uniforms.depthToBlurRatioBias.value = depthToBlurRatioBias;
|
|
33
|
-
this.convolutionMaterial.defines.USE_DEPTH = depthScale > 0;
|
|
34
|
-
const vertices = new Float32Array([-1, -1, 0, 3, -1, 0, -1, 3, 0]);
|
|
35
|
-
const uvs = new Float32Array([0, 0, 2, 0, 0, 2]);
|
|
36
|
-
const geometry = new BufferGeometry();
|
|
37
|
-
geometry.setAttribute('position', new BufferAttribute(vertices, 3));
|
|
38
|
-
geometry.setAttribute('uv', new BufferAttribute(uvs, 2));
|
|
39
|
-
this.screen = new Mesh(geometry, this.convolutionMaterial);
|
|
40
|
-
this.screen.frustumCulled = false;
|
|
41
|
-
this.scene.add(this.screen);
|
|
42
|
-
}
|
|
43
|
-
render(renderer, inputBuffer, outputBuffer) {
|
|
44
|
-
const scene = this.scene;
|
|
45
|
-
const camera = this.camera;
|
|
46
|
-
const renderTargetA = this.renderTargetA;
|
|
47
|
-
const renderTargetB = this.renderTargetB;
|
|
48
|
-
let material = this.convolutionMaterial;
|
|
49
|
-
let uniforms = material.uniforms;
|
|
50
|
-
uniforms.depthBuffer.value = inputBuffer.depthTexture;
|
|
51
|
-
const kernel = material.kernel;
|
|
52
|
-
let lastRT = inputBuffer;
|
|
53
|
-
let destRT;
|
|
54
|
-
let i, l;
|
|
55
|
-
// Apply the multi-pass blur.
|
|
56
|
-
for (i = 0, l = kernel.length - 1; i < l; ++i) {
|
|
57
|
-
// Alternate between targets.
|
|
58
|
-
destRT = (i & 1) === 0 ? renderTargetA : renderTargetB;
|
|
59
|
-
uniforms.kernel.value = kernel[i];
|
|
60
|
-
uniforms.inputBuffer.value = lastRT.texture;
|
|
61
|
-
renderer.setRenderTarget(destRT);
|
|
62
|
-
renderer.render(scene, camera);
|
|
63
|
-
lastRT = destRT;
|
|
64
|
-
}
|
|
65
|
-
uniforms.kernel.value = kernel[i];
|
|
66
|
-
uniforms.inputBuffer.value = lastRT.texture;
|
|
67
|
-
renderer.setRenderTarget(this.renderToScreen ? null : outputBuffer);
|
|
68
|
-
renderer.render(scene, camera);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export { BlurPass };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("three"),n=require("../helpers/constants.cjs.js");function r(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,t.get?t:{enumerable:!0,get:function(){return e[r]}})}})),n.default=e,Object.freeze(n)}var t=r(e);class i extends t.ShaderMaterial{constructor(e=new t.Vector2){super({uniforms:{inputBuffer:new t.Uniform(null),depthBuffer:new t.Uniform(null),resolution:new t.Uniform(new t.Vector2),texelSize:new t.Uniform(new t.Vector2),halfTexelSize:new t.Uniform(new t.Vector2),kernel:new t.Uniform(0),scale:new t.Uniform(1),cameraNear:new t.Uniform(0),cameraFar:new t.Uniform(1),minDepthThreshold:new t.Uniform(0),maxDepthThreshold:new t.Uniform(1),depthScale:new t.Uniform(0),depthToBlurRatioBias:new t.Uniform(.25)},fragmentShader:`#include <common>\n #include <dithering_pars_fragment> \n uniform sampler2D inputBuffer;\n uniform sampler2D depthBuffer;\n uniform float cameraNear;\n uniform float cameraFar;\n uniform float minDepthThreshold;\n uniform float maxDepthThreshold;\n uniform float depthScale;\n uniform float depthToBlurRatioBias;\n varying vec2 vUv;\n varying vec2 vUv0;\n varying vec2 vUv1;\n varying vec2 vUv2;\n varying vec2 vUv3;\n\n void main() {\n float depthFactor = 0.0;\n \n #ifdef USE_DEPTH\n vec4 depth = texture2D(depthBuffer, vUv);\n depthFactor = smoothstep(minDepthThreshold, maxDepthThreshold, 1.0-(depth.r * depth.a));\n depthFactor *= depthScale;\n depthFactor = max(0.0, min(1.0, depthFactor + 0.25));\n #endif\n \n vec4 sum = texture2D(inputBuffer, mix(vUv0, vUv, depthFactor));\n sum += texture2D(inputBuffer, mix(vUv1, vUv, depthFactor));\n sum += texture2D(inputBuffer, mix(vUv2, vUv, depthFactor));\n sum += texture2D(inputBuffer, mix(vUv3, vUv, depthFactor));\n gl_FragColor = sum * 0.25 ;\n\n #include <dithering_fragment>\n #include <tonemapping_fragment>\n #include <${n.version>=154?"colorspace_fragment":"encodings_fragment"}>\n }`,vertexShader:"uniform vec2 texelSize;\n uniform vec2 halfTexelSize;\n uniform float kernel;\n uniform float scale;\n varying vec2 vUv;\n varying vec2 vUv0;\n varying vec2 vUv1;\n varying vec2 vUv2;\n varying vec2 vUv3;\n\n void main() {\n vec2 uv = position.xy * 0.5 + 0.5;\n vUv = uv;\n\n vec2 dUv = (texelSize * vec2(kernel) + halfTexelSize) * scale;\n vUv0 = vec2(uv.x - dUv.x, uv.y + dUv.y);\n vUv1 = vec2(uv.x + dUv.x, uv.y + dUv.y);\n vUv2 = vec2(uv.x + dUv.x, uv.y - dUv.y);\n vUv3 = vec2(uv.x - dUv.x, uv.y - dUv.y);\n\n gl_Position = vec4(position.xy, 1.0, 1.0);\n }",blending:t.NoBlending,depthWrite:!1,depthTest:!1}),this.toneMapped=!1,this.setTexelSize(e.x,e.y),this.kernel=new Float32Array([0,1,2,2,3])}setTexelSize(e,n){this.uniforms.texelSize.value.set(e,n),this.uniforms.halfTexelSize.value.set(e,n).multiplyScalar(.5)}setResolution(e){this.uniforms.resolution.value.copy(e)}}exports.ConvolutionMaterial=i;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
export declare class ConvolutionMaterial extends THREE.ShaderMaterial {
|
|
3
|
-
readonly kernel: Float32Array;
|
|
4
|
-
constructor(texelSize?: THREE.Vector2);
|
|
5
|
-
setTexelSize(x: number, y: number): void;
|
|
6
|
-
setResolution(resolution: THREE.Vector2): void;
|
|
7
|
-
}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import { version } from '../helpers/constants.js';
|
|
3
|
-
|
|
4
|
-
class ConvolutionMaterial extends THREE.ShaderMaterial {
|
|
5
|
-
constructor(texelSize = new THREE.Vector2()) {
|
|
6
|
-
super({
|
|
7
|
-
uniforms: {
|
|
8
|
-
inputBuffer: new THREE.Uniform(null),
|
|
9
|
-
depthBuffer: new THREE.Uniform(null),
|
|
10
|
-
resolution: new THREE.Uniform(new THREE.Vector2()),
|
|
11
|
-
texelSize: new THREE.Uniform(new THREE.Vector2()),
|
|
12
|
-
halfTexelSize: new THREE.Uniform(new THREE.Vector2()),
|
|
13
|
-
kernel: new THREE.Uniform(0.0),
|
|
14
|
-
scale: new THREE.Uniform(1.0),
|
|
15
|
-
cameraNear: new THREE.Uniform(0.0),
|
|
16
|
-
cameraFar: new THREE.Uniform(1.0),
|
|
17
|
-
minDepthThreshold: new THREE.Uniform(0.0),
|
|
18
|
-
maxDepthThreshold: new THREE.Uniform(1.0),
|
|
19
|
-
depthScale: new THREE.Uniform(0.0),
|
|
20
|
-
depthToBlurRatioBias: new THREE.Uniform(0.25)
|
|
21
|
-
},
|
|
22
|
-
fragmentShader: `#include <common>
|
|
23
|
-
#include <dithering_pars_fragment>
|
|
24
|
-
uniform sampler2D inputBuffer;
|
|
25
|
-
uniform sampler2D depthBuffer;
|
|
26
|
-
uniform float cameraNear;
|
|
27
|
-
uniform float cameraFar;
|
|
28
|
-
uniform float minDepthThreshold;
|
|
29
|
-
uniform float maxDepthThreshold;
|
|
30
|
-
uniform float depthScale;
|
|
31
|
-
uniform float depthToBlurRatioBias;
|
|
32
|
-
varying vec2 vUv;
|
|
33
|
-
varying vec2 vUv0;
|
|
34
|
-
varying vec2 vUv1;
|
|
35
|
-
varying vec2 vUv2;
|
|
36
|
-
varying vec2 vUv3;
|
|
37
|
-
|
|
38
|
-
void main() {
|
|
39
|
-
float depthFactor = 0.0;
|
|
40
|
-
|
|
41
|
-
#ifdef USE_DEPTH
|
|
42
|
-
vec4 depth = texture2D(depthBuffer, vUv);
|
|
43
|
-
depthFactor = smoothstep(minDepthThreshold, maxDepthThreshold, 1.0-(depth.r * depth.a));
|
|
44
|
-
depthFactor *= depthScale;
|
|
45
|
-
depthFactor = max(0.0, min(1.0, depthFactor + 0.25));
|
|
46
|
-
#endif
|
|
47
|
-
|
|
48
|
-
vec4 sum = texture2D(inputBuffer, mix(vUv0, vUv, depthFactor));
|
|
49
|
-
sum += texture2D(inputBuffer, mix(vUv1, vUv, depthFactor));
|
|
50
|
-
sum += texture2D(inputBuffer, mix(vUv2, vUv, depthFactor));
|
|
51
|
-
sum += texture2D(inputBuffer, mix(vUv3, vUv, depthFactor));
|
|
52
|
-
gl_FragColor = sum * 0.25 ;
|
|
53
|
-
|
|
54
|
-
#include <dithering_fragment>
|
|
55
|
-
#include <tonemapping_fragment>
|
|
56
|
-
#include <${version >= 154 ? 'colorspace_fragment' : 'encodings_fragment'}>
|
|
57
|
-
}`,
|
|
58
|
-
vertexShader: `uniform vec2 texelSize;
|
|
59
|
-
uniform vec2 halfTexelSize;
|
|
60
|
-
uniform float kernel;
|
|
61
|
-
uniform float scale;
|
|
62
|
-
varying vec2 vUv;
|
|
63
|
-
varying vec2 vUv0;
|
|
64
|
-
varying vec2 vUv1;
|
|
65
|
-
varying vec2 vUv2;
|
|
66
|
-
varying vec2 vUv3;
|
|
67
|
-
|
|
68
|
-
void main() {
|
|
69
|
-
vec2 uv = position.xy * 0.5 + 0.5;
|
|
70
|
-
vUv = uv;
|
|
71
|
-
|
|
72
|
-
vec2 dUv = (texelSize * vec2(kernel) + halfTexelSize) * scale;
|
|
73
|
-
vUv0 = vec2(uv.x - dUv.x, uv.y + dUv.y);
|
|
74
|
-
vUv1 = vec2(uv.x + dUv.x, uv.y + dUv.y);
|
|
75
|
-
vUv2 = vec2(uv.x + dUv.x, uv.y - dUv.y);
|
|
76
|
-
vUv3 = vec2(uv.x - dUv.x, uv.y - dUv.y);
|
|
77
|
-
|
|
78
|
-
gl_Position = vec4(position.xy, 1.0, 1.0);
|
|
79
|
-
}`,
|
|
80
|
-
blending: THREE.NoBlending,
|
|
81
|
-
depthWrite: false,
|
|
82
|
-
depthTest: false
|
|
83
|
-
});
|
|
84
|
-
this.toneMapped = false;
|
|
85
|
-
this.setTexelSize(texelSize.x, texelSize.y);
|
|
86
|
-
this.kernel = new Float32Array([0.0, 1.0, 2.0, 2.0, 3.0]);
|
|
87
|
-
}
|
|
88
|
-
setTexelSize(x, y) {
|
|
89
|
-
this.uniforms.texelSize.value.set(x, y);
|
|
90
|
-
this.uniforms.halfTexelSize.value.set(x, y).multiplyScalar(0.5);
|
|
91
|
-
}
|
|
92
|
-
setResolution(resolution) {
|
|
93
|
-
this.uniforms.resolution.value.copy(resolution);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export { ConvolutionMaterial };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../core/shaderMaterial.cjs.js");require("three");const r=e.shaderMaterial({},"void main() { }","void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); discard; }");exports.DiscardMaterial=r;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("three");class t extends e.MeshStandardMaterial{constructor(e={}){super(e),this._tDepth={value:null},this._distortionMap={value:null},this._tDiffuse={value:null},this._tDiffuseBlur={value:null},this._textureMatrix={value:null},this._hasBlur={value:!1},this._mirror={value:0},this._mixBlur={value:0},this._blurStrength={value:.5},this._minDepthThreshold={value:.9},this._maxDepthThreshold={value:1},this._depthScale={value:0},this._depthToBlurRatioBias={value:.25},this._distortion={value:1},this._mixContrast={value:1},this.setValues(e)}onBeforeCompile(e){var t;null!=(t=e.defines)&&t.USE_UV||(e.defines.USE_UV=""),e.uniforms.hasBlur=this._hasBlur,e.uniforms.tDiffuse=this._tDiffuse,e.uniforms.tDepth=this._tDepth,e.uniforms.distortionMap=this._distortionMap,e.uniforms.tDiffuseBlur=this._tDiffuseBlur,e.uniforms.textureMatrix=this._textureMatrix,e.uniforms.mirror=this._mirror,e.uniforms.mixBlur=this._mixBlur,e.uniforms.mixStrength=this._blurStrength,e.uniforms.minDepthThreshold=this._minDepthThreshold,e.uniforms.maxDepthThreshold=this._maxDepthThreshold,e.uniforms.depthScale=this._depthScale,e.uniforms.depthToBlurRatioBias=this._depthToBlurRatioBias,e.uniforms.distortion=this._distortion,e.uniforms.mixContrast=this._mixContrast,e.vertexShader=`\n uniform mat4 textureMatrix;\n varying vec4 my_vUv;\n ${e.vertexShader}`,e.vertexShader=e.vertexShader.replace("#include <project_vertex>","#include <project_vertex>\n my_vUv = textureMatrix * vec4( position, 1.0 );\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );"),e.fragmentShader=`\n uniform sampler2D tDiffuse;\n uniform sampler2D tDiffuseBlur;\n uniform sampler2D tDepth;\n uniform sampler2D distortionMap;\n uniform float distortion;\n uniform float cameraNear;\n\t\t\t uniform float cameraFar;\n uniform bool hasBlur;\n uniform float mixBlur;\n uniform float mirror;\n uniform float mixStrength;\n uniform float minDepthThreshold;\n uniform float maxDepthThreshold;\n uniform float mixContrast;\n uniform float depthScale;\n uniform float depthToBlurRatioBias;\n varying vec4 my_vUv;\n ${e.fragmentShader}`,e.fragmentShader=e.fragmentShader.replace("#include <emissivemap_fragment>","#include <emissivemap_fragment>\n\n float distortionFactor = 0.0;\n #ifdef USE_DISTORTION\n distortionFactor = texture2D(distortionMap, vUv).r * distortion;\n #endif\n\n vec4 new_vUv = my_vUv;\n new_vUv.x += distortionFactor;\n new_vUv.y += distortionFactor;\n\n vec4 base = texture2DProj(tDiffuse, new_vUv);\n vec4 blur = texture2DProj(tDiffuseBlur, new_vUv);\n\n vec4 merge = base;\n\n #ifdef USE_NORMALMAP\n vec2 normal_uv = vec2(0.0);\n vec4 normalColor = texture2D(normalMap, vUv * normalScale);\n vec3 my_normal = normalize( vec3( normalColor.r * 2.0 - 1.0, normalColor.b, normalColor.g * 2.0 - 1.0 ) );\n vec3 coord = new_vUv.xyz / new_vUv.w;\n normal_uv = coord.xy + coord.z * my_normal.xz * 0.05;\n vec4 base_normal = texture2D(tDiffuse, normal_uv);\n vec4 blur_normal = texture2D(tDiffuseBlur, normal_uv);\n merge = base_normal;\n blur = blur_normal;\n #endif\n\n float depthFactor = 0.0001;\n float blurFactor = 0.0;\n\n #ifdef USE_DEPTH\n vec4 depth = texture2DProj(tDepth, new_vUv);\n depthFactor = smoothstep(minDepthThreshold, maxDepthThreshold, 1.0-(depth.r * depth.a));\n depthFactor *= depthScale;\n depthFactor = max(0.0001, min(1.0, depthFactor));\n\n #ifdef USE_BLUR\n blur = blur * min(1.0, depthFactor + depthToBlurRatioBias);\n merge = merge * min(1.0, depthFactor + 0.5);\n #else\n merge = merge * depthFactor;\n #endif\n\n #endif\n\n float reflectorRoughnessFactor = roughness;\n #ifdef USE_ROUGHNESSMAP\n vec4 reflectorTexelRoughness = texture2D( roughnessMap, vUv );\n reflectorRoughnessFactor *= reflectorTexelRoughness.g;\n #endif\n\n #ifdef USE_BLUR\n blurFactor = min(1.0, mixBlur * reflectorRoughnessFactor);\n merge = mix(merge, blur, blurFactor);\n #endif\n\n vec4 newMerge = vec4(0.0, 0.0, 0.0, 1.0);\n newMerge.r = (merge.r - 0.5) * mixContrast + 0.5;\n newMerge.g = (merge.g - 0.5) * mixContrast + 0.5;\n newMerge.b = (merge.b - 0.5) * mixContrast + 0.5;\n\n diffuseColor.rgb = diffuseColor.rgb * ((1.0 - min(1.0, mirror)) + newMerge.rgb * mixStrength);\n ")}get tDiffuse(){return this._tDiffuse.value}set tDiffuse(e){this._tDiffuse.value=e}get tDepth(){return this._tDepth.value}set tDepth(e){this._tDepth.value=e}get distortionMap(){return this._distortionMap.value}set distortionMap(e){this._distortionMap.value=e}get tDiffuseBlur(){return this._tDiffuseBlur.value}set tDiffuseBlur(e){this._tDiffuseBlur.value=e}get textureMatrix(){return this._textureMatrix.value}set textureMatrix(e){this._textureMatrix.value=e}get hasBlur(){return this._hasBlur.value}set hasBlur(e){this._hasBlur.value=e}get mirror(){return this._mirror.value}set mirror(e){this._mirror.value=e}get mixBlur(){return this._mixBlur.value}set mixBlur(e){this._mixBlur.value=e}get mixStrength(){return this._blurStrength.value}set mixStrength(e){this._blurStrength.value=e}get minDepthThreshold(){return this._minDepthThreshold.value}set minDepthThreshold(e){this._minDepthThreshold.value=e}get maxDepthThreshold(){return this._maxDepthThreshold.value}set maxDepthThreshold(e){this._maxDepthThreshold.value=e}get depthScale(){return this._depthScale.value}set depthScale(e){this._depthScale.value=e}get depthToBlurRatioBias(){return this._depthToBlurRatioBias.value}set depthToBlurRatioBias(e){this._depthToBlurRatioBias.value=e}get distortion(){return this._distortion.value}set distortion(e){this._distortion.value=e}get mixContrast(){return this._mixContrast.value}set mixContrast(e){this._mixContrast.value=e}}exports.MeshReflectorMaterial=t;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { Matrix4, MeshStandardMaterial, Texture } from 'three';
|
|
2
|
-
export declare class MeshReflectorMaterial extends MeshStandardMaterial {
|
|
3
|
-
private _tDepth;
|
|
4
|
-
private _distortionMap;
|
|
5
|
-
private _tDiffuse;
|
|
6
|
-
private _tDiffuseBlur;
|
|
7
|
-
private _textureMatrix;
|
|
8
|
-
private _hasBlur;
|
|
9
|
-
private _mirror;
|
|
10
|
-
private _mixBlur;
|
|
11
|
-
private _blurStrength;
|
|
12
|
-
private _minDepthThreshold;
|
|
13
|
-
private _maxDepthThreshold;
|
|
14
|
-
private _depthScale;
|
|
15
|
-
private _depthToBlurRatioBias;
|
|
16
|
-
private _distortion;
|
|
17
|
-
private _mixContrast;
|
|
18
|
-
constructor(parameters?: {});
|
|
19
|
-
onBeforeCompile(shader: any): void;
|
|
20
|
-
get tDiffuse(): Texture | null;
|
|
21
|
-
set tDiffuse(v: Texture | null);
|
|
22
|
-
get tDepth(): Texture | null;
|
|
23
|
-
set tDepth(v: Texture | null);
|
|
24
|
-
get distortionMap(): Texture | null;
|
|
25
|
-
set distortionMap(v: Texture | null);
|
|
26
|
-
get tDiffuseBlur(): Texture | null;
|
|
27
|
-
set tDiffuseBlur(v: Texture | null);
|
|
28
|
-
get textureMatrix(): Matrix4 | null;
|
|
29
|
-
set textureMatrix(v: Matrix4 | null);
|
|
30
|
-
get hasBlur(): boolean;
|
|
31
|
-
set hasBlur(v: boolean);
|
|
32
|
-
get mirror(): number;
|
|
33
|
-
set mirror(v: number);
|
|
34
|
-
get mixBlur(): number;
|
|
35
|
-
set mixBlur(v: number);
|
|
36
|
-
get mixStrength(): number;
|
|
37
|
-
set mixStrength(v: number);
|
|
38
|
-
get minDepthThreshold(): number;
|
|
39
|
-
set minDepthThreshold(v: number);
|
|
40
|
-
get maxDepthThreshold(): number;
|
|
41
|
-
set maxDepthThreshold(v: number);
|
|
42
|
-
get depthScale(): number;
|
|
43
|
-
set depthScale(v: number);
|
|
44
|
-
get depthToBlurRatioBias(): number;
|
|
45
|
-
set depthToBlurRatioBias(v: number);
|
|
46
|
-
get distortion(): number;
|
|
47
|
-
set distortion(v: number);
|
|
48
|
-
get mixContrast(): number;
|
|
49
|
-
set mixContrast(v: number);
|
|
50
|
-
}
|