├── .dprint.jsonc ├── .eslintrc.cjs ├── .gitattributes ├── .github ├── FUNDING.yml └── workflows │ └── CI.yml ├── .gitignore ├── .gitmodules ├── .prettierignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── README.md ├── attw.json ├── examples-testing ├── .prettierrc.json ├── README.md ├── changes.patch ├── index.js ├── package.json ├── prepare-examples.sh ├── tsconfig.json └── update-patch.sh ├── jsdoc-testing ├── .dprint.jsonc ├── .prettierignore ├── .prettierrc.json ├── changes.patch ├── declarations.js ├── package.json ├── prepare-jsdoc.sh ├── tsconfig.jsdoc.json ├── tsconfig.json ├── update-declarations.sh └── update-patch.sh ├── notNeededPackages.json ├── package.json ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── renovate.json ├── src-testing ├── .dprint.jsonc ├── .prettierignore ├── .prettierrc.json ├── README.md ├── changes.patch ├── create-src.js ├── declarations.js ├── package.json ├── prepare-src.sh ├── tsconfig.json ├── update-declarations.sh └── update-patch.sh ├── tsconfig.all-files.json ├── types └── three │ ├── .eslintrc.json │ ├── .npmignore │ ├── build │ ├── three.core.d.ts │ ├── three.core.min.d.ts │ ├── three.d.cts │ ├── three.module.d.ts │ ├── three.module.min.d.ts │ ├── three.tsl.d.ts │ ├── three.tsl.min.d.ts │ ├── three.webgpu.d.ts │ ├── three.webgpu.min.d.ts │ ├── three.webgpu.nodes.d.ts │ └── three.webgpu.nodes.min.d.ts │ ├── examples │ └── jsm │ │ ├── Addons.d.ts │ │ ├── animation │ │ ├── AnimationClipCreator.d.ts │ │ └── CCDIKSolver.d.ts │ │ ├── capabilities │ │ ├── WebGL.d.ts │ │ └── WebGPU.d.ts │ │ ├── controls │ │ ├── ArcballControls.d.ts │ │ ├── DragControls.d.ts │ │ ├── FirstPersonControls.d.ts │ │ ├── FlyControls.d.ts │ │ ├── MapControls.d.ts │ │ ├── OrbitControls.d.ts │ │ ├── PointerLockControls.d.ts │ │ ├── TrackballControls.d.ts │ │ └── TransformControls.d.ts │ │ ├── csm │ │ ├── CSM.d.ts │ │ ├── CSMFrustum.d.ts │ │ ├── CSMHelper.d.ts │ │ ├── CSMShader.d.ts │ │ └── CSMShadowNode.d.ts │ │ ├── curves │ │ ├── CurveExtras.d.ts │ │ ├── NURBSCurve.d.ts │ │ ├── NURBSSurface.d.ts │ │ ├── NURBSUtils.d.ts │ │ └── NURBSVolume.d.ts │ │ ├── effects │ │ ├── AnaglyphEffect.d.ts │ │ ├── AsciiEffect.d.ts │ │ ├── OutlineEffect.d.ts │ │ ├── ParallaxBarrierEffect.d.ts │ │ └── StereoEffect.d.ts │ │ ├── environments │ │ ├── DebugEnvironment.d.ts │ │ └── RoomEnvironment.d.ts │ │ ├── exporters │ │ ├── DRACOExporter.d.ts │ │ ├── EXRExporter.d.ts │ │ ├── GLTFExporter.d.ts │ │ ├── KTX2Exporter.d.ts │ │ ├── OBJExporter.d.ts │ │ ├── PLYExporter.d.ts │ │ ├── STLExporter.d.ts │ │ └── USDZExporter.d.ts │ │ ├── geometries │ │ ├── BoxLineGeometry.d.ts │ │ ├── ConvexGeometry.d.ts │ │ ├── DecalGeometry.d.ts │ │ ├── ParametricFunctions.d.ts │ │ ├── ParametricGeometry.d.ts │ │ ├── RoundedBoxGeometry.d.ts │ │ ├── TeapotGeometry.d.ts │ │ └── TextGeometry.d.ts │ │ ├── helpers │ │ ├── LightProbeHelper.d.ts │ │ ├── LightProbeHelperGPU.d.ts │ │ ├── OctreeHelper.d.ts │ │ ├── PositionalAudioHelper.d.ts │ │ ├── RapierHelper.d.ts │ │ ├── RectAreaLightHelper.d.ts │ │ ├── TextureHelper.d.ts │ │ ├── TextureHelperGPU.d.ts │ │ ├── VertexNormalsHelper.d.ts │ │ ├── VertexTangentsHelper.d.ts │ │ └── ViewHelper.d.ts │ │ ├── interactive │ │ ├── HTMLMesh.d.ts │ │ ├── InteractiveGroup.d.ts │ │ ├── SelectionBox.d.ts │ │ └── SelectionHelper.d.ts │ │ ├── libs │ │ ├── fflate.module.d.ts │ │ ├── lil-gui.module.min.d.ts │ │ ├── meshopt_decoder.module.d.ts │ │ ├── stats.module.d.ts │ │ └── tween.module.d.ts │ │ ├── lighting │ │ └── TiledLighting.d.ts │ │ ├── lights │ │ ├── LightProbeGenerator.d.ts │ │ ├── RectAreaLightTexturesLib.d.ts │ │ └── RectAreaLightUniformsLib.d.ts │ │ ├── lines │ │ ├── Line2.d.ts │ │ ├── LineGeometry.d.ts │ │ ├── LineMaterial.d.ts │ │ ├── LineSegments2.d.ts │ │ ├── LineSegmentsGeometry.d.ts │ │ ├── Wireframe.d.ts │ │ ├── WireframeGeometry2.d.ts │ │ └── webgpu │ │ │ ├── Line2.d.ts │ │ │ ├── LineSegments2.d.ts │ │ │ └── Wireframe.d.ts │ │ ├── loaders │ │ ├── 3DMLoader.d.ts │ │ ├── 3MFLoader.d.ts │ │ ├── AMFLoader.d.ts │ │ ├── BVHLoader.d.ts │ │ ├── ColladaLoader.d.ts │ │ ├── DDSLoader.d.ts │ │ ├── DRACOLoader.d.ts │ │ ├── EXRLoader.d.ts │ │ ├── FBXLoader.d.ts │ │ ├── FontLoader.d.ts │ │ ├── GCodeLoader.d.ts │ │ ├── GLTFLoader.d.ts │ │ ├── HDRCubeTextureLoader.d.ts │ │ ├── IESLoader.d.ts │ │ ├── KMZLoader.d.ts │ │ ├── KTX2Loader.d.ts │ │ ├── KTXLoader.d.ts │ │ ├── LDrawLoader.d.ts │ │ ├── LUT3dlLoader.d.ts │ │ ├── LUTCubeLoader.d.ts │ │ ├── LUTImageLoader.d.ts │ │ ├── LWOLoader.d.ts │ │ ├── LottieLoader.d.ts │ │ ├── MD2Loader.d.ts │ │ ├── MDDLoader.d.ts │ │ ├── MTLLoader.d.ts │ │ ├── MaterialXLoader.d.ts │ │ ├── NRRDLoader.d.ts │ │ ├── OBJLoader.d.ts │ │ ├── PCDLoader.d.ts │ │ ├── PDBLoader.d.ts │ │ ├── PLYLoader.d.ts │ │ ├── PVRLoader.d.ts │ │ ├── RGBELoader.d.ts │ │ ├── RGBMLoader.d.ts │ │ ├── STLLoader.d.ts │ │ ├── SVGLoader.d.ts │ │ ├── TDSLoader.d.ts │ │ ├── TGALoader.d.ts │ │ ├── TIFFLoader.d.ts │ │ ├── TTFLoader.d.ts │ │ ├── USDZLoader.d.ts │ │ ├── UltraHDRLoader.d.ts │ │ ├── VOXLoader.d.ts │ │ ├── VRMLLoader.d.ts │ │ ├── VTKLoader.d.ts │ │ └── XYZLoader.d.ts │ │ ├── materials │ │ ├── LDrawConditionalLineMaterial.d.ts │ │ ├── LDrawConditionalLineNodeMaterial.d.ts │ │ ├── MeshGouraudMaterial.d.ts │ │ └── MeshPostProcessingMaterial.d.ts │ │ ├── math │ │ ├── Capsule.d.ts │ │ ├── ColorConverter.d.ts │ │ ├── ColorSpaces.d.ts │ │ ├── ConvexHull.d.ts │ │ ├── ImprovedNoise.d.ts │ │ ├── Lut.d.ts │ │ ├── MeshSurfaceSampler.d.ts │ │ ├── OBB.d.ts │ │ ├── Octree.d.ts │ │ └── SimplexNoise.d.ts │ │ ├── misc │ │ ├── ConvexObjectBreaker.d.ts │ │ ├── GPUComputationRenderer.d.ts │ │ ├── Gyroscope.d.ts │ │ ├── MD2Character.d.ts │ │ ├── MD2CharacterComplex.d.ts │ │ ├── MorphAnimMesh.d.ts │ │ ├── MorphBlendMesh.d.ts │ │ ├── ProgressiveLightMap.d.ts │ │ ├── ProgressiveLightMapGPU.d.ts │ │ ├── RollerCoaster.d.ts │ │ ├── Timer.d.ts │ │ ├── TubePainter.d.ts │ │ ├── Volume.d.ts │ │ └── VolumeSlice.d.ts │ │ ├── modifiers │ │ ├── CurveModifier.d.ts │ │ ├── CurveModifierGPU.d.ts │ │ ├── EdgeSplitModifier.d.ts │ │ ├── SimplifyModifier.d.ts │ │ └── TessellateModifier.d.ts │ │ ├── objects │ │ ├── GroundedSkybox.d.ts │ │ ├── Lensflare.d.ts │ │ ├── LensflareMesh.d.ts │ │ ├── MarchingCubes.d.ts │ │ ├── Reflector.d.ts │ │ ├── ReflectorForSSRPass.d.ts │ │ ├── Refractor.d.ts │ │ ├── ShadowMesh.d.ts │ │ ├── Sky.d.ts │ │ ├── SkyMesh.d.ts │ │ ├── Water.d.ts │ │ ├── Water2.d.ts │ │ ├── Water2Mesh.d.ts │ │ └── WaterMesh.d.ts │ │ ├── physics │ │ ├── AmmoPhysics.d.ts │ │ ├── JoltPhysics.d.ts │ │ └── RapierPhysics.d.ts │ │ ├── postprocessing │ │ ├── AfterimagePass.d.ts │ │ ├── BloomPass.d.ts │ │ ├── BokehPass.d.ts │ │ ├── ClearPass.d.ts │ │ ├── CubeTexturePass.d.ts │ │ ├── DotScreenPass.d.ts │ │ ├── EffectComposer.d.ts │ │ ├── FXAAPass.d.ts │ │ ├── FilmPass.d.ts │ │ ├── GTAOPass.d.ts │ │ ├── GlitchPass.d.ts │ │ ├── HalftonePass.d.ts │ │ ├── LUTPass.d.ts │ │ ├── MaskPass.d.ts │ │ ├── OutlinePass.d.ts │ │ ├── OutputPass.d.ts │ │ ├── Pass.d.ts │ │ ├── RenderPass.d.ts │ │ ├── RenderPixelatedPass.d.ts │ │ ├── RenderTransitionPass.d.ts │ │ ├── SAOPass.d.ts │ │ ├── SMAAPass.d.ts │ │ ├── SSAARenderPass.d.ts │ │ ├── SSAOPass.d.ts │ │ ├── SSRPass.d.ts │ │ ├── SavePass.d.ts │ │ ├── ShaderPass.d.ts │ │ ├── TAARenderPass.d.ts │ │ ├── TexturePass.d.ts │ │ └── UnrealBloomPass.d.ts │ │ ├── renderers │ │ ├── CSS2DRenderer.d.ts │ │ ├── CSS3DRenderer.d.ts │ │ ├── Projector.d.ts │ │ └── SVGRenderer.d.ts │ │ ├── shaders │ │ ├── ACESFilmicToneMappingShader.d.ts │ │ ├── AfterimageShader.d.ts │ │ ├── BasicShader.d.ts │ │ ├── BleachBypassShader.d.ts │ │ ├── BlendShader.d.ts │ │ ├── BokehShader.d.ts │ │ ├── BokehShader2.d.ts │ │ ├── BrightnessContrastShader.d.ts │ │ ├── ColorCorrectionShader.d.ts │ │ ├── ColorifyShader.d.ts │ │ ├── ConvolutionShader.d.ts │ │ ├── CopyShader.d.ts │ │ ├── DOFMipMapShader.d.ts │ │ ├── DepthLimitedBlurShader.d.ts │ │ ├── DigitalGlitch.d.ts │ │ ├── DotScreenShader.d.ts │ │ ├── ExposureShader.d.ts │ │ ├── FXAAShader.d.ts │ │ ├── FilmShader.d.ts │ │ ├── FocusShader.d.ts │ │ ├── FreiChenShader.d.ts │ │ ├── GTAOShader.d.ts │ │ ├── GammaCorrectionShader.d.ts │ │ ├── GodRaysShader.d.ts │ │ ├── HalftoneShader.d.ts │ │ ├── HorizontalBlurShader.d.ts │ │ ├── HorizontalTiltShiftShader.d.ts │ │ ├── HueSaturationShader.d.ts │ │ ├── KaleidoShader.d.ts │ │ ├── LuminosityHighPassShader.d.ts │ │ ├── LuminosityShader.d.ts │ │ ├── MirrorShader.d.ts │ │ ├── NormalMapShader.d.ts │ │ ├── OutputShader.d.ts │ │ ├── PoissonDenoiseShader.d.ts │ │ ├── RGBShiftShader.d.ts │ │ ├── SAOShader.d.ts │ │ ├── SMAAShader.d.ts │ │ ├── SSAOShader.d.ts │ │ ├── SSRShader.d.ts │ │ ├── SepiaShader.d.ts │ │ ├── SobelOperatorShader.d.ts │ │ ├── SubsurfaceScatteringShader.d.ts │ │ ├── TechnicolorShader.d.ts │ │ ├── ToonShader.d.ts │ │ ├── TriangleBlurShader.d.ts │ │ ├── UnpackDepthRGBAShader.d.ts │ │ ├── VelocityShader.d.ts │ │ ├── VerticalBlurShader.d.ts │ │ ├── VerticalTiltShiftShader.d.ts │ │ ├── VignetteShader.d.ts │ │ ├── VolumeShader.d.ts │ │ └── WaterRefractionShader.d.ts │ │ ├── textures │ │ └── FlakesTexture.d.ts │ │ ├── transpiler │ │ ├── AST.d.ts │ │ ├── GLSLDecoder.d.ts │ │ ├── ShaderToyDecoder.d.ts │ │ ├── TSLEncoder.d.ts │ │ └── Transpiler.d.ts │ │ ├── tsl │ │ ├── display │ │ │ ├── AfterImageNode.d.ts │ │ │ ├── AnaglyphPassNode.d.ts │ │ │ ├── AnamorphicNode.d.ts │ │ │ ├── BleachBypass.d.ts │ │ │ ├── BloomNode.d.ts │ │ │ ├── DenoiseNode.d.ts │ │ │ ├── DepthOfFieldNode.d.ts │ │ │ ├── DotScreenNode.d.ts │ │ │ ├── FXAANode.d.ts │ │ │ ├── FilmNode.d.ts │ │ │ ├── GTAONode.d.ts │ │ │ ├── GaussianBlurNode.d.ts │ │ │ ├── LensflareNode.d.ts │ │ │ ├── Lut3DNode.d.ts │ │ │ ├── MotionBlur.d.ts │ │ │ ├── OutlineNode.d.ts │ │ │ ├── ParallaxBarrierPassNode.d.ts │ │ │ ├── PixelationPassNode.d.ts │ │ │ ├── RGBShiftNode.d.ts │ │ │ ├── SMAANode.d.ts │ │ │ ├── SSAAPassNode.d.ts │ │ │ ├── SSRNode.d.ts │ │ │ ├── Sepia.d.ts │ │ │ ├── SobelOperatorNode.d.ts │ │ │ ├── StereoCompositePassNode.d.ts │ │ │ ├── StereoPassNode.d.ts │ │ │ ├── TRAAPassNode.d.ts │ │ │ ├── TransitionNode.d.ts │ │ │ └── hashBlur.d.ts │ │ ├── lighting │ │ │ └── TiledLightsNode.d.ts │ │ ├── math │ │ │ └── Bayer.d.ts │ │ ├── shadows │ │ │ ├── TileShadowNode.d.ts │ │ │ └── TileShadowNodeHelper.d.ts │ │ └── utils │ │ │ └── Raymarching.d.ts │ │ ├── utils │ │ ├── BufferGeometryUtils.d.ts │ │ ├── CameraUtils.d.ts │ │ ├── GeometryCompressionUtils.d.ts │ │ ├── GeometryUtils.d.ts │ │ ├── LDrawUtils.d.ts │ │ ├── SceneUtils.d.ts │ │ ├── ShadowMapViewer.d.ts │ │ ├── ShadowMapViewerGPU.d.ts │ │ ├── SkeletonUtils.d.ts │ │ ├── SortUtils.d.ts │ │ ├── UVsDebug.d.ts │ │ ├── WebGLTextureUtils.d.ts │ │ ├── WebGPUTextureUtils.d.ts │ │ └── WorkerPool.d.ts │ │ └── webxr │ │ ├── ARButton.d.ts │ │ ├── OculusHandModel.d.ts │ │ ├── OculusHandPointerModel.d.ts │ │ ├── Text2D.d.ts │ │ ├── VRButton.d.ts │ │ ├── XRButton.d.ts │ │ ├── XRControllerModelFactory.d.ts │ │ ├── XREstimatedLight.d.ts │ │ ├── XRHandMeshModel.d.ts │ │ ├── XRHandModelFactory.d.ts │ │ ├── XRHandPrimitiveModel.d.ts │ │ └── XRPlanes.d.ts │ ├── index.d.ts │ ├── package.json │ ├── src │ ├── Three.Core.d.ts │ ├── Three.TSL.d.ts │ ├── Three.WebGPU.Nodes.d.ts │ ├── Three.WebGPU.d.ts │ ├── Three.d.ts │ ├── animation │ │ ├── AnimationAction.d.ts │ │ ├── AnimationClip.d.ts │ │ ├── AnimationMixer.d.ts │ │ ├── AnimationObjectGroup.d.ts │ │ ├── AnimationUtils.d.ts │ │ ├── KeyframeTrack.d.ts │ │ ├── PropertyBinding.d.ts │ │ ├── PropertyMixer.d.ts │ │ └── tracks │ │ │ ├── BooleanKeyframeTrack.d.ts │ │ │ ├── ColorKeyframeTrack.d.ts │ │ │ ├── NumberKeyframeTrack.d.ts │ │ │ ├── QuaternionKeyframeTrack.d.ts │ │ │ ├── StringKeyframeTrack.d.ts │ │ │ └── VectorKeyframeTrack.d.ts │ ├── audio │ │ ├── Audio.d.ts │ │ ├── AudioAnalyser.d.ts │ │ ├── AudioContext.d.ts │ │ ├── AudioListener.d.ts │ │ └── PositionalAudio.d.ts │ ├── cameras │ │ ├── ArrayCamera.d.ts │ │ ├── Camera.d.ts │ │ ├── CubeCamera.d.ts │ │ ├── OrthographicCamera.d.ts │ │ ├── PerspectiveCamera.d.ts │ │ └── StereoCamera.d.ts │ ├── constants.d.ts │ ├── core │ │ ├── BufferAttribute.d.ts │ │ ├── BufferGeometry.d.ts │ │ ├── Clock.d.ts │ │ ├── EventDispatcher.d.ts │ │ ├── GLBufferAttribute.d.ts │ │ ├── InstancedBufferAttribute.d.ts │ │ ├── InstancedBufferGeometry.d.ts │ │ ├── InstancedInterleavedBuffer.d.ts │ │ ├── InterleavedBuffer.d.ts │ │ ├── InterleavedBufferAttribute.d.ts │ │ ├── Layers.d.ts │ │ ├── Object3D.d.ts │ │ ├── Raycaster.d.ts │ │ ├── RenderTarget.d.ts │ │ ├── RenderTarget3D.d.ts │ │ ├── Uniform.d.ts │ │ └── UniformsGroup.d.ts │ ├── extras │ │ ├── Controls.d.ts │ │ ├── DataUtils.d.ts │ │ ├── Earcut.d.ts │ │ ├── ImageUtils.d.ts │ │ ├── PMREMGenerator.d.ts │ │ ├── ShapeUtils.d.ts │ │ ├── TextureUtils.d.ts │ │ ├── core │ │ │ ├── Curve.d.ts │ │ │ ├── CurvePath.d.ts │ │ │ ├── Interpolations.d.ts │ │ │ ├── Path.d.ts │ │ │ ├── Shape.d.ts │ │ │ └── ShapePath.d.ts │ │ └── curves │ │ │ ├── ArcCurve.d.ts │ │ │ ├── CatmullRomCurve3.d.ts │ │ │ ├── CubicBezierCurve.d.ts │ │ │ ├── CubicBezierCurve3.d.ts │ │ │ ├── Curves.d.ts │ │ │ ├── EllipseCurve.d.ts │ │ │ ├── LineCurve.d.ts │ │ │ ├── LineCurve3.d.ts │ │ │ ├── QuadraticBezierCurve.d.ts │ │ │ ├── QuadraticBezierCurve3.d.ts │ │ │ └── SplineCurve.d.ts │ ├── geometries │ │ ├── BoxGeometry.d.ts │ │ ├── CapsuleGeometry.d.ts │ │ ├── CircleGeometry.d.ts │ │ ├── ConeGeometry.d.ts │ │ ├── CylinderGeometry.d.ts │ │ ├── DodecahedronGeometry.d.ts │ │ ├── EdgesGeometry.d.ts │ │ ├── ExtrudeGeometry.d.ts │ │ ├── Geometries.d.ts │ │ ├── IcosahedronGeometry.d.ts │ │ ├── LatheGeometry.d.ts │ │ ├── OctahedronGeometry.d.ts │ │ ├── PlaneGeometry.d.ts │ │ ├── PolyhedronGeometry.d.ts │ │ ├── RingGeometry.d.ts │ │ ├── ShapeGeometry.d.ts │ │ ├── SphereGeometry.d.ts │ │ ├── TetrahedronGeometry.d.ts │ │ ├── TorusGeometry.d.ts │ │ ├── TorusKnotGeometry.d.ts │ │ ├── TubeGeometry.d.ts │ │ └── WireframeGeometry.d.ts │ ├── helpers │ │ ├── ArrowHelper.d.ts │ │ ├── AxesHelper.d.ts │ │ ├── Box3Helper.d.ts │ │ ├── BoxHelper.d.ts │ │ ├── CameraHelper.d.ts │ │ ├── DirectionalLightHelper.d.ts │ │ ├── GridHelper.d.ts │ │ ├── HemisphereLightHelper.d.ts │ │ ├── PlaneHelper.d.ts │ │ ├── PointLightHelper.d.ts │ │ ├── PolarGridHelper.d.ts │ │ ├── SkeletonHelper.d.ts │ │ └── SpotLightHelper.d.ts │ ├── lights │ │ ├── AmbientLight.d.ts │ │ ├── DirectionalLight.d.ts │ │ ├── DirectionalLightShadow.d.ts │ │ ├── HemisphereLight.d.ts │ │ ├── Light.d.ts │ │ ├── LightProbe.d.ts │ │ ├── LightShadow.d.ts │ │ ├── PointLight.d.ts │ │ ├── PointLightShadow.d.ts │ │ ├── RectAreaLight.d.ts │ │ ├── SpotLight.d.ts │ │ ├── SpotLightShadow.d.ts │ │ └── webgpu │ │ │ ├── IESSpotLight.d.ts │ │ │ └── ProjectorLight.d.ts │ ├── loaders │ │ ├── AnimationLoader.d.ts │ │ ├── AudioLoader.d.ts │ │ ├── BufferGeometryLoader.d.ts │ │ ├── Cache.d.ts │ │ ├── CompressedTextureLoader.d.ts │ │ ├── CubeTextureLoader.d.ts │ │ ├── DataTextureLoader.d.ts │ │ ├── FileLoader.d.ts │ │ ├── ImageBitmapLoader.d.ts │ │ ├── ImageLoader.d.ts │ │ ├── Loader.d.ts │ │ ├── LoaderUtils.d.ts │ │ ├── LoadingManager.d.ts │ │ ├── MaterialLoader.d.ts │ │ ├── ObjectLoader.d.ts │ │ ├── TextureLoader.d.ts │ │ └── nodes │ │ │ ├── NodeLoader.d.ts │ │ │ ├── NodeMaterialLoader.d.ts │ │ │ └── NodeObjectLoader.d.ts │ ├── materials │ │ ├── LineBasicMaterial.d.ts │ │ ├── LineDashedMaterial.d.ts │ │ ├── Material.d.ts │ │ ├── Materials.d.ts │ │ ├── MeshBasicMaterial.d.ts │ │ ├── MeshDepthMaterial.d.ts │ │ ├── MeshDistanceMaterial.d.ts │ │ ├── MeshLambertMaterial.d.ts │ │ ├── MeshMatcapMaterial.d.ts │ │ ├── MeshNormalMaterial.d.ts │ │ ├── MeshPhongMaterial.d.ts │ │ ├── MeshPhysicalMaterial.d.ts │ │ ├── MeshStandardMaterial.d.ts │ │ ├── MeshToonMaterial.d.ts │ │ ├── PointsMaterial.d.ts │ │ ├── RawShaderMaterial.d.ts │ │ ├── ShaderMaterial.d.ts │ │ ├── ShadowMaterial.d.ts │ │ ├── SpriteMaterial.d.ts │ │ └── nodes │ │ │ ├── Line2NodeMaterial.d.ts │ │ │ ├── LineBasicNodeMaterial.d.ts │ │ │ ├── LineDashedNodeMaterial.d.ts │ │ │ ├── MeshBasicNodeMaterial.d.ts │ │ │ ├── MeshLambertNodeMaterial.d.ts │ │ │ ├── MeshMatcapNodeMaterial.d.ts │ │ │ ├── MeshNormalNodeMaterial.d.ts │ │ │ ├── MeshPhongNodeMaterial.d.ts │ │ │ ├── MeshPhysicalNodeMaterial.d.ts │ │ │ ├── MeshSSSNodeMaterial.d.ts │ │ │ ├── MeshStandardNodeMaterial.d.ts │ │ │ ├── MeshToonNodeMaterial.d.ts │ │ │ ├── NodeMaterial.d.ts │ │ │ ├── NodeMaterials.d.ts │ │ │ ├── PointsNodeMaterial.d.ts │ │ │ ├── ShadowNodeMaterial.d.ts │ │ │ ├── SpriteNodeMaterial.d.ts │ │ │ ├── VolumeNodeMaterial.d.ts │ │ │ └── manager │ │ │ └── NodeMaterialObserver.d.ts │ ├── math │ │ ├── Box2.d.ts │ │ ├── Box3.d.ts │ │ ├── Color.d.ts │ │ ├── ColorManagement.d.ts │ │ ├── Cylindrical.d.ts │ │ ├── Euler.d.ts │ │ ├── Frustum.d.ts │ │ ├── FrustumArray.d.ts │ │ ├── Interpolant.d.ts │ │ ├── Line3.d.ts │ │ ├── MathUtils.d.ts │ │ ├── Matrix2.d.ts │ │ ├── Matrix3.d.ts │ │ ├── Matrix4.d.ts │ │ ├── Plane.d.ts │ │ ├── Quaternion.d.ts │ │ ├── Ray.d.ts │ │ ├── Sphere.d.ts │ │ ├── Spherical.d.ts │ │ ├── SphericalHarmonics3.d.ts │ │ ├── Triangle.d.ts │ │ ├── Vector2.d.ts │ │ ├── Vector3.d.ts │ │ ├── Vector4.d.ts │ │ └── interpolants │ │ │ ├── CubicInterpolant.d.ts │ │ │ ├── DiscreteInterpolant.d.ts │ │ │ ├── LinearInterpolant.d.ts │ │ │ └── QuaternionLinearInterpolant.d.ts │ ├── nodes │ │ ├── Nodes.d.ts │ │ ├── TSL.d.ts │ │ ├── accessors │ │ │ ├── AccessorsUtils.d.ts │ │ │ ├── Arrays.d.ts │ │ │ ├── BatchNode.d.ts │ │ │ ├── Bitangent.d.ts │ │ │ ├── BufferAttributeNode.d.ts │ │ │ ├── BufferNode.d.ts │ │ │ ├── BuiltinNode.d.ts │ │ │ ├── Camera.d.ts │ │ │ ├── ClippingNode.d.ts │ │ │ ├── CubeTextureNode.d.ts │ │ │ ├── InstanceNode.d.ts │ │ │ ├── InstancedMeshNode.d.ts │ │ │ ├── Lights.d.ts │ │ │ ├── MaterialNode.d.ts │ │ │ ├── MaterialProperties.d.ts │ │ │ ├── MaterialReferenceNode.d.ts │ │ │ ├── ModelNode.d.ts │ │ │ ├── ModelViewProjectionNode.d.ts │ │ │ ├── MorphNode.d.ts │ │ │ ├── Normal.d.ts │ │ │ ├── Object3DNode.d.ts │ │ │ ├── PointUVNode.d.ts │ │ │ ├── Position.d.ts │ │ │ ├── ReferenceBaseNode.d.ts │ │ │ ├── ReferenceNode.d.ts │ │ │ ├── ReflectVector.d.ts │ │ │ ├── RendererReferenceNode.d.ts │ │ │ ├── SceneNode.d.ts │ │ │ ├── SkinningNode.d.ts │ │ │ ├── StorageBufferNode.d.ts │ │ │ ├── StorageTextureNode.d.ts │ │ │ ├── Tangent.d.ts │ │ │ ├── Texture3DNode.d.ts │ │ │ ├── TextureBicubic.d.ts │ │ │ ├── TextureNode.d.ts │ │ │ ├── TextureSizeNode.d.ts │ │ │ ├── UV.d.ts │ │ │ ├── UniformArrayNode.d.ts │ │ │ ├── UserDataNode.d.ts │ │ │ ├── VelocityNode.d.ts │ │ │ └── VertexColorNode.d.ts │ │ ├── code │ │ │ ├── CodeNode.d.ts │ │ │ ├── ExpressionNode.d.ts │ │ │ ├── FunctionCallNode.d.ts │ │ │ ├── FunctionNode.d.ts │ │ │ ├── ScriptableNode.d.ts │ │ │ └── ScriptableValueNode.d.ts │ │ ├── core │ │ │ ├── ArrayNode.d.ts │ │ │ ├── AssignNode.d.ts │ │ │ ├── AttributeNode.d.ts │ │ │ ├── BypassNode.d.ts │ │ │ ├── CacheNode.d.ts │ │ │ ├── ConstNode.d.ts │ │ │ ├── ContextNode.d.ts │ │ │ ├── IndexNode.d.ts │ │ │ ├── InputNode.d.ts │ │ │ ├── LightingModel.d.ts │ │ │ ├── MRTNode.d.ts │ │ │ ├── Node.d.ts │ │ │ ├── NodeAttribute.d.ts │ │ │ ├── NodeBuilder.d.ts │ │ │ ├── NodeCache.d.ts │ │ │ ├── NodeCode.d.ts │ │ │ ├── NodeFrame.d.ts │ │ │ ├── NodeFunction.d.ts │ │ │ ├── NodeFunctionInput.d.ts │ │ │ ├── NodeParser.d.ts │ │ │ ├── NodeUniform.d.ts │ │ │ ├── NodeUtils.d.ts │ │ │ ├── NodeVar.d.ts │ │ │ ├── NodeVarying.d.ts │ │ │ ├── OutputStructNode.d.ts │ │ │ ├── ParameterNode.d.ts │ │ │ ├── PropertyNode.d.ts │ │ │ ├── StackNode.d.ts │ │ │ ├── StructNode.d.ts │ │ │ ├── StructType.d.ts │ │ │ ├── StructTypeNode.d.ts │ │ │ ├── TempNode.d.ts │ │ │ ├── UniformGroupNode.d.ts │ │ │ ├── UniformNode.d.ts │ │ │ ├── VarNode.d.ts │ │ │ ├── VaryingNode.d.ts │ │ │ └── constants.d.ts │ │ ├── display │ │ │ ├── BlendModes.d.ts │ │ │ ├── BumpMapNode.d.ts │ │ │ ├── ColorAdjustment.d.ts │ │ │ ├── ColorSpaceFunctions.d.ts │ │ │ ├── ColorSpaceNode.d.ts │ │ │ ├── FrontFacingNode.d.ts │ │ │ ├── NormalMapNode.d.ts │ │ │ ├── PassNode.d.ts │ │ │ ├── PosterizeNode.d.ts │ │ │ ├── RenderOutputNode.d.ts │ │ │ ├── ScreenNode.d.ts │ │ │ ├── ToneMappingFunctions.d.ts │ │ │ ├── ToneMappingNode.d.ts │ │ │ ├── ToonOutlinePassNode.d.ts │ │ │ ├── ViewportDepthNode.d.ts │ │ │ ├── ViewportDepthTextureNode.d.ts │ │ │ ├── ViewportSharedTextureNode.d.ts │ │ │ └── ViewportTextureNode.d.ts │ │ ├── fog │ │ │ └── Fog.d.ts │ │ ├── functions │ │ │ ├── BSDF │ │ │ │ ├── BRDF_GGX.d.ts │ │ │ │ ├── BRDF_Lambert.d.ts │ │ │ │ ├── BRDF_Sheen.d.ts │ │ │ │ ├── DFGApprox.d.ts │ │ │ │ ├── D_GGX.d.ts │ │ │ │ ├── D_GGX_Anisotropic.d.ts │ │ │ │ ├── F_Schlick.d.ts │ │ │ │ ├── LTC.d.ts │ │ │ │ ├── Schlick_to_F0.d.ts │ │ │ │ ├── V_GGX_SmithCorrelated.d.ts │ │ │ │ └── V_GGX_SmithCorrelated_Anisotropic.d.ts │ │ │ ├── BasicLightingModel.d.ts │ │ │ ├── PhongLightingModel.d.ts │ │ │ ├── PhysicalLightingModel.d.ts │ │ │ ├── ShadowMaskModel.d.ts │ │ │ ├── ToonLightingModel.d.ts │ │ │ ├── VolumetricLightingModel.d.ts │ │ │ └── material │ │ │ │ ├── getAlphaHashThreshold.d.ts │ │ │ │ ├── getGeometryRoughness.d.ts │ │ │ │ ├── getParallaxCorrectNormal.d.ts │ │ │ │ ├── getRoughness.d.ts │ │ │ │ └── getShIrradianceAt.d.ts │ │ ├── geometry │ │ │ └── RangeNode.d.ts │ │ ├── gpgpu │ │ │ ├── AtomicFunctionNode.d.ts │ │ │ ├── BarrierNode.d.ts │ │ │ ├── ComputeBuiltinNode.d.ts │ │ │ ├── ComputeNode.d.ts │ │ │ └── WorkgroupInfoNode.d.ts │ │ ├── lighting │ │ │ ├── AONode.d.ts │ │ │ ├── AmbientLightNode.d.ts │ │ │ ├── AnalyticLightNode.d.ts │ │ │ ├── BasicEnvironmentNode.d.ts │ │ │ ├── BasicLightMapNode.d.ts │ │ │ ├── DirectionalLightNode.d.ts │ │ │ ├── EnvironmentNode.d.ts │ │ │ ├── HemisphereLightNode.d.ts │ │ │ ├── IESSpotLightNode.d.ts │ │ │ ├── IrradianceNode.d.ts │ │ │ ├── LightProbeNode.d.ts │ │ │ ├── LightUtils.d.ts │ │ │ ├── LightingContextNode.d.ts │ │ │ ├── LightingNode.d.ts │ │ │ ├── LightsNode.d.ts │ │ │ ├── PointLightNode.d.ts │ │ │ ├── PointShadowNode.d.ts │ │ │ ├── ProjectorLightNode.d.ts │ │ │ ├── RectAreaLightNode.d.ts │ │ │ ├── ShadowBaseNode.d.ts │ │ │ ├── ShadowFilterNode.d.ts │ │ │ ├── ShadowNode.d.ts │ │ │ └── SpotLightNode.d.ts │ │ ├── materialx │ │ │ ├── MaterialXNodes.d.ts │ │ │ └── lib │ │ │ │ ├── mx_hsv.d.ts │ │ │ │ ├── mx_noise.d.ts │ │ │ │ └── mx_transform_color.d.ts │ │ ├── math │ │ │ ├── ConditionalNode.d.ts │ │ │ ├── Hash.d.ts │ │ │ ├── MathNode.d.ts │ │ │ ├── MathUtils.d.ts │ │ │ ├── OperatorNode.d.ts │ │ │ └── TriNoise3D.d.ts │ │ ├── parsers │ │ │ ├── GLSLNodeFunction.d.ts │ │ │ └── GLSLNodeParser.d.ts │ │ ├── pmrem │ │ │ ├── PMREMNode.d.ts │ │ │ └── PMREMUtils.d.ts │ │ ├── procedural │ │ │ └── Checker.d.ts │ │ ├── shapes │ │ │ └── Shapes.d.ts │ │ ├── tsl │ │ │ ├── TSLBase.d.ts │ │ │ └── TSLCore.d.ts │ │ └── utils │ │ │ ├── ArrayElementNode.d.ts │ │ │ ├── ConvertNode.d.ts │ │ │ ├── CubeMapNode.d.ts │ │ │ ├── DebugNode.d.ts │ │ │ ├── Discard.d.ts │ │ │ ├── EquirectUVNode.d.ts │ │ │ ├── FunctionOverloadingNode.d.ts │ │ │ ├── JoinNode.d.ts │ │ │ ├── LoopNode.d.ts │ │ │ ├── MatcapUVNode.d.ts │ │ │ ├── MaxMipLevelNode.d.ts │ │ │ ├── MemberNode.d.ts │ │ │ ├── Oscillators.d.ts │ │ │ ├── Packing.d.ts │ │ │ ├── PostProcessingUtils.d.ts │ │ │ ├── RTTNode.d.ts │ │ │ ├── ReflectorNode.d.ts │ │ │ ├── RemapNode.d.ts │ │ │ ├── RotateNode.d.ts │ │ │ ├── SetNode.d.ts │ │ │ ├── SplitNode.d.ts │ │ │ ├── SpriteSheetUVNode.d.ts │ │ │ ├── SpriteUtils.d.ts │ │ │ ├── StorageArrayElementNode.d.ts │ │ │ ├── Timer.d.ts │ │ │ ├── TriplanarTexturesNode.d.ts │ │ │ ├── UVUtils.d.ts │ │ │ └── ViewportUtils.d.ts │ ├── objects │ │ ├── BatchedMesh.d.ts │ │ ├── Bone.d.ts │ │ ├── ClippingGroup.d.ts │ │ ├── Group.d.ts │ │ ├── InstancedMesh.d.ts │ │ ├── LOD.d.ts │ │ ├── Line.d.ts │ │ ├── LineLoop.d.ts │ │ ├── LineSegments.d.ts │ │ ├── Mesh.d.ts │ │ ├── Points.d.ts │ │ ├── Skeleton.d.ts │ │ ├── SkinnedMesh.d.ts │ │ └── Sprite.d.ts │ ├── renderers │ │ ├── WebGL3DRenderTarget.d.ts │ │ ├── WebGLArrayRenderTarget.d.ts │ │ ├── WebGLCubeRenderTarget.d.ts │ │ ├── WebGLRenderTarget.d.ts │ │ ├── WebGLRenderer.d.ts │ │ ├── common │ │ │ ├── Animation.d.ts │ │ │ ├── Attributes.d.ts │ │ │ ├── Backend.d.ts │ │ │ ├── Background.d.ts │ │ │ ├── BindGroup.d.ts │ │ │ ├── Binding.d.ts │ │ │ ├── Bindings.d.ts │ │ │ ├── Buffer.d.ts │ │ │ ├── BufferUtils.d.ts │ │ │ ├── BundleGroup.d.ts │ │ │ ├── ChainMap.d.ts │ │ │ ├── ClippingContext.d.ts │ │ │ ├── Color4.d.ts │ │ │ ├── ComputePipeline.d.ts │ │ │ ├── Constants.d.ts │ │ │ ├── CubeRenderTarget.d.ts │ │ │ ├── DataMap.d.ts │ │ │ ├── Geometries.d.ts │ │ │ ├── IndirectStorageBufferAttribute.d.ts │ │ │ ├── Info.d.ts │ │ │ ├── Lighting.d.ts │ │ │ ├── Pipeline.d.ts │ │ │ ├── Pipelines.d.ts │ │ │ ├── PostProcessing.d.ts │ │ │ ├── ProgrammableStage.d.ts │ │ │ ├── QuadMesh.d.ts │ │ │ ├── RenderBundle.d.ts │ │ │ ├── RenderBundles.d.ts │ │ │ ├── RenderContext.d.ts │ │ │ ├── RenderContexts.d.ts │ │ │ ├── RenderList.d.ts │ │ │ ├── RenderLists.d.ts │ │ │ ├── RenderObject.d.ts │ │ │ ├── RenderObjects.d.ts │ │ │ ├── RenderPipeline.d.ts │ │ │ ├── Renderer.d.ts │ │ │ ├── RendererUtils.d.ts │ │ │ ├── SampledTexture.d.ts │ │ │ ├── Sampler.d.ts │ │ │ ├── StorageBufferAttribute.d.ts │ │ │ ├── StorageInstancedBufferAttribute.d.ts │ │ │ ├── StorageTexture.d.ts │ │ │ ├── Textures.d.ts │ │ │ ├── TimestampQueryPool.d.ts │ │ │ ├── Uniform.d.ts │ │ │ ├── UniformBuffer.d.ts │ │ │ ├── UniformsGroup.d.ts │ │ │ ├── XRManager.d.ts │ │ │ ├── XRRenderTarget.d.ts │ │ │ ├── extras │ │ │ │ └── PMREMGenerator.d.ts │ │ │ └── nodes │ │ │ │ ├── NodeBuilderState.d.ts │ │ │ │ ├── NodeLibrary.d.ts │ │ │ │ ├── NodeSampledTexture.d.ts │ │ │ │ ├── NodeSampler.d.ts │ │ │ │ ├── NodeUniform.d.ts │ │ │ │ ├── NodeUniformsGroup.d.ts │ │ │ │ ├── Nodes.d.ts │ │ │ │ └── StandardNodeLibrary.d.ts │ │ ├── shaders │ │ │ ├── ShaderChunk.d.ts │ │ │ ├── ShaderLib.d.ts │ │ │ ├── UniformsLib.d.ts │ │ │ └── UniformsUtils.d.ts │ │ ├── webgl-fallback │ │ │ └── WebGLBackend.d.ts │ │ ├── webgl │ │ │ ├── WebGLAttributes.d.ts │ │ │ ├── WebGLBindingStates.d.ts │ │ │ ├── WebGLBufferRenderer.d.ts │ │ │ ├── WebGLCapabilities.d.ts │ │ │ ├── WebGLClipping.d.ts │ │ │ ├── WebGLCubeMaps.d.ts │ │ │ ├── WebGLCubeUVMaps.d.ts │ │ │ ├── WebGLExtensions.d.ts │ │ │ ├── WebGLGeometries.d.ts │ │ │ ├── WebGLIndexedBufferRenderer.d.ts │ │ │ ├── WebGLInfo.d.ts │ │ │ ├── WebGLLights.d.ts │ │ │ ├── WebGLObjects.d.ts │ │ │ ├── WebGLProgram.d.ts │ │ │ ├── WebGLPrograms.d.ts │ │ │ ├── WebGLProperties.d.ts │ │ │ ├── WebGLRenderLists.d.ts │ │ │ ├── WebGLShader.d.ts │ │ │ ├── WebGLShadowMap.d.ts │ │ │ ├── WebGLState.d.ts │ │ │ ├── WebGLTextures.d.ts │ │ │ ├── WebGLUniforms.d.ts │ │ │ ├── WebGLUniformsGroups.d.ts │ │ │ └── WebGLUtils.d.ts │ │ ├── webgpu │ │ │ ├── WebGPUBackend.d.ts │ │ │ ├── WebGPURenderer.Nodes.d.ts │ │ │ ├── WebGPURenderer.d.ts │ │ │ ├── nodes │ │ │ │ ├── BasicNodeLibrary.d.ts │ │ │ │ ├── StandardNodeLibrary.d.ts │ │ │ │ ├── WGSLNodeBuilder.d.ts │ │ │ │ ├── WGSLNodeFunction.d.ts │ │ │ │ └── WGSLNodeParser.d.ts │ │ │ └── utils │ │ │ │ └── WebGPUConstants.d.ts │ │ └── webxr │ │ │ ├── WebXRController.d.ts │ │ │ ├── WebXRDepthSensing.d.ts │ │ │ └── WebXRManager.d.ts │ ├── scenes │ │ ├── Fog.d.ts │ │ ├── FogExp2.d.ts │ │ └── Scene.d.ts │ ├── textures │ │ ├── CanvasTexture.d.ts │ │ ├── CompressedArrayTexture.d.ts │ │ ├── CompressedCubeTexture.d.ts │ │ ├── CompressedTexture.d.ts │ │ ├── CubeTexture.d.ts │ │ ├── Data3DTexture.d.ts │ │ ├── DataArrayTexture.d.ts │ │ ├── DataTexture.d.ts │ │ ├── DepthTexture.d.ts │ │ ├── FramebufferTexture.d.ts │ │ ├── Source.d.ts │ │ ├── Texture.d.ts │ │ ├── VideoFrameTexture.d.ts │ │ └── VideoTexture.d.ts │ └── utils.d.ts │ ├── test │ ├── integration │ │ ├── geometry-buffer.ts │ │ ├── instanced-mesh.ts │ │ ├── lights-pointlights2.ts │ │ ├── loaders-gltfloader-plugin.ts │ │ ├── materials-meshgouraud.ts │ │ ├── nodes-webgl.ts │ │ ├── objects-reflector.ts │ │ ├── three-examples │ │ │ ├── webgl2_rendertarget_texture2darray.ts │ │ │ ├── webgl_loader_ldraw.ts │ │ │ ├── webgl_materials_channels.ts │ │ │ └── webxr_vr_handinput_cubes.ts │ │ └── webxr-cube.ts │ └── unit │ │ ├── examples │ │ └── jsm │ │ │ ├── exporters │ │ │ ├── PLYExporter.ts │ │ │ └── STLExporter.ts │ │ │ ├── helpers │ │ │ └── ViewHelper.ts │ │ │ ├── libs │ │ │ ├── lil-gui.ts │ │ │ └── tween.ts │ │ │ ├── lines │ │ │ └── LineMaterial.ts │ │ │ ├── nodes │ │ │ ├── ShaderNode │ │ │ │ └── ShaderNode.ts │ │ │ ├── core │ │ │ │ └── FunctionNode.ts │ │ │ ├── display │ │ │ │ └── ColorAdjustmentNode.ts │ │ │ └── materialx │ │ │ │ ├── MaterialXNodes.ts │ │ │ │ └── lib │ │ │ │ ├── mx_hsv.ts │ │ │ │ ├── mx_noise.ts │ │ │ │ └── mx_transform_color.ts │ │ │ ├── postprocessing │ │ │ ├── EffectComposer.ts │ │ │ └── SavePass.ts │ │ │ └── shaders │ │ │ └── ACESFilmicToneMappingShader.ts │ │ └── src │ │ ├── audio │ │ └── AudioContext.ts │ │ ├── core │ │ ├── EventDispatcher.ts │ │ └── Uniform.ts │ │ ├── extras │ │ └── Earcut.ts │ │ ├── renderers │ │ └── webgl │ │ │ └── WebGLUtils.ts │ │ └── textures │ │ └── Texture.ts │ ├── three-tests.ts │ └── tsconfig.json └── update-three.sh /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: ["plugin:@definitelytyped/all"], 4 | }; 5 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [Methuselah96, joshuaellis] 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # JetBrains IDE 2 | .idea/ 3 | 4 | # Dependency directories 5 | node_modules/ 6 | 7 | # Logs 8 | logs 9 | *.log 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | lerna-debug.log* 14 | 15 | *.tgz 16 | .DS_Store 17 | 18 | .pnp.* 19 | .yarn/* 20 | !.yarn/patches 21 | !.yarn/plugins 22 | !.yarn/releases 23 | !.yarn/sdks 24 | !.yarn/versions 25 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "three.js"] 2 | path = three.js 3 | url = https://github.com/mrdoob/three.js 4 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .pnp.* 2 | .yarn/* 3 | pnpm-lock.yaml 4 | types 5 | three.js 6 | -------------------------------------------------------------------------------- /attw.json: -------------------------------------------------------------------------------- 1 | { 2 | "ignoreRules": [ 3 | "no-resolution", 4 | "cjs-only-exports-default", 5 | "unexpected-module-syntax", 6 | "cjs-resolves-to-esm" 7 | ], 8 | "failingPackages": [] 9 | } 10 | -------------------------------------------------------------------------------- /examples-testing/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/prettierrc", 3 | "arrowParens": "avoid", 4 | "singleQuote": true, 5 | "trailingComma": "all", 6 | "tabWidth": 4, 7 | "printWidth": 120 8 | } 9 | -------------------------------------------------------------------------------- /examples-testing/README.md: -------------------------------------------------------------------------------- 1 | # Update patch 2 | 3 | - `pnpm run create-examples` 4 | - Commit changes 5 | - `git apply changes.patch` 6 | - Make changes 7 | - `pnpm run type-check` 8 | - `git diff > ../changes.patch` 9 | - Reset changes 10 | - Move patch file 11 | 12 | # Update sources 13 | 14 | - `pnpm run create-examples` 15 | - Commit changes 16 | - `git apply --reject changes.patch` 17 | - Fix conflicts 18 | - `pnpm run type-check` 19 | - `git diff > ../changes.patch` 20 | - Reset example changes 21 | - Move patch file 22 | - Commit changes 23 | -------------------------------------------------------------------------------- /examples-testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "examples-testing", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "create-examples": "node index.js", 8 | "type-check": "tsc", 9 | "format": "prettier --write .", 10 | "format-check": "prettier --check ." 11 | }, 12 | "type": "module", 13 | "author": "", 14 | "license": "ISC", 15 | "dependencies": { 16 | "@types/three": "file:../types/three", 17 | "3d-tiles-renderer": "~0.4.8", 18 | "prettier": "^3.5.3", 19 | "stats-gl": "^3.6.0", 20 | "typescript": "latest" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /examples-testing/prepare-examples.sh: -------------------------------------------------------------------------------- 1 | pnpm run create-examples 2 | git add -A 3 | git commit -m "Add examples" 4 | git apply changes.patch --3way 5 | -------------------------------------------------------------------------------- /examples-testing/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2017", 4 | "module": "NodeNext", 5 | "types": [], 6 | "noEmit": true, 7 | "forceConsistentCasingInFileNames": true, 8 | "strict": true 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples-testing/update-patch.sh: -------------------------------------------------------------------------------- 1 | pnpm run format 2 | git diff > ../changes.patch 3 | mv ../changes.patch . 4 | rm -rf examples 5 | git add -A 6 | git commit -m "Update patch and delete examples" 7 | -------------------------------------------------------------------------------- /jsdoc-testing/.dprint.jsonc: -------------------------------------------------------------------------------- 1 | { 2 | "includes": ["jsdoc/**/*.d.ts"], 3 | "plugins": [ 4 | "https://plugins.dprint.dev/typescript-0.89.3.wasm", 5 | "https://plugins.dprint.dev/json-0.19.2.wasm", 6 | "https://plugins.dprint.dev/markdown-0.16.4.wasm", 7 | "https://plugins.dprint.dev/prettier-0.39.0.json@896b70f29ef8213c1b0ba81a93cee9c2d4f39ac2194040313cd433906db7bc7c", 8 | ], 9 | "indentWidth": 4, 10 | "lineWidth": 120, 11 | "json": { 12 | "trailingCommas": "never", // Our tsconfig files must be parsable by JSON.parse. 13 | }, 14 | } 15 | -------------------------------------------------------------------------------- /jsdoc-testing/.prettierignore: -------------------------------------------------------------------------------- 1 | **/*.d.ts 2 | -------------------------------------------------------------------------------- /jsdoc-testing/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/prettierrc", 3 | "arrowParens": "avoid", 4 | "singleQuote": true, 5 | "trailingComma": "all", 6 | "tabWidth": 4, 7 | "printWidth": 120 8 | } 9 | -------------------------------------------------------------------------------- /jsdoc-testing/prepare-jsdoc.sh: -------------------------------------------------------------------------------- 1 | pnpm run build-declarations 2 | git add -A 3 | git commit -m "Add jsdoc" 4 | git apply changes.patch --3way 5 | -------------------------------------------------------------------------------- /jsdoc-testing/tsconfig.jsdoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": ["../three.js/src/animation/**/*"], 3 | "compilerOptions": { 4 | "target": "es2017", 5 | "module": "NodeNext", 6 | "types": [], 7 | "allowJs": true, 8 | "declaration": true, 9 | "emitDeclarationOnly": true, 10 | "outDir": "jsdoc", 11 | "forceConsistentCasingInFileNames": true, 12 | "strict": true 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /jsdoc-testing/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2017", 4 | "module": "NodeNext", 5 | "types": [], 6 | "noEmit": true, 7 | "forceConsistentCasingInFileNames": true, 8 | "strict": true 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /jsdoc-testing/update-declarations.sh: -------------------------------------------------------------------------------- 1 | pnpm run build-declarations 2 | git apply changes.patch 3 | pnpm run format-dprint 4 | pnpm run copy-declarations 5 | rm -rf jsdoc 6 | git add -A 7 | git commit -m "Update declarations" 8 | -------------------------------------------------------------------------------- /jsdoc-testing/update-patch.sh: -------------------------------------------------------------------------------- 1 | git diff > ../changes.patch 2 | mv ../changes.patch . 3 | rm -rf jsdoc 4 | git add -A 5 | git commit -m "Update patch and delete jsdoc" 6 | -------------------------------------------------------------------------------- /notNeededPackages.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": {} 3 | } 4 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - examples-testing 3 | - jsdoc-testing 4 | - src-testing 5 | - types/three 6 | onlyBuiltDependencies: 7 | - dprint 8 | -------------------------------------------------------------------------------- /src-testing/.dprint.jsonc: -------------------------------------------------------------------------------- 1 | { 2 | "includes": ["src/**/*.d.ts"], 3 | "plugins": [ 4 | "https://plugins.dprint.dev/typescript-0.89.3.wasm", 5 | "https://plugins.dprint.dev/json-0.19.2.wasm", 6 | "https://plugins.dprint.dev/markdown-0.16.4.wasm", 7 | "https://plugins.dprint.dev/prettier-0.39.0.json@896b70f29ef8213c1b0ba81a93cee9c2d4f39ac2194040313cd433906db7bc7c", 8 | ], 9 | "indentWidth": 4, 10 | "lineWidth": 120, 11 | "json": { 12 | "trailingCommas": "never", // Our tsconfig files must be parsable by JSON.parse. 13 | }, 14 | } 15 | -------------------------------------------------------------------------------- /src-testing/.prettierignore: -------------------------------------------------------------------------------- 1 | **/*.d.ts 2 | -------------------------------------------------------------------------------- /src-testing/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/prettierrc", 3 | "arrowParens": "avoid", 4 | "singleQuote": true, 5 | "trailingComma": "all", 6 | "tabWidth": 4, 7 | "printWidth": 120 8 | } 9 | -------------------------------------------------------------------------------- /src-testing/README.md: -------------------------------------------------------------------------------- 1 | # Update patch 2 | 3 | - `pnpm run create-examples` 4 | - Commit changes 5 | - `git apply changes.patch` 6 | - Make changes 7 | - `pnpm run type-check` 8 | - `git diff > ../changes.patch` 9 | - Reset changes 10 | - Move patch file 11 | 12 | # Update sources 13 | 14 | - `pnpm run create-examples` 15 | - Commit changes 16 | - `git apply --reject changes.patch` 17 | - Fix conflicts 18 | - `pnpm run type-check` 19 | - `git diff > ../changes.patch` 20 | - Reset example changes 21 | - Move patch file 22 | - Commit changes 23 | -------------------------------------------------------------------------------- /src-testing/prepare-src.sh: -------------------------------------------------------------------------------- 1 | pnpm run create-src 2 | git add -A 3 | git commit -m "Add src" 4 | git apply changes.patch --3way 5 | -------------------------------------------------------------------------------- /src-testing/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2017", 4 | "module": "NodeNext", 5 | "types": [], 6 | "declaration": true, 7 | "emitDeclarationOnly": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "strict": true 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src-testing/update-declarations.sh: -------------------------------------------------------------------------------- 1 | pnpm run create-src 2 | git apply changes.patch 3 | pnpm run build-declarations 4 | pnpm run format-dprint 5 | pnpm run copy-declarations 6 | rm -rf src 7 | git add -A 8 | git commit -m "Update declarations" 9 | -------------------------------------------------------------------------------- /src-testing/update-patch.sh: -------------------------------------------------------------------------------- 1 | pnpm run format 2 | git diff > ../changes.patch 3 | mv ../changes.patch . 4 | rm -rf src 5 | git add -A 6 | git commit -m "Update patch and delete src" 7 | -------------------------------------------------------------------------------- /tsconfig.all-files.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "node16", 4 | "lib": [ 5 | "es2017", 6 | "dom" 7 | ], 8 | "noImplicitAny": true, 9 | "noImplicitThis": true, 10 | "strictFunctionTypes": true, 11 | "strictNullChecks": true, 12 | "types": [], 13 | "noEmit": true, 14 | "forceConsistentCasingInFileNames": true 15 | }, 16 | "include": ["types/three/**/*"], 17 | "exclude": ["types/three/build/three.d.cts"] 18 | } 19 | -------------------------------------------------------------------------------- /types/three/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "@definitelytyped/no-single-element-tuple-type": "off" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /types/three/.npmignore: -------------------------------------------------------------------------------- 1 | * 2 | !**/*.d.ts 3 | !**/*.d.cts 4 | !**/*.d.mts 5 | !**/*.d.*.ts 6 | -------------------------------------------------------------------------------- /types/three/build/three.core.d.ts: -------------------------------------------------------------------------------- 1 | export * from "../src/Three.Core.js"; 2 | -------------------------------------------------------------------------------- /types/three/build/three.core.min.d.ts: -------------------------------------------------------------------------------- 1 | export * from "../src/Three.Core.js"; 2 | -------------------------------------------------------------------------------- /types/three/build/three.d.cts: -------------------------------------------------------------------------------- 1 | export * from "../src/Three.js"; 2 | -------------------------------------------------------------------------------- /types/three/build/three.module.d.ts: -------------------------------------------------------------------------------- 1 | export * from "../src/Three.js"; 2 | -------------------------------------------------------------------------------- /types/three/build/three.module.min.d.ts: -------------------------------------------------------------------------------- 1 | export * from "../src/Three.js"; 2 | -------------------------------------------------------------------------------- /types/three/build/three.tsl.d.ts: -------------------------------------------------------------------------------- 1 | export * from "../src/Three.TSL.js"; 2 | -------------------------------------------------------------------------------- /types/three/build/three.tsl.min.d.ts: -------------------------------------------------------------------------------- 1 | export * from "../src/Three.TSL.js"; 2 | -------------------------------------------------------------------------------- /types/three/build/three.webgpu.d.ts: -------------------------------------------------------------------------------- 1 | export * from "../src/Three.WebGPU.js"; 2 | -------------------------------------------------------------------------------- /types/three/build/three.webgpu.min.d.ts: -------------------------------------------------------------------------------- 1 | export * from "../src/Three.WebGPU.js"; 2 | -------------------------------------------------------------------------------- /types/three/build/three.webgpu.nodes.d.ts: -------------------------------------------------------------------------------- 1 | export * from "../src/Three.WebGPU.Nodes.js"; 2 | -------------------------------------------------------------------------------- /types/three/build/three.webgpu.nodes.min.d.ts: -------------------------------------------------------------------------------- 1 | export * from "../src/Three.WebGPU.Nodes.js"; 2 | -------------------------------------------------------------------------------- /types/three/examples/jsm/animation/AnimationClipCreator.d.ts: -------------------------------------------------------------------------------- 1 | import { AnimationClip, Vector3 } from "three"; 2 | 3 | export interface AnimationClipCreator { 4 | CreateRotationAnimation(period: number, axis: string): AnimationClip; 5 | CreateScaleAxisAnimation(period: number, axis: string): AnimationClip; 6 | CreateShakeAnimation(duration: number, shakeScale: Vector3): AnimationClip; 7 | CreatePulsationAnimation(duration: number, pulseScale: number): AnimationClip; 8 | CreateVisibilityAnimation(duration: number): AnimationClip; 9 | CreateMaterialColorAnimation(duration: number, colors: number[]): AnimationClip; 10 | } 11 | 12 | export const AnimationClipCreator: AnimationClipCreator; 13 | -------------------------------------------------------------------------------- /types/three/examples/jsm/capabilities/WebGPU.d.ts: -------------------------------------------------------------------------------- 1 | // tslint:disable-next-line:no-unnecessary-class 2 | 3 | export default class WebGPU { 4 | static isAvailable(): boolean; 5 | static getStaticAdapter(): unknown; 6 | static getErrorMessage(): HTMLElement; 7 | } 8 | -------------------------------------------------------------------------------- /types/three/examples/jsm/csm/CSMShader.d.ts: -------------------------------------------------------------------------------- 1 | export interface CSMShader { 2 | lights_fragment_begin: string; 3 | lights_pars_begin: string; 4 | } 5 | -------------------------------------------------------------------------------- /types/three/examples/jsm/curves/NURBSSurface.d.ts: -------------------------------------------------------------------------------- 1 | import { Vector2, Vector3, Vector4 } from "three"; 2 | 3 | export class NURBSSurface { 4 | constructor( 5 | degree1: number, 6 | degree2: number, 7 | knots1: number[], 8 | knots2: number[], 9 | controlPoints: Vector2[][] | Vector3[][] | Vector4[][], 10 | ); 11 | 12 | getPoint(t1: number, t2: number, target: Vector3): void; 13 | } 14 | -------------------------------------------------------------------------------- /types/three/examples/jsm/effects/AnaglyphEffect.d.ts: -------------------------------------------------------------------------------- 1 | import { Camera, Matrix3, Scene, WebGLRenderer } from "three"; 2 | 3 | declare class AnaglyphEffect { 4 | colorMatrixLeft: Matrix3; 5 | 6 | colorMatrixRight: Matrix3; 7 | 8 | setSize: (width: number, height: number) => void; 9 | 10 | render: (scene: Scene, camera: Camera) => void; 11 | 12 | dispose: () => void; 13 | 14 | constructor(renderer: WebGLRenderer, width?: number, height?: number); 15 | } 16 | 17 | export { AnaglyphEffect }; 18 | -------------------------------------------------------------------------------- /types/three/examples/jsm/effects/AsciiEffect.d.ts: -------------------------------------------------------------------------------- 1 | import { Camera, Scene, WebGLRenderer } from "three"; 2 | 3 | export interface AsciiEffectOptions { 4 | resolution?: number; 5 | scale?: number; 6 | color?: boolean; 7 | alpha?: boolean; 8 | block?: boolean; 9 | invert?: boolean; 10 | } 11 | 12 | export class AsciiEffect { 13 | constructor(renderer: WebGLRenderer, charSet?: string, options?: AsciiEffectOptions); 14 | domElement: HTMLElement; 15 | 16 | render(scene: Scene, camera: Camera): void; 17 | setSize(width: number, height: number): void; 18 | } 19 | -------------------------------------------------------------------------------- /types/three/examples/jsm/effects/ParallaxBarrierEffect.d.ts: -------------------------------------------------------------------------------- 1 | import { Camera, Scene, WebGLRenderer } from "three"; 2 | 3 | declare class ParallaxBarrierEffect { 4 | setSize: (width: number, height: number) => void; 5 | render: (scene: Scene, camera: Camera) => void; 6 | dispose: () => void; 7 | 8 | constructor(renderer: WebGLRenderer); 9 | } 10 | 11 | export { ParallaxBarrierEffect }; 12 | -------------------------------------------------------------------------------- /types/three/examples/jsm/effects/StereoEffect.d.ts: -------------------------------------------------------------------------------- 1 | import { Camera, Scene, WebGLRenderer } from "three"; 2 | 3 | export class StereoEffect { 4 | constructor(renderer: WebGLRenderer); 5 | 6 | setEyeSeparation(eyeSep: number): void; 7 | render(scene: Scene, camera: Camera): void; 8 | setSize(width: number, height: number): void; 9 | } 10 | -------------------------------------------------------------------------------- /types/three/examples/jsm/environments/DebugEnvironment.d.ts: -------------------------------------------------------------------------------- 1 | import { Scene } from "three"; 2 | 3 | export class DebugEnvironment extends Scene { 4 | constructor(); 5 | } 6 | -------------------------------------------------------------------------------- /types/three/examples/jsm/environments/RoomEnvironment.d.ts: -------------------------------------------------------------------------------- 1 | import { Scene } from "three"; 2 | 3 | export class RoomEnvironment extends Scene { 4 | constructor(); 5 | dispose(): void; 6 | } 7 | -------------------------------------------------------------------------------- /types/three/examples/jsm/exporters/DRACOExporter.d.ts: -------------------------------------------------------------------------------- 1 | import { Mesh, Points } from "three"; 2 | 3 | export interface DRACOExporterOptions { 4 | decodeSpeed?: number; 5 | encodeSpeed?: number; 6 | encoderMethod?: number; 7 | quantization?: number[]; 8 | exportUvs?: boolean; 9 | exportNormals?: boolean; 10 | exportColor?: boolean; 11 | } 12 | 13 | export class DRACOExporter { 14 | constructor(); 15 | 16 | parse(object: Mesh | Points, options?: DRACOExporterOptions): Int8Array; 17 | } 18 | -------------------------------------------------------------------------------- /types/three/examples/jsm/exporters/KTX2Exporter.d.ts: -------------------------------------------------------------------------------- 1 | import { Data3DTexture, DataTexture, WebGLRenderer, WebGLRenderTarget } from "three"; 2 | import { WebGPURenderer } from "three/webgpu"; 3 | 4 | export class KTX2Exporter { 5 | parse(renderer: WebGLRenderer | WebGPURenderer, rtt?: WebGLRenderTarget): Promise; 6 | parse(texture: Data3DTexture | DataTexture): Promise; 7 | } 8 | -------------------------------------------------------------------------------- /types/three/examples/jsm/exporters/OBJExporter.d.ts: -------------------------------------------------------------------------------- 1 | import { Object3D } from "three"; 2 | 3 | export class OBJExporter { 4 | constructor(); 5 | 6 | parse(object: Object3D): string; 7 | } 8 | -------------------------------------------------------------------------------- /types/three/examples/jsm/exporters/STLExporter.d.ts: -------------------------------------------------------------------------------- 1 | import { Object3D } from "three"; 2 | 3 | export interface STLExporterOptionsBinary { 4 | binary: true; 5 | } 6 | 7 | export interface STLExporterOptionsString { 8 | binary?: false; 9 | } 10 | 11 | export interface STLExporterOptions { 12 | binary?: boolean; 13 | } 14 | 15 | export class STLExporter { 16 | constructor(); 17 | 18 | parse(scene: Object3D, options: STLExporterOptionsBinary): DataView; 19 | parse(scene: Object3D, options?: STLExporterOptionsString): string; 20 | parse(scene: Object3D, options?: STLExporterOptions): string | DataView; 21 | } 22 | -------------------------------------------------------------------------------- /types/three/examples/jsm/geometries/BoxLineGeometry.d.ts: -------------------------------------------------------------------------------- 1 | import { BufferGeometry } from "three"; 2 | 3 | export class BoxLineGeometry extends BufferGeometry { 4 | constructor( 5 | width?: number, 6 | height?: number, 7 | depth?: number, 8 | widthSegments?: number, 9 | heightSegments?: number, 10 | depthSegments?: number, 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /types/three/examples/jsm/geometries/ConvexGeometry.d.ts: -------------------------------------------------------------------------------- 1 | import { BufferGeometry, Vector3 } from "three"; 2 | 3 | export class ConvexGeometry extends BufferGeometry { 4 | constructor(points?: Vector3[]); 5 | } 6 | -------------------------------------------------------------------------------- /types/three/examples/jsm/geometries/DecalGeometry.d.ts: -------------------------------------------------------------------------------- 1 | import { BufferGeometry, Euler, Mesh, Vector3 } from "three"; 2 | 3 | declare class DecalGeometry extends BufferGeometry { 4 | constructor(mesh?: Mesh, position?: Vector3, orientation?: Euler, size?: Vector3); 5 | } 6 | 7 | declare class DecalVertex { 8 | position: Vector3; 9 | normal: Vector3 | null; 10 | 11 | constructor(position: Vector3, normal?: Vector3 | null); 12 | 13 | clone(): this; 14 | } 15 | 16 | export { DecalGeometry, DecalVertex }; 17 | -------------------------------------------------------------------------------- /types/three/examples/jsm/geometries/ParametricFunctions.d.ts: -------------------------------------------------------------------------------- 1 | import { Vector3 } from "three"; 2 | 3 | declare function klein(v: number, u: number, target: Vector3): void; 4 | declare function plane(u: number, v: number, target: Vector3): void; 5 | declare function mobius(u: number, t: number, target: Vector3): void; 6 | declare function mobius3d(u: number, t: number, target: Vector3): void; 7 | 8 | export { klein, mobius, mobius3d, plane }; 9 | -------------------------------------------------------------------------------- /types/three/examples/jsm/geometries/ParametricGeometry.d.ts: -------------------------------------------------------------------------------- 1 | import { BufferGeometry, Vector3 } from "three"; 2 | 3 | export class ParametricGeometry extends BufferGeometry { 4 | constructor(func?: (u: number, v: number, target: Vector3) => void, slices?: number, stacks?: number); 5 | 6 | /** 7 | * @default 'ParametricGeometry' 8 | */ 9 | type: string; 10 | 11 | parameters: { 12 | func: (u: number, v: number, dest: Vector3) => void; 13 | slices: number; 14 | stacks: number; 15 | }; 16 | } 17 | 18 | export { ParametricGeometry as ParametricBufferGeometry }; 19 | -------------------------------------------------------------------------------- /types/three/examples/jsm/geometries/RoundedBoxGeometry.d.ts: -------------------------------------------------------------------------------- 1 | import { BoxGeometry } from "three"; 2 | 3 | export class RoundedBoxGeometry extends BoxGeometry { 4 | constructor(width?: number, height?: number, depth?: number, segments?: number, radius?: number); 5 | } 6 | -------------------------------------------------------------------------------- /types/three/examples/jsm/helpers/LightProbeHelper.d.ts: -------------------------------------------------------------------------------- 1 | import { LightProbe, Mesh } from "three"; 2 | 3 | declare class LightProbeHelper extends Mesh { 4 | lightProbe: LightProbe; 5 | size: number; 6 | 7 | constructor(lightProbe: LightProbe, size?: number); 8 | 9 | dispose(): void; 10 | } 11 | 12 | export { LightProbeHelper }; 13 | -------------------------------------------------------------------------------- /types/three/examples/jsm/helpers/LightProbeHelperGPU.d.ts: -------------------------------------------------------------------------------- 1 | import { LightProbe, Mesh } from "three"; 2 | 3 | declare class LightProbeHelper extends Mesh { 4 | lightProbe: LightProbe; 5 | size: number; 6 | 7 | constructor(lightProbe: LightProbe, size?: number); 8 | 9 | dispose(): void; 10 | } 11 | 12 | export { LightProbeHelper }; 13 | -------------------------------------------------------------------------------- /types/three/examples/jsm/helpers/OctreeHelper.d.ts: -------------------------------------------------------------------------------- 1 | import { ColorRepresentation, LineSegments } from "three"; 2 | import { Octree } from "../math/Octree.js"; 3 | 4 | export class OctreeHelper extends LineSegments { 5 | constructor(octree: Octree, color?: ColorRepresentation); 6 | 7 | octree: Octree; 8 | color: ColorRepresentation; 9 | 10 | /** 11 | * @default 'OctreeHelper' 12 | */ 13 | type: "OctreeHelper" | string; 14 | 15 | update(): void; 16 | dispose(): void; 17 | } 18 | -------------------------------------------------------------------------------- /types/three/examples/jsm/helpers/PositionalAudioHelper.d.ts: -------------------------------------------------------------------------------- 1 | import { Line, PositionalAudio } from "three"; 2 | 3 | export class PositionalAudioHelper extends Line { 4 | constructor(audio: PositionalAudio, range?: number, divisionsInnerAngle?: number, divisionsOuterAngle?: number); 5 | 6 | audio: PositionalAudio; 7 | range: number; 8 | divisionsInnerAngle: number; 9 | divisionsOuterAngle: number; 10 | 11 | dispose(): void; 12 | update(): void; 13 | } 14 | -------------------------------------------------------------------------------- /types/three/examples/jsm/helpers/RapierHelper.d.ts: -------------------------------------------------------------------------------- 1 | import * as RAPIER from "@dimforge/rapier3d-compat"; 2 | import { LineSegments } from "three"; 3 | 4 | declare class RapierHelper extends LineSegments { 5 | world: RAPIER.World; 6 | 7 | constructor(world: RAPIER.World); 8 | 9 | update(): void; 10 | dispose(): void; 11 | } 12 | 13 | export { RapierHelper }; 14 | -------------------------------------------------------------------------------- /types/three/examples/jsm/helpers/RectAreaLightHelper.d.ts: -------------------------------------------------------------------------------- 1 | import { ColorRepresentation, Line, RectAreaLight } from "three"; 2 | 3 | export class RectAreaLightHelper extends Line { 4 | constructor(light: RectAreaLight, color?: ColorRepresentation); 5 | 6 | light: RectAreaLight; 7 | color: ColorRepresentation | undefined; 8 | 9 | dispose(): void; 10 | } 11 | -------------------------------------------------------------------------------- /types/three/examples/jsm/helpers/TextureHelper.d.ts: -------------------------------------------------------------------------------- 1 | import { Mesh, Texture } from "three"; 2 | 3 | export class TextureHelper extends Mesh { 4 | texture: Texture; 5 | type: "TextureHelper"; 6 | 7 | constructor(texture: Texture, width?: number, height?: number, depth?: number); 8 | 9 | dispose(): void; 10 | } 11 | -------------------------------------------------------------------------------- /types/three/examples/jsm/helpers/TextureHelperGPU.d.ts: -------------------------------------------------------------------------------- 1 | import { Mesh, Texture } from "three"; 2 | 3 | export class TextureHelper extends Mesh { 4 | texture: Texture; 5 | type: "TextureHelper"; 6 | 7 | constructor(texture: Texture, width?: number, height?: number, depth?: number); 8 | 9 | dispose(): void; 10 | } 11 | -------------------------------------------------------------------------------- /types/three/examples/jsm/helpers/VertexNormalsHelper.d.ts: -------------------------------------------------------------------------------- 1 | import { LineSegments, Object3D } from "three"; 2 | 3 | export class VertexNormalsHelper extends LineSegments { 4 | readonly isVertexNormalsHelper: true; 5 | 6 | constructor(object: Object3D, size?: number, hex?: number); 7 | 8 | object: Object3D; 9 | size: number; 10 | 11 | update(): void; 12 | 13 | dispose(): void; 14 | } 15 | -------------------------------------------------------------------------------- /types/three/examples/jsm/helpers/VertexTangentsHelper.d.ts: -------------------------------------------------------------------------------- 1 | import { LineSegments, Object3D } from "three"; 2 | 3 | export class VertexTangentsHelper extends LineSegments { 4 | constructor(object: Object3D, size?: number, hex?: number); 5 | 6 | object: Object3D; 7 | size: number; 8 | 9 | update(): void; 10 | 11 | dispose(): void; 12 | } 13 | -------------------------------------------------------------------------------- /types/three/examples/jsm/helpers/ViewHelper.d.ts: -------------------------------------------------------------------------------- 1 | import { Camera, Object3D, Vector3, WebGLRenderer } from "three"; 2 | 3 | export class ViewHelper extends Object3D { 4 | readonly isViewHelper: true; 5 | 6 | animating: boolean; 7 | center: Vector3; 8 | 9 | render: (renderer: WebGLRenderer) => void; 10 | handleClick: (event: MouseEvent) => boolean; 11 | setLabels: (labelX?: string, labelY?: string, labelZ?: string) => void; 12 | setLabelStyle: (font?: string, color?: string, radius?: number) => void; 13 | update: (delta: number) => void; 14 | dispose: () => void; 15 | 16 | constructor(camera: Camera, domElement: HTMLElement); 17 | } 18 | -------------------------------------------------------------------------------- /types/three/examples/jsm/interactive/HTMLMesh.d.ts: -------------------------------------------------------------------------------- 1 | import { Mesh, MeshBasicMaterial, Object3DEventMap, PlaneGeometry } from "three"; 2 | 3 | export interface HTMLMeshEventMap extends Object3DEventMap { 4 | mousedown: { data: { x: number; y: number } }; 5 | mousemove: { data: { x: number; y: number } }; 6 | mouseup: { data: { x: number; y: number } }; 7 | click: { data: { x: number; y: number } }; 8 | } 9 | 10 | export class HTMLMesh extends Mesh { 11 | constructor(dom: HTMLElement); 12 | dispose(): void; 13 | } 14 | -------------------------------------------------------------------------------- /types/three/examples/jsm/interactive/SelectionBox.d.ts: -------------------------------------------------------------------------------- 1 | import { Camera, Frustum, Mesh, Object3D, Scene, Vector3 } from "three"; 2 | 3 | export class SelectionBox { 4 | constructor(camera: Camera, scene: Scene, deep?: number); 5 | camera: Camera; 6 | collection: Mesh[]; 7 | deep: number; 8 | endPoint: Vector3; 9 | scene: Scene; 10 | startPoint: Vector3; 11 | instances: Record; 12 | 13 | select(startPoint?: Vector3, endPoint?: Vector3): Mesh[]; 14 | updateFrustum(startPoint: Vector3, endPoint: Vector3): void; 15 | searchChildInFrustum(frustum: Frustum, object: Object3D): void; 16 | } 17 | -------------------------------------------------------------------------------- /types/three/examples/jsm/interactive/SelectionHelper.d.ts: -------------------------------------------------------------------------------- 1 | import { Vector2, WebGLRenderer } from "three"; 2 | 3 | export class SelectionHelper { 4 | constructor(renderer: WebGLRenderer, cssClassName: string); 5 | element: HTMLElement; 6 | isDown: boolean; 7 | enabled: boolean; 8 | pointBottomRight: Vector2; 9 | pointTopLeft: Vector2; 10 | renderer: WebGLRenderer; 11 | startPoint: Vector2; 12 | 13 | onSelectStart(event: Event): void; 14 | onSelectMove(event: Event): void; 15 | onSelectOver(event: Event): void; 16 | dispose(): void; 17 | } 18 | -------------------------------------------------------------------------------- /types/three/examples/jsm/libs/fflate.module.d.ts: -------------------------------------------------------------------------------- 1 | export * from "fflate"; 2 | -------------------------------------------------------------------------------- /types/three/examples/jsm/libs/meshopt_decoder.module.d.ts: -------------------------------------------------------------------------------- 1 | export * from "meshoptimizer/meshopt_decoder.module.js"; 2 | -------------------------------------------------------------------------------- /types/three/examples/jsm/libs/stats.module.d.ts: -------------------------------------------------------------------------------- 1 | import Stats = require("stats.js"); 2 | 3 | export default Stats; 4 | -------------------------------------------------------------------------------- /types/three/examples/jsm/libs/tween.module.d.ts: -------------------------------------------------------------------------------- 1 | export * from "@tweenjs/tween.js"; 2 | export { default as default } from "@tweenjs/tween.js"; 3 | -------------------------------------------------------------------------------- /types/three/examples/jsm/lighting/TiledLighting.d.ts: -------------------------------------------------------------------------------- 1 | import { ShaderNodeObject } from "three/tsl"; 2 | import { Lighting } from "three/webgpu"; 3 | import { Light } from "../../../src/lights/Light.js"; 4 | import TiledLightsNode from "../tsl/lighting/TiledLightsNode.js"; 5 | 6 | export class TiledLighting extends Lighting { 7 | constructor(); 8 | 9 | createNode(lights?: Light[]): ShaderNodeObject; 10 | } 11 | -------------------------------------------------------------------------------- /types/three/examples/jsm/lights/LightProbeGenerator.d.ts: -------------------------------------------------------------------------------- 1 | import { CubeTexture, LightProbe, WebGLCubeRenderTarget, WebGLRenderer } from "three"; 2 | import { WebGPURenderer } from "three/webgpu"; 3 | 4 | export namespace LightProbeGenerator { 5 | function fromCubeTexture(cubeTexture: CubeTexture): LightProbe; 6 | function fromCubeRenderTarget( 7 | renderer: WebGLRenderer | WebGPURenderer, 8 | cubeRenderTarget: WebGLCubeRenderTarget, 9 | ): Promise; 10 | } 11 | -------------------------------------------------------------------------------- /types/three/examples/jsm/lights/RectAreaLightTexturesLib.d.ts: -------------------------------------------------------------------------------- 1 | import { RectAreaLightTexturesLib as RectAreaLightTexturesLibInterface } from "three/webgpu"; 2 | 3 | declare class RectAreaLightTexturesLib { 4 | static init(): RectAreaLightTexturesLibInterface; 5 | } 6 | 7 | export { RectAreaLightTexturesLib }; 8 | -------------------------------------------------------------------------------- /types/three/examples/jsm/lights/RectAreaLightUniformsLib.d.ts: -------------------------------------------------------------------------------- 1 | declare class RectAreaLightUniformsLib { 2 | static init(): void; 3 | } 4 | 5 | export { RectAreaLightUniformsLib }; 6 | -------------------------------------------------------------------------------- /types/three/examples/jsm/lines/Wireframe.d.ts: -------------------------------------------------------------------------------- 1 | import { Mesh } from "three"; 2 | 3 | import { LineMaterial } from "./LineMaterial.js"; 4 | import { LineSegmentsGeometry } from "./LineSegmentsGeometry.js"; 5 | 6 | declare class Wireframe extends Mesh { 7 | readonly isWireframe: true; 8 | 9 | constructor(geometry?: LineSegmentsGeometry, material?: LineMaterial); 10 | 11 | computeLineDistances(): this; 12 | } 13 | 14 | export { Wireframe }; 15 | -------------------------------------------------------------------------------- /types/three/examples/jsm/lines/WireframeGeometry2.d.ts: -------------------------------------------------------------------------------- 1 | import { BufferGeometry } from "three"; 2 | 3 | import { LineSegmentsGeometry } from "./LineSegmentsGeometry.js"; 4 | 5 | export class WireframeGeometry2 extends LineSegmentsGeometry { 6 | constructor(geometry: BufferGeometry); 7 | readonly isWireframeGeometry2: boolean; 8 | } 9 | -------------------------------------------------------------------------------- /types/three/examples/jsm/lines/webgpu/Line2.d.ts: -------------------------------------------------------------------------------- 1 | import { Line2NodeMaterial } from "three/webgpu"; 2 | import { LineGeometry } from "../LineGeometry.js"; 3 | import { LineSegments2 } from "./LineSegments2.js"; 4 | 5 | declare class Line2 extends LineSegments2 { 6 | geometry: LineGeometry; 7 | material: Line2NodeMaterial; 8 | 9 | readonly isLine2: true; 10 | 11 | constructor(geometry?: LineGeometry, material?: Line2NodeMaterial); 12 | } 13 | 14 | export { Line2 }; 15 | -------------------------------------------------------------------------------- /types/three/examples/jsm/lines/webgpu/LineSegments2.d.ts: -------------------------------------------------------------------------------- 1 | import { Line2NodeMaterial, Mesh } from "three/webgpu"; 2 | import { LineSegmentsGeometry } from "../LineSegmentsGeometry.js"; 3 | 4 | declare class LineSegments2 extends Mesh { 5 | geometry: LineSegmentsGeometry; 6 | material: Line2NodeMaterial; 7 | 8 | readonly isLineSegments2: true; 9 | 10 | constructor(geometry?: LineSegmentsGeometry, material?: Line2NodeMaterial); 11 | 12 | computeLineDistances(): this; 13 | } 14 | 15 | export { LineSegments2 }; 16 | -------------------------------------------------------------------------------- /types/three/examples/jsm/lines/webgpu/Wireframe.d.ts: -------------------------------------------------------------------------------- 1 | import { Line2NodeMaterial, Mesh } from "three/webgpu"; 2 | 3 | import { WireframeGeometry2 } from "../WireframeGeometry2.js"; 4 | 5 | declare class Wireframe extends Mesh { 6 | readonly isWireframe: true; 7 | 8 | constructor(geometry?: WireframeGeometry2, material?: Line2NodeMaterial); 9 | 10 | computeLineDistances(): this; 11 | } 12 | 13 | export { Wireframe }; 14 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/3DMLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { Loader, LoadingManager, Object3D } from "three"; 2 | 3 | export class Rhino3dmLoader extends Loader { 4 | constructor(manager?: LoadingManager); 5 | 6 | parse(data: ArrayBufferLike, onLoad: (object: Object3D) => void, onError?: (event: ErrorEvent) => void): void; 7 | setLibraryPath(path: string): Rhino3dmLoader; 8 | setWorkerLimit(workerLimit: number): Rhino3dmLoader; 9 | dispose(): Rhino3dmLoader; 10 | } 11 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/3MFLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { Group, Loader, LoadingManager } from "three"; 2 | 3 | export class ThreeMFLoader extends Loader { 4 | constructor(manager?: LoadingManager); 5 | availableExtensions: object[]; 6 | 7 | parse(data: ArrayBuffer): Group; 8 | addExtension(extension: object): void; 9 | } 10 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/AMFLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { Group, Loader, LoadingManager } from "three"; 2 | 3 | export class AMFLoader extends Loader { 4 | constructor(manager?: LoadingManager); 5 | 6 | parse(data: ArrayBuffer): Group; 7 | } 8 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/BVHLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { AnimationClip, Loader, LoadingManager, Skeleton } from "three"; 2 | 3 | export interface BVH { 4 | clip: AnimationClip; 5 | skeleton: Skeleton; 6 | } 7 | 8 | export class BVHLoader extends Loader { 9 | constructor(manager?: LoadingManager); 10 | animateBonePositions: boolean; 11 | animateBoneRotations: boolean; 12 | 13 | parse(text: string): BVH; 14 | } 15 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/ColladaLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { Loader, Scene } from "three"; 2 | 3 | export interface Collada { 4 | kinematics: object; 5 | library: object; 6 | scene: Scene; 7 | } 8 | 9 | export class ColladaLoader extends Loader { 10 | parse(text: string, path: string): Collada; 11 | } 12 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/DDSLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { 2 | CompressedPixelFormat, 3 | CompressedTextureLoader, 4 | CompressedTextureMipmap, 5 | LoadingManager, 6 | PixelFormat, 7 | } from "three"; 8 | 9 | export interface DDS { 10 | mipmaps: CompressedTextureMipmap[]; 11 | width: number; 12 | height: number; 13 | format: PixelFormat | CompressedPixelFormat; 14 | mipmapCount: number; 15 | isCubemap: boolean; 16 | } 17 | 18 | export class DDSLoader extends CompressedTextureLoader { 19 | constructor(manager?: LoadingManager); 20 | 21 | parse(buffer: ArrayBuffer, loadMipmaps: boolean): DDS; 22 | } 23 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/EXRLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { DataTextureLoader, LoadingManager, PixelFormat, TextureDataType } from "three"; 2 | 3 | export interface EXR { 4 | header: object; 5 | width: number; 6 | height: number; 7 | data: Float32Array | Uint16Array; 8 | format: PixelFormat; 9 | colorSpace: string; 10 | type: TextureDataType; 11 | } 12 | 13 | export class EXRLoader extends DataTextureLoader { 14 | constructor(manager?: LoadingManager); 15 | type: TextureDataType; 16 | 17 | parse(buffer: ArrayBuffer): EXR; 18 | setDataType(type: TextureDataType): this; 19 | } 20 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/FBXLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { Group, Loader, LoadingManager } from "three"; 2 | 3 | export class FBXLoader extends Loader { 4 | constructor(manager?: LoadingManager); 5 | 6 | parse(FBXBuffer: ArrayBuffer | string, path: string): Group; 7 | } 8 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/GCodeLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { Group, Loader, LoadingManager } from "three"; 2 | 3 | export class GCodeLoader extends Loader { 4 | constructor(manager?: LoadingManager); 5 | splitLayer: boolean; 6 | 7 | parse(data: string): Group; 8 | } 9 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/HDRCubeTextureLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { CubeTexture, Loader, LoadingManager, TextureDataType } from "three"; 2 | 3 | import { RGBELoader } from "./RGBELoader.js"; 4 | 5 | export class HDRCubeTextureLoader extends Loader { 6 | constructor(manager?: LoadingManager); 7 | hdrLoader: RGBELoader; 8 | type: TextureDataType; 9 | 10 | load( 11 | url: readonly string[], 12 | onLoad?: (data: CubeTexture) => void, 13 | onProgress?: (event: ProgressEvent) => void, 14 | onError?: (err: unknown) => void, 15 | ): CubeTexture; 16 | 17 | setDataType(type: TextureDataType): this; 18 | } 19 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/IESLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { DataTexture, Loader } from "three"; 2 | 3 | export class IESLoader extends Loader { 4 | parse(text: string): DataTexture; 5 | } 6 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/KMZLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { Loader, LoadingManager } from "three"; 2 | 3 | import { Collada } from "./ColladaLoader.js"; 4 | 5 | export class KMZLoader extends Loader { 6 | constructor(manager?: LoadingManager); 7 | 8 | parse(data: ArrayBuffer): Collada; 9 | } 10 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/KTXLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { 2 | CompressedPixelFormat, 3 | CompressedTextureLoader, 4 | CompressedTextureMipmap, 5 | LoadingManager, 6 | PixelFormat, 7 | } from "three"; 8 | 9 | export interface KTX { 10 | mipmaps: CompressedTextureMipmap[]; 11 | width: number; 12 | height: number; 13 | format: PixelFormat | CompressedPixelFormat; 14 | mipmapCount: number; 15 | isCubemap: boolean; 16 | } 17 | 18 | export class KTXLoader extends CompressedTextureLoader { 19 | constructor(manager?: LoadingManager); 20 | 21 | parse(buffer: ArrayBuffer, loadMipmaps: boolean): KTX; 22 | } 23 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/LUTImageLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { Data3DTexture, Loader, LoadingManager, Texture } from "three"; 2 | 3 | export interface LUTImageResult { 4 | size: number; 5 | texture3D: Data3DTexture; 6 | } 7 | 8 | export class LUTImageLoader extends Loader { 9 | flip: boolean; 10 | 11 | constructor(manager?: LoadingManager); 12 | 13 | getImageData(texture: Texture): ImageData; 14 | 15 | horz2Vert(texture: Texture): ImageData; 16 | 17 | parse(dataArray: Uint8ClampedArray, size: number): LUTImageResult; 18 | } 19 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/LWOLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { Loader, LoadingManager, Material, Object3D } from "three"; 2 | 3 | export interface LWO { 4 | materials: Material[]; 5 | meshes: Object3D[]; 6 | } 7 | 8 | export interface LWOLoaderParameters { 9 | /** 10 | * Base content delivery folder path, use when it differs from Lightwave default structure 11 | */ 12 | resourcePath?: string; 13 | } 14 | 15 | export class LWOLoader extends Loader { 16 | constructor(manager?: LoadingManager, parameters?: LWOLoaderParameters); 17 | 18 | parse(data: ArrayBuffer, path: string, modelName: string): LWO; 19 | } 20 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/LottieLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { CanvasTexture, Loader, LoadingManager } from "three"; 2 | 3 | export class LottieLoader extends Loader { 4 | /** 5 | * @deprecated The loader has been deprecated and will be removed with r186. Use lottie-web instead and create your 6 | * animated texture manually. 7 | */ 8 | constructor(manager?: LoadingManager); 9 | 10 | load( 11 | url: string, 12 | onLoad?: (data: CanvasTexture) => void, 13 | onProgress?: (event: ProgressEvent) => void, 14 | onError?: (err: unknown) => void, 15 | ): CanvasTexture; 16 | 17 | setQuality(value: number): void; 18 | } 19 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/MD2Loader.d.ts: -------------------------------------------------------------------------------- 1 | import { BufferGeometry, Loader, LoadingManager } from "three"; 2 | 3 | export class MD2Loader extends Loader { 4 | constructor(manager?: LoadingManager); 5 | 6 | parse(data: ArrayBuffer): BufferGeometry; 7 | } 8 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/MDDLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { AnimationClip, BufferAttribute, Loader, LoadingManager } from "three"; 2 | 3 | export interface MDD { 4 | morphTargets: BufferAttribute[]; 5 | clip: AnimationClip; 6 | } 7 | 8 | export class MDDLoader extends Loader { 9 | constructor(manager?: LoadingManager); 10 | 11 | parse(data: ArrayBuffer): MDD; 12 | } 13 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/MaterialXLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { Loader, LoadingManager, MeshPhysicalNodeMaterial } from "three/webgpu"; 2 | 3 | export class MaterialXLoader extends Loader<{ materials: Record }> { 4 | constructor(manager?: LoadingManager); 5 | } 6 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/NRRDLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { Loader, LoadingManager } from "three"; 2 | 3 | import { Volume } from "../misc/Volume.js"; 4 | 5 | export class NRRDLoader extends Loader { 6 | constructor(manager?: LoadingManager); 7 | manager: LoadingManager; 8 | path: string; 9 | 10 | fieldFunctions: object; 11 | 12 | parse(data: string): Volume; 13 | parseChars(array: number[], start?: number, end?: number): string; 14 | setPath(value: string): this; 15 | } 16 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/OBJLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { Group, Loader, LoadingManager } from "three"; 2 | import { MTLLoader } from "./MTLLoader.js"; 3 | 4 | export class OBJLoader extends Loader { 5 | constructor(manager?: LoadingManager); 6 | materials: MTLLoader.MaterialCreator; 7 | 8 | parse(data: string): Group; 9 | setMaterials(materials: MTLLoader.MaterialCreator): this; 10 | } 11 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/PCDLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { BufferGeometry, Loader, LoadingManager, Points, PointsMaterial } from "three"; 2 | 3 | export class PCDLoader extends Loader> { 4 | constructor(manager?: LoadingManager); 5 | littleEndian: boolean; 6 | 7 | parse(data: ArrayBuffer | string): Points; 8 | } 9 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/PDBLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { BufferGeometry, Loader, LoadingManager } from "three"; 2 | 3 | export interface PDB { 4 | geometryAtoms: BufferGeometry; 5 | geometryBonds: BufferGeometry; 6 | json: { 7 | atoms: any[][]; 8 | }; 9 | } 10 | 11 | export class PDBLoader extends Loader { 12 | constructor(manager?: LoadingManager); 13 | 14 | parse(text: string): PDB; 15 | } 16 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/PLYLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { BufferGeometry, Loader, LoadingManager } from "three"; 2 | 3 | export class PLYLoader extends Loader { 4 | constructor(manager?: LoadingManager); 5 | propertyNameMapping: object; 6 | customPropertyMapping: Record; 7 | 8 | setPropertyNameMapping(mapping: object): void; 9 | setCustomPropertyNameMapping(mapping: Record): void; 10 | parse(data: ArrayBuffer | string): BufferGeometry; 11 | } 12 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/PVRLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { CompressedPixelFormat, CompressedTextureLoader, CompressedTextureMipmap, LoadingManager } from "three"; 2 | 3 | export interface PVR { 4 | mipmaps: CompressedTextureMipmap[]; 5 | width: number; 6 | height: number; 7 | format: CompressedPixelFormat; 8 | mipmapCount: number; 9 | isCubemap: boolean; 10 | } 11 | 12 | export class PVRLoader extends CompressedTextureLoader { 13 | constructor(manager?: LoadingManager); 14 | 15 | parse(buffer: ArrayBuffer, loadMipmaps: boolean): PVR; 16 | } 17 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/RGBELoader.d.ts: -------------------------------------------------------------------------------- 1 | import { DataTextureLoader, LoadingManager, PixelFormat, TextureDataType } from "three"; 2 | 3 | export interface RGBE { 4 | width: number; 5 | height: number; 6 | data: Float32Array | Uint8Array; 7 | header: string; 8 | gamma: number; 9 | exposure: number; 10 | type: TextureDataType; 11 | } 12 | 13 | export class RGBELoader extends DataTextureLoader { 14 | constructor(manager?: LoadingManager); 15 | type: TextureDataType; 16 | 17 | parse(buffer: ArrayBuffer): RGBE; 18 | setDataType(type: TextureDataType): this; 19 | } 20 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/STLLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { BufferGeometry, Loader, LoadingManager } from "three"; 2 | 3 | export class STLLoader extends Loader { 4 | constructor(manager?: LoadingManager); 5 | 6 | parse(data: ArrayBuffer | string): BufferGeometry; 7 | } 8 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/TGALoader.d.ts: -------------------------------------------------------------------------------- 1 | import { DataTexture, DataTextureLoader, LoadingManager } from "three"; 2 | 3 | export class TGALoader extends DataTextureLoader { 4 | constructor(manager?: LoadingManager); 5 | 6 | parse(data: ArrayBuffer): DataTexture; 7 | } 8 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/TIFFLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { DataTextureLoader, LoadingManager, TextureFilter } from "three"; 2 | 3 | export interface TIFFResult { 4 | width: number; 5 | height: number; 6 | data: Uint8Array; 7 | flipY: true; 8 | magFilter: TextureFilter; 9 | minFilter: TextureFilter; 10 | } 11 | 12 | export class TIFFLoader extends DataTextureLoader { 13 | constructor(manager?: LoadingManager); 14 | 15 | parse(buffer: Iterable): TIFFResult; 16 | } 17 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/TTFLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { Loader, LoadingManager } from "three"; 2 | import { FontData } from "./FontLoader.js"; 3 | 4 | export class TTFLoader extends Loader { 5 | reversed: boolean; 6 | 7 | constructor(manager?: LoadingManager); 8 | 9 | parse(arraybuffer: ArrayBuffer): FontData; 10 | } 11 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/USDZLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { Group, Loader, LoadingManager, Mesh } from "three"; 2 | 3 | export class USDAParser { 4 | parse(text: string): object; 5 | } 6 | 7 | export class USDZLoader extends Loader { 8 | constructor(manager?: LoadingManager); 9 | 10 | parse(buffer: ArrayBuffer | string): Group; 11 | } 12 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/UltraHDRLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { DataTexture, Loader, LoadingManager, RGBAFormat, TextureDataType } from "three"; 2 | 3 | interface UltraHDRLoaderTextureData { 4 | width: number; 5 | height: number; 6 | hdrBuffer: Uint16Array | Float32Array; 7 | format: typeof RGBAFormat; 8 | type: TextureDataType; 9 | } 10 | 11 | declare class UltraHDRLoader extends Loader { 12 | type: TextureDataType; 13 | 14 | constructor(manager?: LoadingManager); 15 | 16 | setDataType(value: TextureDataType): this; 17 | 18 | parse(buffer: ArrayBuffer, onLoad: (texData: UltraHDRLoaderTextureData) => void): void; 19 | } 20 | 21 | export { UltraHDRLoader }; 22 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/VOXLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { Data3DTexture, Loader, LoadingManager, Mesh } from "three"; 2 | 3 | export interface Chunk { 4 | palette: number[]; 5 | size: { x: number; y: number; z: number }; 6 | data: Uint8Array; 7 | } 8 | 9 | export class VOXLoader extends Loader { 10 | constructor(manager?: LoadingManager); 11 | 12 | parse(data: ArrayBuffer): object[]; 13 | } 14 | 15 | export class VOXMesh extends Mesh { 16 | constructor(chunk: Chunk); 17 | } 18 | 19 | export class VOXData3DTexture extends Data3DTexture { 20 | constructor(chunk: Chunk); 21 | } 22 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/VRMLLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { Loader, LoadingManager, Scene } from "three"; 2 | 3 | export class VRMLLoader extends Loader { 4 | constructor(manager?: LoadingManager); 5 | 6 | parse(data: string, path: string): Scene; 7 | } 8 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/VTKLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { BufferGeometry, Loader, LoadingManager } from "three"; 2 | 3 | export class VTKLoader extends Loader { 4 | constructor(manager?: LoadingManager); 5 | 6 | parse(data: ArrayBuffer | string, path: string): BufferGeometry; 7 | } 8 | -------------------------------------------------------------------------------- /types/three/examples/jsm/loaders/XYZLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { BufferGeometry, Loader, LoadingManager } from "three"; 2 | 3 | export class XYZLoader extends Loader { 4 | constructor(manager?: LoadingManager); 5 | 6 | parse(data: string, onLoad: (geometry: BufferGeometry) => void): object; 7 | } 8 | -------------------------------------------------------------------------------- /types/three/examples/jsm/materials/LDrawConditionalLineMaterial.d.ts: -------------------------------------------------------------------------------- 1 | import { ShaderMaterial, ShaderMaterialParameters } from "three"; 2 | 3 | declare class LDrawConditionalLineMaterial extends ShaderMaterial { 4 | readonly isLDrawConditionalLineMaterial: true; 5 | 6 | constructor(parameters?: ShaderMaterialParameters); 7 | } 8 | 9 | export { LDrawConditionalLineMaterial }; 10 | -------------------------------------------------------------------------------- /types/three/examples/jsm/materials/LDrawConditionalLineNodeMaterial.d.ts: -------------------------------------------------------------------------------- 1 | import { NodeMaterial, NodeMaterialParameters } from "three/webgpu"; 2 | 3 | declare class LDrawConditionalLineMaterial extends NodeMaterial { 4 | readonly isLDrawConditionalLineMaterial: true; 5 | 6 | constructor(parameters?: NodeMaterialParameters); 7 | } 8 | 9 | export { LDrawConditionalLineMaterial }; 10 | -------------------------------------------------------------------------------- /types/three/examples/jsm/materials/MeshGouraudMaterial.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * MeshGouraudMaterial 3 | * 4 | * Lambert illumination model with Gouraud (per-vertex) shading 5 | */ 6 | 7 | import { ShaderMaterial, ShaderMaterialParameters } from "three"; 8 | 9 | /** 10 | * @deprecated Use THREE.MeshLambertMaterial instead. 11 | */ 12 | export class MeshGouraudMaterial extends ShaderMaterial { 13 | isMeshGouraudMaterial: true; 14 | 15 | constructor(parameters?: ShaderMaterialParameters); 16 | 17 | copy(source: MeshGouraudMaterial): this; 18 | } 19 | -------------------------------------------------------------------------------- /types/three/examples/jsm/materials/MeshPostProcessingMaterial.d.ts: -------------------------------------------------------------------------------- 1 | import { MeshPhysicalMaterial, MeshPhysicalMaterialParameters, Texture } from "three"; 2 | 3 | export interface MeshPostProcessingMaterialParameters extends MeshPhysicalMaterialParameters { 4 | aoPassMap?: Texture | null | undefined; 5 | aoPassMapScale?: number | undefined; 6 | } 7 | 8 | export class MeshPostProcessingMaterial extends MeshPhysicalMaterial { 9 | constructor(parameters: MeshPostProcessingMaterialParameters); 10 | 11 | get aoPassMap(): Texture | null | undefined; 12 | set aoPassMap(aoPassMap: Texture | null | undefined); 13 | } 14 | -------------------------------------------------------------------------------- /types/three/examples/jsm/math/ColorConverter.d.ts: -------------------------------------------------------------------------------- 1 | import { Color } from "three"; 2 | 3 | export interface HSL { 4 | h: number; 5 | s: number; 6 | l: number; 7 | } 8 | 9 | export interface CMYK { 10 | c: number; 11 | m: number; 12 | y: number; 13 | k: number; 14 | } 15 | 16 | export namespace ColorConverter { 17 | function setHSV(color: Color, h: number, s: number, v: number): Color; 18 | function getHSV(color: Color, target: HSL): HSL; 19 | } 20 | -------------------------------------------------------------------------------- /types/three/examples/jsm/math/ColorSpaces.d.ts: -------------------------------------------------------------------------------- 1 | import { ColorSpaceDefinition } from "three"; 2 | 3 | export const DisplayP3ColorSpace: "display-p3"; 4 | export const LinearDisplayP3ColorSpace: "display-p3-linear"; 5 | 6 | export const DisplayP3ColorSpaceImpl: ColorSpaceDefinition; 7 | export const LinearDisplayP3ColorSpaceImpl: ColorSpaceDefinition; 8 | 9 | export const LinearRec2020ColorSpace: "rec2020-linear"; 10 | 11 | export const LinearRec2020ColorSpaceImpl: ColorSpaceDefinition; 12 | -------------------------------------------------------------------------------- /types/three/examples/jsm/math/ImprovedNoise.d.ts: -------------------------------------------------------------------------------- 1 | export class ImprovedNoise { 2 | constructor(); 3 | noise(x: number, y: number, z: number): number; 4 | } 5 | -------------------------------------------------------------------------------- /types/three/examples/jsm/math/SimplexNoise.d.ts: -------------------------------------------------------------------------------- 1 | export class SimplexNoise { 2 | constructor(r?: object); 3 | dot(g: number[], x: number, y: number): number; 4 | dot3(g: number[], x: number, y: number, z: number): number; 5 | dot4(g: number[], x: number, y: number, z: number, w: number): number; 6 | noise(xin: number, yin: number): number; 7 | noise3d(xin: number, yin: number, zin: number): number; 8 | noise4d(x: number, y: number, z: number, w: number): number; 9 | } 10 | -------------------------------------------------------------------------------- /types/three/examples/jsm/misc/Gyroscope.d.ts: -------------------------------------------------------------------------------- 1 | import { Object3D } from "three"; 2 | 3 | export class Gyroscope extends Object3D { 4 | constructor(); 5 | } 6 | -------------------------------------------------------------------------------- /types/three/examples/jsm/misc/MorphAnimMesh.d.ts: -------------------------------------------------------------------------------- 1 | import { AnimationAction, AnimationMixer, BufferGeometry, Material, Mesh } from "three"; 2 | 3 | export class MorphAnimMesh extends Mesh { 4 | constructor(geometry: BufferGeometry, material: Material); 5 | mixer: AnimationMixer; 6 | activeAction: AnimationAction | null; 7 | 8 | setDirectionForward(): void; 9 | setDirectionBackward(): void; 10 | playAnimation(label: string, fps: number): void; 11 | updateAnimation(delta: number): void; 12 | copy(source: MorphAnimMesh, recursive?: boolean): this; 13 | } 14 | -------------------------------------------------------------------------------- /types/three/examples/jsm/misc/TubePainter.d.ts: -------------------------------------------------------------------------------- 1 | import { Matrix4, Mesh, Vector3 } from "three"; 2 | 3 | export class TubePainter { 4 | constructor(); 5 | 6 | mesh: Mesh; 7 | 8 | stroke(position1: Vector3, position2: Vector3, matrix1: Matrix4, matrix2: Matrix4): void; 9 | updateGeometry(start: number, end: number): void; 10 | } 11 | -------------------------------------------------------------------------------- /types/three/examples/jsm/modifiers/SimplifyModifier.d.ts: -------------------------------------------------------------------------------- 1 | import { BufferGeometry } from "three"; 2 | 3 | export class SimplifyModifier { 4 | constructor(); 5 | modify(geometry: BufferGeometry, count: number): BufferGeometry; 6 | } 7 | -------------------------------------------------------------------------------- /types/three/examples/jsm/modifiers/TessellateModifier.d.ts: -------------------------------------------------------------------------------- 1 | import { BufferGeometry } from "three"; 2 | 3 | export class TessellateModifier { 4 | constructor(maxEdgeLength?: number, maxIterations?: number); 5 | maxEdgeLength: number; 6 | maxIterations: number; 7 | 8 | modify(geometry: TGeometry): TGeometry; 9 | } 10 | -------------------------------------------------------------------------------- /types/three/examples/jsm/objects/GroundedSkybox.d.ts: -------------------------------------------------------------------------------- 1 | import { Mesh, MeshBasicMaterial, SphereGeometry, Texture } from "three"; 2 | 3 | export class GroundedSkybox extends Mesh { 4 | constructor(map: Texture, height: number, radius: number, resolution?: number); 5 | } 6 | -------------------------------------------------------------------------------- /types/three/examples/jsm/objects/Lensflare.d.ts: -------------------------------------------------------------------------------- 1 | import { Color, Mesh, Texture } from "three"; 2 | 3 | declare class Lensflare extends Mesh { 4 | readonly isLensflare: true; 5 | 6 | constructor(); 7 | 8 | addElement: (element: LensflareElement) => void; 9 | dispose: () => void; 10 | } 11 | 12 | declare class LensflareElement { 13 | texture: Texture; 14 | size: number; 15 | distance: number; 16 | color: Color; 17 | 18 | constructor(texture: Texture, size?: number, distance?: number, color?: Color); 19 | } 20 | 21 | export { Lensflare, LensflareElement }; 22 | -------------------------------------------------------------------------------- /types/three/examples/jsm/objects/LensflareMesh.d.ts: -------------------------------------------------------------------------------- 1 | import { Color, Mesh, Texture } from "three"; 2 | 3 | declare class LensflareMesh extends Mesh { 4 | readonly isLensflare: true; 5 | 6 | constructor(); 7 | 8 | addElement: (element: LensflareElement) => void; 9 | dispose: () => void; 10 | } 11 | 12 | declare class LensflareElement { 13 | texture: Texture; 14 | size: number; 15 | distance: number; 16 | color: Color; 17 | 18 | constructor(texture: Texture, size?: number, distance?: number, color?: Color); 19 | } 20 | 21 | export { LensflareElement, LensflareMesh }; 22 | -------------------------------------------------------------------------------- /types/three/examples/jsm/objects/ShadowMesh.d.ts: -------------------------------------------------------------------------------- 1 | import { BufferGeometry, Matrix4, Mesh, MeshBasicMaterial, Plane, Vector4 } from "three"; 2 | 3 | export class ShadowMesh extends Mesh { 4 | readonly isShadowMesh: true; 5 | meshMatrix: Matrix4; 6 | 7 | constructor(mesh: Mesh); 8 | 9 | update(plane: Plane, lightPosition4D: Vector4): void; 10 | } 11 | -------------------------------------------------------------------------------- /types/three/examples/jsm/physics/AmmoPhysics.d.ts: -------------------------------------------------------------------------------- 1 | import { Mesh, Object3D, Vector3 } from "three"; 2 | 3 | export interface AmmoPhysicsObject { 4 | addScene: (scene: Object3D) => void; 5 | addMesh: (mesh: Mesh, mass?: number) => void; 6 | setMeshPosition: (mesh: Mesh, position: Vector3, index?: number) => void; 7 | } 8 | 9 | export function AmmoPhysics(): Promise; 10 | -------------------------------------------------------------------------------- /types/three/examples/jsm/physics/JoltPhysics.d.ts: -------------------------------------------------------------------------------- 1 | import { Mesh, Object3D, Vector3Like } from "three"; 2 | 3 | export interface JoltPhysicsObject { 4 | addScene: (scene: Object3D) => void; 5 | addMesh: (mesh: Mesh, mass?: number, restitution?: number) => void; 6 | setMeshPosition: (mesh: Mesh, position: Vector3Like, index?: number) => void; 7 | setMeshVelocity: (mesh: Mesh, velocity: Vector3Like, index?: number) => void; 8 | } 9 | 10 | export function JoltPhysics(): Promise; 11 | -------------------------------------------------------------------------------- /types/three/examples/jsm/postprocessing/AfterimagePass.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform, ShaderMaterial } from "three"; 2 | 3 | import { Pass } from "./Pass.js"; 4 | 5 | declare class AfterimagePass extends Pass { 6 | uniforms: Record; 7 | 8 | compFsMaterial: ShaderMaterial; 9 | copyFsMaterial: ShaderMaterial; 10 | 11 | constructor(damp?: number); 12 | 13 | get damp(): number; 14 | set damp(value: number); 15 | } 16 | 17 | export { AfterimagePass }; 18 | -------------------------------------------------------------------------------- /types/three/examples/jsm/postprocessing/BloomPass.d.ts: -------------------------------------------------------------------------------- 1 | import { ShaderMaterial, WebGLRenderTarget } from "three"; 2 | 3 | import { FullScreenQuad, Pass } from "./Pass.js"; 4 | 5 | export class BloomPass extends Pass { 6 | constructor(strength?: number, kernelSize?: number, sigma?: number); 7 | renderTargetX: WebGLRenderTarget; 8 | renderTargetY: WebGLRenderTarget; 9 | copyUniforms: object; 10 | materialCopy: ShaderMaterial; 11 | convolutionUniforms: object; 12 | materialConvolution: ShaderMaterial; 13 | fsQuad: FullScreenQuad; 14 | } 15 | -------------------------------------------------------------------------------- /types/three/examples/jsm/postprocessing/ClearPass.d.ts: -------------------------------------------------------------------------------- 1 | import { ColorRepresentation } from "three"; 2 | 3 | import { FullScreenQuad, Pass } from "./Pass.js"; 4 | 5 | export class ClearPass extends Pass { 6 | constructor(clearColor?: ColorRepresentation, clearAlpha?: number); 7 | clearColor: ColorRepresentation; 8 | clearAlpha: number; 9 | } 10 | -------------------------------------------------------------------------------- /types/three/examples/jsm/postprocessing/CubeTexturePass.d.ts: -------------------------------------------------------------------------------- 1 | import { CubeTexture, Mesh, PerspectiveCamera, Scene } from "three"; 2 | 3 | import { FullScreenQuad, Pass } from "./Pass.js"; 4 | 5 | export class CubeTexturePass extends Pass { 6 | constructor(camera: PerspectiveCamera, envMap?: CubeTexture, opacity?: number); 7 | camera: PerspectiveCamera; 8 | cubeShader: object; 9 | cubeMesh: Mesh; 10 | envMap: CubeTexture; 11 | opacity: number; 12 | cubeScene: Scene; 13 | cubeCamera: PerspectiveCamera; 14 | } 15 | -------------------------------------------------------------------------------- /types/three/examples/jsm/postprocessing/DotScreenPass.d.ts: -------------------------------------------------------------------------------- 1 | import { ShaderMaterial, Vector2 } from "three"; 2 | 3 | import { FullScreenQuad, Pass } from "./Pass.js"; 4 | 5 | export class DotScreenPass extends Pass { 6 | constructor(center?: Vector2, angle?: number, scale?: number); 7 | uniforms: object; 8 | material: ShaderMaterial; 9 | fsQuad: FullScreenQuad; 10 | } 11 | -------------------------------------------------------------------------------- /types/three/examples/jsm/postprocessing/FXAAPass.d.ts: -------------------------------------------------------------------------------- 1 | import { ShaderPass } from "./ShaderPass.js"; 2 | 3 | declare class FXAAPass extends ShaderPass { 4 | constructor(); 5 | } 6 | 7 | export { FXAAPass }; 8 | -------------------------------------------------------------------------------- /types/three/examples/jsm/postprocessing/FilmPass.d.ts: -------------------------------------------------------------------------------- 1 | import { ShaderMaterial } from "three"; 2 | 3 | import { FullScreenQuad, Pass } from "./Pass.js"; 4 | 5 | export class FilmPass extends Pass { 6 | constructor(intensity?: number, grayscale?: boolean); 7 | uniforms: object; 8 | material: ShaderMaterial; 9 | fsQuad: FullScreenQuad; 10 | } 11 | -------------------------------------------------------------------------------- /types/three/examples/jsm/postprocessing/GlitchPass.d.ts: -------------------------------------------------------------------------------- 1 | import { DataTexture, ShaderMaterial } from "three"; 2 | 3 | import { FullScreenQuad, Pass } from "./Pass.js"; 4 | 5 | export class GlitchPass extends Pass { 6 | constructor(dt_size?: number); 7 | uniforms: object; 8 | material: ShaderMaterial; 9 | fsQuad: FullScreenQuad; 10 | goWild: boolean; 11 | curF: number; 12 | randX: number; 13 | 14 | generateTrigger(): void; 15 | generateHeightmap(dt_size: number): DataTexture; 16 | } 17 | -------------------------------------------------------------------------------- /types/three/examples/jsm/postprocessing/LUTPass.d.ts: -------------------------------------------------------------------------------- 1 | import { Data3DTexture, DataTexture } from "three"; 2 | import { ShaderPass } from "./ShaderPass.js"; 3 | 4 | export interface LUTPassParameters { 5 | lut?: DataTexture | Data3DTexture; 6 | intensity?: number; 7 | } 8 | 9 | export class LUTPass extends ShaderPass { 10 | lut?: DataTexture | Data3DTexture; 11 | intensity?: number; 12 | constructor(params?: LUTPassParameters); 13 | } 14 | -------------------------------------------------------------------------------- /types/three/examples/jsm/postprocessing/MaskPass.d.ts: -------------------------------------------------------------------------------- 1 | import { Camera, Scene } from "three"; 2 | 3 | import { FullScreenQuad, Pass } from "./Pass.js"; 4 | 5 | export class MaskPass extends Pass { 6 | constructor(scene: Scene, camera: Camera); 7 | scene: Scene; 8 | camera: Camera; 9 | inverse: boolean; 10 | } 11 | 12 | export class ClearMaskPass extends Pass { 13 | constructor(); 14 | } 15 | -------------------------------------------------------------------------------- /types/three/examples/jsm/postprocessing/OutputPass.d.ts: -------------------------------------------------------------------------------- 1 | import { ShaderMaterial } from "three"; 2 | 3 | import { FullScreenQuad, Pass } from "./Pass.js"; 4 | 5 | export class OutputPass extends Pass { 6 | constructor(); 7 | uniforms: object; 8 | material: ShaderMaterial; 9 | fsQuad: FullScreenQuad; 10 | } 11 | -------------------------------------------------------------------------------- /types/three/examples/jsm/postprocessing/RenderPass.d.ts: -------------------------------------------------------------------------------- 1 | import { Camera, Color, Material, Scene } from "three"; 2 | 3 | import { Pass } from "./Pass.js"; 4 | 5 | export class RenderPass extends Pass { 6 | constructor( 7 | scene: Scene, 8 | camera: Camera, 9 | overrideMaterial?: Material | null, 10 | clearColor?: Color | null, 11 | clearAlpha?: number | null, 12 | ); 13 | 14 | scene: Scene; 15 | camera: Camera; 16 | 17 | overrideMaterial: Material | null; 18 | 19 | clearColor: Color | null; 20 | clearAlpha: number | null; 21 | 22 | clearDepth: boolean; 23 | } 24 | -------------------------------------------------------------------------------- /types/three/examples/jsm/postprocessing/SavePass.d.ts: -------------------------------------------------------------------------------- 1 | import { ShaderMaterial, WebGLRenderTarget } from "three"; 2 | 3 | import { FullScreenQuad, Pass } from "./Pass.js"; 4 | 5 | export class SavePass extends Pass { 6 | constructor(renderTarget?: WebGLRenderTarget); 7 | textureID: string; 8 | renderTarget: WebGLRenderTarget; 9 | uniforms: object; 10 | material: ShaderMaterial; 11 | fsQuad: FullScreenQuad; 12 | } 13 | -------------------------------------------------------------------------------- /types/three/examples/jsm/postprocessing/ShaderPass.d.ts: -------------------------------------------------------------------------------- 1 | import { ShaderMaterial } from "three"; 2 | 3 | import { FullScreenQuad, Pass } from "./Pass.js"; 4 | 5 | export class ShaderPass extends Pass { 6 | constructor(shader: object, textureID?: string); 7 | textureID: string; 8 | uniforms: { [name: string]: { value: any } }; 9 | material: ShaderMaterial; 10 | fsQuad: FullScreenQuad; 11 | } 12 | -------------------------------------------------------------------------------- /types/three/examples/jsm/postprocessing/TAARenderPass.d.ts: -------------------------------------------------------------------------------- 1 | import { Camera, ColorRepresentation, Scene } from "three"; 2 | 3 | import { SSAARenderPass } from "./SSAARenderPass.js"; 4 | 5 | export class TAARenderPass extends SSAARenderPass { 6 | constructor(scene: Scene, camera: Camera, clearColor?: ColorRepresentation, clearAlpha?: number); 7 | accumulate: boolean; 8 | } 9 | -------------------------------------------------------------------------------- /types/three/examples/jsm/postprocessing/TexturePass.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform, ShaderMaterial, Texture } from "three"; 2 | 3 | import { FullScreenQuad, Pass } from "./Pass.js"; 4 | 5 | export class TexturePass extends Pass { 6 | constructor(map?: Texture, opacity?: number); 7 | map: Texture | undefined; 8 | opacity: number; 9 | uniforms: Record; 10 | material: ShaderMaterial; 11 | fsQuad: FullScreenQuad; 12 | } 13 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/ACESFilmicToneMappingShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform, Texture } from "three"; 2 | 3 | export const ACESFilmicToneMappingShader: { 4 | name: string; 5 | uniforms: { 6 | tDiffuse: IUniform; 7 | exposure: IUniform; 8 | }; 9 | vertexShader: string; 10 | fragmentShader: string; 11 | }; 12 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/AfterimageShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const AfterimageShader: { 4 | name: string; 5 | uniforms: { 6 | damp: IUniform; 7 | tOld: IUniform; 8 | tNew: IUniform; 9 | }; 10 | vertexShader: string; 11 | fragmentShader: string; 12 | }; 13 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/BasicShader.d.ts: -------------------------------------------------------------------------------- 1 | export const BasicShader: { 2 | name: string; 3 | uniforms: {}; 4 | vertexShader: string; 5 | fragmentShader: string; 6 | }; 7 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/BleachBypassShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const BleachBypassShader: { 4 | uniforms: { 5 | tDiffuse: IUniform; 6 | opacity: IUniform; 7 | }; 8 | vertexShader: string; 9 | fragmentShader: string; 10 | }; 11 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/BlendShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const BlendShader: { 4 | name: string; 5 | uniforms: { 6 | tDiffuse1: IUniform; 7 | tDiffuse2: IUniform; 8 | mixRatio: IUniform; 9 | opacity: IUniform; 10 | }; 11 | vertexShader: string; 12 | fragmentShader: string; 13 | }; 14 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/BokehShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const BokehShader: { 4 | name: string; 5 | defines: { 6 | DEPTH_PACKING: number; 7 | PERSPECTIVE_CAMERA: number; 8 | }; 9 | uniforms: { 10 | tColor: IUniform; 11 | tDepth: IUniform; 12 | focus: IUniform; 13 | aspect: IUniform; 14 | aperture: IUniform; 15 | maxblur: IUniform; 16 | nearClip: IUniform; 17 | farClip: IUniform; 18 | }; 19 | vertexShader: string; 20 | fragmentShader: string; 21 | }; 22 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/BrightnessContrastShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const BrightnessContrastShader: { 4 | name: string; 5 | uniforms: { 6 | tDiffuse: IUniform; 7 | brightness: IUniform; 8 | contrast: IUniform; 9 | }; 10 | vertexShader: string; 11 | fragmentShader: string; 12 | }; 13 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/ColorCorrectionShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const ColorCorrectionShader: { 4 | name: string; 5 | uniforms: { 6 | tDiffuse: IUniform; 7 | powRGB: IUniform; 8 | mulRGB: IUniform; 9 | addRGB: IUniform; 10 | }; 11 | vertexShader: string; 12 | fragmentShader: string; 13 | }; 14 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/ColorifyShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const ColorifyShader: { 4 | uniforms: { 5 | tDiffuse: IUniform; 6 | color: IUniform; 7 | }; 8 | vertexShader: string; 9 | fragmentShader: string; 10 | }; 11 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/ConvolutionShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const ConvolutionShader: { 4 | defines: { 5 | KERNEL_SIZE_FLOAT: string; 6 | KERNEL_SIZE_INT: string; 7 | }; 8 | uniforms: { 9 | tDiffuse: IUniform; 10 | uImageIncrement: IUniform; 11 | cKernel: IUniform; 12 | }; 13 | vertexShader: string; 14 | fragmentShader: string; 15 | 16 | buildKernel(sigma: number): number[]; 17 | }; 18 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/CopyShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const CopyShader: { 4 | uniforms: { 5 | tDiffuse: IUniform; 6 | opacity: IUniform; 7 | }; 8 | vertexShader: string; 9 | fragmentShader: string; 10 | }; 11 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/DOFMipMapShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const DOFMipMapShader: { 4 | name: string; 5 | uniforms: { 6 | tColor: IUniform; 7 | tDepth: IUniform; 8 | focus: IUniform; 9 | maxblur: IUniform; 10 | }; 11 | vertexShader: string; 12 | fragmentShader: string; 13 | }; 14 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/DigitalGlitch.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const DigitalGlitch: { 4 | uniforms: { 5 | tDiffuse: IUniform; 6 | tDisp: IUniform; 7 | byp: IUniform; 8 | amount: IUniform; 9 | angle: IUniform; 10 | seed: IUniform; 11 | seed_x: IUniform; 12 | seed_y: IUniform; 13 | distortion_x: IUniform; 14 | distortion_y: IUniform; 15 | col_s: IUniform; 16 | }; 17 | vertexShader: string; 18 | fragmentShader: string; 19 | }; 20 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/DotScreenShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const DotScreenShader: { 4 | uniforms: { 5 | tDiffuse: IUniform; 6 | tSize: IUniform; 7 | center: IUniform; 8 | angle: IUniform; 9 | scale: IUniform; 10 | }; 11 | vertexShader: string; 12 | fragmentShader: string; 13 | }; 14 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/ExposureShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform, Texture } from "three"; 2 | 3 | export const ExposureShader: { 4 | name: "ExposureShader"; 5 | uniforms: { 6 | tDiffuse: IUniform; 7 | exposure: IUniform; 8 | }; 9 | vertexShader: string; 10 | fragmentShader: string; 11 | }; 12 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/FXAAShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const FXAAShader: { 4 | name: string; 5 | uniforms: { 6 | tDiffuse: IUniform; 7 | resolution: IUniform; 8 | }; 9 | vertexShader: string; 10 | fragmentShader: string; 11 | }; 12 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/FilmShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const FilmShader: { 4 | uniforms: { 5 | tDiffuse: IUniform; 6 | time: IUniform; 7 | intensity: IUniform; 8 | grayscale: IUniform; 9 | }; 10 | vertexShader: string; 11 | fragmentShader: string; 12 | }; 13 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/FocusShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const FocusShader: { 4 | name: string; 5 | uniforms: { 6 | tDiffuse: IUniform; 7 | screenWidth: IUniform; 8 | screenHeight: IUniform; 9 | sampleDistance: IUniform; 10 | waveFactor: IUniform; 11 | }; 12 | vertexShader: string; 13 | fragmentShader: string; 14 | }; 15 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/FreiChenShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const FreiChenShader: { 4 | name: string; 5 | uniforms: { 6 | tDiffuse: IUniform; 7 | aspect: IUniform; 8 | }; 9 | vertexShader: string; 10 | fragmentShader: string; 11 | }; 12 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/GammaCorrectionShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const GammaCorrectionShader: { 4 | uniforms: { 5 | tDiffuse: IUniform; 6 | }; 7 | vertexShader: string; 8 | fragmentShader: string; 9 | }; 10 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/HalftoneShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const HalftoneShader: { 4 | name: string; 5 | uniforms: { 6 | tDiffuse: IUniform; 7 | shape: IUniform; 8 | radius: IUniform; 9 | rotateR: IUniform; 10 | rotateG: IUniform; 11 | rotateB: IUniform; 12 | scatter: IUniform; 13 | width: IUniform; 14 | height: IUniform; 15 | blending: IUniform; 16 | blendingMode: IUniform; 17 | greyscale: IUniform; 18 | disable: IUniform; 19 | }; 20 | vertexShader: string; 21 | fragmentShader: string; 22 | }; 23 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/HorizontalBlurShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const HorizontalBlurShader: { 4 | uniforms: { 5 | tDiffuse: IUniform; 6 | h: IUniform; 7 | }; 8 | vertexShader: string; 9 | fragmentShader: string; 10 | }; 11 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/HorizontalTiltShiftShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const HorizontalTiltShiftShader: { 4 | name: string; 5 | uniforms: { 6 | tDiffuse: IUniform; 7 | h: IUniform; 8 | r: IUniform; 9 | }; 10 | vertexShader: string; 11 | fragmentShader: string; 12 | }; 13 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/HueSaturationShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const HueSaturationShader: { 4 | name: string; 5 | uniforms: { 6 | tDiffuse: IUniform; 7 | hue: IUniform; 8 | saturation: IUniform; 9 | }; 10 | vertexShader: string; 11 | fragmentShader: string; 12 | }; 13 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/KaleidoShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const KaleidoShader: { 4 | name: string; 5 | uniforms: { 6 | tDiffuse: IUniform; 7 | sides: IUniform; 8 | angle: IUniform; 9 | }; 10 | vertexShader: string; 11 | fragmentShader: string; 12 | }; 13 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/LuminosityHighPassShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const LuminosityHighPassShader: { 4 | name: string; 5 | shaderID: string; 6 | uniforms: { 7 | tDiffuse: IUniform; 8 | luminosityThreshold: IUniform; 9 | smoothWidth: IUniform; 10 | defaultColor: IUniform; 11 | defaultOpacity: IUniform; 12 | }; 13 | vertexShader: string; 14 | fragmentShader: string; 15 | }; 16 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/LuminosityShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const LuminosityShader: { 4 | name: string; 5 | uniforms: { 6 | tDiffuse: IUniform; 7 | }; 8 | vertexShader: string; 9 | fragmentShader: string; 10 | }; 11 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/MirrorShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const MirrorShader: { 4 | name: string; 5 | uniforms: { 6 | tDiffuse: IUniform; 7 | side: IUniform; 8 | }; 9 | vertexShader: string; 10 | fragmentShader: string; 11 | }; 12 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/NormalMapShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const NormalMapShader: { 4 | name: string; 5 | uniforms: { 6 | heightMap: IUniform; 7 | resolution: IUniform; 8 | scale: IUniform; 9 | height: IUniform; 10 | }; 11 | vertexShader: string; 12 | fragmentShader: string; 13 | }; 14 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/OutputShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const OutputShader: { 4 | name: string; 5 | uniforms: { 6 | tDiffuse: IUniform; 7 | toneMappingExposure: IUniform; 8 | }; 9 | vertexShader: string; 10 | fragmentShader: string; 11 | }; 12 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/RGBShiftShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const RGBShiftShader: { 4 | uniforms: { 5 | tDiffuse: IUniform; 6 | amount: IUniform; 7 | angle: IUniform; 8 | }; 9 | vertexShader: string; 10 | fragmentShader: string; 11 | }; 12 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/SepiaShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const SepiaShader: { 4 | uniforms: { 5 | tDiffuse: IUniform; 6 | amount: IUniform; 7 | }; 8 | vertexShader: string; 9 | fragmentShader: string; 10 | }; 11 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/SobelOperatorShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const SobelOperatorShader: { 4 | name: string; 5 | uniforms: { 6 | tDiffuse: IUniform; 7 | resolution: IUniform; 8 | }; 9 | vertexShader: string; 10 | fragmentShader: string; 11 | }; 12 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/TechnicolorShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const TechnicolorShader: { 4 | name: string; 5 | uniforms: { 6 | tDiffuse: IUniform; 7 | }; 8 | vertexShader: string; 9 | fragmentShader: string; 10 | }; 11 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/TriangleBlurShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const TriangleBlurShader: { 4 | name: string; 5 | uniforms: { 6 | texture: IUniform; 7 | delta: IUniform; 8 | }; 9 | vertexShader: string; 10 | fragmentShader: string; 11 | }; 12 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/UnpackDepthRGBAShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const UnpackDepthRGBAShader: { 4 | name: string; 5 | uniforms: { 6 | tDiffuse: IUniform; 7 | opacity: IUniform; 8 | }; 9 | vertexShader: string; 10 | fragmentShader: string; 11 | }; 12 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/VelocityShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform, UniformsLib } from "three"; 2 | 3 | export const VelocityShader: { 4 | name: string; 5 | uniforms: 6 | & (typeof UniformsLib)["common"] 7 | & (typeof UniformsLib)["displacementmap"] 8 | & { 9 | modelMatrixPrev: IUniform; 10 | currentProjectionViewMatrix: IUniform; 11 | previousProjectionViewMatrix: IUniform; 12 | }; 13 | 14 | fragmentShader: string; 15 | vertexShader: string; 16 | }; 17 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/VerticalBlurShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const VerticalBlurShader: { 4 | uniforms: { 5 | tDiffuse: IUniform; 6 | v: IUniform; 7 | }; 8 | vertexShader: string; 9 | fragmentShader: string; 10 | }; 11 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/VerticalTiltShiftShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const VerticalTiltShiftShader: { 4 | name: string; 5 | uniforms: { 6 | tDiffuse: IUniform; 7 | v: IUniform; 8 | r: IUniform; 9 | }; 10 | vertexShader: string; 11 | fragmentShader: string; 12 | }; 13 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/VignetteShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const VignetteShader: { 4 | uniforms: { 5 | tDiffuse: IUniform; 6 | offset: IUniform; 7 | darkness: IUniform; 8 | }; 9 | vertexShader: string; 10 | fragmentShader: string; 11 | }; 12 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/VolumeShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const VolumeRenderShader1: { 4 | uniforms: { 5 | u_size: IUniform; 6 | u_renderstyle: IUniform; 7 | u_renderthreshold: IUniform; 8 | u_clim: IUniform; 9 | u_data: IUniform; 10 | u_cmdata: IUniform; 11 | }; 12 | vertexShader: string; 13 | fragmentShader: string; 14 | }; 15 | -------------------------------------------------------------------------------- /types/three/examples/jsm/shaders/WaterRefractionShader.d.ts: -------------------------------------------------------------------------------- 1 | import { IUniform } from "three"; 2 | 3 | export const WaterRefractionShader: { 4 | name: string; 5 | uniforms: { 6 | color: IUniform; 7 | time: IUniform; 8 | tDiffuse: IUniform; 9 | tDudv: IUniform; 10 | textureMatrix: IUniform; 11 | }; 12 | vertexShader: string; 13 | fragmentShader: string; 14 | }; 15 | -------------------------------------------------------------------------------- /types/three/examples/jsm/textures/FlakesTexture.d.ts: -------------------------------------------------------------------------------- 1 | export class FlakesTexture extends HTMLCanvasElement { 2 | constructor(width?: number, height?: number); 3 | } 4 | -------------------------------------------------------------------------------- /types/three/examples/jsm/transpiler/GLSLDecoder.d.ts: -------------------------------------------------------------------------------- 1 | import { Program } from "./AST.js"; 2 | 3 | export default class GLSLDecoder { 4 | constructor(); 5 | 6 | parse(source: string): Program; 7 | } 8 | -------------------------------------------------------------------------------- /types/three/examples/jsm/transpiler/ShaderToyDecoder.d.ts: -------------------------------------------------------------------------------- 1 | import GLSLDecoder from "./GLSLDecoder.js"; 2 | 3 | export default class ShaderToyDecoder extends GLSLDecoder {} 4 | -------------------------------------------------------------------------------- /types/three/examples/jsm/transpiler/Transpiler.d.ts: -------------------------------------------------------------------------------- 1 | export default class Transpiler { 2 | constructor(decoder: { parse(source: string): U }, encoder: { emit(decoded: U): V }); 3 | 4 | parse(source: string): V; 5 | } 6 | -------------------------------------------------------------------------------- /types/three/examples/jsm/tsl/display/AfterImageNode.d.ts: -------------------------------------------------------------------------------- 1 | import { ShaderNodeObject } from "three/tsl"; 2 | import { Node, TempNode, TextureNode, UniformNode } from "three/webgpu"; 3 | 4 | export default class AfterImageNode extends TempNode { 5 | textureNode: TextureNode; 6 | textureNodeOld: Node; 7 | damp: UniformNode; 8 | 9 | constructor(textureNode: Node, damp?: number); 10 | 11 | getTextureNode(): TextureNode; 12 | 13 | setSize(width: number, height: number): void; 14 | } 15 | 16 | export const afterImage: (node: Node, damp?: number) => ShaderNodeObject; 17 | -------------------------------------------------------------------------------- /types/three/examples/jsm/tsl/display/AnaglyphPassNode.d.ts: -------------------------------------------------------------------------------- 1 | import { ShaderNodeObject } from "three/tsl"; 2 | import { Camera, Scene } from "three/webgpu"; 3 | import StereoCompositePassNode from "./StereoCompositePassNode.js"; 4 | 5 | declare class AnaglyphPassNode extends StereoCompositePassNode { 6 | readonly isAnaglyphPassNode: true; 7 | 8 | constructor(scene: Scene, camera: Camera); 9 | } 10 | 11 | export default AnaglyphPassNode; 12 | 13 | export const anaglyphPass: (scene: Scene, camera: Camera) => ShaderNodeObject; 14 | -------------------------------------------------------------------------------- /types/three/examples/jsm/tsl/display/BleachBypass.d.ts: -------------------------------------------------------------------------------- 1 | import { NodeRepresentation, ShaderNodeObject } from "three/tsl"; 2 | import { Node } from "three/webgpu"; 3 | 4 | export const bleach: (color: NodeRepresentation, opacity?: number) => ShaderNodeObject; 5 | -------------------------------------------------------------------------------- /types/three/examples/jsm/tsl/display/DotScreenNode.d.ts: -------------------------------------------------------------------------------- 1 | import { NodeRepresentation, ShaderNodeObject } from "three/tsl"; 2 | import { Node, TempNode, UniformNode, Vector2 } from "three/webgpu"; 3 | 4 | declare class DotScreenNode extends TempNode { 5 | inputNode: Node; 6 | center: UniformNode; 7 | angle: UniformNode; 8 | scale: UniformNode; 9 | 10 | constructor(inputNode: Node, center?: Vector2, angle?: number, scale?: number); 11 | } 12 | 13 | export default DotScreenNode; 14 | 15 | export const dotScreen: ( 16 | node: NodeRepresentation, 17 | center?: Vector2, 18 | angle?: number, 19 | scale?: number, 20 | ) => ShaderNodeObject; 21 | -------------------------------------------------------------------------------- /types/three/examples/jsm/tsl/display/FXAANode.d.ts: -------------------------------------------------------------------------------- 1 | import { NodeRepresentation, ShaderNodeObject } from "three/tsl"; 2 | import { TempNode, TextureNode } from "three/webgpu"; 3 | 4 | declare class FXAANode extends TempNode { 5 | textureNode: TextureNode; 6 | 7 | constructor(textureNode: TextureNode); 8 | } 9 | 10 | export default FXAANode; 11 | 12 | export const fxaa: (node: NodeRepresentation) => ShaderNodeObject; 13 | -------------------------------------------------------------------------------- /types/three/examples/jsm/tsl/display/FilmNode.d.ts: -------------------------------------------------------------------------------- 1 | import { NodeRepresentation, ShaderNodeObject } from "three/tsl"; 2 | import { Node, TempNode } from "three/webgpu"; 3 | 4 | declare class FilmNode extends TempNode { 5 | inputNode: Node; 6 | intensityNode: Node | null; 7 | uvNode: Node | null; 8 | 9 | constructor(inputNode: Node, intensityNode?: Node | null, uvNode?: Node | null); 10 | } 11 | 12 | export default FilmNode; 13 | 14 | export const film: ( 15 | inputNode: NodeRepresentation, 16 | intensityNode?: NodeRepresentation | null, 17 | uvNode?: NodeRepresentation | null, 18 | ) => ShaderNodeObject; 19 | -------------------------------------------------------------------------------- /types/three/examples/jsm/tsl/display/MotionBlur.d.ts: -------------------------------------------------------------------------------- 1 | import { NodeRepresentation, ShaderNodeObject } from "three/tsl"; 2 | import { Node } from "three/webgpu"; 3 | 4 | export const motionBlur: ( 5 | inputNode: NodeRepresentation, 6 | velocity: NodeRepresentation, 7 | numSamples?: NodeRepresentation, 8 | ) => ShaderNodeObject; 9 | -------------------------------------------------------------------------------- /types/three/examples/jsm/tsl/display/ParallaxBarrierPassNode.d.ts: -------------------------------------------------------------------------------- 1 | import { ShaderNodeObject } from "three/tsl"; 2 | import { Camera, Scene } from "three/webgpu"; 3 | import StereoCompositePassNode from "./StereoCompositePassNode.js"; 4 | 5 | declare class ParallaxBarrierPassNode extends StereoCompositePassNode { 6 | readonly isParallaxBarrierPassNode: true; 7 | 8 | constructor(scene: Scene, camera: Camera); 9 | } 10 | 11 | export default ParallaxBarrierPassNode; 12 | 13 | export const parallaxBarrierPass: (scene: Scene, camera: Camera) => ShaderNodeObject; 14 | -------------------------------------------------------------------------------- /types/three/examples/jsm/tsl/display/RGBShiftNode.d.ts: -------------------------------------------------------------------------------- 1 | import { NodeRepresentation, ShaderNodeObject } from "three/tsl"; 2 | import { TempNode, TextureNode, UniformNode } from "three/webgpu"; 3 | 4 | export default class RGBShiftNode extends TempNode { 5 | textureNode: TextureNode; 6 | amount: UniformNode; 7 | angle: UniformNode; 8 | 9 | constructor(textureNode: TextureNode, amount?: number, angle?: number); 10 | 11 | getTextureNode(): TextureNode; 12 | 13 | setSize(width: number, height: number): void; 14 | } 15 | 16 | export const rgbShift: (node: NodeRepresentation, amount?: number, angle?: number) => ShaderNodeObject; 17 | -------------------------------------------------------------------------------- /types/three/examples/jsm/tsl/display/SMAANode.d.ts: -------------------------------------------------------------------------------- 1 | import { NodeRepresentation, ShaderNodeObject } from "three/tsl"; 2 | import { TempNode, TextureNode } from "three/webgpu"; 3 | 4 | declare class SMAANode extends TempNode { 5 | textureNode: TextureNode; 6 | 7 | constructor(textureNode: TextureNode); 8 | 9 | getTextureNode(): TextureNode; 10 | 11 | setSize(width: number, height: number): void; 12 | 13 | getAreaTexture(): string; 14 | 15 | getSearchTexture(): string; 16 | } 17 | 18 | export const smaa: (node: NodeRepresentation) => ShaderNodeObject; 19 | -------------------------------------------------------------------------------- /types/three/examples/jsm/tsl/display/SSAAPassNode.d.ts: -------------------------------------------------------------------------------- 1 | import { ShaderNodeObject } from "three/tsl"; 2 | import { Camera, Color, PassNode, RenderTarget, Scene, UniformNode } from "three/webgpu"; 3 | 4 | declare class SSAAPassNode extends PassNode { 5 | readonly isSSAAPassNode: boolean; 6 | 7 | sampleLevel: number; 8 | unbiased: boolean; 9 | clearColor: Color; 10 | clearAlpha: number; 11 | 12 | sampleWeight: UniformNode; 13 | 14 | sampleRenderTarget: RenderTarget | null; 15 | 16 | constructor(scene: Scene, camera: Camera); 17 | } 18 | 19 | export default SSAAPassNode; 20 | 21 | export const ssaaPass: (scene: Scene, camera: Camera) => ShaderNodeObject; 22 | -------------------------------------------------------------------------------- /types/three/examples/jsm/tsl/display/Sepia.d.ts: -------------------------------------------------------------------------------- 1 | import { NodeRepresentation, ShaderNodeObject } from "three/tsl"; 2 | import { Node } from "three/webgpu"; 3 | 4 | export const sepia: (color: NodeRepresentation) => ShaderNodeObject; 5 | -------------------------------------------------------------------------------- /types/three/examples/jsm/tsl/display/SobelOperatorNode.d.ts: -------------------------------------------------------------------------------- 1 | import { NodeRepresentation, ShaderNodeObject } from "three/tsl"; 2 | import { TempNode, TextureNode } from "three/webgpu"; 3 | 4 | declare class SobelOperatorNode extends TempNode { 5 | textureNode: TextureNode; 6 | 7 | constructor(textureNode: TextureNode); 8 | } 9 | 10 | export default SobelOperatorNode; 11 | 12 | export const sobel: (node: NodeRepresentation) => ShaderNodeObject; 13 | -------------------------------------------------------------------------------- /types/three/examples/jsm/tsl/display/StereoCompositePassNode.d.ts: -------------------------------------------------------------------------------- 1 | import { Camera, CoordinateSystem, PassNode, Scene, StereoCamera } from "three/webgpu"; 2 | 3 | declare class StereoCompositePassNode extends PassNode { 4 | readonly isStereoCompositePassNode: true; 5 | 6 | stereo: StereoCamera; 7 | 8 | constructor(scene: Scene, camera: Camera); 9 | 10 | updateStereoCamera(coordinateSystem: CoordinateSystem): void; 11 | } 12 | 13 | export default StereoCompositePassNode; 14 | -------------------------------------------------------------------------------- /types/three/examples/jsm/tsl/display/StereoPassNode.d.ts: -------------------------------------------------------------------------------- 1 | import { ShaderNodeObject } from "three/tsl"; 2 | import { Camera, PassNode, Scene, StereoCamera } from "three/webgpu"; 3 | 4 | declare class StereoPassNode extends PassNode { 5 | readonly isStereoPassNode: true; 6 | 7 | stereo: StereoCamera; 8 | 9 | constructor(scene: Scene, camera: Camera); 10 | } 11 | 12 | export default StereoPassNode; 13 | 14 | export const stereoPass: (scene: Scene, camera: Camera) => ShaderNodeObject; 15 | -------------------------------------------------------------------------------- /types/three/examples/jsm/tsl/display/TRAAPassNode.d.ts: -------------------------------------------------------------------------------- 1 | import { ShaderNodeObject } from "three/tsl"; 2 | import { Camera, ColorRepresentation, PassNode, Scene } from "three/webgpu"; 3 | 4 | declare class TRAAPassNode extends PassNode { 5 | readonly isTRAAPassNode: true; 6 | 7 | clearColor: ColorRepresentation; 8 | clearAlpha: number; 9 | 10 | constructor(scene: Scene, camera: Camera); 11 | } 12 | 13 | export default TRAAPassNode; 14 | 15 | export const traaPass: (scene: Scene, camera: Camera) => ShaderNodeObject; 16 | -------------------------------------------------------------------------------- /types/three/examples/jsm/tsl/display/hashBlur.d.ts: -------------------------------------------------------------------------------- 1 | import { NodeRepresentation, ShaderNodeObject } from "three/tsl"; 2 | import { Node } from "three/webgpu"; 3 | 4 | interface HashBlurOptions { 5 | repeats?: NodeRepresentation | undefined; 6 | mask?: NodeRepresentation | null | undefined; 7 | premultipliedAlpha?: boolean | undefined; 8 | } 9 | 10 | export const hashBlur: ( 11 | textureNode: NodeRepresentation, 12 | bluramount?: NodeRepresentation, 13 | options?: HashBlurOptions, 14 | ) => ShaderNodeObject; 15 | -------------------------------------------------------------------------------- /types/three/examples/jsm/tsl/math/Bayer.d.ts: -------------------------------------------------------------------------------- 1 | import { ShaderNodeObject } from "three/tsl"; 2 | import { Node } from "three/webgpu"; 3 | 4 | export const bayer16: (uv: Node) => ShaderNodeObject; 5 | -------------------------------------------------------------------------------- /types/three/examples/jsm/tsl/shadows/TileShadowNode.d.ts: -------------------------------------------------------------------------------- 1 | import { Light, ShadowBaseNode } from "three/webgpu"; 2 | 3 | export interface TileShadeNodeConfig { 4 | tilesX?: number | undefined; 5 | tilesY?: number | undefined; 6 | resolution?: { width: number; height: number }; 7 | debug?: boolean | undefined; 8 | } 9 | 10 | declare class TileShadowNode extends ShadowBaseNode { 11 | constructor(light: Light, options?: TileShadeNodeConfig); 12 | } 13 | 14 | export { TileShadowNode }; 15 | -------------------------------------------------------------------------------- /types/three/examples/jsm/tsl/shadows/TileShadowNodeHelper.d.ts: -------------------------------------------------------------------------------- 1 | import { Group } from "three/webgpu"; 2 | import { TileShadowNode } from "./TileShadowNode.js"; 3 | 4 | declare class TileShadowNodeHelper extends Group { 5 | constructor(tileShadowNode: TileShadowNode); 6 | 7 | init(): void; 8 | 9 | update(): void; 10 | 11 | dispose(): void; 12 | } 13 | 14 | export { TileShadowNodeHelper }; 15 | -------------------------------------------------------------------------------- /types/three/examples/jsm/tsl/utils/Raymarching.d.ts: -------------------------------------------------------------------------------- 1 | import { ShaderNodeObject } from "three/tsl"; 2 | import { FunctionNode, Node } from "three/webgpu"; 3 | 4 | export const RaymarchingBox: ( 5 | steps: number | Node, 6 | callback: 7 | | ((params: { positionRay: ShaderNodeObject }) => void) 8 | | FunctionNode<{ positionRay: ShaderNodeObject }>, 9 | ) => void; 10 | -------------------------------------------------------------------------------- /types/three/examples/jsm/utils/CameraUtils.d.ts: -------------------------------------------------------------------------------- 1 | import { PerspectiveCamera, Vector3 } from "three"; 2 | 3 | export function frameCorners( 4 | camera: PerspectiveCamera, 5 | bottomLeftCorner: Vector3, 6 | bottomRightCorner: Vector3, 7 | topLeftCorner: Vector3, 8 | estimateViewFrustum?: boolean, 9 | ): void; 10 | -------------------------------------------------------------------------------- /types/three/examples/jsm/utils/GeometryUtils.d.ts: -------------------------------------------------------------------------------- 1 | import { Vector3 } from "three"; 2 | 3 | export function hilbert2D( 4 | center?: Vector3, 5 | size?: number, 6 | iterations?: number, 7 | v0?: number, 8 | v1?: number, 9 | v2?: number, 10 | v3?: number, 11 | ): Vector3[]; 12 | export function hilbert3D( 13 | center?: Vector3, 14 | size?: number, 15 | iterations?: number, 16 | v0?: number, 17 | v1?: number, 18 | v2?: number, 19 | v3?: number, 20 | v4?: number, 21 | v5?: number, 22 | v6?: number, 23 | v7?: number, 24 | ): Vector3[]; 25 | export function gosper(size?: number): number[]; 26 | -------------------------------------------------------------------------------- /types/three/examples/jsm/utils/LDrawUtils.d.ts: -------------------------------------------------------------------------------- 1 | import { Group, Object3D } from "three"; 2 | 3 | export namespace LDrawUtils { 4 | function mergeObject(object: Object3D): Group; 5 | } 6 | -------------------------------------------------------------------------------- /types/three/examples/jsm/utils/ShadowMapViewer.d.ts: -------------------------------------------------------------------------------- 1 | import { Light, WebGLRenderer } from "three"; 2 | 3 | export interface Size { 4 | width: number; 5 | height: number; 6 | set: (width: number, height: number) => void; 7 | } 8 | 9 | export interface Position { 10 | x: number; 11 | y: number; 12 | set: (x: number, y: number) => void; 13 | } 14 | 15 | declare class ShadowMapViewer { 16 | enabled: boolean; 17 | size: Size; 18 | position: Position; 19 | render: (renderer: WebGLRenderer) => void; 20 | updateForWindowResize: () => void; 21 | update: () => void; 22 | 23 | constructor(light: Light); 24 | } 25 | 26 | export { ShadowMapViewer }; 27 | -------------------------------------------------------------------------------- /types/three/examples/jsm/utils/ShadowMapViewerGPU.d.ts: -------------------------------------------------------------------------------- 1 | import { Light, WebGPURenderer } from "three/webgpu"; 2 | 3 | export interface Size { 4 | width: number; 5 | height: number; 6 | set: (width: number, height: number) => void; 7 | } 8 | 9 | export interface Position { 10 | x: number; 11 | y: number; 12 | set: (x: number, y: number) => void; 13 | } 14 | 15 | declare class ShadowMapViewer { 16 | enabled: boolean; 17 | size: Size; 18 | position: Position; 19 | render: (renderer: WebGPURenderer) => void; 20 | updateForWindowResize: () => void; 21 | update: () => void; 22 | 23 | constructor(light: Light); 24 | } 25 | 26 | export { ShadowMapViewer }; 27 | -------------------------------------------------------------------------------- /types/three/examples/jsm/utils/SortUtils.d.ts: -------------------------------------------------------------------------------- 1 | export interface RadixSortOptions { 2 | aux?: T[] | undefined; 3 | get?: ((el: T) => number) | undefined; 4 | reversed?: boolean | undefined; 5 | } 6 | 7 | export const radixSort: (arr: T[], opt?: RadixSortOptions) => void; 8 | -------------------------------------------------------------------------------- /types/three/examples/jsm/utils/UVsDebug.d.ts: -------------------------------------------------------------------------------- 1 | import { BufferGeometry } from "three"; 2 | 3 | export function UVsDebug(geometry: BufferGeometry, size?: number): HTMLCanvasElement; 4 | -------------------------------------------------------------------------------- /types/three/examples/jsm/utils/WebGLTextureUtils.d.ts: -------------------------------------------------------------------------------- 1 | import { Texture, WebGLRenderer } from "three"; 2 | 3 | export function decompress(texture: Texture, maxTextureSize?: number, renderer?: WebGLRenderer): Texture; 4 | -------------------------------------------------------------------------------- /types/three/examples/jsm/utils/WebGPUTextureUtils.d.ts: -------------------------------------------------------------------------------- 1 | import { Texture, WebGPURenderer } from "three/webgpu"; 2 | 3 | export function decompress(blitTexture: Texture, maxTextureSize?: number, renderer?: WebGPURenderer): Promise; 4 | -------------------------------------------------------------------------------- /types/three/examples/jsm/webxr/ARButton.d.ts: -------------------------------------------------------------------------------- 1 | import { WebGLRenderer } from "three"; 2 | 3 | export interface ARButtonSessionInit extends XRSessionInit { 4 | domOverlay: { root: HTMLElement }; 5 | } 6 | 7 | export namespace ARButton { 8 | function createButton(renderer: WebGLRenderer, sessionInit?: Partial): HTMLElement; 9 | } 10 | -------------------------------------------------------------------------------- /types/three/examples/jsm/webxr/Text2D.d.ts: -------------------------------------------------------------------------------- 1 | import { Mesh } from "three"; 2 | 3 | export function createText(message: string, height: number): Mesh; 4 | -------------------------------------------------------------------------------- /types/three/examples/jsm/webxr/VRButton.d.ts: -------------------------------------------------------------------------------- 1 | export interface VRButtonRenderer { 2 | xr: { setSession: (value: XRSession) => Promise }; 3 | } 4 | 5 | export class VRButton { 6 | static createButton(renderer: VRButtonRenderer, sessionInit?: XRSessionInit): HTMLElement; 7 | } 8 | -------------------------------------------------------------------------------- /types/three/examples/jsm/webxr/XRButton.d.ts: -------------------------------------------------------------------------------- 1 | export interface XRButtonRenderer { 2 | xr: { setSession(session: XRSession): Promise }; 3 | } 4 | 5 | export class XRButton { 6 | static createButton(renderer: XRButtonRenderer, sessionInit?: XRSessionInit): HTMLElement; 7 | } 8 | -------------------------------------------------------------------------------- /types/three/examples/jsm/webxr/XRHandMeshModel.d.ts: -------------------------------------------------------------------------------- 1 | import { Loader, Object3D } from "three"; 2 | import { GLTF } from "../loaders/GLTFLoader.js"; 3 | 4 | export class XRHandMeshModel { 5 | controller: Object3D; 6 | handModel: Object3D; 7 | bones: Object3D[]; 8 | 9 | constructor( 10 | handModel: Object3D, 11 | controller: Object3D, 12 | path: string, 13 | handedness: string, 14 | loader?: Loader | null, 15 | onLoad?: ((object: Object3D) => void) | null, 16 | ); 17 | 18 | updateMesh(): void; 19 | } 20 | -------------------------------------------------------------------------------- /types/three/examples/jsm/webxr/XRPlanes.d.ts: -------------------------------------------------------------------------------- 1 | import { Object3D, WebGLRenderer } from "three"; 2 | 3 | export class XRPlanes extends Object3D { 4 | constructor(renderer: WebGLRenderer); 5 | } 6 | -------------------------------------------------------------------------------- /types/three/index.d.ts: -------------------------------------------------------------------------------- 1 | // To update three.js type definition, please make changes to the repository at: 2 | // https://github.com/three-types/three-ts-types. 3 | // Periodically, the updates from the repository are pushed to DefinitelyTyped 4 | // and released in the @types/three npm package. 5 | 6 | export * from "./src/Three.js"; 7 | -------------------------------------------------------------------------------- /types/three/src/core/RenderTarget3D.d.ts: -------------------------------------------------------------------------------- 1 | import { RenderTarget, RenderTargetOptions } from "./RenderTarget.js"; 2 | 3 | declare class RenderTarget3D extends RenderTarget { 4 | readonly isRenderTarget3D: true; 5 | 6 | constructor(width?: number, height?: number, depth?: number, options?: RenderTargetOptions); 7 | } 8 | 9 | export { RenderTarget3D }; 10 | -------------------------------------------------------------------------------- /types/three/src/extras/curves/Curves.d.ts: -------------------------------------------------------------------------------- 1 | export * from "./ArcCurve.js"; 2 | export * from "./CatmullRomCurve3.js"; 3 | export * from "./CubicBezierCurve.js"; 4 | export * from "./CubicBezierCurve3.js"; 5 | export * from "./EllipseCurve.js"; 6 | export * from "./LineCurve.js"; 7 | export * from "./LineCurve3.js"; 8 | export * from "./QuadraticBezierCurve.js"; 9 | export * from "./QuadraticBezierCurve3.js"; 10 | export * from "./SplineCurve.js"; 11 | -------------------------------------------------------------------------------- /types/three/src/lights/webgpu/IESSpotLight.d.ts: -------------------------------------------------------------------------------- 1 | import { Texture } from "../../textures/Texture.js"; 2 | import { SpotLight } from "../SpotLight.js"; 3 | 4 | export default class IESSpotLight extends SpotLight { 5 | iesMap: Texture | null; 6 | } 7 | -------------------------------------------------------------------------------- /types/three/src/lights/webgpu/ProjectorLight.d.ts: -------------------------------------------------------------------------------- 1 | import { ColorRepresentation } from "../../math/Color.js"; 2 | import { SpotLight } from "../SpotLight.js"; 3 | 4 | declare class ProjectorLight extends SpotLight { 5 | aspect: number | null; 6 | 7 | constructor( 8 | color?: ColorRepresentation, 9 | intensity?: number, 10 | distance?: number, 11 | angle?: number, 12 | penumbra?: number, 13 | decay?: number, 14 | ); 15 | } 16 | 17 | export default ProjectorLight; 18 | -------------------------------------------------------------------------------- /types/three/src/loaders/AnimationLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { AnimationClip } from "../animation/AnimationClip.js"; 2 | import { Loader } from "./Loader.js"; 3 | import { LoadingManager } from "./LoadingManager.js"; 4 | 5 | export class AnimationLoader extends Loader { 6 | constructor(manager?: LoadingManager); 7 | 8 | parse(json: readonly unknown[]): AnimationClip[]; 9 | } 10 | -------------------------------------------------------------------------------- /types/three/src/loaders/AudioLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { Loader } from "./Loader.js"; 2 | import { LoadingManager } from "./LoadingManager.js"; 3 | 4 | export class AudioLoader extends Loader { 5 | constructor(manager?: LoadingManager); 6 | } 7 | -------------------------------------------------------------------------------- /types/three/src/loaders/BufferGeometryLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { BufferGeometry } from "../core/BufferGeometry.js"; 2 | import { InstancedBufferGeometry } from "../core/InstancedBufferGeometry.js"; 3 | import { Loader } from "./Loader.js"; 4 | import { LoadingManager } from "./LoadingManager.js"; 5 | 6 | export class BufferGeometryLoader extends Loader { 7 | constructor(manager?: LoadingManager); 8 | 9 | parse(json: unknown): InstancedBufferGeometry | BufferGeometry; 10 | } 11 | -------------------------------------------------------------------------------- /types/three/src/loaders/Cache.d.ts: -------------------------------------------------------------------------------- 1 | declare const Cache: { 2 | /** 3 | * @default false 4 | */ 5 | enabled: boolean; 6 | 7 | /** 8 | * @default {} 9 | */ 10 | files: any; 11 | 12 | add(key: string, file: any): void; 13 | 14 | get(key: string): any; 15 | 16 | remove(key: string): void; 17 | 18 | clear(): void; 19 | }; 20 | 21 | export { Cache }; 22 | -------------------------------------------------------------------------------- /types/three/src/loaders/CompressedTextureLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { CompressedTexture } from "../textures/CompressedTexture.js"; 2 | import { Loader } from "./Loader.js"; 3 | import { LoadingManager } from "./LoadingManager.js"; 4 | 5 | export class CompressedTextureLoader extends Loader { 6 | constructor(manager?: LoadingManager); 7 | 8 | load( 9 | url: string, 10 | onLoad?: (data: CompressedTexture) => void, 11 | onProgress?: (event: ProgressEvent) => void, 12 | onError?: (err: unknown) => void, 13 | ): CompressedTexture; 14 | } 15 | -------------------------------------------------------------------------------- /types/three/src/loaders/CubeTextureLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { CubeTexture } from "../textures/CubeTexture.js"; 2 | import { Loader } from "./Loader.js"; 3 | import { LoadingManager } from "./LoadingManager.js"; 4 | 5 | export class CubeTextureLoader extends Loader { 6 | constructor(manager?: LoadingManager); 7 | 8 | load( 9 | url: readonly string[], 10 | onLoad?: (data: CubeTexture) => void, 11 | onProgress?: (event: ProgressEvent) => void, 12 | onError?: (err: unknown) => void, 13 | ): CubeTexture; 14 | } 15 | -------------------------------------------------------------------------------- /types/three/src/loaders/DataTextureLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { DataTexture } from "../textures/DataTexture.js"; 2 | import { Loader } from "./Loader.js"; 3 | import { LoadingManager } from "./LoadingManager.js"; 4 | 5 | export class DataTextureLoader extends Loader { 6 | constructor(manager?: LoadingManager); 7 | 8 | load( 9 | url: string, 10 | onLoad?: (data: DataTexture, texData: object) => void, 11 | onProgress?: (event: ProgressEvent) => void, 12 | onError?: (err: unknown) => void, 13 | ): DataTexture; 14 | } 15 | -------------------------------------------------------------------------------- /types/three/src/loaders/FileLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { Loader } from "./Loader.js"; 2 | import { LoadingManager } from "./LoadingManager.js"; 3 | 4 | export class FileLoader extends Loader { 5 | constructor(manager?: LoadingManager); 6 | 7 | load( 8 | url: string, 9 | onLoad?: (data: string | ArrayBuffer) => void, 10 | onProgress?: (event: ProgressEvent) => void, 11 | onError?: (err: unknown) => void, 12 | ): void; 13 | 14 | mimeType: string; 15 | responseType: string; 16 | 17 | setMimeType(mimeType: string): FileLoader; 18 | setResponseType(responseType: string): FileLoader; 19 | } 20 | -------------------------------------------------------------------------------- /types/three/src/loaders/ImageBitmapLoader.d.ts: -------------------------------------------------------------------------------- 1 | import { Loader } from "./Loader.js"; 2 | import { LoadingManager } from "./LoadingManager.js"; 3 | 4 | export class ImageBitmapLoader extends Loader { 5 | constructor(manager?: LoadingManager); 6 | 7 | load( 8 | url: string, 9 | onLoad?: (data: ImageBitmap) => void, 10 | onProgress?: (event: ProgressEvent) => void, 11 | onError?: (err: unknown) => void, 12 | ): void; 13 | 14 | /** 15 | * @default { premultiplyAlpha: 'none' } 16 | */ 17 | options: undefined | object; 18 | 19 | readonly isImageBitmapLoader: true; 20 | 21 | setOptions(options: object): ImageBitmapLoader; 22 | } 23 | -------------------------------------------------------------------------------- /types/three/src/loaders/LoaderUtils.d.ts: -------------------------------------------------------------------------------- 1 | export class LoaderUtils { 2 | static extractUrlBase(url: string): string; 3 | 4 | static resolveURL(url: string, path: string): string; 5 | } 6 | -------------------------------------------------------------------------------- /types/three/src/loaders/nodes/NodeMaterialLoader.d.ts: -------------------------------------------------------------------------------- 1 | import NodeMaterial from "../../materials/nodes/NodeMaterial.js"; 2 | import { MaterialLoader } from "../MaterialLoader.js"; 3 | import { NodeLoaderResult } from "./NodeLoader.js"; 4 | 5 | export default class NodeMaterialLoader extends MaterialLoader { 6 | nodes: NodeLoaderResult; 7 | nodeMaterials: { [type: string]: NodeMaterial }; 8 | 9 | setNodes(value: NodeLoaderResult): this; 10 | setNodeMaterials(value: { [type: string]: NodeMaterial }): this; 11 | } 12 | -------------------------------------------------------------------------------- /types/three/src/materials/RawShaderMaterial.d.ts: -------------------------------------------------------------------------------- 1 | import { ShaderMaterial, ShaderMaterialParameters } from "./ShaderMaterial.js"; 2 | 3 | export class RawShaderMaterial extends ShaderMaterial { 4 | constructor(parameters?: ShaderMaterialParameters); 5 | 6 | /** 7 | * Read-only flag to check if a given object is of type {@link RawShaderMaterial}. 8 | * @remarks This is a _constant_ value 9 | * @defaultValue `true` 10 | */ 11 | readonly isRawShaderMaterial: true; 12 | } 13 | -------------------------------------------------------------------------------- /types/three/src/materials/nodes/PointsNodeMaterial.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../../nodes/core/Node.js"; 2 | import SpriteNodeMaterial, { SpriteNodeMaterialParameters } from "./SpriteNodeMaterial.js"; 3 | 4 | export interface PointsNodeMaterialParameters extends SpriteNodeMaterialParameters { 5 | sizeNode?: Node | null | undefined; 6 | } 7 | 8 | export default class PointsNodeMaterial extends SpriteNodeMaterial { 9 | sizeNode: Node | null; 10 | 11 | readonly isPointsNodeMaterial: true; 12 | 13 | constructor(parameters?: PointsNodeMaterialParameters); 14 | } 15 | -------------------------------------------------------------------------------- /types/three/src/materials/nodes/ShadowNodeMaterial.d.ts: -------------------------------------------------------------------------------- 1 | import { Color } from "../../math/Color.js"; 2 | import { ShadowMaterialParameters } from "../ShadowMaterial.js"; 3 | import NodeMaterial, { NodeMaterialParameters } from "./NodeMaterial.js"; 4 | 5 | export interface ShadowNodeMaterialParameters extends NodeMaterialParameters, ShadowMaterialParameters { 6 | } 7 | 8 | export default class ShadowNodeMaterial extends NodeMaterial { 9 | readonly isShadowNodeMaterial: true; 10 | 11 | // Properties from ShadowMaterial 12 | readonly isShadowMaterial: true; 13 | color: Color; 14 | fog: boolean; 15 | 16 | constructor(parameters?: ShadowNodeMaterialParameters); 17 | } 18 | -------------------------------------------------------------------------------- /types/three/src/math/Cylindrical.d.ts: -------------------------------------------------------------------------------- 1 | import { Vector3 } from "./Vector3.js"; 2 | 3 | export class Cylindrical { 4 | constructor(radius?: number, theta?: number, y?: number); 5 | 6 | /** 7 | * @default 1 8 | */ 9 | radius: number; 10 | 11 | /** 12 | * @default 0 13 | */ 14 | theta: number; 15 | 16 | /** 17 | * @default 0 18 | */ 19 | y: number; 20 | 21 | clone(): this; 22 | copy(other: Cylindrical): this; 23 | set(radius: number, theta: number, y: number): this; 24 | setFromVector3(vec3: Vector3): this; 25 | setFromCartesianCoords(x: number, y: number, z: number): this; 26 | } 27 | -------------------------------------------------------------------------------- /types/three/src/math/Interpolant.d.ts: -------------------------------------------------------------------------------- 1 | export abstract class Interpolant { 2 | constructor(parameterPositions: any, sampleValues: any, sampleSize: number, resultBuffer?: any); 3 | 4 | parameterPositions: any; 5 | sampleValues: any; 6 | valueSize: number; 7 | resultBuffer: any; 8 | 9 | evaluate(time: number): any; 10 | } 11 | -------------------------------------------------------------------------------- /types/three/src/math/Spherical.d.ts: -------------------------------------------------------------------------------- 1 | import { Vector3 } from "./Vector3.js"; 2 | 3 | export class Spherical { 4 | constructor(radius?: number, phi?: number, theta?: number); 5 | 6 | /** 7 | * @default 1 8 | */ 9 | radius: number; 10 | 11 | /** 12 | * @default 0 13 | */ 14 | phi: number; 15 | 16 | /** 17 | * @default 0 18 | */ 19 | theta: number; 20 | 21 | set(radius: number, phi: number, theta: number): this; 22 | clone(): this; 23 | copy(other: Spherical): this; 24 | makeSafe(): this; 25 | setFromVector3(v: Vector3): this; 26 | setFromCartesianCoords(x: number, y: number, z: number): this; 27 | } 28 | -------------------------------------------------------------------------------- /types/three/src/math/interpolants/CubicInterpolant.d.ts: -------------------------------------------------------------------------------- 1 | import { Interpolant } from "../Interpolant.js"; 2 | 3 | export class CubicInterpolant extends Interpolant { 4 | constructor(parameterPositions: any, samplesValues: any, sampleSize: number, resultBuffer?: any); 5 | 6 | interpolate_(i1: number, t0: number, t: number, t1: number): any; 7 | } 8 | -------------------------------------------------------------------------------- /types/three/src/math/interpolants/DiscreteInterpolant.d.ts: -------------------------------------------------------------------------------- 1 | import { Interpolant } from "../Interpolant.js"; 2 | 3 | export class DiscreteInterpolant extends Interpolant { 4 | constructor(parameterPositions: any, samplesValues: any, sampleSize: number, resultBuffer?: any); 5 | 6 | interpolate_(i1: number, t0: number, t: number, t1: number): any; 7 | } 8 | -------------------------------------------------------------------------------- /types/three/src/math/interpolants/LinearInterpolant.d.ts: -------------------------------------------------------------------------------- 1 | import { Interpolant } from "../Interpolant.js"; 2 | 3 | export class LinearInterpolant extends Interpolant { 4 | constructor(parameterPositions: any, samplesValues: any, sampleSize: number, resultBuffer?: any); 5 | 6 | interpolate_(i1: number, t0: number, t: number, t1: number): any; 7 | } 8 | -------------------------------------------------------------------------------- /types/three/src/math/interpolants/QuaternionLinearInterpolant.d.ts: -------------------------------------------------------------------------------- 1 | import { Interpolant } from "../Interpolant.js"; 2 | 3 | export class QuaternionLinearInterpolant extends Interpolant { 4 | constructor(parameterPositions: any, samplesValues: any, sampleSize: number, resultBuffer?: any); 5 | 6 | interpolate_(i1: number, t0: number, t: number, t1: number): any; 7 | } 8 | -------------------------------------------------------------------------------- /types/three/src/nodes/accessors/AccessorsUtils.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export const TBNViewMatrix: ShaderNodeObject; 5 | 6 | export const parallaxDirection: ShaderNodeObject; 7 | export const parallaxUV: (uv: ShaderNodeObject, scale: NodeRepresentation) => ShaderNodeObject; 8 | 9 | export const transformedBentNormalView: ShaderNodeObject; 10 | -------------------------------------------------------------------------------- /types/three/src/nodes/accessors/Arrays.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedArray } from "../../core/BufferAttribute.js"; 2 | import { Struct } from "../core/StructNode.js"; 3 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 4 | import StorageBufferNode from "./StorageBufferNode.js"; 5 | 6 | export const attributeArray: ( 7 | count: TypedArray | number, 8 | type?: string | Struct, 9 | ) => ShaderNodeObject; 10 | 11 | export const instancedArray: ( 12 | count: TypedArray | number, 13 | type?: string | Struct, 14 | ) => ShaderNodeObject; 15 | -------------------------------------------------------------------------------- /types/three/src/nodes/accessors/BatchNode.d.ts: -------------------------------------------------------------------------------- 1 | import { BatchedMesh } from "../../objects/BatchedMesh.js"; 2 | import Node from "../core/Node.js"; 3 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 4 | 5 | export default class BatchNode extends Node { 6 | batchMesh: BatchedMesh; 7 | 8 | batchingIdNode: Node | null; 9 | 10 | constructor(batchMesh: BatchedMesh); 11 | } 12 | 13 | export const batch: (batchMesh: BatchedMesh) => ShaderNodeObject; 14 | -------------------------------------------------------------------------------- /types/three/src/nodes/accessors/Bitangent.d.ts: -------------------------------------------------------------------------------- 1 | import MathNode from "../math/MathNode.js"; 2 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export const bitangentGeometry: ShaderNodeObject; 5 | export const bitangentLocal: ShaderNodeObject; 6 | export const bitangentView: ShaderNodeObject; 7 | export const bitangentWorld: ShaderNodeObject; 8 | export const transformedBitangentView: ShaderNodeObject; 9 | export const transformedBitangentWorld: ShaderNodeObject; 10 | -------------------------------------------------------------------------------- /types/three/src/nodes/accessors/BufferNode.d.ts: -------------------------------------------------------------------------------- 1 | import UniformNode from "../core/UniformNode.js"; 2 | import { NodeOrType, ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export default class BufferNode extends UniformNode { 5 | isBufferNode: true; 6 | 7 | bufferType: string; 8 | bufferCount: number; 9 | 10 | constructor(value: TValue, bufferType: string, bufferCount?: number); 11 | } 12 | 13 | export const buffer: ( 14 | value: unknown, 15 | nodeOrType: NodeOrType, 16 | count: number, 17 | ) => ShaderNodeObject>; 18 | -------------------------------------------------------------------------------- /types/three/src/nodes/accessors/BuiltinNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | declare class BuiltinNode extends Node { 5 | name: string; 6 | 7 | readonly isBuiltinNode: true; 8 | 9 | constructor(name: string); 10 | } 11 | 12 | export default BuiltinNode; 13 | 14 | export const builtin: (name: string) => ShaderNodeObject; 15 | -------------------------------------------------------------------------------- /types/three/src/nodes/accessors/InstancedMeshNode.d.ts: -------------------------------------------------------------------------------- 1 | import { InstancedMesh } from "../../objects/InstancedMesh.js"; 2 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | import InstanceNode from "./InstanceNode.js"; 4 | 5 | declare class InstancedMeshNode extends InstanceNode { 6 | constructor(instanceMesh: InstancedMesh); 7 | } 8 | 9 | export default InstancedMeshNode; 10 | 11 | export const instancedMesh: (instancedMesh: InstancedMesh) => ShaderNodeObject; 12 | -------------------------------------------------------------------------------- /types/three/src/nodes/accessors/Lights.d.ts: -------------------------------------------------------------------------------- 1 | import { Light } from "../../lights/Light.js"; 2 | import Node from "../core/Node.js"; 3 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 4 | 5 | export function lightShadowMatrix(light: Light): ShaderNodeObject; 6 | 7 | export function lightProjectionUV(light: Light, position?: Node): ShaderNodeObject; 8 | 9 | export function lightPosition(light: Light): ShaderNodeObject; 10 | 11 | export function lightTargetPosition(light: Light): ShaderNodeObject; 12 | 13 | export function lightViewPosition(light: Light): ShaderNodeObject; 14 | 15 | export const lightTargetDirection: (light: Light) => ShaderNodeObject; 16 | -------------------------------------------------------------------------------- /types/three/src/nodes/accessors/MaterialProperties.d.ts: -------------------------------------------------------------------------------- 1 | import { Matrix4 } from "../../math/Matrix4.js"; 2 | import UniformNode from "../core/UniformNode.js"; 3 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 4 | 5 | export const materialRefractionRatio: ShaderNodeObject>; 6 | 7 | export const materialEnvIntensity: ShaderNodeObject>; 8 | 9 | export const materialEnvRotation: ShaderNodeObject>; 10 | -------------------------------------------------------------------------------- /types/three/src/nodes/accessors/MaterialReferenceNode.d.ts: -------------------------------------------------------------------------------- 1 | import { Material } from "../../materials/Material.js"; 2 | import { NodeOrType, ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | import ReferenceNode from "./ReferenceNode.js"; 4 | 5 | export default class MaterialReferenceNode extends ReferenceNode { 6 | readonly isMaterialReferenceNode: true; 7 | 8 | constructor(property: string, inputType: string, material?: Material | null); 9 | } 10 | 11 | export const materialReference: ( 12 | name: string, 13 | nodeOrType: NodeOrType, 14 | material?: Material | null, 15 | ) => ShaderNodeObject; 16 | -------------------------------------------------------------------------------- /types/three/src/nodes/accessors/ModelViewProjectionNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export const modelViewProjection: ShaderNodeObject; 5 | -------------------------------------------------------------------------------- /types/three/src/nodes/accessors/MorphNode.d.ts: -------------------------------------------------------------------------------- 1 | import { Mesh } from "../../objects/Mesh.js"; 2 | import Node from "../core/Node.js"; 3 | import UniformNode from "../core/UniformNode.js"; 4 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 5 | 6 | declare class MorphNode extends Node { 7 | mesh: Mesh; 8 | morphBaseInfluence: UniformNode; 9 | 10 | constructor(mesh: Mesh); 11 | } 12 | 13 | export default MorphNode; 14 | 15 | export const morphReference: (mesh: Mesh) => ShaderNodeObject; 16 | -------------------------------------------------------------------------------- /types/three/src/nodes/accessors/PointUVNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export default class PointUVNode extends Node { 5 | isPointUVNode: true; 6 | 7 | constructor(); 8 | } 9 | 10 | export const pointUV: ShaderNodeObject; 11 | -------------------------------------------------------------------------------- /types/three/src/nodes/accessors/Position.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export const positionGeometry: ShaderNodeObject; 5 | export const positionLocal: ShaderNodeObject; 6 | export const positionPrevious: ShaderNodeObject; 7 | export const positionWorld: ShaderNodeObject; 8 | export const positionWorldDirection: ShaderNodeObject; 9 | export const positionView: ShaderNodeObject; 10 | export const positionViewDirection: ShaderNodeObject; 11 | -------------------------------------------------------------------------------- /types/three/src/nodes/accessors/ReflectVector.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import VarNode from "../core/VarNode.js"; 3 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 4 | 5 | export const reflectView: ShaderNodeObject; 6 | export const refractView: ShaderNodeObject; 7 | 8 | export const reflectVector: ShaderNodeObject; 9 | export const refractVector: ShaderNodeObject; 10 | -------------------------------------------------------------------------------- /types/three/src/nodes/accessors/RendererReferenceNode.d.ts: -------------------------------------------------------------------------------- 1 | import Renderer from "../../renderers/common/Renderer.js"; 2 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | import ReferenceNode from "./ReferenceNode.js"; 4 | 5 | export default class RendererReferenceNode extends ReferenceNode { 6 | renderer: Renderer | null; 7 | 8 | constructor(property: string, inputType: string, renderer?: Renderer | null); 9 | } 10 | 11 | export const rendererReference: ( 12 | name: string, 13 | type: string, 14 | renderer?: Renderer | null, 15 | ) => ShaderNodeObject; 16 | -------------------------------------------------------------------------------- /types/three/src/nodes/accessors/Tangent.d.ts: -------------------------------------------------------------------------------- 1 | import AttributeNode from "../core/AttributeNode.js"; 2 | import VarNode from "../core/VarNode.js"; 3 | import VaryingNode from "../core/VaryingNode.js"; 4 | import MathNode from "../math/MathNode.js"; 5 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 6 | 7 | export const tangentGeometry: ShaderNodeObject; 8 | export const tangentLocal: ShaderNodeObject; 9 | export const tangentView: ShaderNodeObject; 10 | export const tangentWorld: ShaderNodeObject; 11 | export const transformedTangentView: ShaderNodeObject; 12 | export const transformedTangentWorld: ShaderNodeObject; 13 | -------------------------------------------------------------------------------- /types/three/src/nodes/accessors/TextureBicubic.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export const textureBicubic: (textureNode: Node, lodNode?: NodeRepresentation) => ShaderNodeObject; 5 | -------------------------------------------------------------------------------- /types/three/src/nodes/accessors/TextureSizeNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | declare class TextureSizeNode extends Node { 5 | readonly isTextureSizeNode: true; 6 | 7 | textureNode: Node; 8 | levelNode: Node | null; 9 | 10 | constructor(textureNode: Node, levelNode?: Node | null); 11 | } 12 | 13 | export default TextureSizeNode; 14 | 15 | export const textureSize: ( 16 | textureNode: NodeRepresentation, 17 | levelNode?: NodeRepresentation | null, 18 | ) => ShaderNodeObject; 19 | -------------------------------------------------------------------------------- /types/three/src/nodes/accessors/UV.d.ts: -------------------------------------------------------------------------------- 1 | import AttributeNode from "../core/AttributeNode.js"; 2 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export const uv: (index?: number) => ShaderNodeObject; 5 | -------------------------------------------------------------------------------- /types/three/src/nodes/accessors/UserDataNode.d.ts: -------------------------------------------------------------------------------- 1 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 2 | import ReferenceNode from "./ReferenceNode.js"; 3 | 4 | export type NodeUserData = Record; 5 | 6 | export default class UserDataNode extends ReferenceNode { 7 | userData: NodeUserData | null; 8 | constructor(property: string, inputType: string, userData?: NodeUserData | null); 9 | } 10 | 11 | export const userData: ( 12 | name: string, 13 | inputType: string, 14 | userData?: NodeUserData, 15 | ) => ShaderNodeObject; 16 | -------------------------------------------------------------------------------- /types/three/src/nodes/accessors/VertexColorNode.d.ts: -------------------------------------------------------------------------------- 1 | import AttributeNode from "../core/AttributeNode.js"; 2 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export default class VertexColorNode extends AttributeNode { 5 | readonly isVertexColorNode: true; 6 | 7 | index: number; 8 | 9 | constructor(index: number); 10 | } 11 | 12 | export const vertexColor: (index?: number) => ShaderNodeObject; 13 | -------------------------------------------------------------------------------- /types/three/src/nodes/code/ExpressionNode.d.ts: -------------------------------------------------------------------------------- 1 | import TempNode from "../core/TempNode.js"; 2 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export default class ExpressionNode extends TempNode { 5 | snipped: string; 6 | 7 | constructor(snipped?: string, nodeType?: string); 8 | } 9 | 10 | export const expression: (snipped: string, nodeType?: string) => ShaderNodeObject; 11 | -------------------------------------------------------------------------------- /types/three/src/nodes/code/ScriptableValueNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | declare class ScriptableValueNode extends Node { 5 | constructor(value: unknown); 6 | } 7 | 8 | export default ScriptableValueNode; 9 | 10 | export const scriptableValue: (value: unknown) => ShaderNodeObject; 11 | -------------------------------------------------------------------------------- /types/three/src/nodes/core/AttributeNode.d.ts: -------------------------------------------------------------------------------- 1 | import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js"; 2 | import Node from "./Node.js"; 3 | import NodeBuilder from "./NodeBuilder.js"; 4 | 5 | export default class AttributeNode extends Node { 6 | constructor(attributeName: string, nodeType?: string | null); 7 | 8 | setAttributeName(attributeName: string): this; 9 | 10 | getAttributeName(builder: NodeBuilder): string; 11 | } 12 | 13 | export const attribute: ( 14 | name: string, 15 | nodeType?: string | null, 16 | ) => ShaderNodeObject; 17 | -------------------------------------------------------------------------------- /types/three/src/nodes/core/BypassNode.d.ts: -------------------------------------------------------------------------------- 1 | import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js"; 2 | import Node from "./Node.js"; 3 | 4 | export default class BypassNode extends Node { 5 | isBypassNode: true; 6 | outputNode: Node; 7 | callNode: Node; 8 | 9 | constructor(returnNode: Node, callNode: Node); 10 | } 11 | 12 | export const bypass: (returnNode: NodeRepresentation, callNode: NodeRepresentation) => ShaderNodeObject; 13 | 14 | declare module "../tsl/TSLCore.js" { 15 | interface NodeElements { 16 | bypass: typeof bypass; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /types/three/src/nodes/core/ConstNode.d.ts: -------------------------------------------------------------------------------- 1 | import InputNode from "./InputNode.js"; 2 | import NodeBuilder from "./NodeBuilder.js"; 3 | 4 | export default class ConstNode extends InputNode { 5 | isConstNode: true; 6 | constructor(value: Value, nodeType?: string | null); 7 | 8 | generateConst(builder: NodeBuilder): string; 9 | } 10 | -------------------------------------------------------------------------------- /types/three/src/nodes/core/InputNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "./Node.js"; 2 | import NodeBuilder from "./NodeBuilder.js"; 3 | 4 | export type Precision = "low" | "medium" | "high"; 5 | 6 | export default abstract class InputNode extends Node { 7 | isInputNode: true; 8 | value: Value; 9 | precision: Precision | null; 10 | 11 | constructor(value: Value, nodeType?: string | null); 12 | 13 | getInputType(builder: NodeBuilder): string | null; 14 | setPrecision(precision: Precision): this; 15 | } 16 | -------------------------------------------------------------------------------- /types/three/src/nodes/core/NodeCode.d.ts: -------------------------------------------------------------------------------- 1 | export default class NodeCode { 2 | isNodeCode: true; 3 | constructor(name: string, type: string, code?: string); 4 | } 5 | -------------------------------------------------------------------------------- /types/three/src/nodes/core/NodeFunction.d.ts: -------------------------------------------------------------------------------- 1 | import NodeFunctionInput from "./NodeFunctionInput.js"; 2 | 3 | export default abstract class NodeFunction { 4 | isNodeFunction: true; 5 | type: string; 6 | inputs: NodeFunctionInput[]; 7 | name: string; 8 | precision: string; 9 | 10 | constructor(type: string, inputs: NodeFunctionInput[], name?: string, precision?: string); 11 | 12 | abstract getCode(name?: string): string; 13 | } 14 | -------------------------------------------------------------------------------- /types/three/src/nodes/core/NodeFunctionInput.d.ts: -------------------------------------------------------------------------------- 1 | export default class NodeFunctionInput { 2 | isNodeFunctionInput: true; 3 | count: null | number; 4 | qualifier: string; 5 | isConst: boolean; 6 | constructor(type: string, name: string, count?: number, qualifier?: string, isConst?: boolean); 7 | } 8 | -------------------------------------------------------------------------------- /types/three/src/nodes/core/NodeParser.d.ts: -------------------------------------------------------------------------------- 1 | import NodeFunction from "./NodeFunction.js"; 2 | /** 3 | * Base class for node parsers. A derived parser must be implemented 4 | * for each supported native shader language. 5 | */ 6 | declare abstract class NodeParser { 7 | /** 8 | * The method parses the given native code an returns a node function. 9 | * 10 | * @abstract 11 | * @param {string} source - The native shader code. 12 | * @return {NodeFunction} A node function. 13 | */ 14 | abstract parseFunction(source: string): NodeFunction; 15 | } 16 | export default NodeParser; 17 | -------------------------------------------------------------------------------- /types/three/src/nodes/core/OutputStructNode.d.ts: -------------------------------------------------------------------------------- 1 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 2 | import Node from "./Node.js"; 3 | 4 | export default class OutputStructNode extends Node { 5 | members: Node[]; 6 | 7 | readonly isOutputStructNode: true; 8 | 9 | constructor(...members: Node[]); 10 | } 11 | 12 | export const outputStruct: (...members: Node[]) => ShaderNodeObject; 13 | -------------------------------------------------------------------------------- /types/three/src/nodes/core/ParameterNode.d.ts: -------------------------------------------------------------------------------- 1 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 2 | import PropertyNode from "./PropertyNode.js"; 3 | 4 | declare class ParameterNode extends PropertyNode { 5 | readonly isParameterNode: true; 6 | 7 | constructor(nodeType: string, name?: string | null); 8 | } 9 | 10 | export default ParameterNode; 11 | 12 | export const parameter: (type: string, name?: string | null) => ShaderNodeObject; 13 | -------------------------------------------------------------------------------- /types/three/src/nodes/core/StructType.d.ts: -------------------------------------------------------------------------------- 1 | import { MemberLayout } from "./StructTypeNode.js"; 2 | declare class StructType { 3 | name: string; 4 | members: MemberLayout[]; 5 | output: boolean; 6 | constructor(name: string, members: MemberLayout[]); 7 | } 8 | export default StructType; 9 | -------------------------------------------------------------------------------- /types/three/src/nodes/core/TempNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "./Node.js"; 2 | import NodeBuilder from "./NodeBuilder.js"; 3 | 4 | export default class TempNode extends Node { 5 | isTempNode: true; 6 | 7 | constructor(type: string | null); 8 | 9 | hasDependencies(builder: NodeBuilder): boolean; 10 | } 11 | -------------------------------------------------------------------------------- /types/three/src/nodes/core/UniformGroupNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "./Node.js"; 2 | 3 | export default class UniformGroupNode extends Node { 4 | name: string; 5 | version: number; 6 | 7 | shared: boolean; 8 | 9 | readonly isUniformGroup: true; 10 | 11 | constructor(name: string, shared?: boolean); 12 | 13 | set needsUpdate(value: boolean); 14 | } 15 | 16 | export const uniformGroup: (name: string) => UniformGroupNode; 17 | export const sharedUniformGroup: (name: string) => UniformGroupNode; 18 | 19 | export const frameGroup: UniformGroupNode; 20 | export const renderGroup: UniformGroupNode; 21 | export const objectGroup: UniformGroupNode; 22 | -------------------------------------------------------------------------------- /types/three/src/nodes/display/BumpMapNode.d.ts: -------------------------------------------------------------------------------- 1 | import TempNode from "../core/TempNode.js"; 2 | import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | declare class BumpMapNode extends TempNode { 5 | textureNode: Node; 6 | scaleNode: Node | null; 7 | 8 | constructor(textureNode: Node, scaleNode?: Node | null); 9 | } 10 | 11 | export default BumpMapNode; 12 | 13 | export const bumpMap: ( 14 | textureNode: NodeRepresentation, 15 | scaleNode?: NodeRepresentation | null, 16 | ) => ShaderNodeObject; 17 | -------------------------------------------------------------------------------- /types/three/src/nodes/display/ColorSpaceFunctions.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export const sRGBTransferEOTF: (color: NodeRepresentation) => ShaderNodeObject; 5 | 6 | export const sRGBTransferOETF: (color: NodeRepresentation) => ShaderNodeObject; 7 | -------------------------------------------------------------------------------- /types/three/src/nodes/display/FrontFacingNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | declare class FrontFacingNode extends Node { 5 | isFrontFacingNode: true; 6 | constructor(); 7 | } 8 | 9 | export default FrontFacingNode; 10 | 11 | export const frontFacing: ShaderNodeObject; 12 | export const faceDirection: ShaderNodeObject; 13 | -------------------------------------------------------------------------------- /types/three/src/nodes/display/NormalMapNode.d.ts: -------------------------------------------------------------------------------- 1 | import { NormalMapTypes } from "../../constants.js"; 2 | import Node from "../core/Node.js"; 3 | import TempNode from "../core/TempNode.js"; 4 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 5 | 6 | declare class NormalMapNode extends TempNode { 7 | node: Node; 8 | scaleNode: Node | null; 9 | 10 | normalMapType: NormalMapTypes; 11 | 12 | constructor(node: Node, scaleNode?: Node | null); 13 | } 14 | 15 | export default NormalMapNode; 16 | 17 | export const normalMap: (node: Node, scaleNode?: Node) => ShaderNodeObject; 18 | -------------------------------------------------------------------------------- /types/three/src/nodes/display/PosterizeNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export default class PosterizeNode extends Node { 5 | sourceNode: Node; 6 | stepsNode: Node; 7 | 8 | constructor(sourceNode: Node, stepsNode: Node); 9 | } 10 | 11 | export const posterize: ( 12 | sourceNode: NodeRepresentation, 13 | stepsNode: NodeRepresentation, 14 | ) => ShaderNodeObject; 15 | -------------------------------------------------------------------------------- /types/three/src/nodes/display/ViewportDepthTextureNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | import ViewportTextureNode from "./ViewportTextureNode.js"; 4 | 5 | declare class ViewportDepthTextureNode extends ViewportTextureNode { 6 | constructor(uvNode?: Node, levelNode?: Node | null); 7 | } 8 | 9 | export default ViewportDepthTextureNode; 10 | 11 | export const viewportDepthTexture: ( 12 | uvNode?: NodeRepresentation, 13 | levelNode?: NodeRepresentation, 14 | ) => ShaderNodeObject; 15 | -------------------------------------------------------------------------------- /types/three/src/nodes/display/ViewportSharedTextureNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | import ViewportTextureNode from "./ViewportTextureNode.js"; 4 | 5 | declare class ViewportSharedTextureNode extends ViewportTextureNode { 6 | constructor(uvNode?: Node, levelNode?: Node | null); 7 | } 8 | 9 | export default ViewportSharedTextureNode; 10 | 11 | export const viewportSharedTexture: ( 12 | uvNode?: Node, 13 | levelNode?: Node | null, 14 | ) => ShaderNodeObject; 15 | -------------------------------------------------------------------------------- /types/three/src/nodes/functions/BSDF/BRDF_GGX.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../../core/Node.js"; 2 | import OperatorNode from "../../math/OperatorNode.js"; 3 | import { ShaderNodeObject } from "../../tsl/TSLCore.js"; 4 | 5 | declare const BRDF_GGX: (args: { 6 | lightDirection: Node; 7 | f0: Node; 8 | f90: Node; 9 | roughness: Node; 10 | f?: Node; 11 | USE_IRIDESCENCE?: Node; 12 | USE_ANISOTROPY?: Node; 13 | }) => ShaderNodeObject; 14 | 15 | export default BRDF_GGX; 16 | -------------------------------------------------------------------------------- /types/three/src/nodes/functions/BSDF/BRDF_Lambert.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../../core/Node.js"; 2 | import OperatorNode from "../../math/OperatorNode.js"; 3 | import { ShaderNodeObject } from "../../tsl/TSLCore.js"; 4 | 5 | declare const BRDF_Lambert: (args: { diffuseColor: Node }) => ShaderNodeObject; 6 | 7 | export default BRDF_Lambert; 8 | -------------------------------------------------------------------------------- /types/three/src/nodes/functions/BSDF/BRDF_Sheen.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../../core/Node.js"; 2 | import OperatorNode from "../../math/OperatorNode.js"; 3 | import { ShaderNodeObject } from "../../tsl/TSLCore.js"; 4 | 5 | declare const BRDF_Sheen: (args: { lightDirection: Node }) => ShaderNodeObject; 6 | 7 | export default BRDF_Sheen; 8 | -------------------------------------------------------------------------------- /types/three/src/nodes/functions/BSDF/DFGApprox.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../../core/Node.js"; 2 | import OperatorNode from "../../math/OperatorNode.js"; 3 | import { ShaderNodeObject } from "../../tsl/TSLCore.js"; 4 | 5 | // Analytical approximation of the DFG LUT, one half of the 6 | // split-sum approximation used in indirect specular lighting. 7 | // via 'environmentBRDF' from "Physically Based Shading on Mobile" 8 | // https://www.unrealengine.com/blog/physically-based-shading-on-mobile 9 | declare const DFGApprox: (args: { roughness: Node; dotNV: Node }) => ShaderNodeObject; 10 | 11 | export default DFGApprox; 12 | -------------------------------------------------------------------------------- /types/three/src/nodes/functions/BSDF/D_GGX.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../../core/Node.js"; 2 | import OperatorNode from "../../math/OperatorNode.js"; 3 | import { ShaderNodeObject } from "../../tsl/TSLCore.js"; 4 | 5 | // Microfacet Models for Refraction through Rough Surfaces - equation (33) 6 | // http://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html 7 | // alpha is "roughness squared" in Disney’s reparameterization 8 | declare const D_GGX: (args: { alpha: Node; dotNH: Node }) => ShaderNodeObject; 9 | 10 | export default D_GGX; 11 | -------------------------------------------------------------------------------- /types/three/src/nodes/functions/BSDF/D_GGX_Anisotropic.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../../core/Node.js"; 2 | import OperatorNode from "../../math/OperatorNode.js"; 3 | import { ShaderNodeObject } from "../../tsl/TSLCore.js"; 4 | 5 | // https://google.github.io/filament/Filament.md.html#materialsystem/anisotropicmodel/anisotropicspecularbrdf 6 | declare const D_GGX_Anisotropic: ( 7 | args: { alphaT: Node; alphaB: Node; dotNH: Node; dotTH: Node; dotBH: Node }, 8 | ) => ShaderNodeObject; 9 | 10 | export default D_GGX_Anisotropic; 11 | -------------------------------------------------------------------------------- /types/three/src/nodes/functions/BSDF/F_Schlick.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../../core/Node.js"; 2 | import OperatorNode from "../../math/OperatorNode.js"; 3 | import { ShaderNodeObject } from "../../tsl/TSLCore.js"; 4 | 5 | declare const F_Schlick: (args: { f0: Node; f90: Node; dotVH: Node }) => ShaderNodeObject; 6 | 7 | export default F_Schlick; 8 | -------------------------------------------------------------------------------- /types/three/src/nodes/functions/BSDF/LTC.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../../core/Node.js"; 2 | 3 | declare const LTC_Uv: (args: { N: Node; V: Node; roughness: Node }) => Node; 4 | 5 | declare const LTC_Evaluate: ( 6 | args: { N: Node; V: Node; P: Node; mInv: Node; p0: Node; p1: Node; p2: Node; p3: Node }, 7 | ) => Node; 8 | 9 | declare const LTC_Evaluate_Volume: ( 10 | args: { P: Node; p0: Node; p1: Node; p2: Node; p3: Node }, 11 | ) => Node; 12 | 13 | export { LTC_Evaluate, LTC_Evaluate_Volume, LTC_Uv }; 14 | -------------------------------------------------------------------------------- /types/three/src/nodes/functions/BSDF/Schlick_to_F0.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../../core/Node.js"; 2 | import { NodeRepresentation, ShaderNodeObject } from "../../tsl/TSLCore.js"; 3 | 4 | declare const Schlick_to_F0: ( 5 | f: NodeRepresentation, 6 | f90: NodeRepresentation, 7 | dotVH: NodeRepresentation, 8 | ) => ShaderNodeObject; 9 | 10 | export default Schlick_to_F0; 11 | -------------------------------------------------------------------------------- /types/three/src/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../../core/Node.js"; 2 | import OperatorNode from "../../math/OperatorNode.js"; 3 | import { ShaderNodeObject } from "../../tsl/TSLCore.js"; 4 | 5 | declare const V_GGX_SmithCorrelated: (inputs: { 6 | alpha: Node; 7 | dotNL: Node; 8 | dotNV: Node; 9 | }) => ShaderNodeObject; 10 | 11 | export default V_GGX_SmithCorrelated; 12 | -------------------------------------------------------------------------------- /types/three/src/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../../core/Node.js"; 2 | import MathNode from "../../math/MathNode.js"; 3 | import { ShaderNodeObject } from "../../tsl/TSLCore.js"; 4 | 5 | declare const V_GGX_SmithCorrelated: (inputs: { 6 | alphaT: Node; 7 | alphaB: Node; 8 | dotTV: Node; 9 | dotBV: Node; 10 | dotTL: Node; 11 | dotBL: Node; 12 | dotNV: Node; 13 | dotNL: Node; 14 | }) => ShaderNodeObject; 15 | 16 | export default V_GGX_SmithCorrelated; 17 | -------------------------------------------------------------------------------- /types/three/src/nodes/functions/BasicLightingModel.d.ts: -------------------------------------------------------------------------------- 1 | import LightingModel from "../core/LightingModel.js"; 2 | 3 | declare class BasicLightingModel extends LightingModel { 4 | constructor(); 5 | } 6 | 7 | export default BasicLightingModel; 8 | -------------------------------------------------------------------------------- /types/three/src/nodes/functions/PhongLightingModel.d.ts: -------------------------------------------------------------------------------- 1 | import BasicLightingModel from "./BasicLightingModel.js"; 2 | 3 | export default class PhongLightingModel extends BasicLightingModel { 4 | specular: boolean; 5 | 6 | constructor(specular?: boolean); 7 | } 8 | -------------------------------------------------------------------------------- /types/three/src/nodes/functions/ShadowMaskModel.d.ts: -------------------------------------------------------------------------------- 1 | import LightingModel from "../core/LightingModel.js"; 2 | import VarNode from "../core/VarNode.js"; 3 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 4 | 5 | export default class ShadowMaskModel extends LightingModel { 6 | shadowNode: ShaderNodeObject; 7 | 8 | constructor(); 9 | } 10 | -------------------------------------------------------------------------------- /types/three/src/nodes/functions/ToonLightingModel.d.ts: -------------------------------------------------------------------------------- 1 | import LightingModel from "../core/LightingModel.js"; 2 | 3 | export default class ToonLightingModel extends LightingModel { 4 | } 5 | -------------------------------------------------------------------------------- /types/three/src/nodes/functions/VolumetricLightingModel.d.ts: -------------------------------------------------------------------------------- 1 | import LightingModel from "../core/LightingModel.js"; 2 | 3 | declare class VolumetricLightingModel extends LightingModel { 4 | } 5 | 6 | export default VolumetricLightingModel; 7 | -------------------------------------------------------------------------------- /types/three/src/nodes/functions/material/getAlphaHashThreshold.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../../core/Node.js"; 2 | import { NodeRepresentation, ShaderNodeObject } from "../../tsl/TSLCore.js"; 3 | 4 | declare const getAlphaHashThreshold: (position: NodeRepresentation) => ShaderNodeObject; 5 | 6 | export default getAlphaHashThreshold; 7 | -------------------------------------------------------------------------------- /types/three/src/nodes/functions/material/getGeometryRoughness.d.ts: -------------------------------------------------------------------------------- 1 | import MathNode from "../../math/MathNode.js"; 2 | import { ShaderNodeObject } from "../../tsl/TSLCore.js"; 3 | 4 | declare const getGeometryRoughness: () => ShaderNodeObject; 5 | 6 | export default getGeometryRoughness; 7 | -------------------------------------------------------------------------------- /types/three/src/nodes/functions/material/getParallaxCorrectNormal.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../../core/Node.js"; 2 | import { NodeRepresentation, ShaderNodeObject } from "../../tsl/TSLCore.js"; 3 | 4 | declare const getParallaxCorrectNormal: ( 5 | normal: NodeRepresentation, 6 | cubeSize: NodeRepresentation, 7 | cubePos: NodeRepresentation, 8 | ) => ShaderNodeObject; 9 | 10 | export default getParallaxCorrectNormal; 11 | -------------------------------------------------------------------------------- /types/three/src/nodes/functions/material/getRoughness.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../../core/Node.js"; 2 | import MathNode from "../../math/MathNode.js"; 3 | import { ShaderNodeObject } from "../../tsl/TSLCore.js"; 4 | 5 | declare const getRoughness: (args: { roughness: Node }) => ShaderNodeObject; 6 | 7 | export default getRoughness; 8 | -------------------------------------------------------------------------------- /types/three/src/nodes/functions/material/getShIrradianceAt.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../../core/Node.js"; 2 | import { ShaderNodeObject } from "../../tsl/TSLCore.js"; 3 | 4 | declare const getShIrradianceAt: (normal: Node, shCoefficients: Node) => ShaderNodeObject; 5 | 6 | export default getShIrradianceAt; 7 | -------------------------------------------------------------------------------- /types/three/src/nodes/geometry/RangeNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import NodeBuilder from "../core/NodeBuilder.js"; 3 | import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js"; 4 | 5 | export default class RangeNode extends Node { 6 | minNode: Node; 7 | maxNode: Node; 8 | 9 | constructor(minNode: Node, maxNode: Node); 10 | 11 | getVectorLength(builder: NodeBuilder): number; 12 | } 13 | 14 | export const range: (minNode: NodeRepresentation, maxNode: NodeRepresentation) => ShaderNodeObject; 15 | -------------------------------------------------------------------------------- /types/three/src/nodes/gpgpu/BarrierNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | declare class BarrierNode extends Node { 5 | scope: string; 6 | 7 | constructor(scope: string); 8 | } 9 | 10 | export const workgroupBarrier: () => ShaderNodeObject; 11 | export const storageBarrier: () => ShaderNodeObject; 12 | export const textureBarrier: () => ShaderNodeObject; 13 | -------------------------------------------------------------------------------- /types/three/src/nodes/gpgpu/ComputeBuiltinNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | declare class ComputeBuiltinNode extends Node { 5 | constructor(builtinName: string, nodeType: string); 6 | } 7 | 8 | export default ComputeBuiltinNode; 9 | 10 | export const numWorkgroups: ShaderNodeObject; 11 | export const workgroupId: ShaderNodeObject; 12 | export const globalId: ShaderNodeObject; 13 | export const localId: ShaderNodeObject; 14 | export const subgroupSize: ShaderNodeObject; 15 | -------------------------------------------------------------------------------- /types/three/src/nodes/gpgpu/WorkgroupInfoNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | declare class WorkgroupInfoNode extends Node { 5 | bufferType: string; 6 | bufferCount: number; 7 | 8 | readonly isWorkgroupInfoNode: true; 9 | 10 | elementType: string; 11 | 12 | scope: string; 13 | 14 | constructor(scope: string, bufferType: string, bufferCount?: number); 15 | } 16 | 17 | export default WorkgroupInfoNode; 18 | 19 | export const workgroupArray: (type: string, count?: number) => ShaderNodeObject; 20 | -------------------------------------------------------------------------------- /types/three/src/nodes/lighting/AONode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import LightingNode from "./LightingNode.js"; 3 | 4 | export default class AONode extends LightingNode { 5 | aoNode: Node | null; 6 | 7 | constructor(aoNode?: Node | null); 8 | } 9 | -------------------------------------------------------------------------------- /types/three/src/nodes/lighting/AmbientLightNode.d.ts: -------------------------------------------------------------------------------- 1 | import { AmbientLight } from "../../lights/AmbientLight.js"; 2 | import AnalyticLightNode from "./AnalyticLightNode.js"; 3 | 4 | declare class AmbientLightNode extends AnalyticLightNode { 5 | constructor(light?: AmbientLight | null); 6 | } 7 | 8 | export default AmbientLightNode; 9 | -------------------------------------------------------------------------------- /types/three/src/nodes/lighting/BasicEnvironmentNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import LightingNode from "./LightingNode.js"; 3 | 4 | declare class BasicEnvironmentNode extends LightingNode { 5 | envNode: Node | null; 6 | 7 | constructor(envNode?: Node | null); 8 | } 9 | 10 | export default BasicEnvironmentNode; 11 | -------------------------------------------------------------------------------- /types/three/src/nodes/lighting/BasicLightMapNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import LightingNode from "./LightingNode.js"; 3 | 4 | declare class BasicLightMapNode extends LightingNode { 5 | constructor(lightMapNode?: Node | null); 6 | } 7 | 8 | export default BasicLightMapNode; 9 | -------------------------------------------------------------------------------- /types/three/src/nodes/lighting/DirectionalLightNode.d.ts: -------------------------------------------------------------------------------- 1 | import { DirectionalLight } from "../../lights/DirectionalLight.js"; 2 | import AnalyticLightNode from "./AnalyticLightNode.js"; 3 | 4 | declare class DirectionalLightNode extends AnalyticLightNode { 5 | constructor(light?: DirectionalLight | null); 6 | } 7 | 8 | export default DirectionalLightNode; 9 | -------------------------------------------------------------------------------- /types/three/src/nodes/lighting/EnvironmentNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import LightingNode from "./LightingNode.js"; 3 | 4 | export default class EnvironmentNode extends LightingNode { 5 | envNode: Node | null; 6 | 7 | constructor(envNode?: Node | null); 8 | } 9 | -------------------------------------------------------------------------------- /types/three/src/nodes/lighting/HemisphereLightNode.d.ts: -------------------------------------------------------------------------------- 1 | import { HemisphereLight } from "../../lights/HemisphereLight.js"; 2 | import Object3DNode from "../accessors/Object3DNode.js"; 3 | import Node from "../core/Node.js"; 4 | import AnalyticLightNode from "./AnalyticLightNode.js"; 5 | 6 | export default class HemisphereLightNode extends AnalyticLightNode { 7 | lightPositionNode: Object3DNode; 8 | lightDirectionNode: Node; 9 | 10 | groundColorNode: Node; 11 | 12 | constructor(light?: HemisphereLight | null); 13 | } 14 | -------------------------------------------------------------------------------- /types/three/src/nodes/lighting/IESSpotLightNode.d.ts: -------------------------------------------------------------------------------- 1 | import SpotLightNode from "./SpotLightNode.js"; 2 | 3 | declare class IESSpotLightNode extends SpotLightNode {} 4 | 5 | export default IESSpotLightNode; 6 | -------------------------------------------------------------------------------- /types/three/src/nodes/lighting/IrradianceNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import LightingNode from "./LightingNode.js"; 3 | 4 | export default class IrradianceNode extends LightingNode { 5 | node: Node | null; 6 | 7 | constructor(node?: Node | null); 8 | } 9 | -------------------------------------------------------------------------------- /types/three/src/nodes/lighting/LightProbeNode.d.ts: -------------------------------------------------------------------------------- 1 | import { LightProbe } from "../../lights/LightProbe.js"; 2 | import UniformArrayNode from "../accessors/UniformArrayNode.js"; 3 | import AnalyticLightNode from "./AnalyticLightNode.js"; 4 | 5 | declare class LightProbeNode extends AnalyticLightNode { 6 | lightProbe: UniformArrayNode; 7 | 8 | constructor(light?: LightProbe | null); 9 | } 10 | 11 | export default LightProbeNode; 12 | -------------------------------------------------------------------------------- /types/three/src/nodes/lighting/LightUtils.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import ConditionalNode from "../math/ConditionalNode.js"; 3 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 4 | 5 | export const getDistanceAttenuation: (args: { 6 | lightDistance: Node; 7 | cutoffDistance: Node; 8 | decayExponent: Node; 9 | }) => ShaderNodeObject; 10 | -------------------------------------------------------------------------------- /types/three/src/nodes/lighting/LightingNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | 3 | export default abstract class LightingNode extends Node { 4 | readonly isLightingNode: true; 5 | 6 | constructor(); 7 | } 8 | -------------------------------------------------------------------------------- /types/three/src/nodes/lighting/ProjectorLightNode.d.ts: -------------------------------------------------------------------------------- 1 | import SpotLightNode from "./SpotLightNode.js"; 2 | 3 | declare class ProjectorLightNode extends SpotLightNode {} 4 | 5 | export default ProjectorLightNode; 6 | -------------------------------------------------------------------------------- /types/three/src/nodes/lighting/ShadowBaseNode.d.ts: -------------------------------------------------------------------------------- 1 | import { Light } from "../../lights/Light.js"; 2 | import Node from "../core/Node.js"; 3 | import NodeBuilder from "../core/NodeBuilder.js"; 4 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 5 | 6 | declare class ShadowBaseNode extends Node { 7 | light: Light; 8 | 9 | readonly isShadowBasedNode: true; 10 | 11 | constructor(light: Light); 12 | 13 | setupShadowPosition(builder: NodeBuilder): void; 14 | } 15 | 16 | export const shadowPositionWorld: ShaderNodeObject; 17 | 18 | export default ShadowBaseNode; 19 | -------------------------------------------------------------------------------- /types/three/src/nodes/materialx/lib/mx_hsv.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../../core/Node.js"; 2 | import { NodeRepresentation, ShaderNodeObject } from "../../tsl/TSLCore.js"; 3 | 4 | export const mx_hsvtorgb: (hsv: NodeRepresentation) => ShaderNodeObject; 5 | 6 | export const mx_rgbtohsv: (c_immutable: NodeRepresentation) => ShaderNodeObject; 7 | -------------------------------------------------------------------------------- /types/three/src/nodes/materialx/lib/mx_transform_color.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../../core/Node.js"; 2 | import { NodeRepresentation, ShaderNodeObject } from "../../tsl/TSLCore.js"; 3 | 4 | export const mx_srgb_texture_to_lin_rec709: (color_immutable: NodeRepresentation) => ShaderNodeObject; 5 | -------------------------------------------------------------------------------- /types/three/src/nodes/math/Hash.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export const hash: (seed: NodeRepresentation) => ShaderNodeObject; 5 | -------------------------------------------------------------------------------- /types/three/src/nodes/math/MathUtils.d.ts: -------------------------------------------------------------------------------- 1 | import { Binary, Ternary } from "./MathNode.js"; 2 | 3 | export const parabola: Binary; 4 | export const gain: Binary; 5 | export const pcurve: Ternary; 6 | export const sinc: Binary; 7 | -------------------------------------------------------------------------------- /types/three/src/nodes/math/TriNoise3D.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export const tri: (x: NodeRepresentation) => ShaderNodeObject; 5 | 6 | export const tri3: (p: NodeRepresentation) => ShaderNodeObject; 7 | 8 | export const triNoise3D: ( 9 | p_immutable: NodeRepresentation, 10 | spd: NodeRepresentation, 11 | time: NodeRepresentation, 12 | ) => ShaderNodeObject; 13 | -------------------------------------------------------------------------------- /types/three/src/nodes/parsers/GLSLNodeFunction.d.ts: -------------------------------------------------------------------------------- 1 | import NodeFunction from "../core/NodeFunction.js"; 2 | 3 | declare class GLSLNodeFunction extends NodeFunction { 4 | constructor(source: string); 5 | 6 | getCode(name?: string): string; 7 | } 8 | 9 | export default GLSLNodeFunction; 10 | -------------------------------------------------------------------------------- /types/three/src/nodes/parsers/GLSLNodeParser.d.ts: -------------------------------------------------------------------------------- 1 | import NodeParser from "../core/NodeParser.js"; 2 | import GLSLNodeFunction from "./GLSLNodeFunction.js"; 3 | 4 | declare class GLSLNodeParser extends NodeParser { 5 | parseFunction(source: string): GLSLNodeFunction; 6 | } 7 | 8 | export default GLSLNodeParser; 9 | -------------------------------------------------------------------------------- /types/three/src/nodes/procedural/Checker.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export const checker: (coord?: NodeRepresentation) => ShaderNodeObject; 5 | -------------------------------------------------------------------------------- /types/three/src/nodes/shapes/Shapes.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export const shapeCircle: (coord?: NodeRepresentation) => ShaderNodeObject; 5 | -------------------------------------------------------------------------------- /types/three/src/nodes/utils/ArrayElementNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { TempNode } from "../Nodes.js"; 3 | 4 | export default class ArrayElementNode extends TempNode { 5 | node: Node; 6 | indexNode: Node; 7 | 8 | constructor(node: Node, indexNode: Node); 9 | } 10 | -------------------------------------------------------------------------------- /types/three/src/nodes/utils/ConvertNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | 3 | export default class ConvertNode extends Node { 4 | node: Node; 5 | convertTo: string; 6 | constructor(node: Node, convertTo: string); 7 | } 8 | -------------------------------------------------------------------------------- /types/three/src/nodes/utils/CubeMapNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import TempNode from "../core/TempNode.js"; 3 | import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js"; 4 | 5 | declare class CubeMapNode extends TempNode { 6 | envNode: Node; 7 | 8 | constructor(envNode: Node); 9 | } 10 | 11 | export default CubeMapNode; 12 | 13 | export const cubeMapNode: (envNode: NodeRepresentation) => ShaderNodeObject; 14 | -------------------------------------------------------------------------------- /types/three/src/nodes/utils/Discard.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export const Discard: (conditional?: NodeRepresentation) => ShaderNodeObject; 5 | export const Return: () => ShaderNodeObject; 6 | 7 | declare module "../tsl/TSLCore.js" { 8 | interface NodeElements { 9 | discard: typeof Discard; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /types/three/src/nodes/utils/EquirectUVNode.d.ts: -------------------------------------------------------------------------------- 1 | import { Node, TempNode } from "../Nodes.js"; 2 | import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export default class EquirectUVNode extends TempNode { 5 | constructor(dirNode?: ShaderNodeObject); 6 | } 7 | 8 | export const equirectUV: (dirNode?: NodeRepresentation) => ShaderNodeObject; 9 | -------------------------------------------------------------------------------- /types/three/src/nodes/utils/FunctionOverloadingNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | declare class FunctionOverloadingNode extends Node { 5 | functionNodes: Node[]; 6 | parameterNodes: Node[]; 7 | 8 | constructor(functionNodes?: Node[], ...parameterNodes: Node[]); 9 | } 10 | 11 | export default FunctionOverloadingNode; 12 | 13 | export const overloadingFn: (functionNodes: Node[]) => (...params: Node[]) => ShaderNodeObject; 14 | -------------------------------------------------------------------------------- /types/three/src/nodes/utils/JoinNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { TempNode } from "../Nodes.js"; 3 | 4 | /** 5 | * This node constructs given type from elements, like vec3(a,b,c) 6 | */ 7 | export default class JoinNode extends TempNode { 8 | nodes: Node[]; 9 | constructor(nodes: Node[]); 10 | } 11 | -------------------------------------------------------------------------------- /types/three/src/nodes/utils/MatcapUVNode.d.ts: -------------------------------------------------------------------------------- 1 | import TempNode from "../core/TempNode.js"; 2 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export default class MatcapUVNode extends TempNode { 5 | constructor(); 6 | } 7 | 8 | export const matcapUV: ShaderNodeObject; 9 | -------------------------------------------------------------------------------- /types/three/src/nodes/utils/MaxMipLevelNode.d.ts: -------------------------------------------------------------------------------- 1 | import { Texture } from "../../textures/Texture.js"; 2 | import TextureNode from "../accessors/TextureNode.js"; 3 | import UniformNode from "../core/UniformNode.js"; 4 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 5 | 6 | export default class MaxMipLevelNode extends UniformNode<0> { 7 | constructor(textureNode: TextureNode); 8 | 9 | get textureNode(): TextureNode; 10 | 11 | get texture(): Texture; 12 | } 13 | 14 | export const maxMipLevel: (texture: Texture) => ShaderNodeObject; 15 | -------------------------------------------------------------------------------- /types/three/src/nodes/utils/MemberNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | 3 | declare class MemberNode extends Node { 4 | node: Node; 5 | property: string; 6 | readonly isMemberNode: true; 7 | 8 | constructor(node: Node, property: string); 9 | } 10 | 11 | export default MemberNode; 12 | -------------------------------------------------------------------------------- /types/three/src/nodes/utils/Oscillators.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export const oscSine: (timeNode?: NodeRepresentation) => ShaderNodeObject; 5 | export const oscSquare: (timeNode?: NodeRepresentation) => ShaderNodeObject; 6 | export const oscTriangle: (timeNode?: NodeRepresentation) => ShaderNodeObject; 7 | export const oscSawtooth: (timeNode?: NodeRepresentation) => ShaderNodeObject; 8 | -------------------------------------------------------------------------------- /types/three/src/nodes/utils/Packing.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export const directionToColor: (node: NodeRepresentation) => ShaderNodeObject; 5 | export const colorToDirection: (node: NodeRepresentation) => ShaderNodeObject; 6 | -------------------------------------------------------------------------------- /types/three/src/nodes/utils/RotateNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import TempNode from "../core/TempNode.js"; 3 | import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js"; 4 | 5 | export default class RotateNode extends TempNode { 6 | positionNode: Node; 7 | rotationNode: Node; 8 | 9 | constructor(positionNode: Node, rotationNode: Node); 10 | } 11 | 12 | export const rotate: ( 13 | positionNode: NodeRepresentation, 14 | rotationNode: NodeRepresentation, 15 | ) => ShaderNodeObject; 16 | -------------------------------------------------------------------------------- /types/three/src/nodes/utils/SetNode.d.ts: -------------------------------------------------------------------------------- 1 | import TempNode from "../core/TempNode.js"; 2 | 3 | declare class SetNode extends TempNode { 4 | sourceNode: Node; 5 | components: string[]; 6 | targetNode: Node; 7 | 8 | constructor(sourceNode: Node, components: string[], targetNode: Node); 9 | } 10 | 11 | export default SetNode; 12 | -------------------------------------------------------------------------------- /types/three/src/nodes/utils/SplitNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { SwizzleOption } from "../tsl/TSLCore.js"; 3 | 4 | export default class SplitNode extends Node { 5 | node: Node; 6 | components: string; 7 | 8 | /** 9 | * @param node the input node 10 | * @param components swizzle like string, default = "x" 11 | */ 12 | constructor(node: Node, components?: SwizzleOption); 13 | 14 | getVectorLength(): number; 15 | } 16 | -------------------------------------------------------------------------------- /types/three/src/nodes/utils/SpriteSheetUVNode.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export default class SpriteSheetUVNode extends Node { 5 | countNode: Node; 6 | uvNode: Node; 7 | frameNode: Node; 8 | 9 | constructor(countNode: Node, uvNode?: Node, frameNode?: Node); 10 | } 11 | 12 | export const spritesheetUV: ( 13 | countNode: NodeRepresentation, 14 | uvNode: NodeRepresentation | null, 15 | frameNode: NodeRepresentation | null, 16 | ) => ShaderNodeObject; 17 | -------------------------------------------------------------------------------- /types/three/src/nodes/utils/SpriteUtils.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export const billboarding: ( 5 | args?: { position?: NodeRepresentation | null; horizontal?: boolean; vertical?: boolean }, 6 | ) => ShaderNodeObject; 7 | -------------------------------------------------------------------------------- /types/three/src/nodes/utils/Timer.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export const time: ShaderNodeObject; 5 | export const deltaTime: ShaderNodeObject; 6 | export const frameId: ShaderNodeObject; 7 | 8 | /** 9 | * @deprecated Use "time" instead. 10 | */ 11 | export const timerLocal: (timeScale?: number) => ShaderNodeObject; 12 | 13 | /** 14 | * @deprecated Use "time" instead. 15 | */ 16 | export const timerGlobal: (timeScale?: number) => ShaderNodeObject; 17 | 18 | /** 19 | * @deprecated Use "deltaTime" instead. 20 | */ 21 | export const timerDelta: (timeScale?: number) => ShaderNodeObject; 22 | -------------------------------------------------------------------------------- /types/three/src/nodes/utils/UVUtils.d.ts: -------------------------------------------------------------------------------- 1 | import OperatorNode from "../math/OperatorNode.js"; 2 | import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export const rotateUV: ( 5 | uv: NodeRepresentation, 6 | rotation: NodeRepresentation, 7 | center?: NodeRepresentation, 8 | ) => ShaderNodeObject; 9 | 10 | export const spherizeUV: ( 11 | uv: NodeRepresentation, 12 | strength: NodeRepresentation, 13 | center?: NodeRepresentation, 14 | ) => ShaderNodeObject; 15 | -------------------------------------------------------------------------------- /types/three/src/nodes/utils/ViewportUtils.d.ts: -------------------------------------------------------------------------------- 1 | import Node from "../core/Node.js"; 2 | import { NodeRepresentation, ShaderNodeObject } from "../tsl/TSLCore.js"; 3 | 4 | export const viewportSafeUV: (uv?: NodeRepresentation | null) => ShaderNodeObject; 5 | -------------------------------------------------------------------------------- /types/three/src/renderers/WebGLRenderTarget.d.ts: -------------------------------------------------------------------------------- 1 | import { RenderTarget, RenderTargetOptions } from "../core/RenderTarget.js"; 2 | import { Texture } from "../textures/Texture.js"; 3 | 4 | export class WebGLRenderTarget extends RenderTarget { 5 | constructor(width?: number, height?: number, options?: RenderTargetOptions); 6 | 7 | readonly isWebGLRenderTarget: true; 8 | } 9 | -------------------------------------------------------------------------------- /types/three/src/renderers/common/Constants.d.ts: -------------------------------------------------------------------------------- 1 | export declare const AttributeType: { 2 | readonly VERTEX: 1; 3 | readonly INDEX: 2; 4 | readonly STORAGE: 3; 5 | readonly INDIRECT: 4; 6 | }; 7 | export type AttributeType = (typeof AttributeType)[keyof typeof AttributeType]; 8 | export declare const GPU_CHUNK_BYTES = 16; 9 | export declare const BlendColorFactor = 211; 10 | export declare const OneMinusBlendColorFactor = 212; 11 | -------------------------------------------------------------------------------- /types/three/src/renderers/common/IndirectStorageBufferAttribute.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedArray } from "../../core/BufferAttribute.js"; 2 | import StorageBufferAttribute from "./StorageBufferAttribute.js"; 3 | 4 | declare class IndirectStorageBufferAttribute extends StorageBufferAttribute { 5 | readonly isIndirectStorageBufferAttribute: true; 6 | 7 | constructor(array: TypedArray, itemSize: number); 8 | } 9 | 10 | export default IndirectStorageBufferAttribute; 11 | -------------------------------------------------------------------------------- /types/three/src/renderers/common/Lighting.d.ts: -------------------------------------------------------------------------------- 1 | import { Camera } from "../../cameras/Camera.js"; 2 | import { Object3D } from "../../core/Object3D.js"; 3 | import { Light } from "../../lights/Light.js"; 4 | import LightsNode from "../../nodes/lighting/LightsNode.js"; 5 | import ChainMap from "./ChainMap.js"; 6 | 7 | declare class Lighting extends ChainMap<[Object3D, Camera], LightsNode> { 8 | constructor(); 9 | 10 | createNode(lights?: Light[]): LightsNode; 11 | 12 | getNode(scene: Object3D, camera: Camera): LightsNode; 13 | } 14 | 15 | export default Lighting; 16 | -------------------------------------------------------------------------------- /types/three/src/renderers/common/Pipeline.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Abstract class for representing pipelines. 3 | * 4 | * @private 5 | * @abstract 6 | */ 7 | declare class Pipeline { 8 | cacheKey: string; 9 | usedTimes: number; 10 | /** 11 | * Constructs a new pipeline. 12 | * 13 | * @param {string} cacheKey - The pipeline's cache key. 14 | */ 15 | constructor(cacheKey: string); 16 | } 17 | export default Pipeline; 18 | -------------------------------------------------------------------------------- /types/three/src/renderers/common/PostProcessing.d.ts: -------------------------------------------------------------------------------- 1 | import { Node } from "../../nodes/Nodes.js"; 2 | import Renderer from "./Renderer.js"; 3 | 4 | declare class PostProcessing { 5 | renderer: Renderer; 6 | outputNode: Node; 7 | 8 | outputColorTransform: boolean; 9 | 10 | needsUpdate: boolean; 11 | 12 | constructor(renderer: Renderer, outputNode?: Node); 13 | 14 | render(): void; 15 | 16 | dispose(): void; 17 | 18 | renderAsync(): Promise; 19 | } 20 | 21 | export default PostProcessing; 22 | -------------------------------------------------------------------------------- /types/three/src/renderers/common/QuadMesh.d.ts: -------------------------------------------------------------------------------- 1 | import { OrthographicCamera } from "../../cameras/OrthographicCamera.js"; 2 | import { Material } from "../../materials/Material.js"; 3 | import { Mesh } from "../../objects/Mesh.js"; 4 | import Renderer from "./Renderer.js"; 5 | 6 | export default class QuadMesh extends Mesh { 7 | camera: OrthographicCamera; 8 | 9 | readonly isQuadMesh: true; 10 | 11 | constructor(material?: Material | null); 12 | 13 | renderAsync(renderer: Renderer): Promise; 14 | 15 | render(renderer: Renderer): void; 16 | } 17 | -------------------------------------------------------------------------------- /types/three/src/renderers/common/Sampler.d.ts: -------------------------------------------------------------------------------- 1 | import TextureNode from "../../nodes/accessors/TextureNode.js"; 2 | import Binding from "./Binding.js"; 3 | 4 | declare class Sampler extends Binding { 5 | texture: TextureNode | null; 6 | version: number; 7 | readonly isSampler: true; 8 | constructor(name: string, texture: TextureNode | null); 9 | } 10 | 11 | export default Sampler; 12 | -------------------------------------------------------------------------------- /types/three/src/renderers/common/StorageBufferAttribute.d.ts: -------------------------------------------------------------------------------- 1 | import { BufferAttribute, TypedArray } from "../../core/BufferAttribute.js"; 2 | 3 | export default class StorageBufferAttribute extends BufferAttribute { 4 | readonly isStorageBufferAttribute: true; 5 | 6 | constructor(array: TypedArray | number, itemSize: number); 7 | } 8 | -------------------------------------------------------------------------------- /types/three/src/renderers/common/StorageInstancedBufferAttribute.d.ts: -------------------------------------------------------------------------------- 1 | import { TypedArray } from "../../core/BufferAttribute.js"; 2 | import { InstancedBufferAttribute } from "../../core/InstancedBufferAttribute.js"; 3 | 4 | export default class StorageInstancedBufferAttribute extends InstancedBufferAttribute { 5 | readonly isStorageInstancedBufferAttribute: true; 6 | 7 | constructor(array: TypedArray | number, itemSize: number); 8 | } 9 | -------------------------------------------------------------------------------- /types/three/src/renderers/common/StorageTexture.d.ts: -------------------------------------------------------------------------------- 1 | import { Texture } from "../../textures/Texture.js"; 2 | 3 | export default class StorageTexture extends Texture { 4 | constructor(width?: number, height?: number); 5 | } 6 | -------------------------------------------------------------------------------- /types/three/src/renderers/common/UniformBuffer.d.ts: -------------------------------------------------------------------------------- 1 | import Buffer from "./Buffer.js"; 2 | /** 3 | * Represents a uniform buffer binding type. 4 | * 5 | * @private 6 | * @augments Buffer 7 | */ 8 | declare class UniformBuffer extends Buffer { 9 | readonly isUniformBuffer: true; 10 | /** 11 | * Constructs a new uniform buffer. 12 | * 13 | * @param {string} name - The buffer's name. 14 | * @param {TypedArray} [buffer=null] - The buffer. 15 | */ 16 | constructor(name?: string, buffer?: null); 17 | } 18 | export default UniformBuffer; 19 | -------------------------------------------------------------------------------- /types/three/src/renderers/common/nodes/NodeSampler.d.ts: -------------------------------------------------------------------------------- 1 | import TextureNode from "../../../nodes/accessors/TextureNode.js"; 2 | import UniformGroupNode from "../../../nodes/core/UniformGroupNode.js"; 3 | import Sampler from "../Sampler.js"; 4 | 5 | declare class NodeSampler extends Sampler { 6 | textureNode: TextureNode | undefined; 7 | groupNode: UniformGroupNode; 8 | constructor(name: string, textureNode: TextureNode | undefined, groupNode: UniformGroupNode); 9 | update(): void; 10 | } 11 | 12 | export default NodeSampler; 13 | -------------------------------------------------------------------------------- /types/three/src/renderers/common/nodes/StandardNodeLibrary.d.ts: -------------------------------------------------------------------------------- 1 | import NodeLibrary from "./NodeLibrary.js"; 2 | declare class StandardNodeLibrary extends NodeLibrary { 3 | constructor(); 4 | } 5 | export default StandardNodeLibrary; 6 | -------------------------------------------------------------------------------- /types/three/src/renderers/shaders/UniformsUtils.d.ts: -------------------------------------------------------------------------------- 1 | import { UniformsGroup } from "../../core/UniformsGroup.js"; 2 | import { IUniform } from "./UniformsLib.js"; 3 | 4 | export function cloneUniforms(uniformsSrc: T): T; 5 | export function mergeUniforms(uniforms: Array<{ [uniform: string]: IUniform }>): { [uniform: string]: IUniform }; 6 | 7 | export function cloneUniformsGroups(src: UniformsGroup[]): UniformsGroup[]; 8 | 9 | declare const UniformsUtils: { 10 | clone: typeof cloneUniforms; 11 | merge: typeof mergeUniforms; 12 | }; 13 | 14 | export { UniformsUtils }; 15 | -------------------------------------------------------------------------------- /types/three/src/renderers/webgl-fallback/WebGLBackend.d.ts: -------------------------------------------------------------------------------- 1 | import { CoordinateSystem } from "../../constants.js"; 2 | import Backend, { BackendParameters } from "../common/Backend.js"; 3 | 4 | export interface WebGLBackendParameters extends BackendParameters { 5 | trackTimestamp?: boolean | undefined; 6 | } 7 | 8 | export default class WebGLBackend extends Backend { 9 | constructor(parameters?: BackendParameters); 10 | 11 | get coordinateSystem(): CoordinateSystem; 12 | 13 | getMaxAnisotropy(): number; 14 | } 15 | -------------------------------------------------------------------------------- /types/three/src/renderers/webgl/WebGLCubeMaps.d.ts: -------------------------------------------------------------------------------- 1 | import { WebGLRenderer } from "../WebGLRenderer.js"; 2 | 3 | export class WebGLCubeMaps { 4 | constructor(renderer: WebGLRenderer); 5 | 6 | get(texture: any): any; 7 | dispose(): void; 8 | } 9 | -------------------------------------------------------------------------------- /types/three/src/renderers/webgl/WebGLCubeUVMaps.d.ts: -------------------------------------------------------------------------------- 1 | import { Texture } from "../../textures/Texture.js"; 2 | import { WebGLRenderer } from "../WebGLRenderer.js"; 3 | 4 | export class WebGLCubeUVMaps { 5 | constructor(renderer: WebGLRenderer); 6 | 7 | get(texture: T): T extends Texture ? Texture : T; 8 | dispose(): void; 9 | } 10 | -------------------------------------------------------------------------------- /types/three/src/renderers/webgl/WebGLExtensions.d.ts: -------------------------------------------------------------------------------- 1 | export class WebGLExtensions { 2 | constructor(gl: WebGLRenderingContext); 3 | 4 | has(name: string): boolean; 5 | init(): void; 6 | get(name: string): any; 7 | } 8 | -------------------------------------------------------------------------------- /types/three/src/renderers/webgl/WebGLGeometries.d.ts: -------------------------------------------------------------------------------- 1 | import { BufferAttribute } from "../../core/BufferAttribute.js"; 2 | import { BufferGeometry } from "../../core/BufferGeometry.js"; 3 | import { Object3D } from "../../core/Object3D.js"; 4 | import { WebGLAttributes } from "./WebGLAttributes.js"; 5 | import { WebGLInfo } from "./WebGLInfo.js"; 6 | 7 | export class WebGLGeometries { 8 | constructor(gl: WebGLRenderingContext, attributes: WebGLAttributes, info: WebGLInfo); 9 | 10 | get(object: Object3D, geometry: BufferGeometry): BufferGeometry; 11 | update(geometry: BufferGeometry): void; 12 | getWireframeAttribute(geometry: BufferGeometry): BufferAttribute; 13 | } 14 | -------------------------------------------------------------------------------- /types/three/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts: -------------------------------------------------------------------------------- 1 | export class WebGLIndexedBufferRenderer { 2 | constructor(gl: WebGLRenderingContext, extensions: any, info: any); 3 | 4 | setMode: (value: any) => void; 5 | setIndex: (index: any) => void; 6 | render: (start: any, count: number) => void; 7 | renderInstances: (start: any, count: number, primcount: number) => void; 8 | renderMultiDraw: (starts: Int32Array, counts: Int32Array, drawCount: number) => void; 9 | renderMultiDrawInstances: ( 10 | starts: Int32Array, 11 | counts: Int32Array, 12 | drawCount: number, 13 | primcount: Int32Array, 14 | ) => void; 15 | } 16 | -------------------------------------------------------------------------------- /types/three/src/renderers/webgl/WebGLObjects.d.ts: -------------------------------------------------------------------------------- 1 | export class WebGLObjects { 2 | constructor(gl: WebGLRenderingContext, geometries: any, attributes: any, info: any); 3 | 4 | update(object: any): any; 5 | dispose(): void; 6 | } 7 | -------------------------------------------------------------------------------- /types/three/src/renderers/webgl/WebGLProperties.d.ts: -------------------------------------------------------------------------------- 1 | export class WebGLProperties { 2 | constructor(); 3 | 4 | has: (object: unknown) => boolean; 5 | get: (object: unknown) => unknown; 6 | remove: (object: unknown) => void; 7 | update: (object: unknown, key: unknown, value: unknown) => unknown; 8 | dispose: () => void; 9 | } 10 | -------------------------------------------------------------------------------- /types/three/src/renderers/webgl/WebGLShader.d.ts: -------------------------------------------------------------------------------- 1 | export function WebGLShader(gl: WebGLRenderingContext, type: string, string: string): WebGLShader; 2 | -------------------------------------------------------------------------------- /types/three/src/renderers/webgl/WebGLUniforms.d.ts: -------------------------------------------------------------------------------- 1 | import { WebGLProgram } from "./WebGLProgram.js"; 2 | import { WebGLTextures } from "./WebGLTextures.js"; 3 | 4 | export class WebGLUniforms { 5 | constructor(gl: WebGLRenderingContext, program: WebGLProgram); 6 | 7 | setValue(gl: WebGLRenderingContext, name: string, value: any, textures: WebGLTextures): void; 8 | setOptional(gl: WebGLRenderingContext, object: any, name: string): void; 9 | 10 | static upload(gl: WebGLRenderingContext, seq: any, values: any[], textures: WebGLTextures): void; 11 | static seqWithValue(seq: any, values: any[]): any[]; 12 | } 13 | -------------------------------------------------------------------------------- /types/three/src/renderers/webgl/WebGLUtils.d.ts: -------------------------------------------------------------------------------- 1 | import { CompressedPixelFormat, PixelFormat, TextureDataType } from "../../constants.js"; 2 | import { WebGLExtensions } from "./WebGLExtensions.js"; 3 | 4 | export class WebGLUtils { 5 | constructor( 6 | gl: WebGLRenderingContext | WebGL2RenderingContext, 7 | extensions: WebGLExtensions, 8 | ); 9 | 10 | convert(p: PixelFormat | CompressedPixelFormat | TextureDataType, colorSpace?: string): number | null; 11 | } 12 | -------------------------------------------------------------------------------- /types/three/src/renderers/webgpu/WebGPURenderer.Nodes.d.ts: -------------------------------------------------------------------------------- 1 | import Renderer, { RendererParameters } from "../common/Renderer.js"; 2 | import { WebGPUBackendParameters } from "./WebGPUBackend.js"; 3 | 4 | export interface WebGPURendererParameters extends RendererParameters, WebGPUBackendParameters { 5 | forceWebGL?: boolean | undefined; 6 | } 7 | 8 | export default class WebGPURenderer extends Renderer { 9 | readonly isWebGPURenderer: true; 10 | 11 | constructor(parameters?: WebGPURendererParameters); 12 | } 13 | -------------------------------------------------------------------------------- /types/three/src/renderers/webgpu/WebGPURenderer.d.ts: -------------------------------------------------------------------------------- 1 | import Renderer, { RendererParameters } from "../common/Renderer.js"; 2 | import { WebGPUBackendParameters } from "./WebGPUBackend.js"; 3 | 4 | export interface WebGPURendererParameters extends RendererParameters, WebGPUBackendParameters { 5 | forceWebGL?: boolean | undefined; 6 | } 7 | 8 | declare class WebGPURenderer extends Renderer { 9 | readonly isWebGPURenderer: true; 10 | 11 | constructor(parameters?: WebGPURendererParameters); 12 | } 13 | 14 | export default WebGPURenderer; 15 | -------------------------------------------------------------------------------- /types/three/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts: -------------------------------------------------------------------------------- 1 | import NodeLibrary from "../../common/nodes/NodeLibrary.js"; 2 | /** 3 | * This version of a node library represents a basic version 4 | * just focusing on lights and tone mapping techniques. 5 | * 6 | * @private 7 | * @augments NodeLibrary 8 | */ 9 | declare class BasicNodeLibrary extends NodeLibrary { 10 | /** 11 | * Constructs a new basic node library. 12 | */ 13 | constructor(); 14 | } 15 | export default BasicNodeLibrary; 16 | -------------------------------------------------------------------------------- /types/three/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts: -------------------------------------------------------------------------------- 1 | import NodeLibrary from "../../common/nodes/NodeLibrary.js"; 2 | /** 3 | * This version of a node library represents the standard version 4 | * used in {@link WebGPURenderer}. It maps lights, tone mapping 5 | * techniques and materials to node-based implementations. 6 | * 7 | * @private 8 | * @augments NodeLibrary 9 | */ 10 | declare class StandardNodeLibrary extends NodeLibrary { 11 | /** 12 | * Constructs a new standard node library. 13 | */ 14 | constructor(); 15 | } 16 | export default StandardNodeLibrary; 17 | -------------------------------------------------------------------------------- /types/three/src/renderers/webgpu/nodes/WGSLNodeFunction.d.ts: -------------------------------------------------------------------------------- 1 | import NodeFunction from "../../../nodes/core/NodeFunction.js"; 2 | 3 | export default class WGSLNodeFunction extends NodeFunction { 4 | constructor(source: string); 5 | getCode(name?: string): string; 6 | } 7 | -------------------------------------------------------------------------------- /types/three/src/renderers/webgpu/nodes/WGSLNodeParser.d.ts: -------------------------------------------------------------------------------- 1 | import NodeParser from "../../../nodes/core/NodeParser.js"; 2 | import WGSLNodeFunction from "./WGSLNodeFunction.js"; 3 | 4 | export default class WGSLNodeParser extends NodeParser { 5 | parseFunction(source: string): WGSLNodeFunction; 6 | } 7 | -------------------------------------------------------------------------------- /types/three/src/textures/CompressedCubeTexture.d.ts: -------------------------------------------------------------------------------- 1 | import { CompressedPixelFormat, TextureDataType } from "../constants.js"; 2 | import { CompressedTexture } from "./CompressedTexture.js"; 3 | 4 | export class CompressedCubeTexture extends CompressedTexture { 5 | readonly isCompressedCubeTexture: true; 6 | readonly isCubeTexture: true; 7 | 8 | constructor( 9 | images: Array<{ width: number; height: number }>, 10 | format?: CompressedPixelFormat, 11 | type?: TextureDataType, 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /types/three/src/utils.d.ts: -------------------------------------------------------------------------------- 1 | export function createCanvasElement(): HTMLCanvasElement; 2 | 3 | export function probeAsync(gl: WebGLRenderingContext, sync: WebGLSync, interval: number): Promise; 4 | -------------------------------------------------------------------------------- /types/three/test/integration/nodes-webgl.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Tests some webgl imports, and everything else that is not imported elsewhere. 3 | */ 4 | 5 | import { ConstNode, NodeUtils } from "three/webgpu"; 6 | 7 | NodeUtils.getNodeChildren(new ConstNode(1)); 8 | NodeUtils.getValueType(1); 9 | NodeUtils.getValueFromType("color"); 10 | -------------------------------------------------------------------------------- /types/three/test/unit/examples/jsm/lines/LineMaterial.ts: -------------------------------------------------------------------------------- 1 | import * as THREE from "three"; 2 | 3 | import { LineMaterial } from "three/addons/lines/LineMaterial.js"; 4 | 5 | const color1 = new LineMaterial({ 6 | color: new THREE.Color("blue"), 7 | }); 8 | 9 | const color2 = new LineMaterial({ 10 | color: "red", 11 | }); 12 | 13 | const color3 = new LineMaterial({ 14 | color: 0xaabbcc, 15 | }); 16 | -------------------------------------------------------------------------------- /types/three/test/unit/examples/jsm/nodes/materialx/lib/mx_hsv.ts: -------------------------------------------------------------------------------- 1 | import { mx_hsvtorgb, mx_rgbtohsv, vec3 } from "three/tsl"; 2 | 3 | mx_hsvtorgb(vec3(0)); 4 | mx_rgbtohsv(vec3(0)); 5 | -------------------------------------------------------------------------------- /types/three/test/unit/examples/jsm/nodes/materialx/lib/mx_transform_color.ts: -------------------------------------------------------------------------------- 1 | import { mx_srgb_texture_to_lin_rec709, vec3 } from "three/tsl"; 2 | 3 | mx_srgb_texture_to_lin_rec709(vec3(0)); 4 | -------------------------------------------------------------------------------- /types/three/test/unit/examples/jsm/postprocessing/SavePass.ts: -------------------------------------------------------------------------------- 1 | import * as THREE from "three"; 2 | import { SavePass } from "three/addons/postprocessing/SavePass.js"; 3 | 4 | let pass = new SavePass(); // $ExpectType SavePass 5 | let rt = pass.renderTarget; // $ExpectType WebGLRenderTarget 6 | 7 | pass = new SavePass(new THREE.WebGLRenderTarget(128, 128)); // $ExpectType SavePass 8 | rt = pass.renderTarget; // $ExpectType WebGLRenderTarget 9 | -------------------------------------------------------------------------------- /types/three/test/unit/examples/jsm/shaders/ACESFilmicToneMappingShader.ts: -------------------------------------------------------------------------------- 1 | import * as THREE from "three"; 2 | import { EffectComposer } from "three/addons/postprocessing/EffectComposer.js"; 3 | import { ShaderPass } from "three/addons/postprocessing/ShaderPass.js"; 4 | import { ACESFilmicToneMappingShader } from "three/addons/shaders/ACESFilmicToneMappingShader.js"; 5 | 6 | const renderer = new THREE.WebGLRenderer(); 7 | const composer = new EffectComposer(renderer); 8 | 9 | const toneMappingPass = new ShaderPass(ACESFilmicToneMappingShader); 10 | toneMappingPass.uniforms.exposure.value = 1.0; 11 | 12 | composer.addPass(toneMappingPass); 13 | -------------------------------------------------------------------------------- /types/three/test/unit/src/audio/AudioContext.ts: -------------------------------------------------------------------------------- 1 | import * as THREE from "three"; 2 | 3 | const context = new AudioContext(); 4 | THREE.AudioContext.setContext(context); 5 | -------------------------------------------------------------------------------- /types/three/test/unit/src/core/Uniform.ts: -------------------------------------------------------------------------------- 1 | import * as THREE from "three"; 2 | 3 | const unknownUniform = new THREE.Uniform("abc" as unknown); 4 | const genericUniform = new THREE.Uniform(4); 5 | const inferredUniform = new THREE.Uniform(4); 6 | -------------------------------------------------------------------------------- /types/three/test/unit/src/extras/Earcut.ts: -------------------------------------------------------------------------------- 1 | import { Earcut } from "three/src/extras/Earcut.js"; 2 | 3 | const triangles = Earcut.triangulate([0, 0, 1, 0, 1, 1, 0, 1]); // $ExpectType number[] 4 | -------------------------------------------------------------------------------- /types/three/test/unit/src/renderers/webgl/WebGLUtils.ts: -------------------------------------------------------------------------------- 1 | import { RGBAFormat, WebGLRenderer, WebGLUtils } from "three"; 2 | 3 | const renderer = new WebGLRenderer(); 4 | 5 | // WebGLUtils Tests. 6 | 7 | const glUtils = new WebGLUtils(renderer.getContext(), renderer.extensions); 8 | glUtils.convert(RGBAFormat); 9 | -------------------------------------------------------------------------------- /types/three/test/unit/src/textures/Texture.ts: -------------------------------------------------------------------------------- 1 | import * as THREE from "three"; 2 | 3 | // part of the code is taken from https://github.com/mrdoob/three.js/pull/22846 4 | 5 | const imageLoader = new THREE.ImageLoader(); 6 | imageLoader.load("/path/to/image.png", image => { 7 | const source = new THREE.Source(image); 8 | 9 | const material = new THREE.MeshBasicMaterial(); 10 | material.map = new THREE.Texture(); 11 | material.map.source = source; 12 | material.map.offset.x = 0.5; 13 | }); 14 | -------------------------------------------------------------------------------- /update-three.sh: -------------------------------------------------------------------------------- 1 | cd three.js 2 | git fetch 3 | git checkout $1 4 | cd .. 5 | git add -A 6 | git commit -m "Update three.js" 7 | --------------------------------------------------------------------------------